Skip to the content
nullroute
Browse the docs

Standards

Conformance kit

Portable test vectors and a runner that holds any signer to the profile through an adapter of its own.

Test vectors and a reference runner for spec/signer-profile.md, a draft specification for air-gapped Bitcoin signers. The profile is at version 0.1. Nobody has adopted it, including the project that wrote it. It is here to be reviewed and argued with.

The vectors are language-neutral JSON. The runner is one Node file with no dependencies. You check a signer by writing a small adapter module that calls your signer and reports what it did, then running the runner against it.

nullroute is one implementation of the profile. Its adapter is in adapters/nullroute.mjs, and it does not pass every case (see nullroute's results).

In this chapter

  1. 01Layout
  2. 02Running itOptions.
  3. 03Writing an adapterAn adapter is an ES module. The runner imports it and calls the functions below. Every function may return a value or a promise. Leave out a function your signer does not...
  4. 04The vector filesEach file has the same header.
  5. 05What the runner reportsEach case ends in one of.
  6. 06What passing meansPassing means that on these inputs your signer produced these outputs, as your adapter reported them. It does not mean.
  7. 07Which requirements the vectors checkSeveral requirements in the "own tests only" row could have portable vectors. SP-REV-1 (malformed input refused) and SP-SIG-1 (deterministic signatures that another implementation...
  8. 08nullroute's resultsmake conformance today: all 116 cases pass, with no SHOULD missed, and known-failures/nullroute.json is empty. Four requirements have failed and been fixed, which is what the list...
  9. 09Regenerating the vectorsIt needs network access, Python 3, pip3 and a Bitcoin Core bitcoind. It fetches every reference at its pinned commit into the scratch directory, starts a regtest node there,...
  10. 10BIP test vectors (SP-DEP-1)SP-DEP-1 asks a signer to pass the vectors each BIP publishes. Those are the BIPs' own files, not part of this directory. Which of them nullroute includes is listed in...

Rendered from conformance/README.md, the same bytes that ship with the code. SHA-256 d0c681a5e7b7f55bcc96ecd33bb0ab07dd944b4fe2bb50f640ee79a85db3917e