Forming a Ring: ETH v64 Wire Protocol Ring

Making Pruned State Explicit

Problem

ETH peers are not guaranteed to have all blockchain and state information stored. The most notable example is that a fast-sync node does not store all archival state. Further, there are emerging proposals to drop older blockchain data; making this problem worse in the future.

Headers Bodies Receipts State
Light None None None None
Pruned All Recent Recent Recent
Fast All All All Recent
Archive All All All All

The table is meant to compare the different types of peers seen on the network and what blockchain and state data they hold; demonstrating that there is somewhat of a hierarchy and way to generalize what any given peer holds. Going bottom up:

  • Archive Nodes (geth --syncmode full --gcmode archive): Contains all historical information from genesis until the chain head.
  • Fast Nodes (geth --syncmode fast --gcmode full): Contains all historical chain data, but only the recent 127(ish) state histories.
  • Pruned Nodes: Are nodes that also choose to drop old blockchain state. There are currently unofficial or experimental builds.
  • Light Nodes: Run the light protocol and are really not guaranteed to have anything.

Proposal

Make pruned state apparent by providing guarantees for data availability from a given client. Specifically, to expose these guarantees as additional "window" fields on the STATUS message first exchanged between ETH peers. This allows for better abstractions to orchestrate data exchanges amongst peers.

The “window” corresponds to the maximum distance behind the peer’s current chain head where a given data component will be guaranteed by a client. It is the responsibility of the client to track its peers height to know the current range supported by a window.

HeaderWindow BodyWindow ReceiptWindow StateWindow
Light 0 0 0 0
Pruned MaxValue 1,000 1,000 127
Fast MaxValue MaxValue MaxValue 127
Archive MaxValue MaxValue MaxValue MaxValue

Considerations

  • Older information will become more and more scarce over time (hopefully to some limit with good actors).
  • Care will have to be taken amongst peers to have policies to ensure they are connecting to the right peers there will be orders of magnitude more storing minimal state than the maximal state.
3 Likes