dev stack controls: on-demand miner and configurable reward destination #22
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/dev-stack-controls"
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?
Two dev-stack switches for the epoch milestone:
HASHPOOL_MINER=off devenv upidles the CPU miner (withjust mine [SECONDS]for a bounded mining window), andjust generate-to ADDR [COUNT]mines blocks whose coinbase pays a chosen address — the reward-delivery knob for epoch tests. The pool's dev coinbase destination changes from a testnettb1q…address (invalid-looking on a regtest network) to an explicit regtest burn script with a comment stating it is deliberately not the mint's address. Default behavior is unchanged: withHASHPOOL_MINERunset the miner loop runs exactly as before, and dev rewards remain unspendable throwaways as they always were. If this is wrong, revert — nothing depends on it yet.Closes #14. Part of #13.
Risk
None to running behavior with default env. The burn-script change alters where dev rewards land (previously a testnet-encoded address nobody could spend on regtest either); jds/jdc configs still carry
tb1q…addresses on their currently-inactive paths — left alone deliberately, noted here for the record.Validation
nix-instantiate --parse devenv.nixclean;just --listparses andjust -n generate-todry-run shows the intendedgeneratetoaddressinvocation; the miner gate tested in bash both ways (HASHPOOL_MINER=off→ disabled path, unset → run path). Fulldevenv upnot re-run tonight (the default path is byte-identical when the variable is unset); first full-stack exercise comes with the epoch-mechanics smoke test that consumes these knobs.Adversarial review findings — all checks passed against the real parser and wiring; three nits recorded, no blockers.
Verified: the nix indented-string escaping renders the gate correctly and
nix-instantiate --parseis clean; gate semantics reproduced insh(off → disabled, unset/other → run) and the disabled branch sits beforewaitForPort, so an idle miner never blocks on the proxy;just -n generate-torenders the correctgeneratetoaddressargument order and rightly omits-rpcwallet; theraw(0014{40×0})value is a canonical 22-byte v0 P2WPKH — consensus-valid, effectively unspendable — and the coinbase-script parser's raw arm accepts it; jds/jdc keep theirtb1q…values on genuinely inactive paths (tproxy upstreams the pool; nothing connects to jdc) and still parse network-unchecked, so nothing chokes.Nits, recorded not fixed: (1) the body's "byte-identical when the variable is unset" is an overclaim — the default path gained a 4-line false-test; functionally identical, reworded would be honest; (2)
just mine's|| trueswallows build failures and cold compile time counts against DURATION —cargo build && timeout {{DURATION}} cargo run || [ $? -eq 124 ]would only mask the timeout; (3)exec sleep infinityin the disabled branch would close the (contrived) fall-through if the sleep alone were killed.Verdict: correct as shipped.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.