Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
99b2fea
chore: increment crate versions to v0.23.0
bobbinth Jan 28, 2026
2139bc7
chore: force nightly for fuzz jobs in CI (#807)
huitseeker Jan 30, 2026
3481273
Merge branch 'main' into next
bobbinth Feb 1, 2026
d405c40
Merge branch 'main' into next
bobbinth Feb 2, 2026
12e9fc7
ci: Fix fuzz targets (#815)
huitseeker Feb 2, 2026
3dc60a1
feat: remove hashbrown dependency, tie HashMap to std feature (#813)
Farukest Feb 3, 2026
78a6c86
chore: avoid extra allocations in `MmrPeaks::flatten_and_pad_peaks` (…
MozirDmitriy Feb 3, 2026
3b3a17f
chore: add docs workflow for GitHub Pages (#810)
huitseeker Feb 4, 2026
c857e2a
ci: fix docs publishing to only include workspace crates and add inde…
huitseeker Feb 5, 2026
ff3a912
refactor: use `Digest` struct for BLAKE3 digest types (#811)
Farukest Feb 5, 2026
ac5fe86
refactor: rename NodeIndex `value` to `position`
Farukest Jan 31, 2026
cbc320b
fix: update remaining .value() calls in benchmarks to .position()
Farukest Jan 31, 2026
6ebbf93
chore: add CHANGELOG entry for NodeIndex value-to-position rename
Farukest Feb 6, 2026
921bba8
Merge pull request #814 from Farukest/fix/rename-nodeindex-value-to-p…
plafer Feb 10, 2026
3729056
feat(SmtForest): Implement the in-memory forest (#816)
iamrecursion Feb 11, 2026
7554f53
fix: tuple min_serialized_size excludes alignment padding (#827)
huitseeker Feb 12, 2026
9857772
fix(smt): remove nodes from store when reference count reaches zero (…
sashass1315 Feb 12, 2026
3c3e9d9
refactor(mmr): make `PartialMmr::open()` return `MmrProof` (#787)
krushimir Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Generates and deploys crate documentation to GitHub Pages

name: docs

on:
push:
branches:
- next
paths:
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
docs:
name: Generate and deploy crate documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main

- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner

- name: Install LLVM/Clang
uses: ./.github/actions/install-llvm
with:
version: "17"

- name: Generate documentation
run: |
rustup update --no-self-update
rustup default stable
make doc

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # pin@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
destination_dir: docs
14 changes: 10 additions & 4 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
target: [primitives, collections, string, vint64, goldilocks, budgeted]
timeout-minutes: 15
Expand All @@ -31,19 +32,22 @@ jobs:
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
run: cargo +nightly install cargo-fuzz --locked
- name: Run fuzz target (smoke test)
working-directory: miden-serde-utils
run: |
cargo fuzz run ${{ matrix.target }} -- -max_total_time=60 -runs=10000
cargo +nightly fuzz run ${{ matrix.target }} -- -max_total_time=60 -runs=10000

fuzz-miden-crypto:
name: fuzz miden-crypto (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
target: [word, merkle, smt_serde]
timeout-minutes: 15
Expand All @@ -52,12 +56,14 @@ jobs:
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
run: cargo +nightly install cargo-fuzz --locked
- name: Run fuzz target (smoke test)
run: |
# Build the fuzz target first
cargo fuzz build --fuzz-dir miden-crypto-fuzz ${{ matrix.target }}
cargo +nightly fuzz build --fuzz-dir miden-crypto-fuzz ${{ matrix.target }}
# Run directly to avoid cargo-fuzz wrapper SIGPIPE issue
miden-crypto-fuzz/target/x86_64-unknown-linux-gnu/release/${{ matrix.target }} -max_total_time=60 -runs=10000
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
matrix:
toolchain: [stable, nightly]
os: [ubuntu]
args: [default, hashmaps, no-std, large-smt]
args: [default, no-std, large-smt]
timeout-minutes: 30
steps:
- uses: actions/checkout@main
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 0.23.0 (TBD)

- [BREAKING] `PartialMmr::open()` now returns `Option<MmrProof>` instead of `Option<MmrPath>` ([#787](https://github.com/0xMiden/crypto/pull/787)).
- Fixed `SmtForest` to remove nodes with zero reference count from store ([#821](https://github.com/0xMiden/crypto/pull/821)).
- [BREAKING] Refactored BLAKE3 to use `Digest<N>` struct, added `Digest192` type alias ([#811](https://github.com/0xMiden/crypto/pull/811)).
- [BREAKING] Removed `hashbrown` dependency and `hashmaps` feature; `Map`/`Set` type aliases are now tied to the `std` feature ([#813](https://github.com/0xMiden/crypto/pull/813)).
- [BREAKING] Renamed `NodeIndex::value()` to `NodeIndex::position()`, `NodeIndex::is_value_odd()` to `NodeIndex::is_position_odd()`, and `LeafIndex::value()` to `LeafIndex::position()` ([#814](https://github.com/0xMiden/crypto/pull/814)).
- Fixed tuple `min_serialized_size()` to exclude alignment padding, fixing `BudgetedReader` rejecting valid data ([#827](https://github.com/0xMiden/crypto/pull/827)).

## 0.22.2 (2026-02-01)

- Re-exported `p3_keccak::VECTOR_LEN`.
Expand Down
51 changes: 15 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ keywords = ["crypto", "hash", "merkle", "miden"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/0xMiden/crypto"
rust-version = "1.90"
version = "0.22.2"
version = "0.23.0"

[workspace.dependencies]
miden-crypto-derive = { path = "miden-crypto-derive", version = "0.22" }
miden-serde-utils = { path = "miden-serde-utils", version = "0.22" }
miden-crypto-derive = { path = "miden-crypto-derive", version = "0.23" }
miden-serde-utils = { path = "miden-serde-utils", version = "0.23" }

[workspace.lints.rust]
# Suppress warnings about `cfg(fuzzing)`, which is automatically set when using `cargo-fuzz`.
Expand Down
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ help:

# -- variables --------------------------------------------------------------------------------------

ALL_FEATURES_EXCEPT_ROCKSDB="concurrent executable hashmaps internal serde std"
ALL_FEATURES_EXCEPT_ROCKSDB="concurrent executable internal serde std"
WARNINGS=RUSTDOCFLAGS="-D warnings"

# -- linting --------------------------------------------------------------------------------------
Expand Down Expand Up @@ -60,19 +60,16 @@ lint: format fix clippy toml typos-check machete cargo-deny ## Run all linting t
# --- docs ----------------------------------------------------------------------------------------

.PHONY: doc
doc: ## Generate and check documentation
$(WARNINGS) cargo doc --all-features --keep-going --release
doc: ## Generate and check documentation for workspace crates only
rm -rf "${CARGO_TARGET_DIR:-target}/doc"
RUSTDOCFLAGS="--enable-index-page -Zunstable-options -D warnings" cargo +nightly doc --all-features --keep-going --release --no-deps

# --- testing -------------------------------------------------------------------------------------

.PHONY: test-default
test-default: ## Run tests with default features
cargo nextest run --profile default --cargo-profile test-release --features ${ALL_FEATURES_EXCEPT_ROCKSDB}

.PHONY: test-hashmaps
test-hashmaps: ## Run tests with `hashmaps` feature enabled
cargo nextest run --profile default --cargo-profile test-release --features hashmaps

.PHONY: test-no-std
test-no-std: ## Run tests with `no-default-features` (std)
cargo nextest run --profile default --cargo-profile test-release --no-default-features
Expand All @@ -87,10 +84,10 @@ test-docs:

.PHONY: test-large-smt
test-large-smt: ## Run only large SMT tests
cargo nextest run --success-output immediate --profile large-smt --cargo-profile test-release --features hashmaps,rocksdb
cargo nextest run --success-output immediate --profile large-smt --cargo-profile test-release --features rocksdb

.PHONY: test
test: test-default test-hashmaps test-no-std test-docs test-large-smt ## Run all tests except concurrent SMT tests
test: test-default test-no-std test-docs test-large-smt ## Run all tests except concurrent SMT tests

# --- checking ------------------------------------------------------------------------------------

Expand Down Expand Up @@ -136,15 +133,15 @@ bench-smt-concurrent: ## Run SMT benchmarks with concurrent feature

.PHONY: bench-large-smt-memory
bench-large-smt-memory: ## Run large SMT benchmarks with memory storage
cargo run --release --features concurrent,hashmaps,executable -- --size 1000000
cargo run --release --features concurrent,executable -- --size 1000000

.PHONY: bench-large-smt-rocksdb
bench-large-smt-rocksdb: ## Run large SMT benchmarks with rocksdb storage
cargo run --release --features concurrent,hashmaps,rocksdb,executable -- --storage rocksdb --size 1000000
cargo run --release --features concurrent,rocksdb,executable -- --storage rocksdb --size 1000000

.PHONY: bench-large-smt-rocksdb-open
bench-large-smt-rocksdb-open: ## Run large SMT benchmarks with rocksdb storage and open existing database
cargo run --release --features concurrent,hashmaps,rocksdb,executable -- --storage rocksdb --open
cargo run --release --features concurrent,rocksdb,executable -- --storage rocksdb --open

# --- fuzzing --------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ This crate can be compiled with the following features:
- `concurrent`- enabled by default; enables multi-threaded implementation of `Smt::with_entries()` which significantly improves performance on multi-core CPUs.
- `std` - enabled by default and relies on the Rust standard library.
- `no_std` does not rely on the Rust standard library and enables compilation to WebAssembly.
- `hashmaps` - uses hashbrown hashmaps in SMT and Merkle Store implementation which significantly improves performance of updates. Keys ordering in iterators is not guaranteed when this feature is enabled.
- `rocksdb` - enables the RocksDB-backed storage for `LargeSmt` and related utilities. Implies `concurrent`.
All of these features imply the use of [alloc](https://doc.rust-lang.org/alloc/) to support heap-allocated collections.

Expand Down
25 changes: 8 additions & 17 deletions miden-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,15 @@ name = "rand"
required-features = ["std"]

[features]
concurrent = [
"dep:rayon",
"hashbrown?/rayon",
"p3-maybe-rayon/parallel",
"p3-miden-prover/parallel",
"p3-util/parallel",
"std",
]
default = ["concurrent", "std"]
concurrent = ["dep:rayon", "p3-maybe-rayon/parallel", "p3-miden-prover/parallel", "p3-util/parallel", "std"]
default = ["concurrent", "std"]
executable = ["concurrent", "dep:clap", "dep:rand-utils"]
fuzzing = []
hashmaps = ["dep:hashbrown"]
internal = ["concurrent"]
rocksdb = ["concurrent", "dep:rocksdb"]
serde = ["dep:serde", "serde?/alloc"]
std = ["blake3/std", "dep:cc", "miden-serde-utils/std", "rand/std", "rand/thread_rng"]
testing = ["dep:proptest"]
fuzzing = []
internal = ["concurrent"]
rocksdb = ["concurrent", "dep:rocksdb"]
serde = ["dep:serde", "serde?/alloc"]
std = ["blake3/std", "dep:cc", "miden-serde-utils/std", "rand/std", "rand/thread_rng", "serde?/std"]
testing = ["dep:proptest"]

[dependencies]
blake3 = { default-features = false, version = "1.8" }
Expand All @@ -95,7 +87,6 @@ clap = { features = ["derive"], optional = true, versio
curve25519-dalek = { default-features = false, version = "4" }
ed25519-dalek = { features = ["zeroize"], version = "2" }
flume = { version = "0.11.1" }
hashbrown = { features = ["serde"], optional = true, version = "0.16" }
hkdf = { default-features = false, version = "0.12" }
k256 = { features = ["ecdh", "ecdsa"], version = "0.13" }
miden-crypto-derive.workspace = true
Expand Down
Loading
Loading