Skip to content

Commit c30b3a4

Browse files
committed
FUTURE.md: add received block resubmission gap (needs tx relay pipeline)
1 parent fed933d commit c30b3a4

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/FUTURE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,29 @@ IDs. Foundation committed: data structures, SipHash, peer negotiation.
479479
Remaining: wire send path (BuildCompactBlock → cmpctblock), receive path
480480
(reconstruct from mempool), multi-peer broadcast.
481481
482+
### Received Block Resubmission — Not Started
483+
When a peer's share meets the block target, c2pool detects it (block found
484+
banner in log, commit `fed933d3`) but does NOT resubmit the block to the
485+
local coin daemon for propagation redundancy. p2pool does this in `work.py`
486+
via `helper.submit_block()`, reconstructing the full block from share data
487+
+ `known_txs` (the transaction cache). Implementing this in c2pool requires:
488+
489+
1. **Transaction relay pipeline** — peers must relay `known_txs` alongside
490+
shares (p2pool's `have_tx`/`losing_tx` messages). Currently c2pool stores
491+
transaction data in `HandleSharesData::m_txs` but only for locally-held
492+
templates, not for reconstructing blocks from peer shares.
493+
2. **Block reconstruction** — given a block-level share + transaction data,
494+
rebuild the full block (header + coinbase + all transactions) and call
495+
`submitblock` RPC to the local coin daemon.
496+
3. **P2P block broadcast** — additionally relay the reconstructed block via
497+
the P2P connection to the coin daemon for fastest propagation (bypasses
498+
RPC latency). p2pool uses `Broadcaster` for parallel relay to multiple
499+
coin daemon P2P connections.
500+
501+
**Impact:** Reduces orphan rate — every pool node that receives the block-level
502+
share resubmits it independently, creating N parallel submission paths instead
503+
of relying on the single node that found the block.
504+
482505
---
483506
484507
## Share Redistribution Enhancements (from p2pool-merged-v36)

0 commit comments

Comments
 (0)