21 NAND Docs 中文

Commands you can check

For everything on chain and everything we publish: what it checks, against what, which command, and what you see when it passes. All read-only, no wallet.

The repository of the tapemule command-line tool is not public yet, so the commands below that use it can only be run once it is. You can check a single file without it: see Quickstart.

Set up first

Download tapemule and install its dependencies (needs Node.js 22 or newer)
git clone https://github.com/BruceLanLan/tapemule.git
cd tapemule
npm ci

Run all the tapemule commands below inside this directory. Every chain read is pinned to a finalized block, and a result only counts when at least two independent nodes agree.

Overview

#What it checksAgainst whatCommandWhen it passes
1The Hub contracts on three chains are the pinned implementationThe code on chain and the implementation address match the ones pinned in tapemulenpm run tape -- hub bnb (same for base, xlayer)A "check passed" line (the tool's messages are in Chinese for now), exit code 0
2A .tape site: container, holder, activation, and the bytes of every file match the fingerprint recorded on chainThe sha256 recorded on chain for each filenpm run tape -- open <name> --filesOne verified line per file, exit code 0; if any file is not, exit 1
3A local file you have is exactly the one recorded for a path of a siteThe size and sha256 recorded on chain for that path; it reads only the record, without downloading the contentNot merged into tapemule's main branch yetverified, exit code 0; change one byte and it is incomplete, exit 1
4TapeBoot test vectors for canonical form, signing and fetching (C version)Test vectors, no private keysScript not publicAll pass, 0 failures
5The same test vectors (TS reference client)Same as aboveScript not publicAll 14 pass
6Netlists of 10 circuits on chain: stored on chain = in the burn transaction = kept in our repositorynetlist(id) and circuitInfo(id) on chain; the input and receipt of the burn transaction; the netlist file in the repository. A three-way sha256 comparisonScript not publicOne line per circuit: the first 12 characters of the three sha256 values plus "match"; exit 0 if all match, exit 1 on any mismatch or read failure, exit 2 if nothing mismatches but one circuit is missing a source
7The model machine's toy model and the text it writesThe file sha256 and the output sha256Open the model machine and tap "Write 200 characters"Both sha256 values match the ones shown on the page

1. Hub contracts

Check the Hub on all three chains
npm run tape -- hub bnb && npm run tape -- hub base && npm run tape -- hub xlayer

2. Every file of a site

Read every file of 282.732.tape and compare it with the sha256 recorded on chain
npm run tape -- open 282.732.tape --files
The same result as JSON
npm run tape -- open 282.732.tape --files --json

6. Netlists of circuits on chain

CircuitChainProcessor
279.732 to 287.732, 9 in totalBNB ChainCPU #732
3.2.245X Layer#245

For 282.732 this only checks the circuit netlist; its website files are checked with item 2.

The script is not public yet. You can still check it yourself without it:

  1. Call netlist(id) on the processor contract with eth_call and compute its sha256.
  2. Find the burn transaction of this circuit, decode the netlist bytes according to tapeout(bytes,uint32,uint32), and compute their sha256. The receipt must have status = 1, be sent to this processor, and contain a TapedOut(id) event.
  3. If the two sha256 values are the same, what is stored on chain is the same as what was burned in.

For how the netlist bytes are laid out, see Netlist format.

Other read-only commands

List the sites on one chain and check activation (BNB takes a few minutes)
npm run tape -- sites bnb
Search the site data by keyword (doesn't read the chain)
npm run tape -- search <keyword>

Add --json to any command for JSON output.