Skip to content

Use real nullifier count in Unlink event model#53

Merged
Th0rgal merged 1 commit into
mainfrom
codex/unlink-real-nullifier-event-count
May 14, 2026
Merged

Use real nullifier count in Unlink event model#53
Th0rgal merged 1 commit into
mainfrom
codex/unlink-real-nullifier-event-count

Conversation

@Th0rgal
Copy link
Copy Markdown
Member

@Th0rgal Th0rgal commented May 14, 2026

Summary

  • count nonzero nullifiers before the transfer/withdraw event surrogate
  • use that filtered count for the _realNullifiers(...) event payload approximation

Tests

  • lake build Benchmark.Cases.UnlinkXyz.Pool.Compile
  • git diff --check

Note

Low Risk
Low risk: only changes event payload data to use a computed non-zero nullifier count; no state-transition logic or verification paths are modified.

Overview
Updates the UnlinkXyz pool Verity contract to emit a real nullifier count (computed via countNonZero over txn.nullifierHashes) in the Transferred, Withdrawn, and EmergencyWithdrawn event surrogates, replacing the previous arrayLength-based approximation.

Reviewed by Cursor Bugbot for commit e4ce8cd. Bugbot is set up for automated code reviews on this repo. Configure here.

@Th0rgal Th0rgal merged commit 515b86c into main May 14, 2026
3 checks passed
@Th0rgal Th0rgal deleted the codex/unlink-real-nullifier-event-count branch May 14, 2026 13:13
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.

1 participant