Skip to content

feat: migrate to zerokit v2.0.1#3868

Open
darshankabariya wants to merge 15 commits into
masterfrom
feat/bump_zerokit_2.0.1
Open

feat: migrate to zerokit v2.0.1#3868
darshankabariya wants to merge 15 commits into
masterfrom
feat/bump_zerokit_2.0.1

Conversation

@darshankabariya
Copy link
Copy Markdown
Contributor

@darshankabariya darshankabariya commented May 12, 2026

Bumps zerokit v0.9 → v2.0.1. Migrates the FFI from v0.9's raw byte buffers to v2.0's safer-ffi typed handles. Built against the stateless feature — the Merkle tree lives on-chain, so we no longer carry zerokit's pmtree-ft local tree.

What changed

  • rln_interface.nim rewritten against the v2.0.1 typed-handle API (CFr, Vec_CFr, CResult*)
  • Proof gen/verify wired through generateRlnProofWithWitness / verifyRlnProof
  • verify_with_roots replaces verify_rln_proof — matches the contract's recentRoots ring buffer
  • Wire format: 290-byte versioned encoding (layout in the rln_interface.nim header)
  • Dead v0.9 buffer-API code removed

Checklist

  • make librln builds against vendor/zerokit at v2.0.1
  • Nim type-checks and links against the new librln
  • Unit tests pass (make test)
  • Roundtrip: membershipKeyGen → register → generateRlnProofWithWitness → verifyRlnProof
  • Daily simulator E2E CI until RLN is enabled in logos.dev ( ci: add daily rln simulator e2e workflow #3885 )

After merged

  • 48h soak on Logos fleet — no regressions in non-RLN paths
  • Mix protocol functionality tested on Logos fleet (also uses zerokit 2.0.1)

Related issue

@darshankabariya darshankabariya self-assigned this May 12, 2026
@darshankabariya darshankabariya marked this pull request as draft May 12, 2026 08:17
@darshankabariya darshankabariya changed the title feat: bump zerokit 2.0.1 and migrate FFI to zerokit v2.0.1 typed han… feat: migrate to zerokit v2.0.1 May 12, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3868

Built from 5ff5300

@darshankabariya darshankabariya marked this pull request as ready for review May 17, 2026 17:53
Comment thread waku/waku_rln_relay/rln/wrappers.nim
Comment thread waku/waku_rln_relay/rln/wrappers.nim Outdated
Comment thread waku/waku_rln_relay/rln/wrappers.nim Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants