Context
The L0 conformance vectors (added under /vectors, FIP validator-onboarding gate L0 — snapchain#917) currently cover Layer 1 only: encoding, BLAKE3-160 hash, Ed25519 signature, and signer. These rest on protobuf + BLAKE3 + Ed25519 and are reproducible in any language.
They intentionally omit the post-state merkle root (Layer 2) because docs/SPECIFICATION.md §4.2 is stale relative to the reference implementation (farcasterxyz/snapchain):
- §4.2.1 describes a timestamp-prefixed 36-byte Sync ID (
10b timestamp + 1b type + 4b fid + 1b crdt + 20b hash) in a chronologically-ordered Merkle Patricia Trie with exclusion-set sync — the legacy hubs design.
- snapchain's actual trie key is
[virtual_shard(1)][fid(BE)][msg_type<<3 (1)][hash(20)] — fid-sharded, fid-prefixed, no timestamp (256 virtual shards). On-chain events are keyed by transaction_hash + log_index; fnames by a padded name. A trie leaf's hash is blake3_20(key); internal nodes hash the concatenation of child hashes sorted by child byte.
Scope
- Update §4.2 (and §4.2.1/§4.2.2) to describe the sharded trie key layout, node hashing, and the per-entity key encodings actually used by the reference implementation.
- Audit/extend §3.1 CRDTs for the off-chain-signer message types (
KEY_ADD / KEY_REMOVE).
- Once the trie spec is reconciled, promote the post-state merkle root vectors into
/vectors so an alternative client can reproduce state roots, not just the cryptographic layer.
Mirror of Linear NEYN-12044 follow-up (epic NEYN-12026). Tracks the Layer-2 portion of the conformance corpus.
Context
The L0 conformance vectors (added under
/vectors, FIP validator-onboarding gate L0 — snapchain#917) currently cover Layer 1 only: encoding, BLAKE3-160 hash, Ed25519 signature, and signer. These rest on protobuf + BLAKE3 + Ed25519 and are reproducible in any language.They intentionally omit the post-state merkle root (Layer 2) because
docs/SPECIFICATION.md§4.2 is stale relative to the reference implementation (farcasterxyz/snapchain):10b timestamp + 1b type + 4b fid + 1b crdt + 20b hash) in a chronologically-ordered Merkle Patricia Trie with exclusion-set sync — the legacy hubs design.[virtual_shard(1)][fid(BE)][msg_type<<3 (1)][hash(20)]— fid-sharded, fid-prefixed, no timestamp (256 virtual shards). On-chain events are keyed bytransaction_hash + log_index; fnames by a padded name. A trie leaf's hash isblake3_20(key); internal nodes hash the concatenation of child hashes sorted by child byte.Scope
KEY_ADD/KEY_REMOVE)./vectorsso an alternative client can reproduce state roots, not just the cryptographic layer.Mirror of Linear NEYN-12044 follow-up (epic NEYN-12026). Tracks the Layer-2 portion of the conformance corpus.