Add runnable node, HTTP API, all-devices revocation and reconnect sync

- cmd/node: init (recovery phrase onboarding), run, recover
- api: public reads of canonical signed records, token-protected writes
- identity: RevokeAll voids every device certified before a cutoff, so
  recovery works with only the phrase; store purges by certificate age
- p2p: redial bootstrap peers, sync on every new connection (in-flight
  guard only), validate bootstrap addresses up front
- docs: API, recovery semantics, peer-ID change on recovery

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 18:03:46 +01:00
co-authored by Claude Sonnet 5.5
parent d3efe5a3a7
commit 918e16ed37
18 changed files with 1550 additions and 82 deletions
+4
View File
@@ -35,6 +35,10 @@ const (
listingContext = "allmende-listing-v1\n"
)
// DefaultDifficulty is the proof-of-work (leading zero bits) the network
// requires. All nodes must agree on it, or they reject each other's messages.
const DefaultDifficulty = 16
// ErrTimeWindow marks failures caused by the clock (expired, or created in
// the future). They are not the sender's fault, so the p2p layer ignores such
// messages instead of penalizing the peer that relayed them.