Skip to content

chore(docs): restructure and verify docs against code [skip-line-limit] - #2010

Closed
hmzakhalid wants to merge 4 commits into
mainfrom
docs/rewrite-verified
Closed

hmzakhalid wants to merge 4 commits into
mainfrom
docs/rewrite-verified

Conversation

@hmzakhalid

@hmzakhalid hmzakhalid commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR rewrites the docs site (docs/) against the code at release 0.18.0 and gives it a new structure and visual design. Every command, flag, config key, contract function, event, and number on a page now has a source in this repository. Claims that the code contradicts are corrected. Technical claims that cannot be verified are removed.

What changes

Structure

  • The pages are grouped into Learn, Build, Run a Ciphernode, and Reference, with separators inside each section.
  • Every moved URL has a permanent (308) redirect. See MOVED_PAGES in docs/next.config.js. CRISP, internals, governance, tokenomics, the FAQ, the constitution, and the whitepaper keep their URLs.
  • New Reference pages:
    • the full CLI, from the clap source, cross-checked with the 0.18.0 binary
    • node configuration, with every key and default
    • contracts and addresses for mainnet and Sepolia, from deployments/manifest.json
    • a glossary of about 70 terms
  • constitution.mdx is byte-identical to main. Its canonical URI is this file, and its keccak256 is computed from it at adoption. The whitepaper text is also unchanged.

Visual design

  • New component kit in docs/components/ui, imported as @/components/ui:
    • hero, "decrypt" text effect, and animated committee ring
    • lifecycle stepper, flow and layer diagrams
    • stat tiles, typing terminal, link cards, and badges
  • All motion stops when the reader asks for reduced motion. The server render contains all text.
  • The palette and serif headings now match the node dashboard. The link color changes from blue to green (primaryHue in theme.config.jsx).

Fixes to the site

  • #anchor links did not scroll before this change. globals.css set display: none on .subheading-anchor, which is the element that carries the heading id.
  • Tab panels stay mounted. A #link to a heading in a hidden tab now selects that tab (useOpenTabForHash in pages/_app.tsx).
  • .prettierignore contained build, so Prettier skipped every page under docs/pages/build/. That folder is now included.
  • sitemap.xml is generated at build time. The docs MCP server already reads it.

Outside docs/

  • Updated old docs source paths and URLs in circuits/README.md, circuits/benchmarks/README.md, circuits/lib/src/README.md, crates/support/README.md, scripts/README.md, scripts/generate-provenance-manifest.ts, agent/invariants/04_BUILD_CONFIG.md, a comment in releases.yml, and README.md.
  • The READMEs in circuits/bin/** are unchanged. The circuit SOURCE_HASH includes every file in those packages, so an edit there needs new circuit artifacts. Their docs links use old paths, which redirect (see Harness docs, READMEs, and code comments disagree with the code #2023).
  • scripts/check-addresses.ts now lists the moved consumer pages, plus operate/rpc-endpoints.mdx, which quoted an address without a registration, and reference/contracts.mdx.
  • The MCP fallback page list and docs/public/llms.txt use the new paths.
  • The dashboard app and CRISP keep their old docs links. They release separately, and the old links redirect.

Code issues found during verification

Each item below was checked again on 25 September 2026 against the code, the 0.18.0 binary or image, and mainnet or Sepolia state (Blockscout event history and eth_call). The PR does not fix these items. Each has an issue (#2011 to #2023).

Confirmed

  1. Sepolia cannot run 0.18.0 ciphernodes. (Sepolia protocol deployment predates the node release gate, so 0.18.0 ciphernodes cannot start #2011) The Sepolia protocol was deployed on 21 Aug 2026, before the node release gate (feat(upgrades): node release gate [skip-line-limit] #1892, 28 Aug), and it was never upgraded. nodeReleaseRegistry() reverts on the Sepolia Interfold contract, so a node stops at startup with failed to read Interfold release dependencies.
  2. Mainnet has no slash policies. (Mainnet SlashingManager has no slash policies configured #2012) The mainnet SlashingManager has emitted no SlashPolicyUpdated event, and getSlashPolicy() returns a disabled policy for each proof type. An accused member is excluded from the E3, and no penalty applies.
  3. Events that are never emitted. (Declared events are never emitted, and the SDK and template wait for CiphertextOutputPublished #2013) CiphertextOutputPublished, CommitteePublished, and CommitteeRequested have no emitter, and only a test mock emits InputPublished. On mainnet, E3 test: crisp circuit tests #978 published its key with CommitteeProofPublished and CommitteePublicKeyChunkPublished. The template's EncryptSubmit.tsx waits for CiphertextOutputPublished, so its progress step never completes.
  4. Docker entrypoint. (Ciphernode Docker entrypoint fails with bind-mounted secrets and on restart #2014) On the released ciphernode:0.18.0 image, a bind-mounted /run/secrets/secrets.json makes the entrypoint exit with Device or resource busy before interfold start. A second start exits with code 1 at password set (Keyfile already exists). In deploy/docker-compose.yml, the data volume at .local/share/interfold is unused, and node state stays in the container layer.
  5. ciphernode setup. (ciphernode setup writes a config that cannot start, and it requires a terminal #2015) It writes no data_availability block. On a mainnet fork, a node without that block exits with chain 'mainnet' has Interfold enabled but no data_availability reader. The command also prompts for the config directory with no flag, so it needs a terminal. --network local writes the Sepolia addresses built into the binary.
  6. Owner-only calls in the template. (Default template: owner-only deploy calls, RISC Zero mode proves the bundled CRISP program, ctrl_port collision #2016) On Sepolia, registerE3Program and setCiphertextVerifier revert with OwnableUnauthorizedAccount for any other caller. The template's deploy/default.ts calls both.
  7. Stale mainnet records. (Mainnet deployment records are stale, and config check reports mainnet as a mock deployment #2017) The live mainnet verifiers (Risc0BfvCiphertextVerifier 0x80D2…c549 with image ID 0x9d3e…10fc, and the two BFV routers) are not in any deployment record. The manifest marks mainnet mocks: true because the record lists MockE3Program, which is registered but not enabled. As a result, interfold config check tells mainnet operators that proofs are not verified.
  8. CLI. (CLI: the otel config key is ignored, and several help texts are wrong #2018) The otel key and E3_OTEL have no effect (only --otel works). Help text is wrong for password set ("or overwrite", but it refuses), nodes restart ("Stop"), and noir status/noir setup (empty). The Keyfile already exists error suggests the same command that failed.
  9. Template. (Default template: owner-only deploy calls, RISC Zero mode proves the bundled CRISP program, ctrl_port collision #2016) With program.dev: false, ctl/container does not mount the project's program/, and the support image contains the CRISP program at /app/program. The default node and cn5 both use ctrl_port 50505.
  10. Local dashboard rewards. (Local dashboard does not count rewards paid to a separate bond owner #2019) The count filters RewardCredited by the operator address, but the event's account is bondOwnerOf(operator).
  11. Install script. (Install script gives Intel Macs the Apple silicon binary #2020) On an Intel Mac, install selects the macOS arm64 binary and says that it "runs via Rosetta 2". Rosetta runs x86_64 code on Apple silicon, not the reverse.
  12. SDK. (SDK: some read errors are not wrapped as SDKError, and waitForTransaction loses its type #2021) getE3Quote, getE3Stage, and getFailureReason return the readContract promise inside try without await, so a revert is not wrapped as SDKError. InterfoldSDK.waitForTransaction is typed Promise<unknown>. CiphertextOutputReferencePublishedData is exported only from /events.
  13. Audit note. (Off-chain C2→C4 check blames a dealer only when it matches no recipient #2022) The off-chain C2→C4 check flags a dealer only when its commitments match no recipient (any(...) in commitment_consistency/workflow.rs). The aggregation circuit still checks every pair.
  14. Harness and README drift. (Harness docs, READMEs, and code comments disagree with the code #2023) agent/flow-trace/00_INDEX.md rows 8 (CommitteePublished) and 25 (fee slippage), the accusation quorum lines (threshold_m, agree/disagree), flow-trace 02 (ERC20Permit, PermitDisabled: tFOLD has neither on mainnet), the E3_BAD_* policy names (slash_reason() is unused), the circuits/README.md tree (fold/, wrapper/), the sortition README (the CRP uses a fixed default seed), and the BfvPkVerifier.sol public-input comment.

Corrected or withdrawn after the on-chain check

  • The first version of this PR said that mainnet uses DeployableMockCiphertextVerifier. That was true only from 19 to 22 Aug 2026. The owner replaced it at block 25,813,839 and again at block 26,004,622. No mainnet E3 used the mock. The docs now show the live verifiers.
  • The earlier note that the Tokenomics chart overstates the CCA sale is withdrawn. The chain minted exactly 150,000,000 FOLD to the Uniswap Liquidity Launcher, and 60 of 64 claimants that still hold FOLD have no locked balance.
  • The TGE happened: tgeTimestamp() returns 1787148023 (19 Aug 2026 14:00:23 UTC). The FAQs now say that general transferability is active.

Test plan

  • pnpm build in docs/ passes (58 pages).
  • Each MDX page compiles with Nextra. Its internal links resolve, and it has no em dash or semicolon in prose (55 pages; constitution and whitepaper are verbatim).
  • Post-build check: every internal link and #anchor in the built HTML resolves.
  • prettier --check, eslint docs, and tsc --noEmit pass.
  • pnpm check:addresses, check:license, and check:committee pass.
  • Tested in a browser: redirects return 308 to the new paths, /sitemap.xml is served, #links select the correct tab and scroll, wide tables scroll, and the layout works at 390 px.
  • Independent spot-check of 11 claims across pages against the source. All match.
  • Follow-up commits correct the mainnet verifier section and the TGE status, and add dated notes for the Sepolia release gate and the mainnet slash policies. Rebuilt, link check and check:addresses pass.
  • The tutorials were not run end to end. Only the tutorial Noir circuits and the modified MyProgram.sol were compiled.

🤖 Generated with Claude Code

@hmzakhalid hmzakhalid added the documentation Improvements or additions to documentation label Sep 25, 2026
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
crisp Ready Ready Preview Sep 25, 2026 11:02pm UTC
interfold-dashboard Ready Ready Preview Sep 25, 2026 11:02pm UTC
interfold-docs Ready Ready Preview Sep 25, 2026 11:02pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 140 files, which is 40 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Repository: theinterfold/interfold/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9d107131-24f1-4aa0-9202-00bdd9228440

📥 Commits

Reviewing files that changed from the base of the PR and between 51fa741 and c840b08.

📒 Files selected for processing (140)
  • .github/workflows/releases.yml
  • .prettierignore
  • README.md
  • agent/invariants/04_BUILD_CONFIG.md
  • circuits/README.md
  • circuits/benchmarks/README.md
  • circuits/lib/src/README.md
  • crates/support/README.md
  • docs/.gitignore
  • docs/components/ui/Badge.tsx
  • docs/components/ui/Flow.tsx
  • docs/components/ui/Hero.tsx
  • docs/components/ui/Icon.tsx
  • docs/components/ui/Lifecycle.tsx
  • docs/components/ui/LinkCards.tsx
  • docs/components/ui/Motion.tsx
  • docs/components/ui/Stats.tsx
  • docs/components/ui/Terminal.tsx
  • docs/components/ui/ThresholdRing.tsx
  • docs/components/ui/hooks.ts
  • docs/components/ui/index.ts
  • docs/components/ui/ui.module.css
  • docs/next.config.js
  • docs/package.json
  • docs/pages/404.mdx
  • docs/pages/CRISP/_meta.json
  • docs/pages/CRISP/introduction.mdx
  • docs/pages/CRISP/running-e3.mdx
  • docs/pages/CRISP/setup.mdx
  • docs/pages/_app.tsx
  • docs/pages/_meta.json
  • docs/pages/architecture-overview.mdx
  • docs/pages/best-practices.mdx
  • docs/pages/build/_meta.json
  • docs/pages/build/best-practices.mdx
  • docs/pages/build/client-and-server.mdx
  • docs/pages/build/e3-program/_meta.json
  • docs/pages/build/e3-program/complete-example.mdx
  • docs/pages/build/e3-program/compute-provider.mdx
  • docs/pages/build/e3-program/index.mdx
  • docs/pages/build/e3-program/program-contract.mdx
  • docs/pages/build/e3-program/secure-process.mdx
  • docs/pages/build/e3-program/verify-compute-provider.mdx
  • docs/pages/build/hello-world.mdx
  • docs/pages/build/installation.mdx
  • docs/pages/build/interfold-contract.mdx
  • docs/pages/build/noir-circuits.mdx
  • docs/pages/build/project-template.mdx
  • docs/pages/build/quick-start.mdx
  • docs/pages/build/requesting-an-e3.mdx
  • docs/pages/build/sdk.mdx
  • docs/pages/build/tutorials/_meta.json
  • docs/pages/build/tutorials/custom-zk-circuits.mdx
  • docs/pages/build/tutorials/deploy-to-testnet.mdx
  • docs/pages/build/tutorials/encrypt-and-submit.mdx
  • docs/pages/build/tutorials/write-e3-program.mdx
  • docs/pages/building-with-interfold.mdx
  • docs/pages/ciphernode-operators/_meta.json
  • docs/pages/ciphernode-operators/exits-and-slashing.mdx
  • docs/pages/ciphernode-operators/index.mdx
  • docs/pages/ciphernode-operators/migrating.mdx
  • docs/pages/ciphernode-operators/registration.mdx
  • docs/pages/ciphernode-operators/rpc-endpoints.mdx
  • docs/pages/ciphernode-operators/running.mdx
  • docs/pages/ciphernode-operators/tickets-and-sortition.mdx
  • docs/pages/ciphernode-operators/upgrades.mdx
  • docs/pages/computation-flow.mdx
  • docs/pages/compute-provider.mdx
  • docs/pages/cryptography.mdx
  • docs/pages/faq/auction.mdx
  • docs/pages/faq/fold-token.mdx
  • docs/pages/faq/transferability.mdx
  • docs/pages/getting-started.mdx
  • docs/pages/governance.mdx
  • docs/pages/hello-world-tutorial.mdx
  • docs/pages/index.mdx
  • docs/pages/installation.mdx
  • docs/pages/internals/_meta.json
  • docs/pages/internals/commitment-consistency.mdx
  • docs/pages/internals/dkg.mdx
  • docs/pages/internals/sortition.mdx
  • docs/pages/introduction.mdx
  • docs/pages/learn/_meta.json
  • docs/pages/learn/architecture.mdx
  • docs/pages/learn/cryptography.mdx
  • docs/pages/learn/e3-lifecycle.mdx
  • docs/pages/learn/index.mdx
  • docs/pages/learn/use-cases.mdx
  • docs/pages/learn/what-is-e3.mdx
  • docs/pages/noir-circuits.mdx
  • docs/pages/operate/_meta.json
  • docs/pages/operate/dashboard.mdx
  • docs/pages/operate/exits-and-slashing.mdx
  • docs/pages/operate/index.mdx
  • docs/pages/operate/manage-tickets.mdx
  • docs/pages/operate/migrating.mdx
  • docs/pages/operate/registration.mdx
  • docs/pages/operate/requirements.mdx
  • docs/pages/operate/rpc-endpoints.mdx
  • docs/pages/operate/running.mdx
  • docs/pages/operate/tickets-and-sortition.mdx
  • docs/pages/operate/troubleshooting.mdx
  • docs/pages/operate/upgrades.mdx
  • docs/pages/project-template.mdx
  • docs/pages/putting-it-together.mdx
  • docs/pages/quick-start.mdx
  • docs/pages/reference/_meta.json
  • docs/pages/reference/cli.mdx
  • docs/pages/reference/configuration.mdx
  • docs/pages/reference/contracts.mdx
  • docs/pages/reference/glossary.mdx
  • docs/pages/requestor-guide.mdx
  • docs/pages/requirements.mdx
  • docs/pages/sdk.mdx
  • docs/pages/setting-up-server.mdx
  • docs/pages/tokenomics.mdx
  • docs/pages/tutorials/_meta.json
  • docs/pages/tutorials/custom-zk-circuits.mdx
  • docs/pages/tutorials/deploy-to-testnet.mdx
  • docs/pages/tutorials/encrypt-and-submit.mdx
  • docs/pages/tutorials/manage-tickets.mdx
  • docs/pages/tutorials/operator-troubleshooting.mdx
  • docs/pages/tutorials/using-the-dashboard.mdx
  • docs/pages/tutorials/write-e3-program.mdx
  • docs/pages/use-cases.mdx
  • docs/pages/verifying-the-compute-provider.mdx
  • docs/pages/what-is-e3.mdx
  • docs/pages/whitepaper.mdx
  • docs/pages/write-e3-contract.mdx
  • docs/pages/write-secure-program.mdx
  • docs/public/llms.txt
  • docs/public/robots.txt
  • docs/scripts/generate-sitemap.mjs
  • docs/styles/globals.css
  • docs/theme.config.jsx
  • docs/tsconfig.json
  • packages/interfold-mcp/src/index.ts
  • scripts/README.md
  • scripts/check-addresses.ts
  • scripts/generate-provenance-manifest.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ine-limit]

Rewrite every docs page against the code at release 0.18.0. Each
command, flag, config key, contract call, event, and number now has a
source in the repository. Wrong or unverifiable claims are removed.

Structure:
- Group pages into Learn, Build, Run a Ciphernode, and Reference.
- Add permanent redirects for every moved URL (MOVED_PAGES in
  docs/next.config.js). CRISP, internals, governance, tokenomics, FAQ,
  constitution, and whitepaper keep their URLs.
- Add Reference pages: CLI, node configuration, contracts and
  addresses, and a glossary.
- Keep constitution.mdx byte-identical. Its keccak256 comes from the file.

Visuals:
- Add a component kit in docs/components/ui: hero, decrypt text effect,
  committee ring, lifecycle stepper, flow and layer diagrams, stats,
  terminal, and link cards. All motion stops under reduced motion.
- Use the dashboard palette and serif headings.

Fixes:
- Make #anchor links scroll. The old CSS hid the element that has the
  heading id.
- Keep tab panels mounted, and select the tab that a #link targets.
- Stop .prettierignore from skipping docs/pages/build.
- Generate sitemap.xml at build. The docs MCP server reads it.
- Update old docs paths in READMEs, scripts, the MCP fallback list,
  llms.txt, and the address-check registry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hmzakhalid
hmzakhalid force-pushed the docs/rewrite-verified branch from 63afc6f to 1b80134 Compare September 25, 2026 20:14
@hmzakhalid hmzakhalid changed the title chore(docs): restructure docs and verify content against code [skip-line-limit] chore(docs): restructure and verify docs against code [skip-line-limit] Sep 25, 2026
hmzakhalid and others added 2 commits September 26, 2026 02:15
The contracts page said that mainnet uses DeployableMockCiphertextVerifier.
On-chain, the owner replaced that mock at block 25813839 and again at
block 26004622. The live ciphertext verifier is Risc0BfvCiphertextVerifier.
No mainnet E3 used the mock. Add the live verifier table and its history.

The FOLD FAQs described the 19 Aug TGE as upcoming. tgeTimestamp() on
the FOLD contract returns 1787148023 (2026-08-19 14:00:23 UTC). State
that general transferability is active.

Allow the live verifier addresses, and the image-ID prefix that the
address pattern matches, in check-addresses.ts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On-chain checks on 25 September 2026 found two facts that affect
operators:

- The Sepolia Interfold contract predates the node release gate.
  nodeReleaseRegistry() reverts, so a 0.18.0 ciphernode stops at
  startup with "failed to read Interfold release dependencies". Add a
  warning to the Sepolia pages and a troubleshooting row.
- The mainnet SlashingManager has no slash policy. getSlashPolicy()
  returns a disabled policy for each proof type, so an accused member
  is excluded from the E3 and no penalty applies. Add a dated note.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The circuit SOURCE_HASH covers every file in each circuits/bin package,
README.md included. The docs-path updates in those READMEs changed the
hash, so CI found no published circuit artifacts for the new hash.
Restore the READMEs to main. Their docs links still use the old paths,
which redirect.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hmzakhalid

Copy link
Copy Markdown
Collaborator Author

This PR is split into a 12-PR stack (stack #2040) so that each part can be reviewed on its own. The top of the stack is identical to the head of this PR (c840b08ed).

  1. chore(docs): add docs component kit and site styles [skip-line-limit] #2028 docs component kit and site styles
  2. chore(docs): group pages into Learn, Build, and Operate sections #2029 move pages into Learn, Build, and Operate (renames and redirects only)
  3. chore(docs): add Reference pages [skip-line-limit] #2030 Reference pages
  4. chore(docs): rewrite landing page and Learn section [skip-line-limit] #2031 landing page and Learn
  5. chore(docs): rewrite Build get-started and E3 program [skip-line-limit] #2032 Build: get started and E3 program
  6. chore(docs): rewrite Build integration pages [skip-line-limit] #2033 Build: integration pages
  7. chore(docs): rewrite Noir circuits and tutorials [skip-line-limit] #2034 Noir circuits and tutorials
  8. chore(docs): rewrite ciphernode setup pages [skip-line-limit] #2035 ciphernode setup
  9. chore(docs): rewrite ciphernode operation pages [skip-line-limit] #2036 ciphernode operation and maintenance
  10. chore(docs): rewrite the CRISP pages [skip-line-limit] #2037 CRISP
  11. chore(docs): rewrite the protocol internals pages [skip-line-limit] #2038 protocol internals
  12. chore(docs): restructure the FOLD and governance pages [skip-line-limit] #2039 FOLD and governance

The verification notes and the issue links (#2011 to #2023) from this description still apply. The branch docs/rewrite-verified is kept.

@hmzakhalid hmzakhalid closed this Sep 26, 2026

This branch was successfully deployed

3 active deployments
Preview – interfold-docs — c840b08e Deployed Sep 25, 2026 by vercel[bot]
Preview – crisp — c840b08e Deployed Sep 25, 2026 by vercel[bot]
Preview – interfold-dashboard — c840b08e Deployed Sep 25, 2026 by vercel[bot]
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant