Commit Graph
3 Commits
Author SHA1 Message Date
nilsandClaude Sonnet 5.5 52a6d87553 pow: a fast miner that hashes the bytes before the nonce once (about 100 times faster)
pow.Mine finds the smallest nonce, exactly what trying 0, 1, 2, ... finds, so every signed record and golden fixture stays the same. It saves the SHA-256 state after the whole blocks before the nonce, hashes only the number and what follows per attempt, and uses every core but one from difficulty 14 up. Listing, report, revocation and message mining use it; each re-checks the result before signing. One listing at difficulty 16 takes about 19 ms instead of about 2 s. docs/PROTOCOL.md says what proof-of-work can and cannot do against fast hardware.

allmende-load fills a data directory with signed invented listings for capacity tests and measures mining time (-mine-only).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
2026-11-19 00:15:52 +01:00
nilsandClaude Sonnet 5.5 d3efe5a3a7 Add device keys, revocation and libp2p gossip with sync
- identity: 12-word recovery phrase, device certificates, revocations,
  device key storage; the identity key is never stored on a node
- listing: signed by a device with an embedded certificate, domain-separated
  signatures, ErrTimeWindow for clock-related failures, region helpers
- store: revocations purge a device's listings; keyset-paged Since for sync
- p2p: gossipsub topic per geohash region plus a global revocation topic,
  validators run before relaying, /allmende/1/sync catch-up protocol,
  bootstrap peers and mDNS
- docs: key model, replication and conflict rules

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 17:43:25 +01:00
nilsandClaude Sonnet 5.5 cdc9c3d20b Scaffold Allmende: identity, canonical JSON, signed listings
- internal/jcs: RFC 8785 canonical JSON (integers only)
- internal/identity: ed25519 keypair, 0600 key file, no overwrite
- internal/listing: signed listing record with PoW, validation,
  tombstones and supersede rules
- docs/PROTOCOL.md: architecture and decisions so far

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 17:02:50 +01:00