From 12e31ec0a26a08116397baee9c627f191a47c52a Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 19:44:18 -0300 Subject: [PATCH 01/10] feat: add `cargo-rbmt` Start migration to `cargo-rbmt`: - Add `rbmt-version` - Update `Cargo.toml`: - Add `[package.metadata.rbmt.*]` fields - Pin dependencies for MSRV - Remove example declarations - Update the `justfile` to use `cargo-rbmt` commands --- Cargo.toml | 106 +++++++++++++++++++++++++++++++++---------------- justfile | 110 +++++++++++++++++++++++++-------------------------- rbmt-version | 1 + 3 files changed, 127 insertions(+), 90 deletions(-) create mode 100644 rbmt-version diff --git a/Cargo.toml b/Cargo.toml index e3ca6e34..fc41a991 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,33 +1,57 @@ [package] name = "rustreexo" version = "0.5.0" -authors = ["Calvin Kim ", "Davidson Souza "] -edition = "2018" description = "A Rust implementation of Utreexo" -license = "MIT OR Apache-2.0" +keywords = ["accumulator", "bitcoin", "utreexo"] +authors = ["Calvin Kim ", "Davidson Souza "] repository = "https://github.com/mit-dci/rustreexo" +license = "MIT OR Apache-2.0" readme = "README.md" -homepage = "https://github.com/mit-dci/rustreexo" -rust-version = "1.74.0" +edition = "2018" +rust-version = "1.74.0" # MSRV +autobenches = false + +[features] +default = ["std"] +std = ["bitcoin_hashes/std", "hex-conservative/std", "hashbrown/default-hasher"] +with-serde = ["serde"] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] bitcoin_hashes = { version = "0.20", default-features = false } -hex-conservative = { version = "1.0.0", default-features = false } -serde = { version = "1.0", features = ["derive"], optional = true } -hashbrown = "0.16.1" +hex-conservative = { version = "1", default-features = false } +serde = { version = "1.0.228", features = ["derive"], optional = true } +hashbrown = { version = "0.16.1", default-features = false } bitcoin-io = { version = "0.5.0", default-features = false, features = ["alloc"] } +# These pins are necessary for `no_std`: +# +# foldhash is hashbrown's default hasher +# Pin it with without default features so it doesn't break no-std +foldhash = { version = "0.2", default-features = false } + [dev-dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.81" -criterion = { version = ">=0.5.1", features = ["html_reports"] } -rand = "0.9.2" +rand = { version = "0.9.2" } +criterion = { version = "0.5.1", features = ["html_reports"] } +serde = { version = "1.0.228", features = ["derive"] } +serde_json = { version = "1.0.81" } -[features] -default = ["std"] -std = ["bitcoin_hashes/std", "hex-conservative/std"] -with-serde = ["serde"] +# These pins are necessary for `Cargo-minimal.lock`: +clap = { version = "4.5.61" } # blame: criterion +clap_builder = { version = "4.5.61" } # blame: criterion +clap_lex = { version = "1.0.1" } # blame: criterion +regex = { version = "1.10.0" } # blame: criterion + +[[bench]] +name = "accumulator" +harness = false + +[[bench]] +name = "proof" +harness = false + +[[bench]] +name = "stump" +harness = false [lints.clippy] use_self = "warn" @@ -35,25 +59,37 @@ use_self = "warn" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bench)'] } -[[example]] -name = "simple-stump-update" +[package.metadata.rbmt.toolchains] +stable = "1.94.0" +nightly = "nightly-2026-03-18" -[[example]] -name = "proof-update" +[package.metadata.rbmt.test] +# Examples to run with different feature configurations. +# +# Supported formats: +# * "name" - runs with default features. +# * "name:-" - runs with no-default-features. +# * "name:feature1 feature2" - runs with specific features. +examples = [ + "stump_modify", + "stump_modify:-", + "proof_update", + "proof_update:-", + "custom_hash", + "custom_hash:-", +] -[[example]] -name = "custom-hash-type" -# Compile AccumulatorHash with the `std::io::{Read, Write}` trait bounds -required-features = ["std"] +# Features to exclude from auto-discovery. +# Use for internal or alias features that should not be tested in isolation. +exclude_features = ["default"] -[[bench]] -name = "accumulator_benchmarks" -harness = false +# Always test specific feature combinations. +exact_features = [ + ["with-serde", "std"], + ["with-serde"], +] -[[bench]] -name = "proof_benchmarks" -harness = false - -[[bench]] -name = "stump_benchmarks" -harness = false +# Allow packages of different versions in the dependency tree. +[package.metadata.rbmt.lint] +allowed_duplicates = [ +] diff --git a/justfile b/justfile index e2ab930d..1d9c2206 100644 --- a/justfile +++ b/justfile @@ -1,69 +1,69 @@ -alias b := build -alias c := check -alias f := fmt -alias t := test -alias ts := test-stable -alias tm := test-msrv -alias tn := test-nightly -alias p := pre-push +alias c := check +alias cs := check-sigs +alias d := doc +alias do := doc-open +alias f := fmt +alias l := lock +alias t := test +alias tns := test-no-std +alias p := pre-push _default: + @echo "> rustreexo" + @echo "> A Rust implementation of Utreexo\n" @just --list -# Run benchmarks -bench: - cargo bench +[doc: "Run benchmarks: accumulator, proof, stump"] +bench BENCH="": + cargo bench {{ if BENCH != "" { "--bench " + BENCH } else { "" } }} -# Build with all features -build: - cargo build --all-features - -# Check code formatting, compilation and linting +[doc: "Check code formatting, compilation, and linting"] check: - cargo +nightly fmt --all --check - - cargo +nightly check --no-default-features --all-targets - cargo +nightly check --all-features --all-targets - cargo +nightly clippy --no-default-features --all-targets -- -D warnings - cargo +nightly clippy --all-features --all-targets -- -D warnings + cargo rbmt fmt --check + cargo rbmt lint + cargo rbmt docs + RUSTFLAGS="--cfg=bench" cargo +nightly check --benches - RUSTDOCFLAGS="-D warnings" cargo +nightly doc --no-deps --all-features +[doc: "Checks whether all commits in this branch are signed"] +check-sigs: + #!/usr/bin/env bash + TOTAL=$(git log --pretty='tformat:%H' origin/main..HEAD | wc -l | tr -d ' ') + UNSIGNED=$(git log --pretty='tformat:%H %G?' origin/main..HEAD | grep " N$" | wc -l | tr -d ' ') + if [ "$UNSIGNED" -gt 0 ]; then + echo "⚠️ Unsigned commits in this branch [$UNSIGNED/$TOTAL]" + exit 1 + else + echo "🔏 All commits in this branch are signed [$TOTAL/$TOTAL]" + fi -# Format code -fmt: - cargo +nightly fmt --all +[doc: "Generate documentation"] +doc: + cargo rbmt docs + cargo doc --no-deps -# Run all tests with stable, nightly and MSRV (1.74.0) toolchains -test: - @just test-stable - @just test-nightly - @just test-msrv +[doc: "Generate and open documentation"] +doc-open: + cargo rbmt docs + cargo doc --no-deps --open -# Run all tests with a stable toolchain -test-stable: - cargo +stable test --no-default-features - cargo +stable test --all-features +[doc: "Format code"] +fmt: + cargo rbmt fmt -# Run all tests with a nightly toolchain -test-nightly: - cargo +nightly test --no-default-features - cargo +nightly test --all-features +[doc: "Regenerate Cargo-recent.lock and Cargo-minimal.lock"] +lock: + cargo rbmt lock -# Run all tests on MSRV (1.74.0) -test-msrv: - rm -f Cargo.lock - cargo update -p criterion --precise 0.5.1 - cargo update -p rayon --precise 1.10.0 - cargo update -p rayon-core --precise 1.12.1 - cargo update -p serde_json --precise 1.0.81 - cargo update -p serde --precise 1.0.160 - cargo update -p half --precise 2.4.1 - cargo update -p clap --precise 4.5.61 - cargo update -p clap_lex --precise 1.0.0 +[doc: "Run tests across all toolchains and lockfiles"] +test: + rustup target add thumbv7m-none-eabi + cargo rbmt test --toolchain stable --lock-file recent + cargo rbmt test --toolchain stable --lock-file minimal - cargo +1.74.0 test --no-default-features - cargo +1.74.0 test --all-features - rm Cargo.lock +[doc: "Run no_std build check with the MSRV toolchain (1.74.0)"] +test-no-std: + rustup target add thumbv7m-none-eabi --toolchain 1.74.0 + cargo rbmt test --toolchain msrv --lock-file minimal -# Run pre-push suite: format, check, and test -pre-push: fmt check test +[doc: "Run pre-push suite: lock, fmt, check, test, and test-no-std"] +pre-push: lock fmt check check-sigs test test-no-std diff --git a/rbmt-version b/rbmt-version new file mode 100644 index 00000000..de57ca2d --- /dev/null +++ b/rbmt-version @@ -0,0 +1 @@ +6560b728ae6a81af9d92713b630ba26772fbd970 From 4cc60a0273c7e2477100c402e87ec8a46c5619d5 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 19:48:50 -0300 Subject: [PATCH 02/10] chore: remove dead code and fix MSRV compilation Remove dead benchmark code from `src/*` (untouched for ~3 years); it wasn't even running on CI and still used the old `Bencher`. Use `hashbrown::HashMap` and `hashbrown::HashSet` in the `no_std` prelude, as using it with `default-features = false` would break `no_std` compilation. --- src/lib.rs | 14 +++++++-- src/mem_forest/mod.rs | 8 +++--- src/pollard/mod.rs | 4 +-- src/proof/mod.rs | 66 ------------------------------------------- src/stump/mod.rs | 61 --------------------------------------- src/util/mod.rs | 5 ++-- 6 files changed, 20 insertions(+), 138 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d39019f0..3c6c0ce1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,6 @@ //! * [`mem_forest`]: an in-memory forest accumulator. It keeps track of every leaf in the forest. It can both verify and //! generate inclusion proofs for any leaf in the forest. -#![cfg_attr(any(bench), feature(test))] #![cfg_attr(not(feature = "std"), no_std)] extern crate alloc; @@ -67,8 +66,17 @@ pub mod prelude { pub use bitcoin_io as io; pub use bitcoin_io::Read; pub use bitcoin_io::Write; - pub use hashbrown::HashMap; - pub use hashbrown::HashSet; + use foldhash::quality::FixedState; + + pub type HashMap = hashbrown::HashMap; + pub type HashSet = hashbrown::HashSet; + + pub fn new_hash_map() -> HashMap { + HashMap::with_hasher(FixedState::default()) + } + pub fn new_hash_set() -> HashSet { + HashSet::with_hasher(FixedState::default()) + } } #[cfg(feature = "std")] diff --git a/src/mem_forest/mod.rs b/src/mem_forest/mod.rs index 70e0102d..9e6482ef 100644 --- a/src/mem_forest/mod.rs +++ b/src/mem_forest/mod.rs @@ -177,7 +177,7 @@ impl Node { Ok(node) } - let mut index = HashMap::new(); + let mut index = HashMap::with_hasher(Default::default()); let root = _read_one(None, reader, &mut index)?; Ok((root, index)) } @@ -215,7 +215,7 @@ impl MemForest { /// ``` pub fn new() -> Self { Self { - map: HashMap::new(), + map: HashMap::with_hasher(Default::default()), roots: Vec::new(), leaves: 0, } @@ -232,7 +232,7 @@ impl MemForest { /// ``` pub fn new_with_hash() -> Self { Self { - map: HashMap::new(), + map: HashMap::with_hasher(Default::default()), roots: Vec::new(), leaves: 0, } @@ -285,7 +285,7 @@ impl MemForest { let leaves = read_u64(&mut reader)?; let roots_len = read_u64(&mut reader)?; let mut roots = Vec::new(); - let mut map = HashMap::new(); + let mut map = HashMap::with_hasher(Default::default()); for _ in 0..roots_len { let (root, _map) = Node::read_one(&mut reader)?; map.extend(_map); diff --git a/src/pollard/mod.rs b/src/pollard/mod.rs index 757b8cc9..247ba1f5 100644 --- a/src/pollard/mod.rs +++ b/src/pollard/mod.rs @@ -779,7 +779,7 @@ impl Pollard { Self { roots, leaves: 0, - leaf_map: HashMap::new(), + leaf_map: HashMap::with_hasher(Default::default()), } } @@ -807,7 +807,7 @@ impl Pollard { Self { roots, leaves, - leaf_map: HashMap::new(), + leaf_map: HashMap::with_hasher(Default::default()), } } diff --git a/src/proof/mod.rs b/src/proof/mod.rs index 1964baaf..17a76d69 100644 --- a/src/proof/mod.rs +++ b/src/proof/mod.rs @@ -1498,69 +1498,3 @@ mod tests { } } } - -#[cfg(bench)] -mod bench { - extern crate test; - use test::Bencher; - - use crate::accumulator::proof::Proof; - use crate::accumulator::stump::Stump; - use crate::accumulator::util::hash_from_u8; - #[bench] - fn bench_calculate_hashes(bencher: &mut Bencher) { - let preimages = 0..255_u8; - let utxos = preimages - .into_iter() - .map(|preimage| hash_from_u8(preimage)) - .collect::>(); - - let (stump, modified) = Stump::new().modify(&utxos, &[], &Proof::default()).unwrap(); - let proof = Proof::default(); - let (proof, cached_hashes) = proof - .update( - vec![], - utxos.clone(), - vec![], - (0..128).into_iter().collect(), - modified, - ) - .unwrap(); - - bencher.iter(|| proof.calculate_hashes(&cached_hashes, stump.leaves)) - } - - #[bench] - fn bench_proof_update(bencher: &mut Bencher) { - let preimages = [0_u8, 1, 2, 3, 4, 5]; - let utxos = preimages - .iter() - .map(|&preimage| hash_from_u8(preimage)) - .collect::>(); - - let (s, modified) = Stump::new().modify(&utxos, &[], &Proof::default()).unwrap(); - let proof = Proof::default(); - let (proof, cached_hashes) = proof - .update(vec![], utxos.clone(), vec![], vec![0, 3, 5], modified) - .unwrap(); - let preimages = [6, 7, 8, 9, 10, 11, 12, 13, 14]; - let utxos = preimages - .iter() - .map(|&preimage| hash_from_u8(preimage)) - .collect::>(); - let (_, modified) = s.modify(&utxos, &cached_hashes, &proof).unwrap(); - - bencher.iter(move || { - proof - .clone() - .update( - cached_hashes.clone(), - utxos.clone(), - vec![0, 3, 5], - vec![1, 2, 3, 4, 5, 6, 7], - modified.clone(), - ) - .unwrap(); - }) - } -} diff --git a/src/stump/mod.rs b/src/stump/mod.rs index 767dce1f..d429a907 100644 --- a/src/stump/mod.rs +++ b/src/stump/mod.rs @@ -724,64 +724,3 @@ mod test { } } } - -#[cfg(bench)] -mod bench { - extern crate test; - use std::convert::TryFrom; - - use test::Bencher; - - use super::Stump; - use crate::accumulator::node_hash::AccumulatorHash; - use crate::accumulator::proof::Proof; - use crate::accumulator::util::hash_from_u8; - - #[bench] - fn bench_addition(bencher: &mut Bencher) { - let hash = [ - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a", - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459b", - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459c", - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459d", - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459e", - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459f", - ] - .iter() - .map(|&hash| AccumulatorHash::try_from(hash).unwrap()) - .collect::>(); - let proof = &Proof::default(); - bencher.iter(move || { - let _ = Stump::new().modify(&hash, &[], &proof); - }); - } - - #[bench] - fn bench_add_del(bencher: &mut Bencher) { - let leaf_preimages = [0_u8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; - let leaves = leaf_preimages - .iter() - .map(|preimage| hash_from_u8(*preimage)) - .collect::>(); - let target_values = [0, 4, 5, 6, 7, 8]; - let target_hashes = target_values - .iter() - .map(|val| hash_from_u8(*val as u8)) - .collect::>(); - let proofhashes = [ - "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a", - "2b4c342f5433ebe591a1da77e013d1b72475562d48578dca8b84bac6651c3cb9", - "9576f4ade6e9bc3a6458b506ce3e4e890df29cb14cb5d3d887672aef55647a2b", - "c413035120e8c9b0ca3e40c93d06fe60a0d056866138300bb1f1dd172b4923c3", - ] - .iter() - .map(|&value| AccumulatorHash::try_from(value).unwrap()) - .collect::>(); - let acc = Stump::new() - .modify(&leaves, &vec![], &Proof::default()) - .unwrap() - .0; - let proof = Proof::new(target_values.to_vec(), proofhashes); - bencher.iter(move || acc.modify(&leaves, &target_hashes, &proof)); - } -} diff --git a/src/util/mod.rs b/src/util/mod.rs index e72bedd4..34459d79 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -342,7 +342,7 @@ fn is_sibling(a: u64, b: u64) -> bool { /// whose hashes will be calculated to reach a root pub fn get_proof_positions(targets: &[u64], num_leaves: u64, forest_rows: u8) -> Vec { let mut proof_positions = BTreeSet::new(); - let mut map = HashSet::new(); + let mut map = HashSet::with_hasher(foldhash::quality::FixedState::default()); let mut computed_positions = targets.to_vec(); computed_positions.reserve(targets.len() * 2); @@ -382,7 +382,8 @@ pub fn get_proof_positions(targets: &[u64], num_leaves: u64, forest_rows: u8) -> proof_positions.into_iter().collect() } -#[cfg(any(test, bench))] + +#[cfg(test)] pub fn hash_from_u8(value: u8) -> super::node_hash::BitcoinNodeHash { use bitcoin_hashes::sha256; use bitcoin_hashes::HashEngine; From 29c4a21be5290ec12776af0c0e405a7113a1bcbf Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 19:55:08 -0300 Subject: [PATCH 03/10] chore: rename bench and example files --- benches/{accumulator_benchmarks.rs => accumulator.rs} | 2 +- benches/{proof_benchmarks.rs => proof.rs} | 2 +- benches/{stump_benchmarks.rs => stump.rs} | 2 +- examples/{custom-hash-type.rs => custom_hash.rs} | 9 +++++---- examples/{full-accumulator.rs => mem_forest.rs} | 0 examples/{proof-update.rs => proof_update.rs} | 0 examples/{simple-stump-update.rs => stump_modify.rs} | 0 7 files changed, 8 insertions(+), 7 deletions(-) rename benches/{accumulator_benchmarks.rs => accumulator.rs} (97%) rename benches/{proof_benchmarks.rs => proof.rs} (97%) rename benches/{stump_benchmarks.rs => stump.rs} (96%) rename examples/{custom-hash-type.rs => custom_hash.rs} (97%) rename examples/{full-accumulator.rs => mem_forest.rs} (100%) rename examples/{proof-update.rs => proof_update.rs} (100%) rename examples/{simple-stump-update.rs => stump_modify.rs} (100%) diff --git a/benches/accumulator_benchmarks.rs b/benches/accumulator.rs similarity index 97% rename from benches/accumulator_benchmarks.rs rename to benches/accumulator.rs index feafae3d..873f4ff2 100644 --- a/benches/accumulator_benchmarks.rs +++ b/benches/accumulator.rs @@ -12,7 +12,7 @@ use rustreexo::mem_forest::MemForest; use rustreexo::node_hash::BitcoinNodeHash; use rustreexo::pollard::Pollard; -fn generate_test_hashes(count: usize, seed: u64) -> Vec { +pub(crate) fn generate_test_hashes(count: usize, seed: u64) -> Vec { let mut rng = StdRng::seed_from_u64(seed); (0..count) .map(|_| { diff --git a/benches/proof_benchmarks.rs b/benches/proof.rs similarity index 97% rename from benches/proof_benchmarks.rs rename to benches/proof.rs index 5309d886..eef35fe6 100644 --- a/benches/proof_benchmarks.rs +++ b/benches/proof.rs @@ -12,7 +12,7 @@ use rustreexo::node_hash::BitcoinNodeHash; use rustreexo::proof::Proof; use rustreexo::stump::Stump; -fn generate_test_hashes(count: usize, seed: u64) -> Vec { +pub(crate) fn generate_test_hashes(count: usize, seed: u64) -> Vec { let mut rng = StdRng::seed_from_u64(seed); (0..count) .map(|_| { diff --git a/benches/stump_benchmarks.rs b/benches/stump.rs similarity index 96% rename from benches/stump_benchmarks.rs rename to benches/stump.rs index 4c4bc58b..95de76b7 100644 --- a/benches/stump_benchmarks.rs +++ b/benches/stump.rs @@ -12,7 +12,7 @@ use rustreexo::node_hash::BitcoinNodeHash; use rustreexo::proof::Proof; use rustreexo::stump::Stump; -fn generate_test_hashes(count: usize, seed: u64) -> Vec { +pub(crate) fn generate_test_hashes(count: usize, seed: u64) -> Vec { let mut rng = StdRng::seed_from_u64(seed); (0..count) .map(|_| { diff --git a/examples/custom-hash-type.rs b/examples/custom_hash.rs similarity index 97% rename from examples/custom-hash-type.rs rename to examples/custom_hash.rs index e82226eb..f89fdb94 100644 --- a/examples/custom-hash-type.rs +++ b/examples/custom_hash.rs @@ -16,6 +16,7 @@ use rustreexo::mem_forest::MemForest; use rustreexo::node_hash::AccumulatorHash; +use rustreexo::prelude::io; #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] /// We need a stateful wrapper around the actual hash, this is because we use those different @@ -80,9 +81,9 @@ impl AccumulatorHash for CustomHash { // used for serialization, writes the hash to the writer // // if you don't want to use serialization, you can just return an error here. - fn write(&self, writer: &mut W) -> std::io::Result<()> + fn write(&self, writer: &mut W) -> io::Result<()> where - W: std::io::Write, + W: io::Write, { match self { Self::Hash(h) => writer.write_all(h), @@ -94,9 +95,9 @@ impl AccumulatorHash for CustomHash { // used for deserialization, reads the hash from the reader // // if you don't want to use serialization, you can just return an error here. - fn read(reader: &mut R) -> std::io::Result + fn read(reader: &mut R) -> io::Result where - R: std::io::Read, + R: io::Read, { let mut h = [0u8; 32]; reader.read_exact(&mut h)?; diff --git a/examples/full-accumulator.rs b/examples/mem_forest.rs similarity index 100% rename from examples/full-accumulator.rs rename to examples/mem_forest.rs diff --git a/examples/proof-update.rs b/examples/proof_update.rs similarity index 100% rename from examples/proof-update.rs rename to examples/proof_update.rs diff --git a/examples/simple-stump-update.rs b/examples/stump_modify.rs similarity index 100% rename from examples/simple-stump-update.rs rename to examples/stump_modify.rs From c7ad0eed29328f7a86cb19fb22befe585a497a1f Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 19:56:07 -0300 Subject: [PATCH 04/10] chore: remove `rust-toolchain.toml` Also: - Rename `LICENSE` to `LICENSE.md` - Rename `.rustfmt.toml` to `rustfmt.toml` --- LICENSE => LICENSE.md | 0 rust-toolchain.toml | 4 ---- .rustfmt.toml => rustfmt.toml | 12 ++++++------ 3 files changed, 6 insertions(+), 10 deletions(-) rename LICENSE => LICENSE.md (100%) delete mode 100644 rust-toolchain.toml rename .rustfmt.toml => rustfmt.toml (69%) diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 8d0254a3..00000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,4 +0,0 @@ -[toolchain] -channel = "stable" -components = [ "rustfmt", "clippy" ] -profile = "default" diff --git a/.rustfmt.toml b/rustfmt.toml similarity index 69% rename from .rustfmt.toml rename to rustfmt.toml index 07310b7e..e3a5db53 100644 --- a/.rustfmt.toml +++ b/rustfmt.toml @@ -1,13 +1,13 @@ -# imports +# Import reorder_imports = true imports_granularity = "Item" group_imports = "StdExternalCrate" -# lines -newline_style = "Unix" +# Macros +format_macro_matchers = true -# comments +# Comments format_code_in_doc_comments = true -# macros -format_macro_matchers = true \ No newline at end of file +# Line +newline_style = "Unix" From 5e55bed6d9d09399d3eca1691e8e3fa293e002fd Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 19:57:38 -0300 Subject: [PATCH 05/10] feat: commit `Cargo-recent.lock` and `Cargo-minimal.lock` Stable toolchain: `Cargo-recent.lock` MSRV toolchain: `Cargo-minimal.lock` --- Cargo-minimal.lock | 1270 ++++++++++++++++++++++++++++++++++++++++++++ Cargo-recent.lock | 796 +++++++++++++++++++++++++++ 2 files changed, 2066 insertions(+) create mode 100644 Cargo-minimal.lock create mode 100644 Cargo-recent.lock diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock new file mode 100644 index 00000000..976a70a9 --- /dev/null +++ b/Cargo-minimal.lock @@ -0,0 +1,1270 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bce8d450891e3b36f85a2230cec441fddd60e0c455b61b15bb3ffba955ca85" +dependencies = [ + "memchr", +] + +[[package]] +name = "anes" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e04b263cb24d859f06563beb27213c7bbfff2c61513763578eba297f4314e4" + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.0", +] + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "autocfg" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + +[[package]] +name = "bitcoin-consensus-encoding" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d7ca3dc8ff835693ad73bf1596240c06f974a31eeb3f611aaedf855f1f2725" +dependencies = [ + "bitcoin-internals", +] + +[[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.0", +] + +[[package]] +name = "bitcoin-io" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fb823712b12e5cfccdb9a2b6a62de2dc42ddb5ec489511025eebeba1c21829" +dependencies = [ + "bitcoin-consensus-encoding", + "bitcoin-internals", + "bitcoin_hashes", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a45c2b41c457a9a9e4670422fcbdf109afb3b22bc920b4045e8bdfd788a3d" +dependencies = [ + "bitcoin-consensus-encoding", + "bitcoin-internals", + "hex-conservative 0.3.0", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + +[[package]] +name = "bumpalo" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cfg-if" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "ciborium" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369" + +[[package]] +name = "ciborium-ll" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "4.5.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52fa72306bb30daf11bc97773431628e5b4916e97aaa74b7d3f625d4d495da02" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.5.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2071365c5c56eae7d77414029dde2f4f4ba151cf68d5a3261c9a40de428ace93" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e78417baa3b3114dc0e95e7357389a249c4da97c3c2b540700079db6171bfd7" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" +dependencies = [ + "autocfg 0.1.6", + "cfg-if 0.1.2", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +dependencies = [ + "autocfg 0.1.6", + "cfg-if 0.1.2", + "lazy_static", +] + +[[package]] +name = "either" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5845bf77d497f79416df39462df26d4a8b71dd6440246848ee63709476dbb9a6" + +[[package]] +name = "errno" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.45.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +dependencies = [ + "gcc", + "libc", +] + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "gcc" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e33f45ff9bef4a33df0e34df4d68ee016762d11f24e8d536e5e294096cc2b96" + +[[package]] +name = "getrandom" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71393ecc86efbf00e4ca13953979ba8b94cfe549a4b74cc26d8b62f4d8feac2b" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi", + "windows-targets 0.52.0", +] + +[[package]] +name = "half" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex-conservative" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afe881d0527571892c4034822e59bb10c6c991cce6abe8199b6f5cf10766f55" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-conservative" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ee770c000993d17c185713463d5ebfbd1af9afae4c17cc295640104383bfbf0" + +[[package]] +name = "io-lifetimes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d367024b3f3414d8e01f437f704f41a9f64ab36f9067fa73e526ad4c763c87" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] + +[[package]] +name = "is-terminal" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" +dependencies = [ + "hermit-abi", + "io-lifetimes", + "rustix", + "windows-sys 0.45.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52b2de84ed0341893ce61ca1af04fa54eea0a764ecc38c6855cc5db84dc1927" +dependencies = [ + "is-terminal", +] + +[[package]] +name = "itertools" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f3e61cf687687b30c9e6ddf0fc36cf15f035e66d491e6da968fa49ffa9a378" + +[[package]] +name = "js-sys" +version = "0.3.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" +dependencies = [ + "version_check", +] + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "linux-raw-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" + +[[package]] +name = "log" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a89a0c46ba789b8a247d4c567aed4d7c68e624672d238b45cc3ec20dc9f940" +dependencies = [ + "cfg-if 0.1.2", +] + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76fc44e2588d5b436dbc3c6cf62aef290f90dab6235744a93dfe1cc18f451e2c" + +[[package]] +name = "memoffset" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea4bf2ae5c6a9c64c2ba12b0c5a73b2e24d9aa205a1c3e1cdd7d0c0c1bfe3b2" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg 1.0.0", +] + +[[package]] +name = "num_cpus" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55aabf4e2d6271a2e4e4c0f2ea1f5b07cc589cc1a9e9213013b54a76678ca4f3" +dependencies = [ + "libc", +] + +[[package]] +name = "once_cell" +version = "1.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" + +[[package]] +name = "once_cell_polyfill" +version = "1.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ecf5dec444661aad892044dfcc6ea9b2d1be3db6c78916b91bbf9d903fc3006" +dependencies = [ + "once_cell", +] + +[[package]] +name = "oorandom" +version = "11.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" + +[[package]] +name = "plotters" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07fffcddc1cb3a1de753caa4e4df03b79922ba43cf882acc1bdd7e8df9f4590" + +[[package]] +name = "plotters-svg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38a02e23bd9604b842a812063aec4ef702b57989c37b655254bb61c471ad211" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" + +[[package]] +name = "proc-macro2" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +dependencies = [ + "getrandom", + "zerocopy", +] + +[[package]] +name = "rayon" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +dependencies = [ + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" +dependencies = [ + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "regex" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d58da636bd923eae52b7e9120271cbefb16f399069ee566ca5ebf9c30e32238" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3cbb081b9784b07cceb8824c8583f86db4814d172ab043f3c23f7dc600bf83d" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a83a7388764c45ed5398d976243a05dcb325c35b867b438aafce72c8b59576" +dependencies = [ + "bitflags 1.2.1", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", +] + +[[package]] +name = "rustreexo" +version = "0.5.0" +dependencies = [ + "bitcoin-io", + "bitcoin_hashes", + "clap", + "clap_builder", + "clap_lex", + "criterion", + "foldhash", + "hashbrown", + "hex-conservative 1.0.0", + "rand", + "regex", + "serde", + "serde_json", +] + +[[package]] +name = "ryu" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" + +[[package]] +name = "same-file" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3257af0472da4b8b8902102a57bafffd9991f0f43772a8af6153d597e6e4ae2" +dependencies = [ + "winapi", +] + +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.81", +] + +[[package]] +name = "serde_json" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "1.0.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "syn" +version = "2.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "198514704ca887dd5a1e408c6c6cdcba43672f9b4062e1b24aa34e74e6d7faae" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tinytemplate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "version_check" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" + +[[package]] +name = "walkdir" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f4ebb15cedacc4a9f5c3469ca29787482d0b7502ff5a4a47ed1f55b987c9b4" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.13.0+wasi-0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "652cd73449d0b957a2743b70c72d79d34a5fa505696488f4ca90b46f6da94118" +dependencies = [ + "bitflags 2.4.2", + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn 1.0.67", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.67", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" + +[[package]] +name = "web-sys" +version = "0.3.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3ad91d846a4a5342c1fb7008d26124ee6cf94a3953751618577295373b32117" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a16a8e2ebfc883e2b1771c6482b1fb3c6831eab289ba391619a2d93a7356220f" + +[[package]] +name = "winapi-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca29cb03c8ceaf20f8224a18a530938305e9872b1478ea24ff44b4f503a1d1d" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.1", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm 0.42.1", + "windows_x86_64_msvc 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-sys" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e5de29ca9cfd0b9822d586cfdcb4e2fe54d71011b33212473628cef1b23a0fe" +dependencies = [ + "windows-targets 0.53.2", +] + +[[package]] +name = "windows-targets" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.1", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm 0.42.1", + "windows_x86_64_msvc 0.42.1", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "wit-bindgen-rt" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026d24a27f6712541fa534f2954bd9e0eb66172f033c2157c0f31d106255c497" + +[[package]] +name = "zerocopy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7885ffcb82507a0f213c593e77c5f13d12cb96588d4e835ad7e9423ba034db" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "930ad75608219e8ffdb8962a5433cb2b30064c7ccb564d3b76c2963390b1e435" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.81", +] diff --git a/Cargo-recent.lock b/Cargo-recent.lock new file mode 100644 index 00000000..6acc5d6d --- /dev/null +++ b/Cargo-recent.lock @@ -0,0 +1,796 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "bitcoin-consensus-encoding" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d7ca3dc8ff835693ad73bf1596240c06f974a31eeb3f611aaedf855f1f2725" +dependencies = [ + "bitcoin-internals", +] + +[[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" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fb823712b12e5cfccdb9a2b6a62de2dc42ddb5ec489511025eebeba1c21829" +dependencies = [ + "bitcoin-consensus-encoding", + "bitcoin-internals", + "bitcoin_hashes", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a45c2b41c457a9a9e4670422fcbdf109afb3b22bc920b4045e8bdfd788a3d" +dependencies = [ + "bitcoin-consensus-encoding", + "bitcoin-internals", + "hex-conservative 0.3.2", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex-conservative" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830e599c2904b08f0834ee6337d8fe8f0ed4a63b5d9e7a7f49c0ffa06d08d360" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-conservative" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366fa3443ac84474447710ec17bb00b05dfbd096137817981e86f992f21a2793" + +[[package]] +name = "is-terminal" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.184" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "rustreexo" +version = "0.5.0" +dependencies = [ + "bitcoin-io", + "bitcoin_hashes", + "clap", + "clap_builder", + "clap_lex", + "criterion", + "foldhash", + "hashbrown", + "hex-conservative 1.0.1", + "rand", + "regex", + "serde", + "serde_json", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd70027e39b12f0849461e08ffc50b9cd7688d942c1c8e3c7b22273236b4dd0a" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" From d832de8dc560665bb75ebfd1f0f7d6e92da72511 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 19:59:38 -0300 Subject: [PATCH 06/10] feat(ci): add commit signature check workflow --- .github/workflows/signatures.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/signatures.yml diff --git a/.github/workflows/signatures.yml b/.github/workflows/signatures.yml new file mode 100644 index 00000000..b7b5779a --- /dev/null +++ b/.github/workflows/signatures.yml @@ -0,0 +1,25 @@ +name: Signed Commits + +on: [push, pull_request] + +permissions: {} +env: + CARGO_TERM_COLOR: always + +jobs: + commit-signatures: + name: Assert all commits are PGP-signed + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Setup just + uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3 + + - name: Check commit signatures + run: just check-sigs From 1f215ef4739109f822f5c60a07325ea4fb6163d5 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 20:00:50 -0300 Subject: [PATCH 07/10] chore(ci): update and format workflows --- .github/dependabot.yml | 30 +++++++++++----------- .github/workflows/audit.yml | 49 ++++++++++++++++-------------------- .github/workflows/zizmor.yml | 34 ++++++++++++++----------- 3 files changed, 56 insertions(+), 57 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3257ca2e..2ef67729 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,16 +1,18 @@ version: 2 + updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" - time: "00:00" - cooldown: - default-days: 14 - - package-ecosystem: "cargo" - directory: "/" - schedule: - interval: "monthly" - time: "00:00" - cooldown: - default-days: 14 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + time: "00:00" + cooldown: + default-days: 14 + + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "monthly" + time: "00:00" + cooldown: + default-days: 14 diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index e39347d5..e04f724f 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -1,35 +1,28 @@ name: Security Audit on: [push, pull_request] - env: - CARGO_TERM_COLOR: always - + CARGO_TERM_COLOR: always permissions: {} jobs: - supply-chain: - name: 'cargo-audit' - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: Install Rust toolchain - run: rustup toolchain install stable --no-self-update - - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - with: - cache-on-failure: true - - - name: Install cargo-audit - run: cargo install cargo-audit@0.22.0 --force --locked - - - name: Check for audit warnings - run: cargo audit -D warnings - continue-on-error: true - - - name: Check for vulnerabilities - run: cargo audit + audit: + name: cargo-audit + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install cargo-audit + run: cargo install cargo-audit@0.22.1 --locked + + - name: Check for audit warnings + run: cargo audit -D warnings + continue-on-error: true + + - name: Check for vulnerabilities + run: cargo audit diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index b510d300..5bcbe959 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -1,21 +1,25 @@ -name: GitHub Actions Security Analysis with zizmor - -on: [push, pull_request] +name: Zizmor +on: + push: + pull_request: + schedule: + - cron: "0 12 * * 1" # Monday, 12:00:00 UTC + workflow_dispatch: permissions: {} jobs: - zizmor: - name: zizmor - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false + zizmor: + name: Action Static Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - - name: Install uv - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 + - name: Install uv + uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 - - name: Run zizmor - run: uvx zizmor . + - name: Run zizmor + run: uvx zizmor . From a8a32dae5b67c78e076e521b9c6f4598359074ed Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 20:01:30 -0300 Subject: [PATCH 08/10] feat(ci): update benchmark workflow Update and simplify the old, and apparently (vibe)enginereed, benchmark job to use `cargo-rbmt`. --- .github/workflows/bench.yml | 63 +++++++ .github/workflows/benchmarks.yml | 241 --------------------------- contrib/collect_benchmark_results.sh | 62 ------- 3 files changed, 63 insertions(+), 303 deletions(-) create mode 100644 .github/workflows/bench.yml delete mode 100644 .github/workflows/benchmarks.yml delete mode 100755 contrib/collect_benchmark_results.sh diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 00000000..f4bbf12d --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,63 @@ +name: Performance Benchmark + +on: + push: + pull_request: + schedule: + - cron: "0 12 * * *" + workflow_dispatch: + +permissions: {} +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +jobs: + benchmark: + name: Run Performance Benchmarks + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup build cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + + - name: Setup cargo-rbmt + uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 + + - name: Display system and commit information + env: + BRANCH_REF: ${{ github.ref_name }} + COMMIT_SHA: ${{ github.sha }} + run: | + echo "Rust version: $(rustc --version)" + echo "CPU cores: $(nproc)" + echo "Memory: $(free -h)" + echo "Branch: $BRANCH_REF" + echo "Commit: $COMMIT_SHA" + + - name: Run Benchmarks + run: cargo rbmt bench + + - name: Summarize Benchmark Results + run: | + echo "## Benchmark Results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + find target/criterion -name "estimates.json" -path "*/new/*" | sort | while read -r f; do + name=$(echo "$f" | sed 's|target/criterion/||' | sed 's|/new/estimates.json||') + slope=$(jq '.slope.point_estimate' "$f") + echo "- \`$name\`: ${slope}ns" >> $GITHUB_STEP_SUMMARY + done + + - name: Upload HTML reports + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + with: + name: benchmark-html-reports-${{ github.run_number }} + path: target/criterion/ + retention-days: 30 diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml deleted file mode 100644 index 4d1958e4..00000000 --- a/.github/workflows/benchmarks.yml +++ /dev/null @@ -1,241 +0,0 @@ -name: Performance Benchmarks - -on: - push: - branches: [main] - pull_request: - branches: [main] - schedule: - # Run benchmarks daily at 2 AM UTC for performance monitoring - - cron: "0 2 * * *" - workflow_dispatch: - inputs: - benchmark_suite: - description: "Benchmark suite to run" - required: false - default: "all" - type: choice - options: - - all - - stump - - proof - - accumulator - - simple - baseline: - description: 'Compare against baseline (branch name or "none")' - required: false - default: "none" - type: string - -permissions: - contents: read - -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 - -jobs: - benchmark: - name: Run Performance Benchmarks - runs-on: ${{ matrix.os }} - permissions: - contents: read - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - include: - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - - os: macos-latest - target: x86_64-apple-darwin - - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - fetch-depth: 0 # Full history for baseline comparison - persist-credentials: false - - - name: Install Rust toolchain - run: rustup toolchain install stable --component clippy,rustfmt --no-self-update - - - name: Configure Rust cache - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - with: - key: ${{ matrix.os }}-benchmark-stable - cache-on-failure: true - - - name: System information - run: | - echo "System Information:" - echo "OS: ${{ matrix.os }}" - echo "Target: ${{ matrix.target }}" - echo "Rust version: $(rustc --version)" - echo "CPU cores: $(nproc 2>/dev/null || sysctl -n hw.ncpu)" - echo "Memory: $(free -h 2>/dev/null || echo 'N/A on macOS')" - echo "Disk space: $(df -h . | tail -1)" - - - name: Install dependencies (Linux) - if: runner.os == 'Linux' - run: | - echo "Installing benchmark dependencies..." - sudo apt-get update - sudo apt-get install -y gnuplot - - - name: Install dependencies (macOS) - if: runner.os == 'macOS' - run: | - echo "Installing benchmark dependencies..." - brew install gnuplot coreutils || true - - - name: Optimize environment for benchmarking (macOS) - if: runner.os == 'macOS' - run: | - echo "Optimizing macOS environment for benchmarking..." - # Reduce background processes impact - sudo launchctl unload /System/Library/LaunchDaemons/com.apple.mds.messages.scan.plist || true - - - name: Validate benchmark compilation - run: | - echo "Checking benchmark compilation..." - cargo check --benches --verbose - echo "Benchmarks compile successfully ✅" - - - name: Run quick benchmark check - run: | - echo "Running quick benchmark compilation check..." - cargo bench --bench stump_benchmarks --help > /dev/null || echo "Benchmark help completed" - - - name: Run Stump benchmarks - if: ${{ github.event.inputs.benchmark_suite == 'all' || github.event.inputs.benchmark_suite == 'stump' || github.event.inputs.benchmark_suite == '' }} - timeout-minutes: 30 - run: | - echo "Running Stump accumulator benchmarks..." - mkdir -p benchmark-results - cargo bench --bench stump_benchmarks - echo "✅ Stump benchmarks completed successfully" - - - name: Run Proof benchmarks - if: ${{ github.event.inputs.benchmark_suite == 'all' || github.event.inputs.benchmark_suite == 'proof' || github.event.inputs.benchmark_suite == '' }} - timeout-minutes: 30 - run: | - echo "Running Proof operation benchmarks..." - mkdir -p benchmark-results - cargo bench --bench proof_benchmarks - echo "✅ Proof benchmarks completed successfully" - - - name: Run Accumulator comparison benchmarks - if: ${{ github.event.inputs.benchmark_suite == 'all' || github.event.inputs.benchmark_suite == 'accumulator' || github.event.inputs.benchmark_suite == '' }} - timeout-minutes: 30 - run: | - echo "Running Accumulator comparison benchmarks..." - mkdir -p benchmark-results - cargo bench --bench accumulator_benchmarks - echo "✅ Accumulator benchmarks completed successfully" - - - name: Run all benchmarks with HTML report generation - if: ${{ github.event.inputs.benchmark_suite == 'all' || github.event.inputs.benchmark_suite == '' }} - timeout-minutes: 30 - run: | - echo "Generating comprehensive HTML reports..." - cargo bench - echo "✅ Full benchmark suite with HTML reports completed successfully" - - - name: Generate performance summary - env: - BRANCH_NAME: ${{ github.ref_name }} - RUNNER_NAME: ${{ runner.name }} - BENCHMARK_SUITE: ${{ github.event.inputs.benchmark_suite || 'all' }} - BASELINE: ${{ github.event.inputs.baseline || 'none' }} - run: | - echo "Generating performance summary..." - mkdir -p benchmark-results - - # Create a summary file - cat > benchmark-results/summary.md << EOF - # Benchmark Results Summary - - **Date:** $(date -u +"%Y-%m-%d %H:%M:%S UTC") - **OS:** ${{ matrix.os }} - **Rust:** $(rustc --version) - **Commit:** ${{ github.sha }} - **Branch:** ${BRANCH_NAME} - - ## Environment - - **CPU Cores:** $(nproc 2>/dev/null || sysctl -n hw.ncpu) - - **Runner:** ${RUNNER_NAME} - - **Architecture:** ${{ matrix.target }} - - ## Benchmark Execution - - **Trigger:** ${{ github.event_name }} - - **Suite:** ${BENCHMARK_SUITE} - - **Baseline:** ${BASELINE} - - ## Results - Detailed results are available in the artifacts and HTML reports. - - Key performance metrics: - - Stump operations: See stump_results.json - - Proof operations: See proof_results.json - - Accumulator comparisons: See accumulator_results.json - EOF - - - name: Collect benchmark artifacts - env: - BRANCH_NAME: ${{ github.ref_name }} - WORKFLOW_NAME: ${{ github.workflow }} - run: | - echo "Collecting benchmark artifacts..." - - # Use the benchmark collection script - bash contrib/collect_benchmark_results.sh benchmark-results - - mkdir -p artifacts - - # Copy collected results - cp -r benchmark-results/* artifacts/ 2>/dev/null || echo "No benchmark results to copy" - - # Copy HTML reports - cp -r target/criterion artifacts/html-reports 2>/dev/null || echo "No HTML reports to copy" - - # Copy logs - find . -name "*.log" -exec cp {} artifacts/ \; 2>/dev/null || echo "No logs found" - - # Create archive info - echo "Archive created: $(date)" > artifacts/archive-info.txt - echo "Commit: ${{ github.sha }}" >> artifacts/archive-info.txt - echo "Branch: ${BRANCH_NAME}" >> artifacts/archive-info.txt - echo "Workflow: ${WORKFLOW_NAME}" >> artifacts/archive-info.txt - echo "Run number: ${{ github.run_number }}" >> artifacts/archive-info.txt - - - name: Upload benchmark results - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - with: - name: benchmark-results-${{ matrix.os }}-${{ github.run_number }} - path: artifacts/ - retention-days: 90 - compression-level: 6 - - - name: Upload HTML reports - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - if: always() - with: - name: benchmark-html-reports-${{ matrix.os }}-${{ github.run_number }} - path: target/criterion/ - retention-days: 30 - compression-level: 9 - - cleanup: - name: Cleanup - runs-on: ubuntu-latest - if: always() - needs: [benchmark] - permissions: - contents: read - - steps: - - name: Reset environment - run: | - echo "Cleanup completed - environment reset for next run" - echo "Benchmark workflow execution finished" diff --git a/contrib/collect_benchmark_results.sh b/contrib/collect_benchmark_results.sh deleted file mode 100755 index ff156f53..00000000 --- a/contrib/collect_benchmark_results.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Collect benchmark results from Criterion output -# This script runs after benchmarks complete to gather results - -set -e - -RESULTS_DIR="${1:-benchmark-results}" -mkdir -p "$RESULTS_DIR" - -echo "Collecting benchmark results..." - -# Check if Criterion generated reports -if [ -d "target/criterion" ]; then - echo "✅ Found Criterion reports" - - # Create a summary of all benchmark results - find target/criterion -name "raw.csv" | while read -r file; do - benchmark_name=$(echo "$file" | sed 's|target/criterion/||' | sed 's|/raw.csv||') - echo "Found benchmark: $benchmark_name" - - # Extract key metrics from the raw data - if [ -f "$file" ]; then - # Get the last (most recent) measurement - tail -n 1 "$file" > "$RESULTS_DIR/${benchmark_name}_latest.csv" 2>/dev/null || true - fi - done - - # Create a summary JSON with key metrics - cat > "$RESULTS_DIR/summary.json" << 'EOF' -{ - "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", - "benchmarks_found": $(find target/criterion -name "raw.csv" | wc -l), - "status": "completed", - "criterion_version": "0.5", - "environment": { - "os": "$(uname -s)", - "arch": "$(uname -m)", - "cpu_count": "$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 'unknown')" - } -} -EOF - - echo "✅ Benchmark results collected successfully" - echo "Results saved to: $RESULTS_DIR" - echo "Benchmark count: $(find target/criterion -name "raw.csv" | wc -l)" - -else - echo "⚠️ No Criterion reports found" - echo "This might indicate benchmark execution issues" - - # Create a minimal status file - cat > "$RESULTS_DIR/status.json" << 'EOF' -{ - "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", - "status": "no_reports_found", - "error": "Criterion reports directory not found" -} -EOF -fi - -echo "Benchmark result collection completed" \ No newline at end of file From 3fc800813f07062fd793d05a017abd190773c61f Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 20:03:22 -0300 Subject: [PATCH 09/10] feat(ci): update Rust CI workflow to use `cargo-rbmt` Improves the Rust CI to use `cargo-rbmt` coupled with a matrix strategy, now testing these (toolchain, lockfile) pairs: - stable + minimal - stable + recent - nightly + minimal - nightly + recent - msrv + minimal --- .github/workflows/rust.yml | 159 +++++++++++++++++-------------------- 1 file changed, 73 insertions(+), 86 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2fc30d37..94508316 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,91 +1,78 @@ -name: Rust +name: Rust CI -permissions: - contents: read +on: [push, pull_request] +permissions: {} env: - CARGO_TERM_COLOR: always - -on: [push, pull_request] + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 jobs: - check: - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: Install nightly Rust toolchain - run: rustup toolchain install nightly --component clippy,rustfmt --no-self-update - - - name: Setup just - uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0 - - - name: Run just check - run: just check - - test-msrv: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: Install MSRV Rust toolchain (1.74.0) - run: rustup toolchain install 1.74.0 --no-self-update - - - name: Setup just - uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0 - - - name: Run MSRV tests - run: just test-msrv - - cross-testing: - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - toolchain: [nightly, stable] - - runs-on: ${{ matrix.os }} - permissions: - contents: read - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: Install Rust toolchain - run: rustup toolchain install ${{ matrix.toolchain }} --component rustfmt,clippy --no-self-update - - - name: Show Rust toolchain - run: rustc +${{ matrix.toolchain }} -Vv - - - name: Setup just - uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0 - - - name: Run Tests - run: just test-${{ matrix.toolchain }} - - no-std: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - # Common bare-metal Cortex-M target (no_std: `core` + `alloc`) - - name: Install MSRV Rust toolchain - run: | - rustup toolchain install 1.74.0 --no-self-update - rustup target add thumbv7em-none-eabi --toolchain 1.74.0 - - - name: Build for no_std target - shell: bash - run: | - cargo +1.74.0 build --lib --target thumbv7em-none-eabi --no-default-features + check: + name: Check - ${{ matrix.task }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + task: [fmt --check, lint, docs] + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup build cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + + - name: Setup cargo-rbmt + uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 + + - name: Run ${{ matrix.task }} + run: cargo rbmt ${{ matrix.task }} + + test: + name: Test - ${{ matrix.toolchain }} toolchain, ${{ matrix.lockfile }} deps + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly, msrv] + lockfile: [minimal, recent] + exclude: + - toolchain: msrv + lockfile: recent + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup build cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + + - name: Setup cargo-rbmt + uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 + + - name: Run tests + run: cargo rbmt test --toolchain ${{ matrix.toolchain }} --lock-file ${{ matrix.lockfile }} + + test-no-std: + name: Test - no-std, msrv toolchain, minimal deps + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup build cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + + - name: Setup cargo-rbmt + uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 + + - name: Add no_std target + run: rustup target add thumbv7m-none-eabi --toolchain 1.74.0 + + - name: Run no_std tests + run: cargo rbmt test --toolchain msrv --lock-file minimal From 134d20acd70cd725ba45d0c4d63c558ff4c1fe56 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Apr 2026 20:07:01 -0300 Subject: [PATCH 10/10] feat(doc): update `README.md` --- README.md | 111 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index dd732147..2cb5b238 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,107 @@ -# rustreexo - Utreexo in rust +# rustreexo

- - + + - +

-Utreexo is a dynamic hash-based accumulator designed to be used as a set membership proof system. -It is used in the Bitcoin network to compress the UTXO set. This is a pure-rust implementation of -the accumulator, allowing proving and verifying set membership proofs. +A Rust implementation of [Utreexo](https://eprint.iacr.org/2019/611), a dynamic hash-based accumulator optimized for the Bitcoin UTXO set. -## Usage +Utreexo enables constructing a succinct representation of the Bitcoin UTXO in a logarithmic +amount of size, by leveraging Merkle trees. Set membership can be proven and verified +through Merkle inclusion proofs. + +This library implements three accumulator primitives: + +- [`Stump`](src/stump/mod.rs): keeps the roots of the Merkle forest, using $O(\log{n})$ space + +- [`Pollard`](src/pollard/mod.rs): keeps a specific set of leaves of the Merkle forest, using $O(k \cdot \log{n})$ space + +- [`MemForest`](src/mem_forest/mod.rs): keeps all leaves of the Merkle forest, using $O(n)$ space, -Rustreexo provides two basic data structures to represent the accumulator, `Stump` and `Pollard`. -`Stump` is a lightweight version of the accumulator that only keeps the roots, and therefore only -uses `O(log n)` space. `Pollard` is a more complete version of the accumulator that keeps the full tree, -and therefore uses `O(n)` space. However, both data structures implements the same algorithms, -so a proof generated by a `Pollard` is meant to be verified by a `Stump`. Here's how to use the `Stump`: +where $n$ is the number of leaves, and $k$ is the number of cached leaves. -```rust +## Usage + +```rs +use rustreexo::node_hash::BitcoinNodeHash; +use rustreexo::proof::Proof; use rustreexo::stump::Stump; +let utxo = BitcoinNodeHash::from_str("b151a956139bb821d4effa34ea95c17560e0135d1e4661fc23cedc3af49dac42").unwrap(); + +// Create an accumulator let stump = Stump::new(); -// Modify the accumulator, adding UTXOs and removing STXOs, that are proved by del_proof -let (stump, _) = stump.modify(utxos, stxos, del_proof).unwrap(); -// Verify a proof for a UTXO -assert!(stump.verify(utxo_proof).unwrap()); + +// Add the UTXO to the accumulator +let (stump, _) = stump.modify(&vec![utxo], &[], &Proof::default()).unwrap(); + +// Create an inclusion proof for the UTXO that was added +let proof = Proof::new(vec![0], vec![utxo]); + +// Remove the UTXO from the accumulator by proving its set membership +let (stump, _) = stump.modify(&vec![], &vec![utxo], &proof).unwrap(); ``` -for a complete example, see `examples/`. +To see complete usage examples, refer to the [`examples/`](./examples) folder. -## Minimum Supported Rust Version (MSRV) +## Developing -This library should compile with any combination of features on Rust **1.74.0**. +This project uses [`cargo-rbmt`](https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools/tree/master/cargo-rbmt) +to manage everything related to `cargo`, such as formatting, linting, testing and CI. To install it, run: -## No-std support +```console +~$ cargo install cargo-rbmt +``` + +A `justfile` is provided for convenience. Run `just` to see available commands: + +```console +~$ just +> rustreexo +> A Rust implementation of Utreexo + +Available recipes: + bench BENCH="" # Run benchmarks: accumulator, proof, stump + check # Check code formatting, compilation, and linting [alias: c] + check-sigs # Checks whether all commits in this branch are signed [alias: cs] + doc # Generate documentation [alias: d] + doc-open # Generate and open documentation [alias: do] + fmt # Format code [alias: f] + lock # Regenerate Cargo-recent.lock and Cargo-minimal.lock [alias: l] + pre-push # Run pre-push suite: lock, fmt, check, test, and test-no-std [alias: p] + test # Run tests across all toolchains and lockfiles [alias: t] + test-no-std # Run no_std build check with the MSRV toolchain (1.74.0) [alias: tns] +``` -The `std` cargo feature is enabled by default. To build this project without the Rust standard -library, use the `--no-default-features` flag or set `default-features = false` in your dependency -declaration when adding it to your project. +## Minimum Supported Rust Version (MSRV) -## Testing +This library should compile with any combination of features on Rust 1.74.0. -This library contains an exhaustive test suite that covers all the algorithms implemented. -To run the tests, simply run `just test`, or `just test-msrv` to test with the MSRV toolchain of 1.74.0. -We test for internal code sanity and cross-test with values generated by the -[utreexo](https://github.com/utreexo/utreexo) library. +To build with the MSRV toolchain, copy `Cargo-minimal.lock` to `Cargo.lock`. ## License Licensed under either of -- MIT license ([LICENSE-MIT](LICENSE-MIT) or ) -- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or ) at your option. +## Contribution + +Unless you explicitly state otherwise, any contribution intentionally +submitted for inclusion in the work by you, as defined in the Apache-2.0 +license, shall be dual licensed as above, without any additional terms or +conditions. + ## References - [Utreexo: A dynamic hash-based accumulator optimized for the Bitcoin UTXO set](https://eprint.iacr.org/2019/611.pdf) - [Dev++ 03-09-EN | Acumulator Based Cryptography & UTreexo](https://www.youtube.com/watch?v=xlKQP9J88uA) - [What is UTreeXO? with Calvin Kim](https://www.youtube.com/watch?v=IcHW6RsZR7o) -- [Rustreexo](https://blog.dlsouza.lol/bitcoin/utreexo/2023/07/07/rustreexo.html) - -## Contributing - -Contributions are welcome! Please feel free to submit a Pull Request. +- [rustreexo](https://blog.dlsouza.lol/bitcoin/utreexo/2023/07/07/rustreexo.html)