Conformance Tests
Conformance tests verify that an ALX implementation produces the expected protocol-defined results for canonical test inputs.
Shared test vectors allow independent implementations to detect behavioral differences before exchanging or verifying Blocks across implementation boundaries.
Conformance Coverage
Core conformance tests evaluate deterministic protocol behavior including:
- Canonicalization
- Parent normalization
contentHashderivationblockHashderivation- Block validation
- Graph validation
- Lineage traversal
Where an implementation supports optional protocol capabilities, applicable tests can additionally cover signature verification, replay handling, and Merkle proof behavior.
Why Conformance Testing Matters
Two implementations can accept equivalent JSON input while producing different canonical bytes, normalized parent sets, or hashes.
Differences in serialization, numeric handling, Unicode encoding, object-key ordering, parent normalization, or cryptographic implementation can produce incompatible Block identities.
Run the JavaScript Suite
From the ALX Protocol source repository, which carries the shared vectors and an adapter for each implementation:
pnpm run test:conformance
The JavaScript test suite also covers package-specific capabilities such as Block attestations, replay windows, and Merkle helpers. Passing those tests evaluates the corresponding JavaScript package behavior; those capabilities are not requirements for core ALX conformance unless the protocol specification defines them.
When to Run Conformance Tests
Run the applicable conformance tests when:
- Implementing ALX in another language or runtime
- Changing canonicalization behavior
- Changing parent normalization
- Changing hash derivation
- Updating Block or graph validation
- Modifying lineage traversal
- Updating supported signing or replay behavior
- Changing supported Merkle proof behavior
- Upgrading serialization or cryptographic dependencies
- Preparing an implementation for release
Conformance tests should also run in continuous integration for implementations that create or verify ALX Blocks.