@@ -35,6 +35,8 @@ const (
3535
3636 ethTxManagerOwner = "aggregator"
3737 monitoredIDFormat = "proof-from-%v-to-%v"
38+
39+ forkId9 = uint64 (9 )
3840)
3941
4042type finalProofMsg struct {
@@ -182,7 +184,7 @@ func (a *Aggregator) Channel(stream prover.AggregatorService_ChannelServer) erro
182184 log .Info ("Establishing stream connection with prover" )
183185
184186 // Check if prover supports the required Fork ID
185- if ! prover .SupportsForkID (a . cfg . ForkId ) {
187+ if ! prover .SupportsForkID (forkId9 ) {
186188 err := errors .New ("prover does not support required fork ID" )
187189 log .Warn (FirstToUpper (err .Error ()))
188190 return err
@@ -1032,9 +1034,13 @@ func (a *Aggregator) buildInputProver(ctx context.Context, batchToVerify *state.
10321034 for _ , l2blockRaw := range batchRawData .Blocks {
10331035 _ , contained := l1InfoTreeData [l2blockRaw .IndexL1InfoTree ]
10341036 if ! contained && l2blockRaw .IndexL1InfoTree != 0 {
1035- l1InfoTreeExitRootStorageEntry , err := a .State .GetL1InfoRootLeafByIndex (ctx , l2blockRaw .IndexL1InfoTree , nil )
1036- if err != nil {
1037- return nil , err
1037+ l1InfoTreeExitRootStorageEntry := state.L1InfoTreeExitRootStorageEntry {}
1038+ l1InfoTreeExitRootStorageEntry .Timestamp = time .Unix (0 , 0 )
1039+ if l2blockRaw .IndexL1InfoTree <= leaves [len (leaves )- 1 ].L1InfoTreeIndex {
1040+ l1InfoTreeExitRootStorageEntry , err = a .State .GetL1InfoRootLeafByIndex (ctx , l2blockRaw .IndexL1InfoTree , nil )
1041+ if err != nil {
1042+ return nil , err
1043+ }
10381044 }
10391045
10401046 // Calculate smt proof
@@ -1087,7 +1093,7 @@ func (a *Aggregator) buildInputProver(ctx context.Context, batchToVerify *state.
10871093 OldAccInputHash : previousBatch .AccInputHash .Bytes (),
10881094 OldBatchNum : previousBatch .BatchNumber ,
10891095 ChainId : a .cfg .ChainID ,
1090- ForkId : a . cfg . ForkId ,
1096+ ForkId : forkId9 ,
10911097 BatchL2Data : batchToVerify .BatchL2Data ,
10921098 L1InfoRoot : l1InfoRoot .Bytes (),
10931099 TimestampLimit : uint64 (batchToVerify .Timestamp .Unix ()),
0 commit comments