Skip to content

Conversation

@pinheadmz
Copy link
Contributor

The core change here is expanding TestNode.generatetoaddress() to support signet mining. The whole script from the signet miner is copied and refactored in commander.py: get block template, create signet TXs, create PSBT, sign with wallet, complete block, etc and THEN, grind the PoW.

Signet grinding goes a lot faster using bitcoin-util rather than single threaded python, so I addeed it to a v29 image and included it in a test. Commander can also fallback to python if bitcoin-util isnt present. But going forward i think we should install it in all images so that change has been made to image-build and the docker bake file as well.

Using bitcoin-util inside the tank requires another k8s permission so the scenario must be run with --admin, which ln_init is automatically.

In summary:

A Warnet can run on Signet with lightning nodes and channels. Upon deployment, the ln_init scenario will generate all blocks necessary for the channels using the bitcoin-util grinder for PoW. For now, the mining node in such a network must use the 29.0-util tag but starting with bitcoin core v30 our warnet images will include bitcoin-util by default

@pinheadmz pinheadmz merged commit 455222c into bitcoin-dev-project:main Sep 10, 2025
16 checks passed
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.

1 participant