You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enable testnet4 support in the bitcoin adapter (dfinity#3267)
This involved:
- changing the seeds,
- upgrading the bitcoin crate (see base branch)
- finally, fixing a bug in the header validation, a fix which is
required in the bitcoin canister too (and even on the bitcoin crate if
we want to use their helpers): For testnet networks, the difficulty
temporarily drops to the minimum if no block has been found in 20
minutes. [Block
30239](https://mempool.space/testnet4/block/00000000eaf8e0ea253d833614892aed70c55e5dc4b4d6709dd6420b8284debb)
is an example of such block, and it (coincidentally) occurs right before
a "difficulty change", once every 2016 blocks. With the previous
implementation, this leads to the difficulty to be dropped massively (to
the minimum) on the next difficulty batch, because the difficulty of an
"epoch" block (in this case block 30240) depends directly on its
previous block (block 30239, which had the "temporarily" drop in
difficulty). The fix involved making the new difficulty depend on the
difficulty of the previous "epoch block", which does not have a drop in
difficulty.
---------
Co-authored-by: IDX GitHub Automation <[email protected]>
0 commit comments