Skip to content

fix: syncer spamming RPC and reaching tip of chain#289

Merged
joanestebanr merged 4 commits intorelease/v0.5.1from
fix/syncers_spamming_rpc
Jan 30, 2025
Merged

fix: syncer spamming RPC and reaching tip of chain#289
joanestebanr merged 4 commits intorelease/v0.5.1from
fix/syncers_spamming_rpc

Conversation

@joanestebanr
Copy link
Copy Markdown
Contributor

@joanestebanr joanestebanr commented Jan 29, 2025

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:

Ask logs for current range [ n - m ]

  • Returns log block x -> next_range = [ x - ( x+ block_chunk) ]
  • Returns empty:
  • if ( fbn - n > block_chunck ) -> create empty block with getHeader(fbn+block_chunk)
  • we have enough blocks on finalized zone to create a empty block
  • next_range = [ (fbn + block_chunck) - m + block_chunck ]
  • else
  • We just increase the range:
  • next_range = [ n - m + block_chunck ]
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"}

@joanestebanr joanestebanr changed the base branch from develop to release/v0.5.1 January 29, 2025 10:23
@joanestebanr joanestebanr changed the title fix: hash meddler error (#285) (#288) fix: syncer spamming RPC and reaching head of chain Jan 29, 2025
@joanestebanr joanestebanr self-assigned this Jan 29, 2025
@sonarqubecloud
Copy link
Copy Markdown

@joanestebanr joanestebanr marked this pull request as ready for review January 29, 2025 11:54
@joanestebanr joanestebanr changed the title fix: syncer spamming RPC and reaching head of chain fix: syncer spamming RPC and reaching tip of chain Jan 29, 2025
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.

3 participants