Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stage_baches): rpc resequence stop stage on unwind #1297

Merged
merged 81 commits into from
Nov 7, 2024

Conversation

V-Staykov
Copy link
Collaborator

No description provided.

@cla-bot cla-bot bot added the cla-signed label Oct 8, 2024
Copy link

sonarcloud bot commented Oct 9, 2024

revitteth
revitteth previously approved these changes Oct 15, 2024
@V-Staykov
Copy link
Collaborator Author

@hexoscott I removed an unneeded sleep and now only one is left that is waiting 1s between checks for new block on the datastream. I ran locally a sequencer + rpc and it doesn't skip blocks for me.

@hexoscott
Copy link
Collaborator

Awesome! Working perfectly now with no delay between sequencer and RPC

afa7789
afa7789 previously approved these changes Oct 31, 2024
hexoscott
hexoscott previously approved these changes Nov 5, 2024
@cffls
Copy link

cffls commented Nov 7, 2024

Resequence test is passing now. @V-Staykov please take a look at the fix. I am not sure if this is the optimal solution, because the RPC node took longer to catch up the reorg so I had to increase the timeout.

Here is how I came up with the fix:

  • Download the RPC log from previous failed run: https://github.com/0xPolygonHermez/cdk-erigon/actions/runs/11708016946
  • The node detected that DS was behind, which meant a reorg has happened.
  • Then the node immediate failed with an error when trying to find the latest common ancestor. [cdk-erigon-node-001] [EROR] [11-06|18:50:07.103] Error while executing stage err="[3/15 Batches] GetL2BlockByNumber: failed to get l2 block 50 from datastream: getL2BlockByNumber: initiateDownloadBookmark: afterStartCommand: readResultEntry: client already started: Already started".

From the error, it seems clear that the DS connection established before should be stopped before setting a new bookmark.

Screenshot 2024-11-06 at 7 58 09 PM

@revitteth revitteth merged commit 6e8775f into zkevm Nov 7, 2024
13 of 14 checks passed
@revitteth revitteth deleted the fix-stage-batches-resequence branch November 7, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants