Module zebra_state::service::finalized_state::disk_format

source ·
Expand description

Serialization formats for finalized data.

§Correctness

crate::constants::state_database_format_version_in_code() must be incremented each time the database format (column, serialization, etc) changes.

Re-exports§

Modules§

  • Block and transaction serialization formats for finalized data.
  • Chain data serialization formats for finalized data.
  • Serialization formats for the shielded scanner results database.
  • Shielded transfer serialization formats for finalized data.
  • tests 🔒
    Tests for the finalized disk format.
  • Transparent transfer serialization formats for finalized data.
  • In-place format upgrades and format validity checks for the Zebra state database.

Structs§

  • Access database keys or values as raw bytes. Mainly for use in tests, runtime checks, or format compatibility code.

Traits§

  • Helper type for reading types from disk as raw bytes.
  • Helper type for writing types to disk as raw bytes. Also used to convert key types to raw bytes for disk lookups.

Functions§

  • Expands disk_bytes to mem_len, by adding zero bytes at the start of the slice. Used to zero-fill bytes that were discarded during serialization.
  • Truncates mem_bytes to disk_len, by removing zero bytes from the start of the slice. Used to discard unused zero bytes during serialization.