Skip to content

Migrate from testnet4 to regtest#52

Merged
vnprc merged 7 commits intomasterfrom
mp-regtest
Jun 11, 2025
Merged

Migrate from testnet4 to regtest#52
vnprc merged 7 commits intomasterfrom
mp-regtest

Conversation

@machuPikacchuBTC
Copy link
Collaborator

Closes #7

This PR:

  • migrates from testnet4 to regtest
  • adds just recipes for:
    • mining N blocks
    • creating a wallet

We need a wallet in order to generate blocks, so it also includes a setup script to ensure that a wallet exists and we have at least 16 blocks.

@machuPikacchuBTC machuPikacchuBTC requested a review from vnprc June 11, 2025 17:44
Copy link
Owner

Choose a reason for hiding this comment

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

let's remove all these changes to config files in /test

Copy link
Owner

Choose a reason for hiding this comment

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

unless they are necessary, which would really surprise me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I reset them back to what they were previously 👍

devenv.nix Outdated
'' "bitcoind-testnet.log";
'' "bitcoind-regtest.log";
};
bitcoind-setup = {
Copy link
Owner

Choose a reason for hiding this comment

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

Not a fan of this as a separate process since it clutters the devenv dashboard. I think you can just call the script from the pool process block similar to how the polling loops work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, that's a better place to put it.

@vnprc
Copy link
Owner

vnprc commented Jun 11, 2025

I tested this change by running rm -rf .devenv/state/bitcoind/regtest and then just up. It works! Awesome!

Before approving this PR I would like to clean up the unnecessary devenv process and get some clarity on whether the 16 blocks are really required. I suspect there is some state being carried over from old runs to new runs.

When I disable the bitcoind setup script it runs but never actually starts mining. I wonder if we can add an error message or something. Not a requirement to approve the PR.

@vnprc vnprc merged commit 401d9b7 into master Jun 11, 2025
@vnprc
Copy link
Owner

vnprc commented Jun 11, 2025

nice work!

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.

Migrate to regtest

2 participants