use snarkvm_console_collections::merkle_tree::MerklePath;
use snarkvm_console_network::BHPMerkleTree;
pub const BLOCKS_DEPTH: u8 = 32;
pub const HEADER_DEPTH: u8 = 3;
pub const FINALIZE_ID_DEPTH: u8 = TRANSACTION_DEPTH + 4; pub const FINALIZE_OPERATIONS_DEPTH: u8 = TRANSACTIONS_DEPTH;
pub const RATIFICATIONS_DEPTH: u8 = 16;
pub const SUBDAG_CERTIFICATES_DEPTH: u8 = 16;
pub const TRANSACTIONS_DEPTH: u8 = 20;
pub const TRANSACTION_DEPTH: u8 = 5;
pub const TRANSITION_DEPTH: u8 = 5;
pub type BlockTree<N> = BHPMerkleTree<N, BLOCKS_DEPTH>;
pub type BlockPath<N> = MerklePath<N, BLOCKS_DEPTH>;
pub type HeaderTree<N> = BHPMerkleTree<N, HEADER_DEPTH>;
pub type HeaderPath<N> = MerklePath<N, HEADER_DEPTH>;
pub type RatificationsTree<N> = BHPMerkleTree<N, RATIFICATIONS_DEPTH>;
pub type RatificationsPath<N> = MerklePath<N, RATIFICATIONS_DEPTH>;
pub type TransactionsTree<N> = BHPMerkleTree<N, TRANSACTIONS_DEPTH>;
pub type TransactionsPath<N> = MerklePath<N, TRANSACTIONS_DEPTH>;
pub type TransactionTree<N> = BHPMerkleTree<N, TRANSACTION_DEPTH>;
pub type TransactionPath<N> = MerklePath<N, TRANSACTION_DEPTH>;
pub type ExecutionTree<N> = BHPMerkleTree<N, TRANSACTION_DEPTH>;
pub type DeploymentTree<N> = BHPMerkleTree<N, TRANSACTION_DEPTH>;
pub type TransitionTree<N> = BHPMerkleTree<N, TRANSITION_DEPTH>;
pub type TransitionPath<N> = MerklePath<N, TRANSITION_DEPTH>;
#[cfg(test)]
mod tests {
use super::*;
use snarkvm_console_network::Network;
type CurrentNetwork = snarkvm_console_network::MainnetV0;
#[test]
fn test_transaction_depth_is_correct() {
assert_eq!((2u32.checked_pow(TRANSACTION_DEPTH as u32).unwrap() - 1) as usize, CurrentNetwork::MAX_FUNCTIONS);
}
#[test]
fn test_transition_depth_is_correct() {
assert_eq!(
2u32.checked_pow(TRANSITION_DEPTH as u32).unwrap() as usize,
CurrentNetwork::MAX_INPUTS + CurrentNetwork::MAX_OUTPUTS
);
}
}