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
bitcoind disables difficulty retargeting on regtest, while btcd does not. When we run itests with backend=bitcoind, the btcd miner generates blocks and sends them to the bitcoind backend. If btcd modifies the difficulty target, its mined blocks get rejected by bitcoind.
So far, we seem to have avoided this issue because our itests generate fewer than 4032 blocks in aggregate (the first retarget at block 2016 doesn't modify difficulty). But #7228 adds a test that pushes us over 4032 blocks, so the new itests are failing in CI.
Steps to reproduce
See #7228 CI. Look at the new itests with backend=bitcoind.
How to fix
There are multiple ways to fix this. Some ideas:
Make btcd regtest behavior match bitcoind (or add an option for this).
Restart miner when it gets close to the retarget height.
Use bitcoind to mine blocks instead of btcd.
The text was updated successfully, but these errors were encountered:
Ensure active nodes are synced to the latest block mined.
There are two scenarios where they might not be synced to the correct
block even when SyncedToChain is true:
1. The backend may have rejected a newly mined block (e.g., see
lightningnetwork#7241).
2. The backend might not have fully processed the new blocks yet.
In either case SyncedToChain will (correctly) be true since the node is
indeed fully synced to the backend. This commit makes sure we detect
case 1 above, while making sure we continue to wait in case 2.
Background
bitcoind disables difficulty retargeting on regtest, while btcd does not. When we run itests with
backend=bitcoind
, the btcd miner generates blocks and sends them to the bitcoind backend. If btcd modifies the difficulty target, its mined blocks get rejected by bitcoind.So far, we seem to have avoided this issue because our itests generate fewer than 4032 blocks in aggregate (the first retarget at block 2016 doesn't modify difficulty). But #7228 adds a test that pushes us over 4032 blocks, so the new itests are failing in CI.
Steps to reproduce
See #7228 CI. Look at the new itests with
backend=bitcoind
.How to fix
There are multiple ways to fix this. Some ideas:
The text was updated successfully, but these errors were encountered: