11 substrate ports. 1 cell. 1 state hash. Verified byte-exact across the canonical reference implementation.
state_hash = fnv1a_64( cell.id (8) + cell.dials (32) + cell.neighbors (8*N) )
uint64_t fnv1a_64(const uint8_t* data, size_t len) {
uint64_t h = 0xcbf29ce484222325ULL;
while (len--) {
h ^= *data++;
h *= 0x100000001b3ULL;
}
return h;
}
pub fn fnv1a_64(data: &[u8]) -> u64 {
let mut h: u64 = 0xcbf29ce484222325;
for &b in data {
h ^= b as u64;
h = h.wrapping_mul(0x100000001b3);
}
h
}
module fnv1a_64 (
input clk, input [63:0] data_in,
output reg [63:0] hash
);
always @(posedge clk) begin
hash <= hash ^ data_in;
hash <= hash * 64'h100000001b3;
end
endmodule
architecture rtl of fnv1a_64 is
begin
process(clk)
begin
if rising_edge(clk) then
hash <= hash xor data_in;
hash <= hash * x"100000001b3";
end if;
end process;
end rtl;
function fnv1a_64(bytes) {
let h = 0xcbf29ce484222325n;
for (const b of bytes) {
h ^= BigInt(b);
h = (h * 0x100000001b3n) & 0xffffffffffffffffn;
}
return h;
}
export function fnv1a_64(
data: Uint8Array
): bigint {
let h = 0xcbf29ce484222325n;
for (const b of data) {
h ^= BigInt(b);
h = (h * 0x100000001b3n) & 0xffffffffffffffffn;
}
return h;
}
def fnv1a_64(data: bytes) -> int:
h = 0xcbf29ce484222325
for b in data:
h ^= b
h = (h * 0x100000001b3) & 0xffffffffffffffff
return h
func FNV1a64(data []byte) uint64 {
h := uint64(0xcbf29ce484222325)
for _, b := range data {
h ^= uint64(b)
h *= 0x100000001b3
}
return h
}
pub fn fnv1a_64(data: []const u8) u64 {
var h: u64 = 0xcbf29ce484222325;
for (data) |b| {
h ^= @as(u64, b);
h *%= 0x100000001b3;
}
return h;
}
fn fnv1a_64(data: List[UInt8]) -> UInt64:
var h: UInt64 = 0xcbf29ce484222325
for b in data:
h = h ^ UInt64(b[])
h = (h * 0x100000001b3) & 0xffffffffffffffff
return h
pub fn fnv1a_64(data: &[u8]) -> u64 {
let mut h: u64 = 0xcbf29ce484222325;
for &b in data {
h ^= b as u64;
h = h.wrapping_mul(0x100000001b3);
}
h
}
(module
(func $fnv1a_64 (param $ptr i32) (result i64)
(local $h i64) (local.set $h (i64.const 0xcbf29ce484222325))
...
)
)
func FNV1a64(data []byte) uint64 {
h := uint64(0xcbf29ce484222325)
for _, b := range data {
h ^= uint64(b)
h *= 0x100000001b3
}
return h
}
pub fn fnv1a_64(data: []const u8) u64 {
var h: u64 = 0xcbf29ce484222325;
for (data) |b| {
h ^= @as(u64, b);
h *%= 0x100000001b3;
}
return h;
}
Reference cell state, fed through the canonical FNV-1a 64-bit hash in 7 different languages. The hashes match:
Test cell: 1 cell, id=1, dials=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16], neighbors=[2,3,4]
Test vector: serialize cell โ fnv1a_64 โ 0xe435d91d6d92a1d8
If your port produces a different hash, the cell is not byte-exact and cannot be admitted to the canon.
github.com/SuperInstance/quilt-{lang}Copy this prompt into any Claude session to generate a working Quilt in your language of choice:
You are writing a Quilt cell. A cell has: - 16 signed Q1.15 dials (range -32768..32767) - A 64-bit id - A list of neighbor ids The 5 opcodes are: - BIND(cell, dials) โ sets the dials, idempotent - LINK(c1, c2) โ adds an undirected edge - EFFECT(cell) โ propagates dial[0] to neighbors - VIEW(cell) โ returns dials - TICK(fabric) โ advances all dials by 1 in alternating direction The state hash is FNV-1a 64-bit over the canonical serialization (type(1) + id(8) + dials(32) + neighbors(8*N)). Constants: FNV_OFFSET = 0xcbf29ce484222325 FNV_PRIME = 0x100000001b3 Write a complete, working cell-fabric runtime in [YOUR LANGUAGE]. Then write a test that produces the hash 0xe435d91d6d92a1d8 for a cell with id=1, dials=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16], neighbors=[2,3,4]. Do not use any external libraries. Do not add features beyond what is specified. Verify the hash byte-exactly.