Skip to content

docs: remove legacy specs + rewrite docs for the ZK-friendly stack#47

Merged
0xErgod merged 1 commit into
mainfrom
docs/40-spec-docs-cleanup
May 28, 2026
Merged

docs: remove legacy specs + rewrite docs for the ZK-friendly stack#47
0xErgod merged 1 commit into
mainfrom
docs/40-spec-docs-cleanup

Conversation

@0xErgod

@0xErgod 0xErgod commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 6 (final) of the ZK-friendly stack migration: the cleanup pass. Removes the legacy specs, rewrites the docs around the actual current stack, and fixes the last stale references — so the repo reads as if the X25519/Blake2b stack never existed.

Linked Issue

Closes #40

Changes

Deleted 6 legacy specs (−2745 lines), all superseded:

  • wallet-signature-derived-keys.md, wallet-bound-private-messaging.md (X25519 design)
  • secret-sharing-poc-build.md (Blake2b PoC)
  • provable-shared-secrets-extensions.md (pre-pivot ZK roadmap)
  • poseidon-commitment-format.md (→ protocol-commitment.md)
  • issues/protocol-versioning-backward-compatibility.md

Fixed dangling cross-refs the deletions left in poseidon-hash-fixed/sponge.md, babyjub-keypair.md, text-utf8-v1.md, crypto/poseidon.rs, crypto/Cargo.toml → repointed at protocol-commitment.md.

Rewrote README.md + packages/sdk/README.md around the real stack: BabyJubjub + Poseidon + vector Pedersen + Groth16, the actual workspace layout (apps/{protocol,curve,zk}, crates/*, packages/sdk), the sui-devnet:9000 dev environment, the on-chain proof flow, current workflow names.

Fixed stale wallet-derived-keys references (deleted package, Phase 3) → the SDK's wallet-keys module, in crypto/keypair.rs, crypto-wasm/lib.rs, babyjub-keypair.md.

.releaserc.json: dropped the dead wallet-derived-keys rule; added explicit no-release rules for migration-era scopes (dapp, contracts, move-contracts, proofs, infra).

Removed scripts/import-env-keys.ps1 + the ALICE/BOB/CHARLIE_ED25519_PRIVATE_KEY block from .env.example.

Acceptance (from #40)

  • Repo-wide grep is clean for the legacy crypto stack. The only remaining matches are current-design references, not legacy:
    • ChaCha20 in babyjub-cipher.md — a rationale table explaining why the protocol uses Poseidon-stream instead of ChaCha20
    • Blake2b in the domain-tag construction (crypto/poseidon.rs, specs) — the current domain_tag primitive
  • README reads as if the legacy stack never existed (no apology/migration notes — that history lives in the PR threads)
  • No broken doc links (dangling refs to deleted specs repointed)

Testing

  • cargo check -p crypto -p crypto-wasm — clean (the lib.rs/Cargo.toml comment edits don't affect compilation)
  • .releaserc.json validates as JSON
  • Doc-only otherwise; no behavioral code changed

[agent PR]

Phase 6 (final) of the ZK-friendly stack migration — the cleanup pass.

Deleted the six pre-pivot design specs that described the X25519/HKDF/
ChaCha20/Blake2b stack or pre-migration roadmaps, all superseded by the
babyjub-*.md / protocol-*.md / zk/ specs:
- wallet-signature-derived-keys.md  (X25519 wallet derivation)
- wallet-bound-private-messaging.md (X25519 envelope design)
- secret-sharing-poc-build.md       (Blake2b PoC build)
- provable-shared-secrets-extensions.md (pre-pivot ZK roadmap)
- poseidon-commitment-format.md     (superseded by protocol-commitment.md)
- issues/protocol-versioning-backward-compatibility.md

Repointed the dangling cross-references the deletions left behind
(poseidon-hash-fixed/sponge, babyjub-keypair, text-utf8-v1,
crypto/poseidon.rs, crypto/Cargo.toml) at protocol-commitment.md.

Rewrote README.md and packages/sdk/README.md around the actual current
stack: BabyJubjub + Poseidon + vector Pedersen + Groth16, the real
workspace layout (apps/{protocol,curve,zk}, crates/*, packages/sdk), the
sui-devnet:9000 dev environment, the on-chain proof flow, and the
current workflow names. No X25519/Blake2b/legacy prose remains.

Fixed stale references to the deleted wallet-derived-keys package — the
BJJ key derivation now lives in the SDK's wallet-keys module
(crypto/keypair.rs, crypto-wasm/lib.rs, babyjub-keypair.md).

Dropped the dead wallet-derived-keys release rule from the SDK's
.releaserc.json; added explicit no-release rules for the migration-era
scopes (dapp, contracts, move-contracts, proofs, infra) for clarity
(the catch-all already covered them).

Deleted scripts/import-env-keys.ps1 (imported the old X25519/Ed25519
demo keys) and the matching ALICE/BOB/CHARLIE_ED25519_PRIVATE_KEY block
from .env.example.

Repo-wide grep is clean for the legacy crypto stack; the only remaining
matches (`ChaCha20` in babyjub-cipher.md's rationale table, `Blake2b` in
the domain-tag construction) are current-design references, not legacy.

Verification: cargo check (crypto, crypto-wasm), .releaserc valid JSON.

Closes #40

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@0xErgod 0xErgod added this to the ZK-friendly stack migration milestone May 28, 2026
@0xErgod 0xErgod added documentation Improvements or additions to documentation zk-migration Atomic ZK-friendly stack migration (kills X25519/Blake2b/HKDF) in-progress Work is actively being done on this issue labels May 28, 2026
@0xErgod 0xErgod self-assigned this May 28, 2026
@0xErgod

0xErgod commented May 28, 2026

Copy link
Copy Markdown
Owner Author

Review pass: APPROVE — no critical, important, or nits. Verified: no kept file references any of the 6 deleted specs; the poseidon-commitment-format → protocol-commitment repoint resolves everywhere; every SDK + Move symbol in the rewritten READMEs exists; workflow names + scripts + workspace layout match reality; grep gate clean (remaining ChaCha20/Blake2b/HKDF hits are current-design rationale/domain-tag, not legacy); .releaserc valid with sdk rules intact; .env keeps the Sui-tx-signing dev keys, drops only the import-env-keys block. cargo check clean.

Merging — this is the final phase of the migration.

[agent comment]

@0xErgod 0xErgod merged commit 8b2572c into main May 28, 2026
3 checks passed
@0xErgod 0xErgod deleted the docs/40-spec-docs-cleanup branch May 28, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation in-progress Work is actively being done on this issue zk-migration Atomic ZK-friendly stack migration (kills X25519/Blake2b/HKDF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 6: spec + docs cleanup; remove last legacy references

1 participant