Conformance Vectors
Conformance vectors provide fixed inputs and expected outputs for the protocol rules that must stay deterministic. A passing implementation reproduces the published bytes, hashes, Graph results, and verification outcomes.
Vector Format
Each suite file lists vectors with an id, a description, an input, and an expected result. An accepted input expects an output value, and a rejected input expects an error identifier. Vectors in suites that test more than one operation also name an operation. The test vector schema and expected results schema define the complete format.
{
"id": "C8",
"description": "nested object with sorted keys",
"input": {"b": {"d": 1, "c": 2}, "a": 3},
"expected": "{\"a\":3,\"b\":{\"c\":2,\"d\":1}}"
}
{
"id": "CN4",
"description": "integer above MAX_SAFE_INTEGER MUST be rejected",
"input": 9007199254740992,
"expected": {"errorCode": "ALX_CANONICALIZATION_UNSAFE_INTEGER"}
}
Use the Vector Groups
The required-suite manifest records each suite's path, operation, vector count, and SHA-256 digest. Compare the digests to confirm that an implementation runs the published vectors. Run the 15 required core suites, canonicalization and identity first, then Graph and Trace. Run an extension's suites only when the implementation claims that extension.
- Canonicalization and Identity Vectors
- Graph and Trace Vectors
- Optional Extension Vectors
Seven core suites cover canonical bytes, rejected values, raw JSON ingress, Block identity, and parent normalization.
| Suite file | Vectors | Coverage |
|---|---|---|
test-vectors/canonicalization/canonicalization.json | 31 | Canonical bytes for accepted values |
test-vectors/canonicalization/canonicalization-negative.json | 11 | Rejected values |
test-vectors/canonicalization/canonicalization-depth.json | 2 | Depth 128 accepted, depth 129 rejected |
test-vectors/ingress/raw-json.json | 6 | Raw JSON ingress |
test-vectors/identity/block-identity.json | 8 | contentHash and blockHash derivation |
test-vectors/blocks/parent-normalization.json | 10 | Parent normalization |
test-vectors/blocks/parent-limits.json | 2 | The 256-parent limit |
Eight core suites cover Graph verification outcomes, lineage rules, and Attribution Trace construction.
| Suite file | Vectors | Coverage |
|---|---|---|
test-vectors/graphs/graph-validation-outcomes.json | 15 | Graph verification statuses |
test-vectors/graphs/graph-validation-interactions.json | 9 | Interactions between Graph conditions |
test-vectors/graphs/lineage-negative.json | 6 | Lineage violations |
test-vectors/graphs/lineage-boundaries.json | 9 | Lineage boundary cases |
test-vectors/graphs/attribution-trace.json | 13 | Attribution Trace construction |
test-vectors/graphs/trace-boundaries.json | 4 | Trace boundary cases |
test-vectors/graphs/semantic-validity.json | 9 | Semantic validity |
test-vectors/graphs/semantic-integrity.json | 13 | Semantic integrity |
Extension suites apply only to implementations that claim the Merkle or signing extension.
| Suite file | Vectors | Coverage |
|---|---|---|
protocol/extensions/merkle/test-vectors/merkle.json | 9 | Sorted-pair Merkle root hashes and inclusion proofs |
protocol/extensions/signing/test-vectors/signed-blocks.json | 4 | Signed Blocks |
protocol/extensions/signing/test-vectors/ed25519-attestations.json | 2 | Ed25519 attestations |
protocol/extensions/signing/test-vectors/p256-attestations.json | 2 | P-256 attestations |
When to Rerun the Vectors
Rerun the core suites after any change to serialization, hashing, parent normalization, Graph verification, or Trace code, and an extension's suites after changing that extension. Run Conformance Tests lists every rerun trigger and the commands.