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 1 commit 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

coveralls commented Nov 25, 2024

Pull Request Test Coverage Report for Build 11982011907

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.02%) to 57.219%

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.02%
Covered Lines: 29891
Relevant Lines: 52240

💛 - Coveralls

@bullet-tooth
Copy link
Author

Hey @Roasbeef, do you have any estimates about reviewing/merging this PR?

@guggero
Copy link
Collaborator

guggero commented Dec 10, 2024

If you clean up the PR into a review friendly commit structure, I'll take a look.
Here are some docs to go by: https://github.com/lightningnetwork/lnd/blob/master/docs/code_contribution_guidelines.md
and https://github.com/lightningnetwork/lnd/blob/master/docs/code_formatting_rules.md.
Those aren't strictly enforced in this project but definitely nice to have if you want review from the lnd team.

Adds support of the Bitcoin testnet version 4 chain.
Reference: https://bips.dev/94/
@bullet-tooth bullet-tooth force-pushed the feat/add-testnet4-support branch from c71544f to 730a170 Compare December 13, 2024 15:08
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.

5 participants