Repository navigation
node: online mining can accept a foreign coinbase (--mine_online_foreign, --mine_online_reserve) - #2160
Draft
profinch wants to merge 2 commits into
Draft
node: online mining can accept a foreign coinbase (--mine_online_foreign, --mine_online_reserve)#2160profinch wants to merge 2 commits into
profinch wants to merge 2 commits into
Conversation
…ign, --mine_online_reserve)
Lets a pool pay its miners in the block itself, with coinbase outputs the
miners created and signed with their own keys (a "pair": an output with a
public value and a kernel whose excess is minus the output's blinding
factor, so each pair balances by itself). The pool's owner wallet finalizes
the block as today, but the coinbase it returns carries outputs the node's
owner key does not recognize.
Two options, both off by default, so nothing changes unless they are set:
--mine_online_foreign=1 skip the "outputs correspond to our viewer's
Kdf" check at finalization; if the finalization
then fails in the chain context (a kernel
already visible, a block too large), drop the
finalizer and keep mining on the node's own
miner key, instead of stalling
--mine_online_reserve=N block space in bytes kept free for the coinbase
when a block is assembled for finalization,
on top of the single output and kernel it
reserves today
Consensus is untouched: a node without these options accepts the blocks.
Tested with two nodes on a FakePoW chain (the mining one with the options,
a stock one validating every block and serving the miner's wallet), and on
a private chain with the stock beam-node and beam-wallet.
…me is given For test chains: with --consensus=FakePoW the node left mining off whatever the options said. Now --mining_threads and --pow_solve_time apply when the solve time is set explicitly, so a FakePoW node can serve its stratum server (or mine with the fake solver) exactly like a PoW node.
profinch
marked this pull request as draft
October 8, 2026 10:53
profinch
added a commit
to profinch/bumblebeam
that referenced
this pull request
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Lets a mining pool pay its miners in the block itself, with coinbase outputs the miners created and signed with their own keys, so the pool never holds their coins. It is the coinbase half of a P2Pool for Beam.
Beam is Mimblewimble: whoever creates an output can spend it, so the block builder cannot make outputs for the miners. The miners make them in advance, as pairs: a coinbase output with a public value plus a kernel whose excess is minus the output's blinding factor. Each pair balances by itself, needs no offset and no co-signer, and is made with the miner key and tagged with the owner key exactly like the coinbase of a node mining for that wallet, so the wallet finds it through its ordinary UTXO events. The pool puts the pairs for what each miner is owed into the coinbase, plus one output of its own for the rest (fee, transaction fees, rounding). Consensus already allows any number of coinbase outputs and kernels as long as they add up to the emission plus the fees (since HF6).
The node side
Online mining already lets the owner wallet finalize the block. The only thing in the way is the check at finalization that every coinbase output is recognized by the node's owner key, and the block space reserved for a single coinbase output. Two options, both off by default, so nothing changes unless they are set:
--mine_online_foreign=1--mine_online_reserve=<bytes>41 lines over 7 files. Consensus is untouched: a node without the options accepts the blocks.
The second commit is independent and only for test chains: with
--consensus=FakePoWthe node left mining off whatever the options said; now--mining_threadsand--pow_solve_timeapply when the solve time is set explicitly, so a FakePoW node can serve its stratum server like a PoW node. Happy to drop it from this PR if you prefer.Tested
--mine_online_foreignthe node refuses the foreign outputs.beam-node, the finalizer, the pool server, the miner's tool, a CPU miner, a second stock node holding the miner wallet's owner key, andbeam-walletitself. 50 blocks; the wallet showed what the blocks paid to the groth and spent it; the fee landed in the next coinbase.nodetestpasses.The pool side (finalizer daemon, miner's tool, pool server) is at https://github.com/profinch/bumblebeam/tree/main/tools/coinbase, with the same patch as a file and the test harness.