Golden vectors, for any language
The vectors ship inside the wheel as plain JSON, so a non-Python implementation can read them from an installedpyboltzmann without this SDK running any of its own code.
Those four cover the whole chain from a payload to a version identifier. Agree on all of them and two
clients share a brain; disagree on any and they do not, whatever else they implement.
The behavioral suite, for Python
A Python implementation inherits the suite directly. These arepytest classes — collect them and they
run against your code, so they need pytest:
What each suite asserts
IdentityConformance
IdentityConformance
- The three levels of hashes are not interchangeable, and parsing refuses the wrong level rather than coercing it.
- Canonicalization erases the order a mapping was built in.
- Floats and unsafe integers are refused inside a payload.
block_idmatches the published vectors, which other languages also read.
MerkleConformance
MerkleConformance
- The root is a function of the set: two parties that assembled the same blocks obtain the same root.
- Duplicates collapse — a set of content-addressed blocks cannot hold the same block twice.
- An empty composition still has a well-defined root.
- Every leaf proves into the root, at every tree size.
- A proof does not verify against another root.
CompositionConformance
CompositionConformance
- Dropping yields a new root, and does not disturb the earlier one.
- Episodic refuses to drop — append-only by protocol, not by policy.
- A diff reports exactly what an incremental update must fetch.
BlockStoreConformance
BlockStoreConformance
- Storing identical bytes twice is a no-op.
- Every memory type round-trips, decoding back to an equal block with the same identity.
- A missing block is an error, not an empty result.
- Corruption is detected: bytes that do not hash to their digest are refused.
- A store must not normalize — non-canonical bytes do not decode.
- A tombstoned block is distinguishable from a missing one.
- Deleting reclaims both the bytes and the record of them.
- The store can enumerate what it holds, which is what mark-and-sweep needs.
BrainReaderConformance
BrainReaderConformance
- Satisfies the
BrainReadercontract, and reports what is installed. - A module that is not installed is an error, never an empty module.
- Resolves members; refuses to resolve a non-member however it is stored.
- Proves membership, and a proof does not verify against another root.
- Verifies itself, and reports resolvability three ways.
searchreturns verified data and not prose, reports the roots it verified against, and honours a memory-type filter.- No match is an answer and not an error.
- An unregistered index is refused rather than faked.
Fixtures
Two helpers build valid blocks, so a suite does not need your constructors:What the SDK asserts about itself
Two tests in the repository are worth knowing about, because they constrain what this package may ever ship:- No
NotImplementedErrorstubs. An unimplemented function is worse than an interface: it looks callable and is not. - Nothing declared and unreachable. Every type, enum member and constant is produced by something.