Skip to content

Commit

Permalink
write the batch fork id when we detect an upgrade (erigontech#1187)
Browse files Browse the repository at this point in the history
* write the batch fork id when we detect an upgrade

without this we use the previous fork when sending this first batch in the new fork id to the executors

* fix batch number arguments for executor stream bytes
  • Loading branch information
hexoscott authored Sep 19, 2024
1 parent f2a86f1 commit 5dab990
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion smt/pkg/smt/smt_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *SMT) GenerateFromKVBulk(ctx context.Context, logPrefix string, nodeKeys

maxReachedLevel := 0

deletesWorker := utils.NewWorker(ctx, "smt_save_finished", 1000)
deletesWorker := utils.NewWorker(ctx, "smt_save_finished", 5)

// start a worker to delete finished parts of the tree and return values to save to the db
wg := sync.WaitGroup{}
Expand Down
2 changes: 1 addition & 1 deletion zk/legacy_executor_verifier/legacy_executor_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func (v *LegacyExecutorVerifier) GetWholeBatchStreamBytes(
txsPerBlock[blockNumber] = filteredTransactions
}

entries, err := server.BuildWholeBatchStreamEntriesProto(tx, hermezDb, v.streamServer.GetChainId(), batchNumber, previousBatch, blocks, txsPerBlock, l1InfoTreeMinTimestamps)
entries, err := server.BuildWholeBatchStreamEntriesProto(tx, hermezDb, v.streamServer.GetChainId(), previousBatch, batchNumber, blocks, txsPerBlock, l1InfoTreeMinTimestamps)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 5dab990

Please sign in to comment.