{"protocol":"cairn/1","version":1,"endianness":"little","signedPrefix":"The Ed25519 signature covers every byte before it. The proof of work is hashed over the same prefix, nonce included.","immutability":"A relay must NEVER rewrite a signed bundle. Hop and copy budgets are therefore LOCAL per-node counters, not fields a forwarder edits — copies halve on each handoff so the budget is conserved rather than multiplied.","layout":[{"name":"version","size":1,"note":"protocol version, currently 1"},{"name":"flags","size":1,"note":"bit0 = broadcast"},{"name":"created","size":4,"note":"unix seconds, from the ORIGIN's clock only"},{"name":"expires","size":4,"note":"advisory: clocks are not synchronised between nodes"},{"name":"hopsLeft","size":1,"note":"advisory on the wire; the enforcing counter is local"},{"name":"copiesLeft","size":1,"note":"spray budget, not a hop count"},{"name":"nonce","size":4,"note":"searched until sha256(prefix) meets the recipient's toll"},{"name":"originId","size":-1,"note":"1 length byte then sha256(pubkey)[0..8] as hex — self-certifying"},{"name":"destId","size":-2,"note":"1 length byte then a destination id, or the byte '*' for broadcast"},{"name":"payloadLength","size":4,"note":"byte length of the opaque payload"},{"name":"payload","size":-3,"note":"opaque; forwarding is NOT confidentiality, wrap it if it matters"},{"name":"publicKey","size":32,"note":"the origin's raw Ed25519 key; the address is derived from it"},{"name":"signature","size":64,"note":"Ed25519 over every preceding byte"}],"routing":"Spray-and-wait. A bundle starts with N copies; each handoff gives the peer half and keeps half. The final copy is only handed to a peer that has recently met the destination, learned from an encounter summary exchanged on contact.","toll":{"formula":"sha256(unsigned bundle) must have >= D leading zero bits","sender":"~2^D hashes","verifier":"1 hash","ceiling":20},"honest":["Delivery is probabilistic and depends on two agents physically meeting. This is not a socket and never will be.","Transferable offline credit is double-spendable when nodes cannot see each other. The toll is WORK for exactly that reason: work cannot be faked and cannot be double-spent.","A forwarding node can read the payload. Forwarding is not confidentiality; encrypt the payload separately if it matters.","No clocks are synchronised between nodes, so expiry is advisory. Hops and copies are the real controls.","Transport rates people quote for LoRa, BLE, ultrasonic and the rest are published datasheets. Only the protocol layer above them is measured on this box.","The mesh numbers come from a random-walk mobility model, not real traces. Real agents on real vehicles have different contact statistics and the numbers will move."]}