Skip to content

feat(postage): make listener block page size configurable - #5627

Open
gacevicljubisa wants to merge 1 commit into
masterfrom
feat/listener-block-page-size
Open

gacevicljubisa wants to merge 1 commit into
masterfrom
feat/listener-block-page-size

Conversation

@gacevicljubisa

Copy link
Copy Markdown
Member

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Nethermind 2.0.0 lowered the default Receipt.MaxBlockDepth from 10000 to 1000. A single eth_getLogs call spanning more than 1000 blocks is now rejected unless the node has the log index enabled.

The postage listener pages contract logs in fixed ranges of 5000 blocks. Against an RPC backed by Nethermind 2.0.0 with default settings, every paged request fails:

Block range 5000 exceeds the maximum of 1000 blocks per logs request

A node that falls behind the chain head keeps retrying the same range and never catches up.

This PR adds the postage-sync-block-range option (BEE_POSTAGE_SYNC_BLOCK_RANGE). Its default is 1000, so Bee works with default Nethermind settings. Operators whose RPC allows wider ranges can raise it. A value of 0 falls back to the default. Syncing from the embedded postage snapshot keeps its own 50000-block page size.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants