zebra_state::service::finalized_state::disk_format::block

Constant MAX_ON_DISK_HEIGHT

source
pub const MAX_ON_DISK_HEIGHT: Height;
Expand description

The maximum value of an on-disk serialized Height.

This allows us to store OutputLocations in 8 bytes, which makes database searches more efficient.

ยงConsensus

This maximum height supports on-disk storage of blocks until around 2050.

Since Zebra only stores fully verified blocks on disk, blocks with heights larger than this height are rejected before reaching the database. (It would take decades to generate a valid chain this high.)