Skip to main content

SolanaError

Type Alias SolanaError 

Source
pub type SolanaError = Error;
👎Deprecated since 1.0.0: Renamed to Error

Aliased Type§

pub enum SolanaError {
    TreeFull {
        capacity: usize,
        attempted_index: usize,
    },
    InvalidProof,
    UnknownRoot,
    InvalidLength {
        expected: usize,
        actual: usize,
    },
    ParseError(String),
    FieldOverflow,
    InvalidTreeConfig(String),
    LeafIndexOutOfBounds {
        index: u32,
        tree_size: u32,
    },
}

Variants§

§

TreeFull

Merkle tree has reached maximum capacity.

This occurs when attempting to insert a leaf into a full tree. The tree capacity is 2^levels.

Fields

§capacity: usize

Maximum number of leaves the tree can hold.

§attempted_index: usize

The index that was attempted.

§

InvalidProof

Invalid Merkle proof.

The proof does not verify against the expected root.

§

UnknownRoot

Root not found in history.

The provided root hash is not in the tree’s root history buffer.

§

InvalidLength

Input data has invalid length.

Expected a specific number of bytes but received a different amount.

Fields

§expected: usize

Expected length in bytes.

§actual: usize

Actual length received.

§

ParseError(String)

Parsing failed.

Failed to parse input data (e.g., from string representation).

§

FieldOverflow

Arithmetic overflow in field operations.

An arithmetic operation would overflow the field modulus.

§

InvalidTreeConfig(String)

Invalid tree configuration.

The tree parameters are invalid (e.g., zero levels).

§

LeafIndexOutOfBounds

Leaf index out of bounds.

The requested leaf index does not exist in the tree.

Fields

§index: u32

The requested index.

§tree_size: u32

The current number of leaves in the tree.