@@ -22,8 +22,6 @@ export class MpcProverService {
2222 orderId : OrderId ;
2323 side : Side ;
2424 circuit : CompiledCircuit ;
25- // TODO: infer number of public inputs
26- numPublicInputs : number ;
2725 } ,
2826 ) {
2927 return await Promise . all (
@@ -47,8 +45,6 @@ class MpcProverPartyService {
4745 side : Side ;
4846 inputShared : string ;
4947 circuit : CompiledCircuit ;
50- // TODO: infer number of public inputs
51- numPublicInputs : number ;
5248 } ) {
5349 // TODO(security): authorization
5450 if ( this . #storage. has ( params . orderId ) ) {
@@ -64,7 +60,6 @@ class MpcProverPartyService {
6460
6561 this . #tryExecuteOrder( params . orderId , {
6662 circuit : params . circuit ,
67- numPublicInputs : params . numPublicInputs ,
6863 } ) ;
6964
7065 return await order . result . promise ;
@@ -74,7 +69,6 @@ class MpcProverPartyService {
7469 orderId : OrderId ,
7570 params : {
7671 circuit : CompiledCircuit ;
77- numPublicInputs : number ;
7872 } ,
7973 ) {
8074 const order = this . #storage. get ( orderId ) ;
@@ -107,7 +101,6 @@ class MpcProverPartyService {
107101 partyIndex : this . partyIndex ,
108102 input0Shared : inputsShared [ 0 ] ,
109103 input1Shared : inputsShared [ 1 ] ,
110- numPublicInputs : params . numPublicInputs ,
111104 } ) ;
112105 const proofHex = ethers . hexlify ( proof ) ;
113106 order . result . resolve ( proofHex ) ;
@@ -126,8 +119,6 @@ async function proveAsParty(params: {
126119 circuit : CompiledCircuit ;
127120 input0Shared : string ;
128121 input1Shared : string ;
129- // TODO: infer number of public inputs
130- numPublicInputs : number ;
131122} ) {
132123 console . log ( "proving as party" , params . partyIndex ) ;
133124 return await inWorkingDir ( async ( workingDir ) => {
@@ -170,7 +161,7 @@ async function proveAsParty(params: {
170161 ethers . concat ( [
171162 proofData . slice ( 0 , 2 ) ,
172163 proofData . slice ( 6 , 100 ) ,
173- proofData . slice ( 100 + params . numPublicInputs * 32 ) ,
164+ proofData . slice ( 100 + publicInputs . length * 32 ) ,
174165 ] ) ,
175166 ) ;
176167
0 commit comments