Skip to content

Add option for backfilling blocks (for nodes that have performed state sync) #932

@darioush

Description

@darioush

Context and scope
Networks may desire to use state sync (for the benefit of speed in joining network and smaller database size), yet also desire to maintain full block history (eg, for data availability and preserving ability to recreate state from genesis).
This ticket is to add an option that would allow a node that does not have full block history to request blocks from its peers without executing those blocks. This process should run in the background with minimal overhead for nodes downloading blocks and nodes serving blocks to their peers.

Subnet-evm currently supports serving blocks to peers (this is used in the last step of state sync to fetch the most recent 256 blocks from peers as their hashes are accessible to application code via BLOCKHASH opcode).

Relevant code:

  • Request handling code
  • Example request making code

This feature should also be added to coreth.

Discussion and alternatives
[TODO: add any relevant alternatives, and document limitations of the approach. Notably using the proposed alternative above does not improve data availability for bootstrapping, since the proposerVM header / block is not synced.]

Open questions
[TODO: add any open questions]

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Backlog 🧊

Relationships

None yet

Development

No branches or pull requests

Issue actions