3 Commits

Author SHA1 Message Date
Vinh Trịnh
25d398be19 feat: implement multi-message-id feature (#375)
## Description

- Refactored `RLNWitnessInput` and `RLNProofValues` into struct/enum
(`SingleV1` / `MultiV1`) to cleanly support both standard and
multi-message-id modes.
- Added version byte retrieval methods for `RLNProof` and
`RLNWitnessInput`.
- Enhanced `ProtocolError` with new variants: `EmptyMessageIds`,
`DuplicateMessageIds`, `MissingSelectorUsed`, `NoActiveSelectorUsed`,
and `FieldLengthMismatch`.
- Read `MAX_OUT` value directly from the graph file instead of
hardcoding.
- Added checks for `message_ids`, `selector_used`, `path_elements`,
`identity_path_index` in proof gen api.
- Extended FFI (C/Nim/Rust) and WASM bindings with multi-message-id
support.
- Added multi-message-id CLI example and updated existing examples.
- Added multi-message-id circuit resources (`max_out_4`) for tree depth
10 and 20; removed tree depth 16 and 24.
- Updated CI with clippy checks and nightly release for the
`multi-message-id` feature flag.
- Version bump for dependencies in all modules.
- Exposed compute_id_secret as a public API and updated README on how to
use the slashing cross feature.
## Testing

- Added multi-message-id test cases for FFI, protocol, and public API.
- Added compatibility tests to verify new witness/proof types against
old serialized data.

## Checklist

- [x] I have run the CI coverage report. Add the `run-coverage` label to
this PR to enable it.
2026-03-16 17:49:51 +07:00
Roman Zajic
be0d246e00 test: RLN-WASM bindings error cases (#381)
## Description

A batch of tests to cover negative/invalid input cases for RLN-WASM
bindings.

## Tests added

rln-wasm/tests/node.rs:
- test_wasm_invalid_inputs

rln-wasm/tests/utils.rs:
- test_wasmfr_from_bytes_invalid
- test_vec_wasmfr_from_bytes_invalid
- test_uint8array_utils_from_bytes_invalid
- test_identity_from_bytes_invalid_len
- test_extended_identity_from_bytes_invalid_len

## Other changes
- Add `cargo make fmt` and `cargo make fmt_check` to cover excluded
modules.

## Checklist

- [x] My PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] I have linked the related issue(s)
- [x] `cargo fmt --all -- --check` produces no changes
- [x] Clippy passes for all affected crate/feature combinations (see
[Linting](#linting-mirrors-ci) above)
- [x] `make test` passes locally
- [x] No new `unwrap()` / `expect()` / `panic!()` in library code
- [x] New code includes appropriate tests (unit / integration / WASM
where applicable)
- [x] I have run the CI coverage report — add the `run-coverage` label
to enable it
- [x] All CI checks pass and the PR is marked **Ready for review**
2026-02-28 09:15:18 +08:00
Rahul Ghangas
1502315605 chore: Makefile and consistent usage of cargo-make (#101)
* feat: add Makefile with pre build check. add targets for build, test and clean

* feat: add workspace level build file

* chore: add skeletal build files for each crate

* chore: remove environment variable to extend workspace makefile

* chore: formatting

* chore: add release flags to all builds/tests
2023-01-26 09:19:55 +05:30