It sync from L1 and set as batch.stamp = L1block.tstamp for ETROG or maxSequenceTimestamp from Sequence Call in Elderberry
So, it produce in some situations that a batch have been updated from L2 after being sequenced, so the timestamp of same batch from L1 is minor that the moment that was syncrhonized
Fix implemented
Synchronizer update state.batch timestamp when the batch is synced from L1:
All batches in same sequence is going to have same tstamp
For etrog and elderberry forks the virtual_batch.timestamp_batch_etrog is going to be equal to state.batch.timestamp
Steps to reproduce the behaviour
Backtrace
error: oldBatch(2013500) tstamp=1714134808 > openingBatch(2013501)=1714134037 err: timestamp needs to be greater or equal
/src/log/log.go:142 github.com/0xPolygonHermez/zkevm-node/log.appendStackTraceMaybeArgs()
/src/log/log.go:217 github.com/0xPolygonHermez/zkevm-node/log.Error()
/src/synchronizer/synchronizer.go:673 github.com/0xPolygonHermez/zkevm-node/synchronizer.(*ClientSynchronizer).ProcessBlockRange()
/src/synchronizer/synchronizer.go:579 github.com/0xPolygonHermez/zkevm-node/synchronizer.(*ClientSynchronizer).syncBlocksSequential()
/src/synchronizer/synchronizer.go:421 github.com/0xPolygonHermez/zkevm-node/synchronizer.(*ClientSynchronizer).Sync()
/src/cmd/run.go:339 main.runSynchronizer()
When submitting logs: please submit them as text and not screenshots.
System information
zkEVM Node version:
v0.6.6
Network:Mainnet
Expected behaviour
The synchronizer must sync from L1 and L2
Actual behaviour
The reason behind this error is:
So, it produce in some situations that a batch have been updated from L2 after being sequenced, so the timestamp of same batch from L1 is minor that the moment that was syncrhonized
Fix implemented
Synchronizer update state.batch timestamp when the batch is synced from L1:
Steps to reproduce the behaviour
Backtrace
When submitting logs: please submit them as text and not screenshots.