From 3c3a939a7cf8e9e75783ae9f90e10258744e8e99 Mon Sep 17 00:00:00 2001 From: Davidson Souza Date: Wed, 11 Mar 2026 14:31:30 -0300 Subject: [PATCH] chore: bump rustreexo --- Cargo.lock | 78 ++++++++++++++++++- Cargo.toml | 2 +- .../benches/chain_state_bench.rs | 2 +- crates/floresta-chain/src/extensions.rs | 4 +- .../src/pruned_utreexo/chain_state.rs | 18 +++-- .../src/pruned_utreexo/chain_state_builder.rs | 2 +- .../src/pruned_utreexo/chainparams.rs | 2 +- .../src/pruned_utreexo/consensus.rs | 11 ++- .../src/pruned_utreexo/error.rs | 5 +- .../floresta-chain/src/pruned_utreexo/mod.rs | 6 +- .../src/pruned_utreexo/partial_chain.rs | 18 ++--- .../src/pruned_utreexo/udata.rs | 9 ++- .../floresta-wire/src/p2p_wire/block_proof.rs | 16 ++-- .../floresta-wire/src/p2p_wire/node/blocks.rs | 2 +- .../src/p2p_wire/node/chain_selector_ctx.rs | 6 +- .../src/p2p_wire/node/running_ctx.rs | 2 +- .../src/p2p_wire/node_interface.rs | 2 +- .../src/p2p_wire/tests/chain_selector.rs | 4 +- .../floresta/examples/chainstate-builder.rs | 2 +- 19 files changed, 139 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7a367208..a62bf3ea7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,6 +292,24 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoin-consensus-encoding" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d7ca3dc8ff835693ad73bf1596240c06f974a31eeb3f611aaedf855f1f2725" +dependencies = [ + "bitcoin-internals 0.5.0", +] + +[[package]] +name = "bitcoin-consensus-encoding" +version = "1.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cd69023e5db2f3f7241672de6be29408373ba0ff407e7fda71d70d728bec05a" +dependencies = [ + "bitcoin-internals 0.5.0", +] + [[package]] name = "bitcoin-internals" version = "0.3.0" @@ -306,6 +324,18 @@ name = "bitcoin-internals" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a90bbbfa552b49101a230fb2668f3f9ef968c81e6f83cf577e1d4b80f689e1aa" +dependencies = [ + "hex-conservative 0.3.2", +] + +[[package]] +name = "bitcoin-internals" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a30a22d1f112dde8e16be7b45c63645dc165cef254f835b3e1e9553e485cfa64" +dependencies = [ + "hex-conservative 0.3.2", +] [[package]] name = "bitcoin-io" @@ -322,6 +352,17 @@ dependencies = [ "bitcoin-internals 0.4.2", ] +[[package]] +name = "bitcoin-io" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1a5e0e2112a702941a5c82fe0a31954c2900686053c33f59af64feab61d981" +dependencies = [ + "bitcoin-consensus-encoding 1.0.0-rc.3", + "bitcoin-internals 0.4.2", + "bitcoin_hashes 0.18.0", +] + [[package]] name = "bitcoin-units" version = "0.1.2" @@ -353,6 +394,28 @@ dependencies = [ "hex-conservative 0.3.2", ] +[[package]] +name = "bitcoin_hashes" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb7fdb8e07d365e9cd16993fb3c4e04f734c66e334b9cb3c0479fa5437b0ed5" +dependencies = [ + "bitcoin-consensus-encoding 1.0.0-rc.3", + "bitcoin-internals 0.4.2", + "hex-conservative 0.3.2", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a45c2b41c457a9a9e4670422fcbdf109afb3b22bc920b4045e8bdfd788a3d" +dependencies = [ + "bitcoin-consensus-encoding 0.1.0", + "bitcoin-internals 0.5.0", + "hex-conservative 0.3.2", +] + [[package]] name = "bitcoinkernel" version = "0.2.0" @@ -1397,6 +1460,12 @@ dependencies = [ "arrayvec", ] +[[package]] +name = "hex-conservative" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366fa3443ac84474447710ec17bb00b05dfbd096137817981e86f992f21a2793" + [[package]] name = "hex_lit" version = "0.1.1" @@ -2467,11 +2536,14 @@ dependencies = [ [[package]] name = "rustreexo" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64bce4e1e36c12aaee94f9604187b1dbb2b826bbcb6807f757f41b1cc9946bc7" +checksum = "8353cd48bea30340eced2a11770e47bb6b83f0e7e679742301f3332e6ec1f6ab" dependencies = [ - "bitcoin_hashes 0.14.1", + "bitcoin-io 0.3.0", + "bitcoin_hashes 0.20.0", + "hashbrown", + "hex-conservative 1.0.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b6e8347aa..cd20c744a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ kv = "0.24" miniscript = { version = "12.3", default-features = false } rand = "0.8" rcgen = { version = "0.14", default-features = false, features = ["aws_lc_rs", "pem"] } -rustreexo = "0.4" +rustreexo = "0.5" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" sha2 = { version = "0.10", default-features = false } diff --git a/crates/floresta-chain/benches/chain_state_bench.rs b/crates/floresta-chain/benches/chain_state_bench.rs index 5ed15da0f..88256e5a0 100644 --- a/crates/floresta-chain/benches/chain_state_bench.rs +++ b/crates/floresta-chain/benches/chain_state_bench.rs @@ -21,7 +21,7 @@ use floresta_chain::AssumeValidArg; use floresta_chain::ChainState; use floresta_chain::FlatChainStore; use floresta_chain::FlatChainStoreConfig; -use rustreexo::accumulator::proof::Proof; +use rustreexo::proof::Proof; /// Reads the first 151 blocks (or 150 blocks on top of genesis) from blocks.txt, which are regtest fn read_blocks_txt() -> Vec { diff --git a/crates/floresta-chain/src/extensions.rs b/crates/floresta-chain/src/extensions.rs index 406692a6f..bc52e9a06 100644 --- a/crates/floresta-chain/src/extensions.rs +++ b/crates/floresta-chain/src/extensions.rs @@ -284,8 +284,8 @@ mod tests { use bitcoin::OutPoint; use bitcoin::Transaction; use bitcoin::Txid; - use rustreexo::accumulator::proof::Proof; - use rustreexo::accumulator::stump::Stump; + use rustreexo::proof::Proof; + use rustreexo::stump::Stump; use super::*; use crate::BlockConsumer; diff --git a/crates/floresta-chain/src/pruned_utreexo/chain_state.rs b/crates/floresta-chain/src/pruned_utreexo/chain_state.rs index 0e845f795..8325f6922 100644 --- a/crates/floresta-chain/src/pruned_utreexo/chain_state.rs +++ b/crates/floresta-chain/src/pruned_utreexo/chain_state.rs @@ -26,6 +26,7 @@ use core::cell::UnsafeCell; use bitcoin::block::Header as BlockHeader; use bitcoin::blockdata::constants::genesis_block; use bitcoin::hashes::sha256; +use bitcoin::hashes::Hash; use bitcoin::Block; use bitcoin::BlockHash; use bitcoin::Network; @@ -37,9 +38,9 @@ use bitcoin::Work; use floresta_common::Channel; #[cfg(feature = "metrics")] use metrics; -use rustreexo::accumulator::node_hash::BitcoinNodeHash; -use rustreexo::accumulator::proof::Proof; -use rustreexo::accumulator::stump::Stump; +use rustreexo::node_hash::BitcoinNodeHash; +use rustreexo::proof::Proof; +use rustreexo::stump::Stump; use spin::RwLock; use tracing::debug; use tracing::info; @@ -576,7 +577,7 @@ impl ChainState { }; let mut acc = acc.as_slice(); - let acc = Stump::deserialize(&mut acc).map_err(BlockchainError::UtreexoError)?; + let acc = Stump::deserialize(&mut acc)?; Ok(Some(acc)) } @@ -1000,7 +1001,10 @@ impl BlockchainInterface for ChainState Result<(), Self::Error> { // Convert to BitcoinNodeHashes, from rustreexo - let del_hashes: Vec<_> = del_hashes.into_iter().map(Into::into).collect(); + let del_hashes: Vec<_> = del_hashes + .into_iter() + .map(|hash| BitcoinNodeHash::Some(hash.to_byte_array())) + .collect(); if !acc.verify(&proof, &del_hashes)? { return Err(BlockValidationErrors::InvalidProof)?; @@ -1452,8 +1456,8 @@ mod test { use floresta_common::assert_ok; use floresta_common::bhash; use rand::Rng; - use rustreexo::accumulator::proof::Proof; - use rustreexo::accumulator::stump::Stump; + use rustreexo::proof::Proof; + use rustreexo::stump::Stump; use super::BlockchainInterface; use super::ChainParams; diff --git a/crates/floresta-chain/src/pruned_utreexo/chain_state_builder.rs b/crates/floresta-chain/src/pruned_utreexo/chain_state_builder.rs index 4a479d26d..c1bc08836 100644 --- a/crates/floresta-chain/src/pruned_utreexo/chain_state_builder.rs +++ b/crates/floresta-chain/src/pruned_utreexo/chain_state_builder.rs @@ -11,7 +11,7 @@ use bitcoin::block::Header as BlockHeader; use bitcoin::BlockHash; use bitcoin::Network; -use rustreexo::accumulator::stump::Stump; +use rustreexo::stump::Stump; use super::chain_state::ChainState; use super::chainparams::ChainParams; diff --git a/crates/floresta-chain/src/pruned_utreexo/chainparams.rs b/crates/floresta-chain/src/pruned_utreexo/chainparams.rs index 3b4234f9f..b825ef9dd 100644 --- a/crates/floresta-chain/src/pruned_utreexo/chainparams.rs +++ b/crates/floresta-chain/src/pruned_utreexo/chainparams.rs @@ -23,7 +23,7 @@ use bitcoin::Network; use floresta_common::acchashes; use floresta_common::bhash; use floresta_common::service_flags; -use rustreexo::accumulator::node_hash::BitcoinNodeHash; +use rustreexo::node_hash::BitcoinNodeHash; use crate::prelude::*; use crate::AssumeValidArg; diff --git a/crates/floresta-chain/src/pruned_utreexo/consensus.rs b/crates/floresta-chain/src/pruned_utreexo/consensus.rs index ddfb748fe..d9cbe69ea 100644 --- a/crates/floresta-chain/src/pruned_utreexo/consensus.rs +++ b/crates/floresta-chain/src/pruned_utreexo/consensus.rs @@ -11,6 +11,7 @@ use bitcoin::blockdata::Weight; #[cfg(feature = "bitcoinkernel")] use bitcoin::consensus::serialize; use bitcoin::hashes::sha256; +use bitcoin::hashes::Hash; use bitcoin::merkle_tree; use bitcoin::script; use bitcoin::Amount; @@ -25,8 +26,9 @@ use bitcoin::Txid; #[cfg(feature = "bitcoinkernel")] use bitcoinkernel::PrecomputedTransactionData; use floresta_common::prelude::*; -use rustreexo::accumulator::proof::Proof; -use rustreexo::accumulator::stump::Stump; +use rustreexo::node_hash::BitcoinNodeHash; +use rustreexo::proof::Proof; +use rustreexo::stump::Stump; use super::chainparams::ChainParams; use super::error::BlockValidationErrors; @@ -498,7 +500,10 @@ impl Consensus { } // Convert to BitcoinNodeHash, from rustreexo - let del_hashes: Vec<_> = del_hashes.into_iter().map(Into::into).collect(); + let del_hashes: Vec<_> = del_hashes + .into_iter() + .map(|hash| BitcoinNodeHash::Some(hash.to_byte_array())) + .collect(); let adds = udata::proof_util::get_block_adds(block, height, block_hash); diff --git a/crates/floresta-chain/src/pruned_utreexo/error.rs b/crates/floresta-chain/src/pruned_utreexo/error.rs index da410a053..e210ecb51 100644 --- a/crates/floresta-chain/src/pruned_utreexo/error.rs +++ b/crates/floresta-chain/src/pruned_utreexo/error.rs @@ -20,6 +20,7 @@ use bitcoin::OutPoint; use bitcoin::Txid; use floresta_common::impl_error_from; use floresta_common::prelude::*; +use rustreexo::stump::StumpError; use crate::proof_util::UtreexoLeafError; use crate::pruned_utreexo::chain_state_builder::BlockchainBuilderError; @@ -35,7 +36,7 @@ pub enum BlockchainError { BlockValidation(BlockValidationErrors), TransactionError(TransactionError), InvalidProof, - UtreexoError(String), + UtreexoError(StumpError), UtreexoLeaf(UtreexoLeafError), Database(Box), ConsensusDecode(bitcoin::consensus::encode::Error), @@ -196,7 +197,7 @@ impl_error_from!( ConsensusDecode ); impl_error_from!(BlockchainError, BlockValidationErrors, BlockValidation); -impl_error_from!(BlockchainError, String, UtreexoError); +impl_error_from!(BlockchainError, StumpError, UtreexoError); impl Display for BlockchainError { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { diff --git a/crates/floresta-chain/src/pruned_utreexo/mod.rs b/crates/floresta-chain/src/pruned_utreexo/mod.rs index e2daa5d25..406903751 100644 --- a/crates/floresta-chain/src/pruned_utreexo/mod.rs +++ b/crates/floresta-chain/src/pruned_utreexo/mod.rs @@ -28,9 +28,9 @@ use bitcoin::hashes::sha256; use bitcoin::Block; use bitcoin::BlockHash; use bitcoin::OutPoint; -use rustreexo::accumulator::node_hash::BitcoinNodeHash; -use rustreexo::accumulator::proof::Proof; -use rustreexo::accumulator::stump::Stump; +use rustreexo::node_hash::BitcoinNodeHash; +use rustreexo::proof::Proof; +use rustreexo::stump::Stump; use self::partial_chain::PartialChainState; use crate::prelude::*; diff --git a/crates/floresta-chain/src/pruned_utreexo/partial_chain.rs b/crates/floresta-chain/src/pruned_utreexo/partial_chain.rs index 72e4b6e16..e51ba9888 100644 --- a/crates/floresta-chain/src/pruned_utreexo/partial_chain.rs +++ b/crates/floresta-chain/src/pruned_utreexo/partial_chain.rs @@ -27,8 +27,8 @@ use bitcoin::block::Header as BlockHeader; use bitcoin::Block; use bitcoin::BlockHash; use floresta_common::prelude::*; -use rustreexo::accumulator::node_hash::BitcoinNodeHash; -use rustreexo::accumulator::stump::Stump; +use rustreexo::node_hash::BitcoinNodeHash; +use rustreexo::stump::Stump; use tracing::info; use super::chainparams::ChainParams; @@ -131,7 +131,7 @@ impl PartialChainStateInner { pub fn process_block( &mut self, block: &bitcoin::Block, - proof: rustreexo::accumulator::proof::Proof, + proof: rustreexo::proof::Proof, inputs: HashMap, del_hashes: Vec, ) -> Result { @@ -259,7 +259,7 @@ impl UpdatableChainstate for PartialChainState { fn connect_block( &self, block: &bitcoin::Block, - proof: rustreexo::accumulator::proof::Proof, + proof: rustreexo::proof::Proof, inputs: HashMap, del_hashes: Vec, ) -> Result { @@ -400,7 +400,7 @@ impl BlockchainInterface for PartialChainState { fn validate_block( &self, _block: &bitcoin::Block, - _proof: rustreexo::accumulator::proof::Proof, + _proof: rustreexo::proof::Proof, _inputs: HashMap, _del_hashes: Vec, _acc: Stump, @@ -417,7 +417,7 @@ impl BlockchainInterface for PartialChainState { _acc: Stump, _block: &Block, _height: u32, - _proof: rustreexo::accumulator::proof::Proof, + _proof: rustreexo::proof::Proof, _del_hashes: Vec, ) -> Result { unimplemented!("PartialChainState::update_acc") @@ -467,9 +467,9 @@ mod tests { use bitcoin::Block; use bitcoin::Network; use floresta_common::acchashes; - use rustreexo::accumulator::node_hash::BitcoinNodeHash; - use rustreexo::accumulator::proof::Proof; - use rustreexo::accumulator::stump::Stump; + use rustreexo::node_hash::BitcoinNodeHash; + use rustreexo::proof::Proof; + use rustreexo::stump::Stump; use super::PartialChainState; use crate::pruned_utreexo::chainparams::ChainParams; diff --git a/crates/floresta-chain/src/pruned_utreexo/udata.rs b/crates/floresta-chain/src/pruned_utreexo/udata.rs index 87716c4e0..81e387771 100644 --- a/crates/floresta-chain/src/pruned_utreexo/udata.rs +++ b/crates/floresta-chain/src/pruned_utreexo/udata.rs @@ -202,7 +202,7 @@ pub mod proof_util { use bitcoin::WPubkeyHash; use bitcoin::WScriptHash; use floresta_common::impl_error_from; - use rustreexo::accumulator::node_hash::BitcoinNodeHash; + use rustreexo::node_hash::BitcoinNodeHash; use sha2::Digest; use sha2::Sha512_256; @@ -378,9 +378,10 @@ pub mod proof_util { // Do not add unspendable nor already spent utxos continue; } - adds.push( - get_leaf_hashes(txid, is_cb, vout as u32, output, height, block_hash).into(), - ); + + let leaf_hash = + get_leaf_hashes(txid, is_cb, vout as u32, output, height, block_hash); + adds.push(BitcoinNodeHash::Some(leaf_hash.to_byte_array())); } } diff --git a/crates/floresta-wire/src/p2p_wire/block_proof.rs b/crates/floresta-wire/src/p2p_wire/block_proof.rs index c66767431..34eb1d491 100644 --- a/crates/floresta-wire/src/p2p_wire/block_proof.rs +++ b/crates/floresta-wire/src/p2p_wire/block_proof.rs @@ -23,12 +23,13 @@ use bitcoin::consensus::Decodable; use bitcoin::consensus::Encodable; use bitcoin::hashes::sha256; +use bitcoin::hashes::Hash; use bitcoin::BlockHash; use bitcoin::VarInt; use floresta_chain::CompactLeafData; use floresta_chain::ScriptPubKeyKind; use floresta_common::read_bounded_len; -use rustreexo::accumulator::node_hash::BitcoinNodeHash; +use rustreexo::node_hash::BitcoinNodeHash; /// The maximum possible inputs you can have per block. /// @@ -243,7 +244,7 @@ impl Decodable for UtreexoProof { let mut proof_hashes = Vec::with_capacity(n_hashes); for _ in 0..n_hashes { let hash = sha256::Hash::consensus_decode(reader)?; - proof_hashes.push(hash.into()); + proof_hashes.push(BitcoinNodeHash::Some(hash.to_byte_array())); } // Read the targets @@ -280,6 +281,7 @@ impl Decodable for UtreexoProof { mod utreexo_proof_tests { use bitcoin::consensus::encode::deserialize_hex; use bitcoin::hashes::sha256; + use bitcoin::hashes::Hash; use bitcoin::Block; use bitcoin::BlockHash; use bitcoin::Network; @@ -292,9 +294,9 @@ mod utreexo_proof_tests { use floresta_chain::FlatChainStoreConfig; use floresta_common::acchashes; use floresta_common::bhash; - use rustreexo::accumulator::node_hash::BitcoinNodeHash; - use rustreexo::accumulator::proof::Proof; - use rustreexo::accumulator::stump::Stump; + use rustreexo::node_hash::BitcoinNodeHash; + use rustreexo::proof::Proof; + use rustreexo::stump::Stump; use crate::block_proof::UtreexoProof; use crate::p2p_wire::block_proof::Bitmap; @@ -338,7 +340,9 @@ mod utreexo_proof_tests { } fn to_acc_hashes(vec: Vec) -> Vec { - vec.into_iter().map(Into::into).collect() + vec.into_iter() + .map(|hash| BitcoinNodeHash::Some(hash.to_byte_array())) + .collect() } #[test] diff --git a/crates/floresta-wire/src/p2p_wire/node/blocks.rs b/crates/floresta-wire/src/p2p_wire/node/blocks.rs index 85ff3574a..44f230827 100644 --- a/crates/floresta-wire/src/p2p_wire/node/blocks.rs +++ b/crates/floresta-wire/src/p2p_wire/node/blocks.rs @@ -10,7 +10,7 @@ use floresta_chain::BlockchainError; use floresta_chain::ChainBackend; use floresta_chain::CompactLeafData; use floresta_common::service_flags; -use rustreexo::accumulator::proof::Proof; +use rustreexo::proof::Proof; use tracing::debug; use tracing::error; use tracing::warn; diff --git a/crates/floresta-wire/src/p2p_wire/node/chain_selector_ctx.rs b/crates/floresta-wire/src/p2p_wire/node/chain_selector_ctx.rs index a2a3af2db..b4863005e 100644 --- a/crates/floresta-wire/src/p2p_wire/node/chain_selector_ctx.rs +++ b/crates/floresta-wire/src/p2p_wire/node/chain_selector_ctx.rs @@ -61,9 +61,9 @@ use floresta_chain::CompactLeafData; use floresta_common::service_flags; use rand::seq::SliceRandom; use rand::thread_rng; -use rustreexo::accumulator::node_hash::BitcoinNodeHash; -use rustreexo::accumulator::proof::Proof; -use rustreexo::accumulator::stump::Stump; +use rustreexo::node_hash::BitcoinNodeHash; +use rustreexo::proof::Proof; +use rustreexo::stump::Stump; use tokio::time; use tokio::time::timeout; use tokio::time::MissedTickBehavior; diff --git a/crates/floresta-wire/src/p2p_wire/node/running_ctx.rs b/crates/floresta-wire/src/p2p_wire/node/running_ctx.rs index 5566c977a..0e56d0bd9 100644 --- a/crates/floresta-wire/src/p2p_wire/node/running_ctx.rs +++ b/crates/floresta-wire/src/p2p_wire/node/running_ctx.rs @@ -18,7 +18,7 @@ use floresta_chain::ThreadSafeChain; use floresta_common::service_flags; use rand::seq::IteratorRandom; use rand::thread_rng; -use rustreexo::accumulator::stump::Stump; +use rustreexo::stump::Stump; use tokio::time; use tokio::time::MissedTickBehavior; use tracing::debug; diff --git a/crates/floresta-wire/src/p2p_wire/node_interface.rs b/crates/floresta-wire/src/p2p_wire/node_interface.rs index 5de9e4b32..69d0b2c11 100644 --- a/crates/floresta-wire/src/p2p_wire/node_interface.rs +++ b/crates/floresta-wire/src/p2p_wire/node_interface.rs @@ -11,7 +11,7 @@ use bitcoin::BlockHash; use bitcoin::Transaction; use bitcoin::Txid; use floresta_mempool::mempool::AcceptToMempoolError; -use rustreexo::accumulator::proof::Proof; +use rustreexo::proof::Proof; use serde::Serialize; use tokio::sync::mpsc::UnboundedSender; use tokio::sync::oneshot; diff --git a/crates/floresta-wire/src/p2p_wire/tests/chain_selector.rs b/crates/floresta-wire/src/p2p_wire/tests/chain_selector.rs index 9b1c5ee4b..cbc938246 100644 --- a/crates/floresta-wire/src/p2p_wire/tests/chain_selector.rs +++ b/crates/floresta-wire/src/p2p_wire/tests/chain_selector.rs @@ -5,8 +5,8 @@ mod tests { use floresta_chain::pruned_utreexo::BlockchainInterface; use floresta_common::acchashes; use floresta_common::prelude::HashMap; - use rustreexo::accumulator::node_hash::BitcoinNodeHash; - use rustreexo::accumulator::stump::Stump; + use rustreexo::node_hash::BitcoinNodeHash; + use rustreexo::stump::Stump; use crate::p2p_wire::tests::utils::create_false_acc; use crate::p2p_wire::tests::utils::setup_node; diff --git a/crates/floresta/examples/chainstate-builder.rs b/crates/floresta/examples/chainstate-builder.rs index 13ee6351d..7c4a3e527 100644 --- a/crates/floresta/examples/chainstate-builder.rs +++ b/crates/floresta/examples/chainstate-builder.rs @@ -12,7 +12,7 @@ use floresta_chain::AssumeValidArg; use floresta_chain::ChainParams; use floresta_chain::FlatChainStore; use floresta_chain::FlatChainStoreConfig; -use rustreexo::accumulator::stump::Stump; +use rustreexo::stump::Stump; const DATA_DIR: &str = "./tmp-db";