Expand description
§Pruning Mechanism for Monero
This crate provides an implementation of the pruning mechanism used in Monero.
The main data structure, PruningSeed, encapsulates the logic for creating and manipulating pruning seeds,
which determine the set of blocks to be pruned from the blockchain.
PruningSeed also contains a method for checking if a pruning seed is valid for Monero rules (must only be
split into 8 parts):
use cuprate_pruning::PruningSeed;
let seed: u32 = 386; // the seed you want to check is valid
match PruningSeed::decompress_p2p_rules(seed) {
    Ok(seed) => seed, // seed is valid
    Err(e) => panic!("seed is invalid")
};Structs§
- Decompressed
Pruning Seed  - This represents a valid Monero pruning seed.
 
Enums§
- Pruning
Error  - Pruning
Seed  - A valid pruning seed for a Monero node.
 
Constants§
- CRYPTONOTE_
PRUNING_ LOG_ STRIPES  - The default log stripes for Monero pruning.
 - CRYPTONOTE_
PRUNING_ STRIPE_ SIZE  - The amount of blocks that peers keep before another stripe starts storing blocks.
 - CRYPTONOTE_
PRUNING_ TIP_ BLOCKS  - The amount of blocks from the top of the chain that should not be pruned.