Skip to content

Commit 03a865b

Browse files
committed
Fix WeightsSkipList: faithful port of p2pool lazy level-building algorithm
The skip list was producing wrong PPLNS weights causing persistent GENTX-MISMATCH on mainnet. Three bugs fixed: 1. Eager level building replaced with p2pool's lazy "updates" mechanism (skiplist.py:24-34,54-56) — higher levels are built during query walks, not at node construction time, ensuring correct combined deltas. 2. Missing updates propagation after jumps — after taking a skip-list jump, the accumulated delta must be combined into all pending update entries so future level fill-ins get correct aggregate weights. 3. std::vector replaced with std::deque for skip levels — push_back during lazy level building was invalidating references to existing level deltas held by the query walk. Verified: 0 GENTX-MISMATCH on testnet node 33 (535+ shares verified), all 198 built tests pass, PPLNS query time 3.3ms at depth 550.
1 parent 3bffbb9 commit 03a865b

1 file changed

Lines changed: 210 additions & 119 deletions

File tree

0 commit comments

Comments
 (0)