Skip to content

refactor: rename dyaka-noir-token to x-token - #2

Merged
xgreenx merged 2 commits into
mainfrom
chore/rename-x-token-circuit
Aug 21, 2026
Merged

xgreenx merged 2 commits into
mainfrom
chore/rename-x-token-circuit

Conversation

@xgreenx

@xgreenx xgreenx commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Scrubs the dyaka branding from this repo by renaming the X login circuit:

  • circuits/dyaka-noir-tokencircuits/x-token; Nargo package dyaka_noir_tokenx_token; authors ["Dyaka"]["libid"]
  • References updated in scripts/gen-verifier.sh (usage text), .github/workflows/ci.yml (comments, the 9-tests note), README.md (circuits table, gen-verifier example, extraction paragraph), and the main.nr header comment
  • The README "Historical note (provenance)" section is collapsed to a minimal factual note; its one remaining dyaka_noir_token mention is deliberate — v0.1.0 shipped the circuit under that name and auditors need the thread from the release assets to today's x_token
  • In passing, the README extraction paragraph was stale (claimed the sources were still not nargo fmt-clean; commit 1638b0b formatted them and CI enforces nargo fmt --check) — it now states the actual policy

vk byte-identity (the critical constraint)

XHonkVerifier.sol in libid-contracts derives from this circuit's vk and is deployed on chain, so the rename must not move the vk. Proven locally with the pinned toolchain from toolchain.env (nargo 1.0.0-beta.20, bb 5.0.0-nightly.20260324, exact versions verified):

  • Built at origin/main (pre-rename) and on this branch (post-rename, via the exact scripts/build.sh release path); bb write_vk --oracle_hash keccak both times
  • cmp on vk and vk_hash: byte-identical — vk sha256 fe6a945bf161fac154633f3dac1b86bd077de2a9e13c33eb56559bc7e128ce8c, vk_hash 0x0ef6521315935086e2161c8343e6e402c97e16770e1db9d53955fe1ca8f86e67
  • ACIR json bytecode and abi fields are identical pre/post; only source-derived metadata moves (file_map paths, the hash field, debug spans — the header comment and package name live there, and bb derives the vk from the bytecode alone)

The next release build plus the libid-contracts verifiers CI job will re-prove this independently before any downstream pin moves.

Validation (CI parity, run locally)

  • nargo fmt --check: clean for both circuits
  • nargo test: x_token 9/9 pass; jwt_email untouched (0 tests, vacuous as in CI)
  • shellcheck scripts/*.sh: clean
  • Full scripts/build.sh succeeds with the renamed directory (tarball naming derives from the circuit dir, so the next release ships libid-circuits-<version>-x-token.tar.gz)
  • No committed artifact or manifest embeds the old name — artifacts are release-only by design

Follow-up (not in this PR)

Deliberately no release, no tag, no downstream bumps here. After merge: cut the next release (assets become …-x-token.tar.gz / package x_token.json), then bump the libid-contracts circuits pin and let its verifiers job byte-compare the committed XHonkVerifier.sol against the new release, then roll any claim-full asset references.

🤖 Generated with Claude Code

Directory circuits/dyaka-noir-token -> circuits/x-token, package
dyaka_noir_token -> x_token, authors Dyaka -> libid, and the dyaka
references in scripts, workflows and docs go with them. The README
historical note keeps one deliberate mention of the old name: v0.1.0
shipped the circuit as dyaka_noir_token, and auditors need that thread.

The rename never touches the ACIR bytecode, so the deployed on-chain
verifier is unaffected. Verified locally with the pinned toolchain
(nargo 1.0.0-beta.20, bb 5.0.0-nightly.20260324): vk and vk_hash are
byte-identical before and after the rename via the exact scripts/build.sh
release path (vk sha256 fe6a945bf161fac154633f3dac1b86bd077de2a9e13c33eb
56559bc7e128ce8c, vk_hash 0x0ef6521315935086e2161c8343e6e402c97e16770e1d
b9d53955fe1ca8f86e67). nargo fmt --check clean, x_token 9/9 tests pass,
jwt_email untouched, shellcheck clean.

Assisted-by: Claude Fable 5
Signed-off-by: xgreenx <xgreenx9999@gmail.com>
Assisted-by: Claude Fable 5
Signed-off-by: xgreenx <xgreenx9999@gmail.com>
@xgreenx
xgreenx merged commit 82fe6a3 into main Aug 21, 2026
3 checks passed
@xgreenx
xgreenx deleted the chore/rename-x-token-circuit branch August 21, 2026 13:07
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