Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
152505f
chore: increment crate version to 0.17.0
bobbinth Aug 16, 2025
8880105
Merge branch 'main' into next
bobbinth Aug 16, 2025
bc02f44
fix: correct rescue import paths in CPU-specific implementations (#492)
krushimir Aug 18, 2025
338697c
Merge branch 'main' into next
bobbinth Aug 22, 2025
337f12b
Remove redundant length checks after read_array in SecretKey deserial…
Galoretka Aug 27, 2025
3427cda
Benchmarks refactor & expansion (#503)
huitseeker Aug 31, 2025
deea5b7
chore: minor readme updates
bobbinth Aug 31, 2025
f20ce04
fix: `benchmark_rand_core!` not calling `b.iter()` properly (#505)
huitseeker Aug 31, 2025
4d58c81
chore: add concurrency and permissions to CI jobs (#508)
mmagician Sep 1, 2025
38fa34c
feat: add ECDH and ECDSA (with key recovery mode) over secp256k1 curv…
Al-Kindi-0 Sep 2, 2025
8ae10db
chore: update read-me file with ECDSA and ECDH (#513)
Al-Kindi-0 Sep 2, 2025
9019e8c
chore: expand & re-use lint CI workflows (#509)
mmagician Sep 3, 2025
9995b03
feat: added XChaCha20-Poly1305 AEAD scheme (#484)
Al-Kindi-0 Sep 4, 2025
a65eb53
feat: add arithmetization oriented authenticated encryption with asso…
Al-Kindi-0 Sep 5, 2025
0c81ee2
refactor: make `SmtLeaf::entries()` return a slice (#521)
bobbinth Sep 7, 2025
fb6ff6d
feat: implement Large SMT (#438)
krushimir Sep 9, 2025
d2a1fea
chore: Implement element encryption for XChaCha (#530)
Al-Kindi-0 Sep 10, 2025
b6ed24c
chore: move SUBTREE_DEPTHS constants to LargeSmt
bobbinth Sep 10, 2025
cdff823
chore: update changelog
bobbinth Sep 10, 2025
9b121f8
chore: fix build
bobbinth Sep 10, 2025
51ef414
chore: fix build
bobbinth Sep 10, 2025
57eae8f
chore: add permissions to lint workflow
bobbinth Sep 12, 2025
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
13 changes: 9 additions & 4 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
[profile.default]
default-filter = 'not (test(merkle::smt::full::concurrent) or test(merkle::smt::full::large) or binary(rocksdb_large_smt))'
fail-fast = false
failure-output = "immediate-final"
fail-fast = false
default-filter = 'not test(merkle::smt::full::concurrent)'

[profile.smt-concurrent]
failure-output = "immediate-final"
fail-fast = false
default-filter = 'test(merkle::smt::full::concurrent)'
fail-fast = false
failure-output = "immediate-final"

[profile.large-smt]
default-filter = '(test(merkle::smt::full::large) or binary(rocksdb_large_smt))'
fail-fast = false
failure-output = "immediate-final"
43 changes: 43 additions & 0 deletions .github/actions/install-llvm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Install LLVM"
description: "Install a specific LLVM/Clang version"
inputs:
version:
description: "LLVM major version to install"
default: "17"

runs:
using: "composite"
steps:
- shell: bash
run: |
set -eux
CODENAME="$(. /etc/os-release && echo "$UBUNTU_CODENAME")"

# Add apt.llvm.org repo
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | \
sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] \
http://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${{ inputs.version }} main" | \
sudo tee /etc/apt/sources.list.d/llvm.list

sudo apt-get update
sudo apt-get install -y \
clang-17 \
lld-17 \
llvm-17-dev \
libclang-17-dev

sudo ln -sf /usr/lib/llvm-${{ inputs.version }}/lib/libclang-${{ inputs.version }}.so \
/usr/lib/llvm-${{ inputs.version }}/lib/libclang.so

echo "/usr/lib/llvm-${{ inputs.version }}/lib" | \
sudo tee /etc/ld.so.conf.d/llvm-${{ inputs.version }}.conf
sudo ldconfig

# Env for build scripts & tools
echo "LIBCLANG_PATH=/usr/lib/llvm-${{ inputs.version }}/lib" >> "$GITHUB_ENV"
echo "LIBRARY_PATH=/usr/lib/llvm-${{ inputs.version }}/lib:${LIBRARY_PATH:-}" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=/usr/lib/llvm-${{ inputs.version }}/lib:${LD_LIBRARY_PATH:-}" >> "$GITHUB_ENV"
echo "/usr/lib/llvm-${{ inputs.version }}/bin" >> "$GITHUB_PATH"
echo "CC=clang-${{ inputs.version }}" >> "$GITHUB_ENV"
echo "CXX=clang++-${{ inputs.version }}" >> "$GITHUB_ENV"
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

name: build

# Limits workflow concurrency to only the latest commit in the PR.
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

on:
push:
branches: [main, next]
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
no-std:
name: Build for no-std
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@

name: changelog

# Limits workflow concurrency to only the latest commit in the PR.
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

on:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]

permissions:
contents: read

jobs:
changelog:
runs-on: ubuntu-latest
Expand Down
101 changes: 80 additions & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,102 @@
# Runs linting related jobs.
# Runs linting related jobs (local copy with LLVM for clippy/doc).

name: lint

on:
push:
branches: [main, next]
branches: [ main, next ]
pull_request:
types: [opened, reopened, synchronize]
types: [ opened, reopened, synchronize ]

jobs:
clippy:
name: clippy nightly on ubuntu-latest
typos:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@main
- name: Clippy
run: |
rustup update --no-self-update nightly
rustup +nightly component add clippy
make clippy
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: typos
- run: make typos-check

rustfmt:
name: rustfmt check nightly on ubuntu-latest
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Rustfmt
- uses: actions/checkout@v4
- name: Rustup
run: |
rustup update --no-self-update nightly
rustup default ${{ matrix.toolchain }}
rustup +nightly component add rustfmt
make format-check
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', inputs.target_branch) }}
- name: Fmt
run: make format-check

doc:
name: doc stable on ubuntu-latest
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Build docs
- uses: actions/checkout@v4
# Added: LLVM/Clang for RocksDB/bindgen
- name: Install LLVM/Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "17"
- name: Rustup
run: |
rustup update --no-self-update
make doc
rustup component add clippy
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', inputs.target_branch) }}
- name: Clippy
run: make clippy

toml:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- run: make toml-check

workspace-lints:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-workspace-lints
- run: |
make workspace-check

doc:
name: doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Added: LLVM/Clang for RocksDB/bindgen
- name: Install LLVM/Clang
uses: ./.github/actions/install-llvm
with:
version: "17"
- name: Rustup
run: rustup update --no-self-update
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', inputs.target_branch) }}
- name: Build docs
run: make doc

unused_deps:
name: check for unused dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: machete
uses: bnjbvr/cargo-machete@main
19 changes: 18 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

name: test

# Limits workflow concurrency to only the latest commit in the PR.
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

on:
push:
branches: [main, next]
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
test:
name: test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.args}}
Expand All @@ -17,11 +25,16 @@ jobs:
matrix:
toolchain: [stable, nightly]
os: [ubuntu]
args: [default, hashmaps, no-std]
args: [default, hashmaps, no-std, large-smt]
timeout-minutes: 30
steps:
- uses: actions/checkout@main
- uses: taiki-e/install-action@nextest
- name: Install LLVM/Clang
if: ${{ matrix.args == 'large-smt' }}
uses: ./.github/actions/install-llvm
with:
version: "17"
- name: Perform tests
run: |
rustup update --no-self-update ${{matrix.toolchain}}
Expand Down Expand Up @@ -55,6 +68,10 @@ jobs:
steps:
- uses: actions/checkout@main
- uses: Swatinem/rust-cache@v2
- name: Install LLVM/Clang
uses: ./.github/actions/install-llvm
with:
version: "17"
- name: Run doc-tests
run: |
rustup update --no-self-update
Expand Down
6 changes: 6 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[formatting]
align_entries = true
column_width = 120
reorder_arrays = true
reorder_inline_tables = true
reorder_keys = true
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
## 0.17.0 (TBD)

- Added `LargeSmt`, SMT backed by RocksDB ([#438](https://github.com/0xMiden/miden-crypto/pull/438)).
- added arithmetization oriented authenticated encryption with associated data (AEAD) scheme ([#480](https://github.com/0xMiden/crypto/pull/480)).
- Added XChaCha20-Poly1305 AEAD scheme ([#484](https://github.com/0xMiden/crypto/pull/484)).
- [BREAKING] `SmtLeaf::entries()` now returns a slice ([#521](https://github.com/0xMiden/crypto/pull/521)).

## 0.16.1 (2025-08-21)

- Fix broken imports in CPU-specific `rescue` implementations (AVX2, SVE) ([#492](https://github.com/0xMiden/crypto/pull/492/)).
- Added `{Smt,PartialSmt}::inner_node_indices` to make inner nodes accessible ([#494](https://github.com/0xMiden/crypto/pull/494)).
- Added various benchmarks & related bench utilities ([#503](https://github.com/0xMiden/crypto/pull/503))

## 0.16.0 (2025-08-15)

Expand All @@ -14,6 +22,7 @@
- `Smt.insert_inner_nodes` does not store empty subtrees ([#452](https://github.com/0xMiden/crypto/pull/452)).
- Optimized `Smt::num_entries()` ([#455](https://github.com/0xMiden/crypto/pull/455)).
- [BREAKING] Disallow leaves with more than 2^16 entries ([#455](https://github.com/0xMiden/crypto/pull/455), [#462](https://github.com/0xMiden/crypto/pull/462)).
- Add ECDSA over secp256k1 curve ([#475](https://github.com/0xMiden/crypto/pull/475)).
- [BREAKING] Modified the public key in Falcon DSA to be the polynomial instead of the commitment ([#460](https://github.com/0xMiden/crypto/pull/460)).
- [BREAKING] Use `SparseMerklePath` in SMT proofs for better memory efficiency ([#477](https://github.com/0xMiden/crypto/pull/477)).
- [BREAKING] Rename `SparseValuePath` to `SimpleSmtProof` ([#477](https://github.com/0xMiden/crypto/pull/477)).
Expand Down
Loading
Loading