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§
- This represents a valid Monero pruning seed.
Enums§
- A valid pruning seed for a Monero node.
Constants§
- The default log stripes for Monero pruning.
- The amount of blocks that peers keep before another stripe starts storing blocks.
- The amount of blocks from the top of the chain that should not be pruned.