Skip to content

feat(pool): add share bridge and ValidatedShare for bead forwarding [Part 2] - #2

Open
nkatha23 wants to merge 5 commits into
braidpool:sv2-integration-braidpoolfrom
nkatha23:braidpool/noise-channel-manager
Open

nkatha23 wants to merge 5 commits into
braidpool:sv2-integration-braidpoolfrom
nkatha23:braidpool/noise-channel-manager

Conversation

@nkatha23

@nkatha23 nkatha23 commented Sep 15, 2026 •

Copy link
Copy Markdown

Part of braidpool/braidpool#313. Architecture documented in the SV2 integration workflow. Depends on Part 1 (#1 ).

When the SV2 pool validates a share, that share needs to reach Braidpool's bead DAG. This PR adds the bridge, every validated share is forwarded from the pool to the node via a dedicated channel so propagate_valid_bead can create a bead. Both shares that meet the pool's weak target and shares that find a full Bitcoin block are forwarded. The share carries the channel ID, template ID, and extranonce fields the node needs to construct bead metadata.

Wiring the receiver to propagate_valid_bead and replacing the placeholder authority key are deferred to a follow-up PR once the sv2-apps dependency is added to the node.

@nkatha23
nkatha23 marked this pull request as draft September 15, 2026 12:10
@nkatha23
nkatha23 force-pushed the braidpool/noise-channel-manager branch from 61ff335 to fe0bfdf Compare September 15, 2026 17:33
@nkatha23
nkatha23 marked this pull request as ready for review September 22, 2026 09:09
@nkatha23 nkatha23 changed the title feat(pool): add share bridge for validated share forwarding [Part 2 feat(pool): add share bridge and ValidatedShare for bead forwarding [Part 2] Sep 22, 2026
…eReceiver

- Add BraidpoolIpc variant to TemplateProviderType (no config fields, channel
  wired at runtime via PoolSv2::with_braidpool_template_rx)
- Add PoolSv2::with_braidpool_template_rx() builder and take_braidpool_template_rx()
- Change PoolSv2::start() to accept Option<oneshot::Sender<ShareBridgeReceiver>>
  so callers receive validated shares without blocking on pool shutdown
- Handle BraidpoolIpc in bootstrap_template_provider via sv2_template_consumer
- BraidpoolIpc errors on JDS (requires BitcoinCoreIpc, same as Sv2Tp)
- Add braidpool-common and braidpool-template-provider deps to pool_sv2
@nkatha23
nkatha23 force-pushed the braidpool/noise-channel-manager branch from 67b91db to 3ccbaa5 Compare October 13, 2026 19:12
…tory

Re-exports Secp256k1PublicKey, Secp256k1SecretKey, CoinbaseRewardScript,
and TemplateProviderType from pool_sv2::config so callers don't need a
direct stratum-apps dependency. Adds PoolConfig::for_braidpool() factory
that wires BraidpoolIpc with sensible defaults (1h cert, 20 shares/min,
batch 100, no JDS).

@Sansh2356 Sansh2356 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach ACK 32dd883, just a question modifying stratum-core crates that will be in upcoming PRs or as the submissions will be requiring some additional data in case of braidpool and are you keeping the validation in sv2-apps then we will have to move the validation inside sv2-apps side only, other than these all PRs looks fine according to flow decided .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants