Skip to content

feat(plugins): backfill section bloom - #81

Open
317787106 wants to merge 7 commits into
developfrom
feature/backfill_sectionbloom
Open

feat(plugins): backfill section bloom#81
317787106 wants to merge 7 commits into
developfrom
feature/backfill_sectionbloom

Conversation

@317787106

@317787106 317787106 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

This PR adds an offline Toolkit command for rebuilding historical SectionBloom data:

java -jar Toolkit.jar db backfill-bloom

The command reconstructs the section-bloom database from existing records in transactionRetStore. It supports an inclusive block range, automatically detects the available historical range, and limits the range to the latest solidified block.

Processing is divided by 2,048-block bloom sections and can run concurrently. The command also provides terminal progress, periodic progress logs, execution statistics, parameter validation, and resumable/idempotent processing.

This PR also registers the command in the database toolkit, adds the required chainbase dependency, and documents its usage and operational requirements.

Why are these changes required?

If isJsonRpcFilterEnabled was disabled while historical blocks were processed, the corresponding SectionBloom data is unavailable after the option is enabled. As a result, eth_getLogs cannot efficiently filter those historical blocks by contract address or topics.

This command allows operators to rebuild the missing SectionBloom data directly from the existing transaction result database without replaying the blockchain.

This PR has been tested by:

  • Added DbBackfillBloomTest
  • Covered parameter validation, default block-range detection, range adjustment, missing or invalid databases, progress reporting, processing failures, summary output, and help output
  • Checkstyle and related PR checks

Follow up

None.

Extra details

The node and any other processes accessing the database must be stopped before running the command. Historical transaction storage must have been enabled when the target blocks were processed.

The command can be safely rerun after interruption, but multiple backfill processes must not operate on the same database concurrently.

@317787106 317787106 changed the title Feature/backfill sectionbloom feat(tookit): backfill sectionbloom Jul 24, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 24, 2026
Repository owner deleted a comment from github-actions Bot Jul 24, 2026
@317787106 317787106 changed the title feat(tookit): backfill sectionbloom feat(plugins): backfill section bloom Jul 24, 2026
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.

1 participant