Dev stack controls: on-demand miner and configurable reward destination #14
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
vnprc/hashpool#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Give the dev stack two switches — run the CPU miner only on demand, and choose where block rewards get paid — so epoch work can be exercised deliberately instead of against ~2 uncontrollable blocks per second.
Primary goals:
minerprocess indevenv.nixis an unconditional infinite-restart loop today; gate it behind a profile/env flag with ajustrecipe so the stack can idle quiescent or mine for a bounded window.coinbase_reward_scriptinconfig/pool.config.toml) as the test knob; regtestbcrt1addresses andraw()script forms both parse. The dev config currently carries a testnettb1q…address on a regtest network — replace it with a regtest address while touching it.Current state and specifics
The dev harness mines ~2 blocks/second through the full miner→translator→pool→sv2-tp path (every share beats the regtest network target), and rewards land on the single configured pool address. There is no way to pause the miner short of killing the process, which auto-restarts every 5s.
just generate-blocksexists but uses the bitcoind wallet's-generate, not a chosen address; ageneratetoaddressvariant is the second half of the reward-destination knob.Witness
With the miner gated off: the stack idles, no new blocks.
just-recipe mining window produces blocks whose coinbase pays the configured script (assert viabitcoin-cliagainst the decoded coinbase). Dev default behaves identically to today.Scope
In: devenv/justfile/config changes only. Out: any epoch logic (#16, #18); cleaning up the harness's other rough edges (append-only logs, no
just clean all) unless trivially adjacent.Part of #13.