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: syncer spamming RPC and reaching tip of chain (cherry-pick from CDK) #177

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

joanestebanr
Copy link
Contributor

@joanestebanr joanestebanr commented Jan 30, 2025

This is a cherry-pick from CDK PR#289

When any synchronize exceeds the block finalized keep asking continously for same range without any sleep, and don't extend the range to reach the lastest block

expected

  • The idea is to extend the range to go to the lastest block seen on network,
    Here the explanation of how must work the range when we are > finalized:

Logs

2025-01-29T11:11:21.890+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.893+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.896+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.899+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.902+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.906+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.909+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.914+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.919+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}
2025-01-29T11:11:21.923+0100	INFO	sync/evmdownloader.go:138	getting events from blocks 665 to  681. lastFinalizedBlock: 670	{"pid": 156441, "version": "v0.1.0", "syncer": "l1infotreesync"}

…tinously for same range without any sleep, and don't extend the range to reach the lastest block
@joanestebanr joanestebanr self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants