QuantumChain QTCN
MenuClose menu
Documentation QTCN / NETWORK

QUANTUMCHAIN

Explore the docs

Architecture · Payments · Protocol

DEVELOPERS · DESIGN GUIDE

Testing & conformance

Connect a protocol requirement to repeatable tests, failure cases and release evidence.

9 min readReviewed 24 November 2026Markdown ↗

Test what must remain true

An invariant is a property that must hold within a declared scope. For example, invalid authorization must not produce an authorized value transfer, and corrupted snapshot data must not become active state.

The scenario selector illustrates expected assertions and useful evidence. It does not run a protocol test suite or report that these properties have been verified in a released node.

06 / FROM FAULT TO EVIDENCE

What should a test prove?

Choose a fault and inspect the property it challenges.

ILLUSTRATIVE TEST CASEAuthorization
INJECT
A required signature fails.
ASSERT
Invalid authorization cannot produce an authorized state transition.
COLLECT EVIDENCE
  1. Descriptor and witness fixture
  2. Expected rejection
  3. Canonical state before / after

This assertion concerns authorization rejection, not all consensus behavior.

Expected behavior, not a test result · this page does not execute a protocol suite.

Use complementary kinds of evidence

Use complementary kinds of evidence
LayerWhat it can establishLimit
Unit / codec vectorsExact expected interpretation of known casesOnly the tested cases and chosen format
Property and state-machine testsInvariants across generated inputs or transitionsDepends on generators and the model
Integration / fault testsBehavior across components under controlled failuresDepends on environment coverage
FuzzingUnexpected input handling and robustness findingsNo complete correctness guarantee
Formal reasoningProperties within a specified model and assumptionsDoes not automatically prove the deployed implementation

Positive and negative vectors belong together

Shared vectors must identify their specification and schema versions. Passing them supports conformance to that scope; it does not establish all possible safety, performance or operational properties.

Positive and negative vectors belong together
Vector familyPositive caseNegative case
Transaction / witnessCanonical encoding and authorized descriptorMalformed encoding, wrong network or invalid signature
Block / certificateValid structure and authority contextInvalid vote set or incompatible epoch context
State / proofCorrect commitment and anchored proofMismatched root or malformed evidence
SnapshotManifest and chunks reconstruct the expected stateCorruption, scope mismatch or incomplete reconstruction

High-value properties to protect

Consensus claims depend on the specified network and honest-validator assumptions. A local test must record those assumptions rather than treating one successful run as a universal guarantee.

  • Canonical transaction bytes and identity are unambiguous.
  • Invalid transitions do not mutate canonical state.
  • Amounts and partitions remain consistent with authorized supply and fee rules.
  • A validator identity cannot sign conflicting messages in the same protected context.
  • Snapshot and proof roots match the declared finalized anchor.
  • Version activation cannot create ambiguous interpretation within one execution context.

Make the evidence traceable

Keep failure bundles, negative cases and compatibility decisions with the release record. A change to an invariant requires explicit review of its tests and assumptions; weakening a test to hide a regression is not conformance.

  1. 01
    Requirement

    Identify the specification section and invariant.

  2. 02
    Test

    Bind vectors and scenarios to that requirement.

  3. 03
    Implementation

    Record the tested code and toolchain revision.

  4. 04
    Release evidence

    Publish scope, results and unresolved findings.

An evidence chain, not a claim that a review or release has occurred.