Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add testnet4 chain support (recreated) #2318

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

bullet-tooth
Copy link

This PR is a recreation of the previous PR because I incidentally dropped a brunch and the PR was closed automatically.

Description

This PR adds support of the Bitcoin testnet version 4 chain (testnet3 is in a way of deprecation).

Reference: https://bips.dev/94/

Testnet4 genesis block: https://mempool.space/testnet4/block/00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Thanks for the updates. Definitely looks better now.

Have a couple of fixes that are required, otherwise things crash quite immediately (please test things before requesting review in the future).

After those fixes I was able to sync up to block height 70513

@saubyk saubyk added this to the v0.25 milestone Feb 25, 2025
@saubyk
Copy link
Collaborator

saubyk commented Feb 25, 2025

hey @bullet-tooth are you planning to work on this pr at a high priority? We are interested in moving this along quickly. Thanks.

@bullet-tooth
Copy link
Author

hey @bullet-tooth are you planning to work on this pr at a high priority? We are interested in moving this along quickly. Thanks.

Done.

Also, verified locally, it could sync up to the current height (71627).

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13524296390

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 68 (14.71%) changed or added relevant lines in 10 files are covered.
  • 217 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-2.0%) to 55.27%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rpcclient/infrastructure.go 0 2 0.0%
rpcserver.go 0 2 0.0%
cmd/addblock/config.go 0 4 0.0%
cmd/findcheckpoint/config.go 0 4 0.0%
config.go 0 4 0.0%
database/cmd/dbtool/globalconfig.go 0 4 0.0%
blockchain/difficulty.go 2 7 28.57%
cmd/btcctl/config.go 0 10 0.0%
blockchain/validate.go 7 30 23.33%
Files with Coverage Reduction New Missed Lines %
btcutil/gcs/gcs.go 1 80.95%
mempool/mempool.go 1 66.67%
database/ffldb/db.go 5 91.23%
config.go 210 5.09%
Totals Coverage Status
Change from base Build 12775873016: -2.0%
Covered Lines: 29949
Relevant Lines: 54187

💛 - Coveralls

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Would be nice if you could squash/fixup the last 4 commits into those that actually introduced the code (to make it easy for the next reviewer, see https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history).
Other than that looks good to me, thanks!

Need a second reviewer though.

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.

4 participants