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§
pub use block::TransactionIndex;
pub use block::TransactionLocation;
pub use block::MAX_ON_DISK_HEIGHT;
pub use transparent::OutputIndex;
pub use transparent::OutputLocation;
pub use scan::SaplingScannedDatabaseEntry;
pub use scan::SaplingScannedDatabaseIndex;
pub use scan::SaplingScannedResult;
pub use scan::SaplingScanningKey;
pub use tests::KV;
Modules§
- block
- Block and transaction serialization formats for finalized data.
- chain
- Chain data serialization formats for finalized data.
- scan
- Serialization formats for the shielded scanner results database.
- shielded
- Shielded transfer serialization formats for finalized data.
- tests 🔒
- Tests for the finalized disk format.
- transparent
- Transparent transfer serialization formats for finalized data.
- upgrade
- In-place format upgrades and format validity checks for the Zebra state database.
Structs§
- RawBytes
- Access database keys or values as raw bytes. Mainly for use in tests, runtime checks, or format compatibility code.
Traits§
- From
Disk - Helper type for reading types from disk as raw bytes.
- Into
Disk - Helper type for writing types to disk as raw bytes. Also used to convert key types to raw bytes for disk lookups.
Functions§
- expand_
zero_ be_ bytes - Expands
disk_bytes
tomem_len
, by adding zero bytes at the start of the slice. Used to zero-fill bytes that were discarded during serialization. - truncate_
zero_ be_ bytes - Truncates
mem_bytes
todisk_len
, by removing zero bytes from the start of the slice. Used to discard unused zero bytes during serialization.