@@ -46,48 +46,48 @@ pub enum State {
4646 // challenge sent, waiting for challenge response
4747 ReceivedCommitments {
4848 commit_msg_id : MsgId ,
49- polynomial_commitments : PolynomialCommitments ,
50- garbling_table_commitments : GarblingTableCommitments ,
49+ polynomial_commitments : Box < PolynomialCommitments > ,
50+ garbling_table_commitments : Box < GarblingTableCommitments > ,
5151 } ,
5252 // got challenge ack, now waiting for challenge response
5353 WaitChallengeResponse {
54- polynomial_commitments : PolynomialCommitments ,
55- garbling_table_commitments : GarblingTableCommitments ,
54+ polynomial_commitments : Box < PolynomialCommitments > ,
55+ garbling_table_commitments : Box < GarblingTableCommitments > ,
5656 } ,
5757 // received challenge response
5858 // verified shares are correct
5959 // triggered garb table verification for opened tables
6060 // waiting for verification to complete
6161 ReceivedChallegeResponse {
6262 challenge_response_msg_id : MsgId ,
63- polynomial_commitments : PolynomialCommitments ,
64- garbling_table_commitments : GarblingTableCommitments ,
65- opened_input_shares : OpenedInputShares ,
66- opened_output_shares : OpenedOutputShares ,
67- reserved_setup_input_shares : ReservedSetupInputShares ,
68- opened_garbling_seeds : OpenedGarblingSeeds ,
63+ polynomial_commitments : Box < PolynomialCommitments > ,
64+ garbling_table_commitments : Box < GarblingTableCommitments > ,
65+ opened_input_shares : Box < OpenedInputShares > ,
66+ opened_output_shares : Box < OpenedOutputShares > ,
67+ reserved_setup_input_shares : Box < ReservedSetupInputShares > ,
68+ opened_garbling_seeds : Box < OpenedGarblingSeeds > ,
6969 } ,
7070 // verified commitments are valid for opened tables
7171 // triggered receive and verify remaining tables
7272 // waiting for tables to be received
7373 VerifiedGarblingTableCommitments {
74- polynomial_commitments : PolynomialCommitments ,
75- garbling_table_commitments : GarblingTableCommitments ,
76- challenge_indices : ChallengeIndices ,
77- opened_input_shares : OpenedInputShares ,
78- opened_output_shares : OpenedOutputShares ,
79- reserved_setup_input_shares : ReservedSetupInputShares ,
80- opened_garbling_seeds : OpenedGarblingSeeds ,
74+ polynomial_commitments : Box < PolynomialCommitments > ,
75+ garbling_table_commitments : Box < GarblingTableCommitments > ,
76+ challenge_indices : Box < ChallengeIndices > ,
77+ opened_input_shares : Box < OpenedInputShares > ,
78+ opened_output_shares : Box < OpenedOutputShares > ,
79+ reserved_setup_input_shares : Box < ReservedSetupInputShares > ,
80+ opened_garbling_seeds : Box < OpenedGarblingSeeds > ,
8181 } ,
8282 SetupComplete {
8383 // TODO: remove states that are not needed
84- polynomial_commitments : PolynomialCommitments ,
85- garbling_table_commitments : GarblingTableCommitments ,
86- challenge_indices : ChallengeIndices ,
87- opened_input_shares : OpenedInputShares ,
88- opened_output_shares : OpenedOutputShares ,
89- reserved_setup_input_shares : ReservedSetupInputShares ,
90- opened_garbling_seeds : OpenedGarblingSeeds ,
84+ polynomial_commitments : Box < PolynomialCommitments > ,
85+ garbling_table_commitments : Box < GarblingTableCommitments > ,
86+ challenge_indices : Box < ChallengeIndices > ,
87+ opened_input_shares : Box < OpenedInputShares > ,
88+ opened_output_shares : Box < OpenedOutputShares > ,
89+ reserved_setup_input_shares : Box < ReservedSetupInputShares > ,
90+ opened_garbling_seeds : Box < OpenedGarblingSeeds > ,
9191 } ,
9292 SetupConsumed {
9393 by_deposit : StateMachinePairId ,
@@ -115,7 +115,7 @@ pub enum Action {
115115 SendCommitAck ( MsgId ) ,
116116 SendChallengeMsg ( ChallengeMsg ) ,
117117 SendChallengeResponseAck ( MsgId ) ,
118- VerifyOpenedGarbTableCommitments ( OpenedGarblingSeeds , GarblingTableCommitments ) ,
118+ VerifyOpenedGarbTableCommitments ( Box < OpenedGarblingSeeds > , Box < GarblingTableCommitments > ) ,
119119 ReceiveGarblingTables ( ( ) ) , // TODO: types
120120}
121121
@@ -183,7 +183,7 @@ fn stf(config: &Config, state: State, input: Input) -> State {
183183 opened_garbling_seeds,
184184 ..
185185 } => {
186- let challenge_indices = generate_challenge_indices ( & config. seed ) ;
186+ let challenge_indices = Box :: new ( generate_challenge_indices ( & config. seed ) ) ;
187187 State :: VerifiedGarblingTableCommitments {
188188 polynomial_commitments,
189189 garbling_table_commitments,
@@ -227,7 +227,7 @@ fn emit_actions(config: &Config, state: &State) -> Vec<Action> {
227227 match state {
228228 State :: Initialized => vec ! [ ] ,
229229 State :: ReceivedCommitments { commit_msg_id, .. } => {
230- let challenge_indices = generate_challenge_indices ( & config. seed ) ;
230+ let challenge_indices = Box :: new ( generate_challenge_indices ( & config. seed ) ) ;
231231 vec ! [
232232 Action :: SendCommitAck ( * commit_msg_id) ,
233233 Action :: SendChallengeMsg ( ChallengeMsg { challenge_indices } ) ,
@@ -243,8 +243,8 @@ fn emit_actions(config: &Config, state: &State) -> Vec<Action> {
243243 vec ! [
244244 Action :: SendChallengeResponseAck ( * challenge_response_msg_id) ,
245245 Action :: VerifyOpenedGarbTableCommitments (
246- * opened_garbling_seeds,
247- * garbling_table_commitments,
246+ opened_garbling_seeds. clone ( ) ,
247+ garbling_table_commitments. clone ( ) ,
248248 ) ,
249249 ]
250250 }
0 commit comments