Skip to content
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
015753f
feat(rln): initial draft for multi messsage_id burn implementation, u…
vinhtc27 Feb 5, 2026
345acc0
fix(rln-cli): cleanup for non-multi-message-id feature
vinhtc27 Feb 5, 2026
7203012
feat(rln): add multi-message-id example and related resources
vinhtc27 Feb 5, 2026
d5eef9f
feat(rln): add single-message-id example and enhance comments in mult…
vinhtc27 Feb 5, 2026
0e5c7a0
chore(rln): cleanup Readme file for example
vinhtc27 Feb 5, 2026
ac84dec
feat(rln): update selector_used type to Vec<bool> and add serializati…
vinhtc27 Feb 6, 2026
cd8566c
feat(rln): update examples to support multi-message-id feature and ad…
vinhtc27 Feb 6, 2026
994cc71
feat(rln): add testcase to check compatibility of witness and proof_v…
vinhtc27 Feb 6, 2026
0c4ec46
feat(rln): update tests, CI, and docs for multi-message-id feature su…
vinhtc27 Feb 6, 2026
5c33617
chore(rln-wasm): fix proof_values.clone()
vinhtc27 Feb 6, 2026
f784a71
chore(rln): cleanup fmt
vinhtc27 Feb 6, 2026
6fde0ac
chore(utils): wrong cleanup comment
vinhtc27 Feb 6, 2026
af0dd13
feat(rln): add testcase to public.rs test file
vinhtc27 Feb 9, 2026
dcf79bc
chore(rln): update test paths for pmtree configuration
vinhtc27 Feb 9, 2026
9319294
feat(ci): add multi_message_id feature combinations to nightly release
vinhtc27 Feb 9, 2026
9bec70f
fix(ci): update multi_message_id to multi-message-id in nightly relea…
vinhtc27 Feb 9, 2026
5cb13d1
feat(ci): add clippy check for multi-message-id feature in rln crate
vinhtc27 Feb 9, 2026
4a24ee4
feat(rln-cli): add multi-message-id example and update README
vinhtc27 Feb 9, 2026
1114220
refactor(rln): remove examples folder and just use rln-cli for Rust e…
vinhtc27 Feb 9, 2026
6df6967
chore(rln-cli): cleanup unuse deps and pretify cli log
vinhtc27 Feb 9, 2026
5c97a4a
chore: bump deps and remove unuse deps
vinhtc27 Feb 9, 2026
935108f
chore(rln-wasm): remove multi-message-id from default feat
vinhtc27 Feb 9, 2026
6a24c45
feat(rln): update protocol.rs test file after rebase
vinhtc27 Feb 9, 2026
48cf8fb
chore(rln): clippy fix
vinhtc27 Feb 9, 2026
fd40fd8
fix(rln): improve error handling in witness deserialization functions
vinhtc27 Feb 9, 2026
3624666
feat(rln): enhance multi-message-id support in FFI C example
vinhtc27 Feb 12, 2026
2944fc7
feat(rln): enhance multi-message-id support in FFI Nim example
vinhtc27 Feb 12, 2026
e6d2f58
feat(rln-wasm): add multi-message-id support and update examples
vinhtc27 Feb 13, 2026
12cadf3
feat(rln-wasm): add multi-message-id support to CI, nightly release, …
vinhtc27 Feb 13, 2026
f5fd316
fix(ci): normalize feature names for build and test commands in CI wo…
vinhtc27 Feb 13, 2026
1519287
docs: update contributing and README files for clarity and multi-mess…
vinhtc27 Feb 13, 2026
ca5c61d
feat(rln): update README and resources for multi-message-id support o…
vinhtc27 Feb 13, 2026
e9cd908
chore(rln): fix testcase
vinhtc27 Feb 13, 2026
48fbb47
fix(ci): correct feature name format for multi-message-id in CI workflow
vinhtc27 Feb 13, 2026
71c5ab2
fix(ci): correct feature name format for multi-message-id in CI workflow
vinhtc27 Feb 13, 2026
55689a6
docs: update PR template to include rustfmt command for code formatting
vinhtc27 Feb 26, 2026
b5987e6
chore: address PR comments
vinhtc27 Feb 26, 2026
2801989
chore: update formatting commands in PR template and CI workflow
vinhtc27 Feb 27, 2026
5ce29d4
chore: correct formatting commands in Makefile.toml and simplify CI w…
vinhtc27 Feb 28, 2026
60554da
Merge remote-tracking branch 'origin/master' into multi-message-id-burn
vinhtc27 Feb 28, 2026
ec3ddce
chore: fmt cleanup
vinhtc27 Feb 28, 2026
747a321
fix(rln): fix ffi testcase to cover multi-message-id feat
vinhtc27 Feb 28, 2026
571d32f
fix(rln): fix test_witness_and_proof_values_serialization testcase
vinhtc27 Feb 28, 2026
da341ca
feat(rln): address PR comments, using enum for RLNWitnessInput and RL…
vinhtc27 Mar 1, 2026
57c8834
feat(rln-cli): address PR comments, update all examples
vinhtc27 Mar 1, 2026
a71853d
feat(rln-wasm): address PR comments, update lib and testcases
vinhtc27 Mar 1, 2026
5bcd0f4
chore: bump deps
vinhtc27 Mar 1, 2026
72871c3
feat(rln-wasm): address PR comments, update lib for multi-message-id …
vinhtc27 Mar 1, 2026
725db74
feat: continue address PR cmts, handle DuplicateMessageId, MissingSel…
vinhtc27 Mar 2, 2026
c52a1d2
feat(rln): improve error handling of FieldLengthMismatch, perform len…
vinhtc27 Mar 2, 2026
72e7e05
feat(rln): update ProtocolError handling and enhance witness validati…
vinhtc27 Mar 2, 2026
983d081
feat: update paths for multi-message-id resources and add new files f…
vinhtc27 Mar 2, 2026
7d73a8f
feat: update paths for multi-message-id resources and add new files f…
vinhtc27 Mar 2, 2026
b5542cb
feat: seperate SingleV1 and MultiV1 for all modules
vinhtc27 Mar 2, 2026
72c8b05
feat: update ffi, protocol, public testcase to support multi-message-…
vinhtc27 Mar 2, 2026
c7f7488
chore(rln): update version module from public to private in protocol
vinhtc27 Mar 2, 2026
7496e9c
feat: add version byte retrieval methods for RLNProof and RLNWitnessI…
vinhtc27 Mar 2, 2026
36b3294
chore(rln): update RLN witness serialization to use VEC_LEN_BYTE_SIZE…
vinhtc27 Mar 2, 2026
bada869
feat(rln): expose compute_id_secret as public API, update docs and Re…
vinhtc27 Mar 3, 2026
4baa022
feat: add compute_id_secret to FFI, WASM and Nim example
vinhtc27 Mar 3, 2026
2961792
refactor(rln): remove all modify method for RLNWitnessInput and RLNPr…
vinhtc27 Mar 3, 2026
462d714
refactor(rln): combine struct and enum for RLNWitnessInput and RLNPro…
vinhtc27 Mar 3, 2026
ba0157d
feat(rln): add multi-message-id support with max_out parameter in RLN…
vinhtc27 Mar 3, 2026
006c153
chore: fmt cleanup
vinhtc27 Mar 3, 2026
32f6fc9
chore: clippy cleanup
vinhtc27 Mar 3, 2026
ddbb8d8
trigger CI
vinhtc27 Mar 3, 2026
7392226
chore: clippy cleanup
vinhtc27 Mar 3, 2026
ee90a5c
chore: import cleanup
vinhtc27 Mar 3, 2026
fccb421
Merge remote-tracking branch 'origin/master' into multi-message-id-burn
vinhtc27 Mar 9, 2026
897734b
chore(rln): move proof_values_from_witness before generate_zk_proof i…
vinhtc27 Mar 9, 2026
de7e52e
feat: merge partial proof to multi-message-id PR (#389)
vinhtc27 Mar 16, 2026
4379581
Merge remote-tracking branch 'origin/master' into multi-message-id-burn
vinhtc27 Mar 16, 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
15 changes: 8 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ Please keep the following in mind (see [CONTRIBUTING.md](../CONTRIBUTING.md) for

- **No panics in library code.** Do not use `unwrap()`, `expect()`, or `panic!()`
in production paths inside `rln/src/` or `utils/src/`.
The only acceptable exception is an internal invariant that is statically guaranteed — and even then,
prefer returning an error.
The only acceptable exception is an internal invariant that is statically guaranteed - and even then, prefer returning an error.
- Use the project's `thiserror`-based error types (`RLNError`, `ProtocolError`, `UtilsError`, etc.)
and propagate errors with `?`.
- Provide context in error variants (e.g., `InsufficientData { expected, actual }`).
- `unwrap()` is fine in **tests**.

### Code Style

- Run `cargo fmt --all -- --check` to verify formatting (CI enforces this on stable).
- Run `cargo make fmt` at the root of the repository to auto-format the entire codebase with rules defined in [`rustfmt.toml`](../rustfmt.toml).
- Run `cargo make fmt_check` to verify formatting (CI enforces this on stable).
- Group imports: std first, then external crates, then local modules (see `rustfmt.toml`).
- Use `pub(crate)` for items that should not be part of the public API.
- Apply `Zeroize` / `ZeroizeOnDrop` to any struct holding secret material.
Expand All @@ -56,14 +56,14 @@ Please keep the following in mind (see [CONTRIBUTING.md](../CONTRIBUTING.md) for
CI runs clippy across multiple crate/feature combinations. Run the relevant checks locally before pushing:

```bash
# Default features workspace root (rln + utils)
# Default features - workspace root (rln + utils)
cargo clippy --all-targets --tests --release -- -D warnings

# Stateless feature from rln/
# Stateless feature - from rln/
cd rln && cargo clippy --all-targets --tests --release \
--features=stateless --no-default-features -- -D warnings

# WASM target from rln-wasm/
# WASM target - from rln-wasm/
cd rln-wasm && cargo clippy --target wasm32-unknown-unknown \
--tests --release -- -D warnings
```
Expand All @@ -74,10 +74,11 @@ At minimum, run the default-features check. If your changes touch `stateless` or

- [ ] My PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [ ] I have linked the related issue(s)
- [ ] I have run `cargo +nightly fmt --all` to apply all `rustfmt.toml` rules (including import grouping)
- [ ] `cargo fmt --all -- --check` produces no changes
- [ ] Clippy passes for all affected crate/feature combinations (see [Linting](#linting-mirrors-ci) above)
- [ ] `make test` passes locally
- [ ] No new `unwrap()` / `expect()` / `panic!()` in library code
- [ ] New code includes appropriate tests (unit / integration / WASM where applicable)
- [ ] I have run the CI coverage report add the `run-coverage` label to enable it
- [ ] I have run the CI coverage report - add the `run-coverage` label to enable it
- [ ] All CI checks pass and the PR is marked **Ready for review**
61 changes: 48 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
matrix:
platform: [ubuntu-latest, macos-latest]
crate: [rln]
feature: ["default", "stateless"]
feature: ["default", "stateless", "multi-message-id"]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

Expand All @@ -71,7 +71,8 @@ jobs:
if [ ${{ matrix.feature }} == default ]; then
cargo make test --release
else
cargo make test_${{ matrix.feature }} --release
FEATURE=$(echo "${{ matrix.feature }}" | tr '-' '_')
cargo make test_${FEATURE} --release
fi
working-directory: ${{ matrix.crate }}

Expand All @@ -82,7 +83,7 @@ jobs:
matrix:
platform: [ubuntu-latest, macos-latest]
crate: [rln-wasm]
feature: ["default"]
feature: ["default", "multi-message-id"]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

Expand All @@ -95,13 +96,26 @@ jobs:
- name: Install dependencies
run: make installdeps
- name: Build rln-wasm
run: cargo make build
run: |
if [ ${{ matrix.feature }} == default ]; then
cargo make build
else
FEATURE=$(echo "${{ matrix.feature }}" | tr '-' '_')
cargo make build_${FEATURE}
fi
working-directory: ${{ matrix.crate }}
- name: Test rln-wasm on node
if: matrix.feature == 'default'
run: cargo make test --release
working-directory: ${{ matrix.crate }}
- name: Test rln-wasm on browser
run: cargo make test_browser --release
run: |
if [ ${{ matrix.feature }} == default ]; then
cargo make test_browser --release
else
FEATURE=$(echo "${{ matrix.feature }}" | tr '-' '_')
cargo make test_${FEATURE} --release
fi
working-directory: ${{ matrix.crate }}

rln-wasm-parallel-test:
Expand Down Expand Up @@ -133,35 +147,51 @@ jobs:
run: cargo make test_parallel --release
working-directory: ${{ matrix.crate }}

lint:
fmt:
# run on both ready and draft PRs
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft)
# run fmt tests only on ubuntu
runs-on: ubuntu-latest
timeout-minutes: 60

name: Format - ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Install cargo-make
run: cargo install cargo-make
- name: Check formatting
run: cargo make fmt_check

clippy:
# run on both ready and draft PRs
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft)
strategy:
matrix:
# run lint tests only on ubuntu
# run clippy tests only on ubuntu
platform: [ubuntu-latest]
crate: [rln, rln-wasm, utils]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60

name: Lint - ${{ matrix.crate }} - ${{ matrix.platform }}
name: Clippy - ${{ matrix.crate }} - ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
components: clippy
- name: Install wasm32 target
if: matrix.crate == 'rln-wasm'
run: rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: make installdeps
- name: Check formatting
if: success() || failure()
run: cargo fmt -- --check
working-directory: ${{ matrix.crate }}
- name: Check clippy wasm target
if: (success() || failure()) && (matrix.crate == 'rln-wasm')
run: |
Expand All @@ -176,6 +206,11 @@ jobs:
run: |
cargo clippy --all-targets --tests --release --features=stateless --no-default-features -- -D warnings
working-directory: ${{ matrix.crate }}
- name: Check clippy multi-message-id feature
if: (success() || failure()) && (matrix.crate == 'rln')
run: |
cargo clippy --all-targets --tests --release --features=multi-message-id -- -D warnings
working-directory: ${{ matrix.crate }}

benchmark-utils:
# run only on ready PRs
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ jobs:
features:
- ["stateless"]
- ["stateless", "parallel"]
- ["stateless", "multi-message-id"]
- ["stateless", "parallel", "multi-message-id"]
- ["pmtree-ft"]
- ["pmtree-ft", "parallel"]
- ["pmtree-ft", "multi-message-id"]
- ["pmtree-ft", "parallel", "multi-message-id"]
- ["fullmerkletree"]
- ["fullmerkletree", "parallel"]
- ["fullmerkletree", "multi-message-id"]
- ["fullmerkletree", "parallel", "multi-message-id"]
- ["optimalmerkletree"]
- ["optimalmerkletree", "parallel"]
- ["optimalmerkletree", "multi-message-id"]
- ["optimalmerkletree", "parallel", "multi-message-id"]
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
env:
FEATURES_CARGO: ${{ join(matrix.features, ',') }}
Expand Down Expand Up @@ -55,12 +63,20 @@ jobs:
features:
- ["stateless"]
- ["stateless", "parallel"]
- ["stateless", "multi-message-id"]
- ["stateless", "parallel", "multi-message-id"]
- ["pmtree-ft"]
- ["pmtree-ft", "parallel"]
- ["pmtree-ft", "multi-message-id"]
- ["pmtree-ft", "parallel", "multi-message-id"]
- ["fullmerkletree"]
- ["fullmerkletree", "parallel"]
- ["fullmerkletree", "multi-message-id"]
- ["fullmerkletree", "parallel", "multi-message-id"]
- ["optimalmerkletree"]
- ["optimalmerkletree", "parallel"]
- ["optimalmerkletree", "multi-message-id"]
- ["optimalmerkletree", "parallel", "multi-message-id"]
target: [x86_64-apple-darwin, aarch64-apple-darwin]
env:
FEATURES_CARGO: ${{ join(matrix.features, ',') }}
Expand Down Expand Up @@ -97,6 +113,8 @@ jobs:
feature:
- "default"
- "parallel"
- "multi-message-id"
- "parallel-multi-message-id"
- "utils"
steps:
- name: Checkout sources
Expand All @@ -120,6 +138,14 @@ jobs:
rustup run nightly wasm-pack build --release --target web --scope waku \
--features parallel -Z build-std=panic_abort,std
sed -i.bak 's/rln-wasm/zerokit-rln-wasm-parallel/g' pkg/package.json && rm pkg/package.json.bak
elif [[ ${{ matrix.feature }} == "parallel-multi-message-id" ]]; then
env CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--shared-memory -C link-arg=--max-memory=1073741824 -C link-arg=--import-memory -C link-arg=--export=__wasm_init_tls -C link-arg=--export=__tls_size -C link-arg=--export=__tls_align -C link-arg=--export=__tls_base" \
rustup run nightly wasm-pack build --release --target web --scope waku \
--features parallel,multi-message-id -Z build-std=panic_abort,std
sed -i.bak 's/rln-wasm/zerokit-rln-wasm-parallel-multi-message-id/g' pkg/package.json && rm pkg/package.json.bak
elif [[ ${{ matrix.feature }} == "multi-message-id" ]]; then
wasm-pack build --release --target web --scope waku --features multi-message-id
sed -i.bak 's/rln-wasm/zerokit-rln-wasm-multi-message-id/g' pkg/package.json && rm pkg/package.json.bak
elif [[ ${{ matrix.feature }} == "utils" ]]; then
wasm-pack build --release --target web --scope waku --no-default-features --features utils
sed -i.bak 's/rln-wasm/zerokit-rln-wasm-utils/g' pkg/package.json && rm pkg/package.json.bak
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.idea
*.log
tmp/
test-path/

# Generated by Cargo will have compiled files and executables
/target
Expand All @@ -17,6 +16,9 @@ result
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Rust examples
rln/examples/database

# FFI C examples
rln/ffi_c_examples/main
rln/ffi_c_examples/rln.h
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ nix develop
# Build all crates
make build

# Run standard tests
# Run default tests
make test

# Module-specific testing
cd rln && cargo make test_stateless # Test stateless features
cd rln && cargo make test_multi_message_id # Test multi_message_id features
cd rln-wasm && cargo make test_browser # Test in browser headless mode
cd rln-wasm && cargo make test_parallel # Test parallel features
```
Expand Down
Loading
Loading