Conformance vectors
How to add an executed case that the prose, the tools, and the tests all share.
Editorial Verified 2026-08-31
Navigation or explanatory writing with no source-sensitive claim of its own.
- Page ID
-
contribute/conformance-vectors - Normative authority
- No normative source. Navigation only.
- Networks
- none
- Documentation version
- 2026.08
- Audience
- developer
- Owner
- bitcoin-universe-docs
本頁內容尚未翻譯。
The rule
Section titled “The rule”A vector is evidence only if it is executed. This documentation never publishes an unexecuted vector as conformance material.
Where the pieces live
Section titled “Where the pieces live”| Piece | Path |
|---|---|
| Engine | conformance/allocation.mjs |
| Vectors | conformance/vectors/arc20-allocation.json |
| Tests | tests/conformance-allocation.test.mjs |
| Rendered table | site/src/components/VectorTable.astro |
The prose, the allocation visualizer, and the tests all call the same engine, so they cannot disagree.
Adding a case
Section titled “Adding a case”- Derive it from the source. Name the exact functions and lines it comes from.
- Add it to the vector file with an
id, atitle, adescription,options,inputs,outputs, andexpected. - Run
node --test tests/conformance-allocation.test.mjs. - If it fails, decide which is wrong: your expectation, or the engine. If the engine is wrong against the source, fix the engine and say so in the pull request.
- Reference the case from the relevant page with
<VectorTable only={["your-case-id"]} />.
Changing the engine
Section titled “Changing the engine”The engine is implemented directly from the pinned reference revision. Changing it is a change to what this documentation claims the protocol does.
A pull request that changes it must:
- name the exact source functions and lines the change follows;
- keep every existing vector passing, or explain precisely why one changed;
- update the source manifest if the pinned revision moved.
What not to add
Section titled “What not to add”- A case whose expectation you assumed rather than derived.
- A case that needs a live chain or a live service. Document it as an expectation on the conformance page instead, in the coverage table.
- A case copied from another repository’s vector set. Link that set rather than duplicating it.