Crate vapcore_snapshot[−][src]
Snapshot creation, restoration, and network service.
Documentation of the format can be found at https://wiki.tetcoin.org/Warp-Sync-Snapshot-Format
Re-exports
pub use self::service::Service; |
pub use self::service::Guard; |
pub use self::service::Restoration; |
pub use self::service::RestorationParams; |
pub use self::io::SnapshotWriter; |
Modules
io | Snapshot i/o. Ways of writing and reading snapshots. This module supports writing and reading snapshots of two different formats: packed and loose. Packed snapshots are written to a single file, and loose snapshots are written to multiple files in one directory. |
service | Snapshot network service implementation. |
Structs
PoaSnapshot | Snapshot creation and restoration for PoA chains. Chunk format: |
PowRebuilder | Rebuilder for proof-of-work chains.
Does basic verification for all blocks, but |
PowSnapshot | Snapshot creation and restoration for PoW chains. This includes blocks from the head of the chain as a loose assurance that the chain is valid. |
SnapshotConfiguration | Configuration for the Snapshot service |
StateRebuilder | Used to rebuild the state trie piece by piece. |
Watcher | A |
Constants
SNAPSHOT_SUBPARTS | number of snapshot subparts, must be a power of 2 in [1; 256] |
Traits
Broadcast | Helper trait for broadcasting a block to take a snapshot at. |
Oracle | Helper trait for transforming hashes to block numbers and checking if syncing. |
Rebuilder | Restore from secondary snapshot chunks. |
SnapshotClient | Snapshot related functionality |
SnapshotComponents | Components necessary for snapshot creation and restoration. |
SnapshotService | The interface for a snapshot network service. This handles: |
Functions
chunk_secondary | Create and write out all secondary chunks to disk, returning a vector of all the hashes of secondary chunks created. |
chunk_state | Walk the given state database starting from the given root,
creating chunks and writing them out.
|
chunker | Create a factory for building snapshot chunks and restoring from them.
|
take_snapshot | Take a snapshot using the given blockchain, starting block hash, and database, writing into the given writer. |
verify_old_block | Verify an old block with the given header, engine, blockchain, body. If |