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 #2274

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

Conversation

bullet-tooth
Copy link

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

Also, I have intention to add testnet4 support to btcwallet after this PR

@Roasbeef
Copy link
Member

Looks like we have another here: #2275

Neither that one, nor this one, have any of the new difficulty adjustment algorithm changes.

@jcvernaleo
Copy link
Member

I know that in #2275 they were working on the difficultly bits. @marcopeereboom I thought you had started on that part, is it in your PR?

@bullet-tooth
Copy link
Author

@Roasbeef @jcvernaleo thanks for your inputs.
As I can see the #2275 is still in draft so if you could provide a little context about this "difficulty adjustment algorithm changes" I could implement it as well in this PR.

@Roasbeef
Copy link
Member

@bullet-tooth see the BIP: https://bips.dev/94/

@bullet-tooth bullet-tooth marked this pull request as draft November 23, 2024 00:09
@bullet-tooth bullet-tooth marked this pull request as ready for review November 23, 2024 14:59
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11982153934

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

  • 13 of 41 (31.71%) changed or added relevant lines in 8 files are covered.
  • 188 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 57.205%

Changes Missing Coverage Covered Lines Changed/Added Lines %
peer/peer.go 0 1 0.0%
rpcclient/infrastructure.go 0 2 0.0%
rpcserver.go 0 2 0.0%
blockchain/difficulty.go 6 10 60.0%
config.go 0 4 0.0%
btcd.go 0 5 0.0%
blockchain/validate.go 5 15 33.33%
Files with Coverage Reduction New Missed Lines %
btcd.go 85 1.89%
config.go 103 5.07%
Totals Coverage Status
Change from base Build 11704113837: -0.03%
Covered Lines: 29884
Relevant Lines: 52240

💛 - Coveralls

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