Skip to content

Do not compute difficulty adjustment on Testnet4#422

Merged
rustaceanrob merged 1 commit into2140-dev:masterfrom
rustaceanrob:testnet4-diff
Jun 18, 2025
Merged

Do not compute difficulty adjustment on Testnet4#422
rustaceanrob merged 1 commit into2140-dev:masterfrom
rustaceanrob:testnet4-diff

Conversation

@rustaceanrob
Copy link
Collaborator

Raised by: bitcoindevkit/bdk-cli#197

Users of Testnet4 will run into problems when loading headers from the database, as the network allows for minimum difficulty blocks. Instead of adding logic for the header timestamps just for the sake of Testnet4, I am opting to simply ignore the difficutly adjustment. This boolean does not evaluate to true on Bitcoin, which is easily verified in rust-bitcoin.

Notably Signet does not allow minimum difficulty blocks, so difficulty adjustment logic is still tested by a testnet as well as mainnet. This is only dropping Testnet4

Raised by: bitcoindevkit/bdk-cli#197

Users of `Testnet4` will run into problems when loading headers from the
database, as the network allows for minimum difficulty blocks. Instead
of adding logic for the header timestamps just for the sake of
`Testnet4`, I am opting to simply ignore the difficutly adjustment. This
boolean does not evaluate to `true` on `Bitcoin`, which is easily
verified in `rust-bitcoin`.

Notably `Signet` does not allow minimum difficulty blocks, so difficulty
adjustment logic is still tested by a testnet as well as mainnet. This
is only dropping `Testnet4`
@rustaceanrob rustaceanrob merged commit 90fc945 into 2140-dev:master Jun 18, 2025
10 checks passed
@rustaceanrob rustaceanrob deleted the testnet4-diff branch June 18, 2025 10:46
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