Crate cuprate_pruning

source ·
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§

Enums§

Constants§