difficulty: the default for listings, reports and revocations is 24 bits (was 16)

About 4 s to mine one listing on 8 cores now that the miner is fast. Nodes of the old default refuse nothing from new ones, but a node at 24 refuses listings mined for 16, so the bootstrap node needs the new image to exchange listings with updated nodes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-19 00:18:11 +01:00
co-authored by Claude Sonnet 5.5
parent 52a6d87553
commit bcae85b06f
2 changed files with 15 additions and 6 deletions
+5 -2
View File
@@ -36,8 +36,11 @@ const (
)
// 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
// requires of listings, reports and revocations. All nodes must agree on it,
// or they reject each other's records: a node refuses what carries less than
// its own value. 24 bits is a few seconds of mining for an honest node (see
// "Spam" in docs/PROTOCOL.md); it was 16 until the miner became fast.
const DefaultDifficulty = 24
// 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