JamZig is a Zig-powered implementation of the JAM Protocol. This repository contains state transition test vectors generated by JamZig for cross-implementation testing and validation.
These test vectors enable teams to validate state transitions by sharing pre-state, block, and post-state data. This allows verification that different implementations can read key objects and perform identical state transitions according to the GP Spec.
The vectors are procedurally generated from a seed, making them deterministic and reproducible. The vectors do not use community-generated keys; instead, all keys are also derived from the same seed.
The format is compatible with: https://github.com/jam-duna/jamtestnet
To validate these test vectors, simply ensure your implementation processes the pre_state from the first transition file (which serves as the genesis state), using the configuration parameters below. Apply each block to its corresponding pre_state following the JAM protocol specifications, then verify your computed post_state matches the provided one.
This assumes teams have implemented the inverse of the state merklization.
A minimal extension to the merklization of the state as described in the Graypaper D.2. The merklization is a lossy format. This extention introduces minimal metadata for state components and deltas entries. This metadata enables full state deserialization.
state_transitions/ # Machine-friendly state transitions
$epoch_$slot-in-epoch.json
$epoch_$slot-in-epoch.bin
File names are output to allow for easy sorting.
pub const JAMDUNA_PARAMS = jam_params.Params{
.epoch_length = 12,
.ticket_submission_end_epoch_slot = 10,
.validators_count = 6,
.validators_super_majority = 5,
.validator_rotation_period = 4,
.core_count = 2,
.avail_bitfield_bytes = (2 + 7) / 8,
// JAMDUNA changes
.max_ticket_entries_per_validator = 3, // N
.max_authorizations_queue_items = 80, // Q
.max_authorizations_pool_items = 8,
};The test vectors alternate between keys and tickets mode to validate correct state progression and fallback behavior.
- Email: contact@jamzig.dev
- Twitter: https://x.com/jamzig_dev
MIT