0) Adjust BIP30 enforcement values
1) Reduce amount that peers can adjust our time to eliminate an attack vector. Thanks to
coblee for this fix.
2) Zeitgeist2 patch - thanks to Lolcust and ArtForz. This fixes an issue where a
51% attack can change difficulty at will. Go back the full period unless it's the
first retarget after genesis.
3) Avoid overflow in CalculateNextWorkRequired(). Thanks to pooler for the overflow fix.
4) Zeitgeist2 bool fshift bnNew.bits(). Thanks to romanornr for this path.
5) SegWit ContextualCheckBlockHeader adjustment and extra coverage.
6) Reject peer proto version below 70002. Thanks to wtogami for this patch.
7) Send final alert message to nodes warning about removal of the alert system. Thanks to coblee for this patch.
8) Adjust default settings for Litecoin.
9) Adjust STALE_CHECK_INTERVAL value
Co-authored-by: David A. Harding <dave@dtrt.org>
Co-authored-by: Jon Atack <jon@atack.com>
Co-authored-by: Pieter Wuille <pieter@wuille.net>
Tree-SHA512: dd9ac416ff22276833111198445d76cf8417012a6faad0c3560276f1dcf24586ff41c65ac3430fbf1e840aaa563d3dd101671cff306b0fd92aa2ee03bb7f926b
b8af67eeef fuzz: cleanups for versionbits fuzzer (Anthony Towns)
79cdb4a198 test: make sure non-IP peers get discouraged and disconnected (Vasil Dimov)
b765f41164 test: also check disconnect in denialofservice_tests/peer_discouragement (Vasil Dimov)
dfeb6c10bb test: use pointers in denialofservice_tests/peer_discouragement (Vasil Dimov)
Pull request description:
Backport tests
ACKs for top commit:
vasild:
ACK b8af67eeef
jnewbery:
ACK b8af67eeef
ajtowns:
ACK b8af67eeef ; visually compared individual commits to originals, checked original commits are in master
Tree-SHA512: 22f665560f9d452993b12508d93d93ff54e3e91dcf39f731e27aedfb891570168066c185413d455bee4fa082c011b65ea1b0eee51e3633392b07a0db008d51c8
Use `CConnmanTest` instead of `CConnman` and add the nodes to it
so that their `fDisconnect` flag is set during disconnection.
Github-Pull: #21571
Rebased-From: 637bb6da36
This is a non-functional change that replaces the `CNode` on-stack
variables with `CNode` pointers.
The reason for this is that it would allow us to add those `CNode`s
to `CConnman::vNodes[]` which in turn would allow us to check that they
are disconnected properly - a `CNode` object must be in
`CConnman::vNodes[]` in order for its `fDisconnect` flag to be set.
If we store pointers to the on-stack variables in `CConnman` then it
would crash at the end, trying to `delete` them.
Github-Pull: #21571
Rebased-From: 4d6e246fa4
cbd64c3a28 Add mainnet and testnet taproot activation params (Andrew Chow)
ec7824396b chainparams: drop versionbits threshold to 90% for mainnnet and signet (Anthony Towns)
600357306e versionbits: simplify state transitions (Anthony Towns)
3acf0379e0 versionbits: Add explicit NEVER_ACTIVE deployments (Anthony Towns)
b529222ad1 fuzz: test versionbits delayed activation (Anthony Towns)
71917e01eb tests: test versionbits delayed activation (Anthony Towns)
4cab84cfdf versionbits: Add support for delayed activation (Anthony Towns)
f9517e6014 tests: clean up versionbits test (Anthony Towns)
1c0164544c tests: test ComputeBlockVersion for all deployments (Anthony Towns)
2e9e7f4329 tests: pull ComputeBlockVersion test into its own function (Anthony Towns)
Pull request description:
Backport of #21377 and #21686
ACKs for top commit:
instagibbs:
cherry-pick ACK cbd64c3a28
jnewbery:
ACK cbd64c3a28
Sjors:
tACK cbd64c3
MarcoFalke:
cherry-pick-only ACK cbd64c3a28🌾
Tree-SHA512: e9efb0ca9986d685161bcba5ed43efdc5f1dca88322cf65faccf17009b567c2d930c2aba4d1541539fc65347574ed4faa3d4558b907c779d1c128b3d2c681f31
d61fb07da7 Rename CoinSelectionParams::effective_fee to m_effective_feerate (Andrew Chow)
5fc381e443 wallet: Move discard feerate fetching to CreateTransaction (Andrew Chow)
bcd716670b wallet: Move long term feerate setting to CreateTransaction (Andrew Chow)
34c89f92f3 wallet: Replace nFeeRateNeeded with effective_fee (Andrew Chow)
48fc675163 wallet: Use existing feerate instead of getting a new one (Andrew Chow)
Pull request description:
Backport of #21083
ACKs for top commit:
MarcoFalke:
cherry-pick-only re-ACK d61fb07da7🔙
instagibbs:
utACK d61fb07da7
Tree-SHA512: 23b212301bb467153dd9723903918ae01dd520525c81d541c411e7a4381e46594fe032e2a7c06ddcff7dc56dcb546991d50187c33fcff08ec45bd835cc01bd19
This removes the DEFINED->FAILED transition and changes the
STARTED->FAILED transition to only occur if signalling didn't pass the
threshold. This ensures that it is always possible for activation to
occur, no matter what settings are chosen, or the speed at which blocks
are found.
Github-Pull: #21377
Rebased-From: f054f6bcd2
Previously we used deployments that would timeout prior to Bitcoin's
invention, which allowed the deployment to still be activated in unit
tests. This switches those deployments to be truly never active.
Github-Pull: #21377
Rebased-From: 55ac5f568a
This generalises the ComputeBlockVersion test so that it can apply to
any activation parameters we might set, and checks all the parameters
set for each deployment on each chain, to simultaneously ensure that the
deployments we have configured work sensibly, and that the test code
does not suffer bitrot in the event that all interesting deployments
are buried.
Github-Pull: #21377
Rebased-From: 5932744450
The intent here is to allow checking ComputeBlockVersion behaviour with
each deployment, rather than only testdummy on mainnet. This commit does
the trivial refactoring component of that change.
Github-Pull: #21377
Rebased-From: 63879f0a47