0xPolygonHermez / zkevm-node

Go implementation of a node that operates the Polygon zkEVM Network
Other
531 stars 685 forks source link

Update permission less rpc's batch time #3580

Closed zjg555543 closed 4 months ago

zjg555543 commented 5 months ago

What does this PR do?

It fixes the issue of inaccurate timestamps on RPC nodes when batching, which maybe leads to older batch timestamps being greater than newer ones after database recovery.

Issue: The trust batch of the Permitionless RPC retrieves directly from theTrust RPC and using local timestamps, but there's no subsequent update.

Solution: Upon detecting an L1 sequence batch event, the Permitionless RPC updates its local batch timestamp to the MaxSequenceTimestamp within L1.

Reviewers

Main reviewers:

Codeowner reviewers: