Skip to content

Conversation

@DracoLi
Copy link
Contributor

@DracoLi DracoLi commented Nov 27, 2025

Why this should be merged

Part of #4500, resolves #4629. Adds config options in coreth to persist blocks in separate height-indexed databases instead of the current key-value store. Disabled by default.

How this works

New coreth config options:

  • block-database-enabled: When true, stores block header/body/receipts in separate height-indexed databases.
  • skip-block-database-auto-migrate: When true, skips migrating existing blocks from KV DB to the block databases. Only new blocks will be stored.

Other Changes:

  • Added newChainDB that creates a blockdb.Database wrapper when enabled.
  • On state sync with no existing block data, initialize the BlockDBs in BlockSyncer.Sync before fetching blocks. This sets the min-height to the smaller block height that will be stored.
  • Returns error if block database is disabled after being previously enabled.

How this was tested

Unit tests & running Mainnet nodes with Block Database enabled.

Need to be documented in RELEASES.md?

Yes

@DracoLi DracoLi changed the base branch from master to dl/evm-blockdb November 27, 2025 22:09
@DracoLi DracoLi changed the base branch from dl/evm-blockdb to master November 27, 2025 22:10
@DracoLi DracoLi force-pushed the dl/evm-blockdb-config branch from a250a31 to 3acd7c8 Compare November 30, 2025 21:36
@DracoLi DracoLi changed the base branch from master to dl/evm-blockdb November 30, 2025 21:36
@DracoLi DracoLi force-pushed the dl/evm-blockdb-config branch from 3acd7c8 to 90d0a9f Compare November 30, 2025 21:39
@ava-labs ava-labs deleted a comment from blacksmith-sh bot Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready 🚦

Development

Successfully merging this pull request may close these issues.

Add config to enable Block Database in coreth

3 participants