PF_NOBAN is a multi-flag that includes PF_DOWNLOAD, so the conditional
in CConnman::Bind() using a bitwise AND will return the same result
for both the "noban" status and the "download" status.
Example:
`PF_DOWNLOAD` is `0b1000000`
`PF_NOBAN` is `0b1010000`
This makes a check like `flags & PF_NOBAN` return `true` even if `flags`
is equal to `PF_DOWNLOAD`.
If `-whitebind=download@1.1.1.1:8765` is specified, then `1.1.1.1:8765`
should be added to the list of local addresses. We only want to avoid
adding to local addresses (that are advertised) a whitebind that has a
`noban@` flag.
As a result of a mis-check in `CConnman::Bind()` we would not have added
`1.1.1.1:8765` to the local addresses in the example above.
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Github-Pull: bitcoin/bitcoin#21644
Rebased-From: dde69f20a01acca64ac21cb13993c6e4f8709f23
deff4e763e depends: update Qt 5.9 source url (Kittywhiskers Van Gogh)
Pull request description:
## Expected Behavior
Running `make` in the depends directory should result in the successful building of host platform dependencies
## Actual Behavior
`make` terminates as `qt.mk` points to (now) outdated URL path for Qt 5.9 sources, returning error 404
## Remedy
Update `qt.mk` to point to updated source location as Qt has relocated them
ACKs for top commit:
RandyMcMillan:
tACK deff4e7
hebasto:
ACK deff4e763e, I have verified the new link, and checked that old one is unavailable:
jarolrod:
tACK deff4e763e
Tree-SHA512: d5b11a678c871a87e6884a35641178ee349728ead51da06018953be36aab5a30aef9c80b549da49802e87903eb0b7836cc343301325bd8c505cb4246f6752505
856de5bd5e build,boost: update download url. (fdov)
Pull request description:
Backports #21662 to the 0.21 branch. Boost has migrated it's download URLs due to bintrays imminent closure. The Boost site has also been updated to point to the new URLs. i.e: https://www.boost.org/users/history/version_1_70_0.html.
Github-Pull: #21662
Rebased-From: 36c10b9f4b181db6afa2f8cb7d4872b158768c16
ACKs for top commit:
jarolrod:
ACK 856de5bd5e
Tree-SHA512: cae7262f963dd6e00af699c3e1bce2ee3ff9f76c5dcc24c8a5bf37025b53de28e4cb80de65a380208ee1841a89736d5c35605e40b728b6c7a9f026d8165d74c8
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: 637bb6da368b87711005b909f451f94909400092
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: 4d6e246fa46f2309e2998b542e4c104d73d29071
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: f054f6bcd2c2ce5fea84cf8681013f85a444e7ea
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: 55ac5f568a3b73d6f1ef4654617fb76e8bcbccdf
Simplify the versionbits unit test slightly to make the next set of
changes a little easier to follow.
Github-Pull: #21377
Rebased-From: 9e6b65f6fa205eee5c3b99343988adcb8d320460
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: 593274445004506c921d5d851361aefb3434d744
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: 63879f0a4760c0c0f784029849cb5d21ee088abb
f79189ca54 Test that signrawtx works when a signed CSV and CLTV inputs are present (Andrew Chow)
7de019bc61 Introduce DeferringSignatureChecker and inherit with SignatureExtractor (Andrew Chow)
Pull request description:
Backport of #21166
ACKs for top commit:
MarcoFalke:
checked this is a clean cherry-pick did not review ACK f79189ca54🐖
instagibbs:
ACK f79189ca54
Tree-SHA512: 51e945c9b353713423d3886c557066c66a6517d2300523832e5a5471ab91a8943385096d9bf5b46910477cb4c47470431690cf3da09b9f6956fe030f13ddff51
Introduces a DeferringSignatureChecker which simply takes a
BaseSignatureChecker and passes through everything.
SignatureExtractorChecker now subclasses DeferringSignatureChecker. This
allows for all BaseSignatureChecker functions to be implemented for
SignatureExtractorChecker, while allowing for future signature checkers
which opreate similarly to SignatureExtractorChecker.
Github-Pull: #21166
Rebased-From: 6965456c10c9c4025c71c5e24fa5b27b15e5933a
1a9a2cb7dc net: add ifaddrs.h include (fanquake)
f6896dfde7 build: check if -lsocket is required with *ifaddrs (fanquake)
e99d6d0c7c rand: only try and use freeifaddrs if available (fanquake)
Pull request description:
Backports #21486 to the 0.21 branch. Related to #21485.
ACKs for top commit:
MarcoFalke:
cherry-pick-only ACK 1a9a2cb7dc did not test or review 🚶
Tree-SHA512: 400dcf0f0bffa9b2c820403936b894969113a2bd82a32ae29d3fb73c4ef9ffafb55f5325fcc4929f6e685f8932be6f566f5dd2163ecf8a64b154b0c401109311
f2195d7c4a Backport invalid address tests (Pieter Wuille)
1e9671116f naming nits (Fabian Jahr)
7dfe406e20 Add signet support to gen_key_io_test_vectors.py (Pieter Wuille)
593e206627 Use Bech32m encoding for v1+ segwit addresses (Pieter Wuille)
8944aaa6d6 Add Bech32m test vectors (Pieter Wuille)
1485533092 Implement Bech32m encoding/decoding (Pieter Wuille)
Pull request description:
Backport of #20861. Also includes #21471.
ACKs for top commit:
jnewbery:
utACK f2195d7c4a
MarcoFalke:
cherry-pick re-ACK f2195d7c4a , only change is version number in doc/bips and new test commit 🍝
fanquake:
ACK f2195d7c4a - performed the backport, changes look sane. Have not tested extensively.
Tree-SHA512: 7dc043e44d7cda07d73331a7b49666b9db98c99f2635dab0cfeb45422dbfbe75a7b44d0aff85ef6369d412d8a5041ed0826c86ffdfc13c5fbff74adfe4d91c1a
This also includes updates to the Python test framework implementation,
test vectors, and release notes.
Github-Pull: #20861
Rebased-From: fe5e495c31de47b0ec732b943db11fe345d874af
Instead of fetching the discard feerate for each SelectCoinsMinConf
iteration, fetch and cache it once during CreateTransaction so that it
is shared for each SelectCoinsMinConf through
coin_selection_params.m_discard_feerate.
Does not change behavior.
Github-Pull: #21083
Rebased-From: bdd0c2934b7f389ffcfae3b602ee3ecee8581acd
Instead of setting the long term feerate for each SelectCoinsMinConf
iteration, set it once during CreateTransaction and let it be shared
with each SelectCoinsMinConf through
coin_selection_params.m_long_term_feerate.
Does not change behavior.
Github-Pull: #21083
Rebased-From: 448d04b931f86941903e855f831249ff5ec77485
Make sure that all fee calculations use the same feerate.
coin_selection_params.effective_fee is the variable we use for all fee
calculations, so get rid of remaining nFeeRateNeeded usages and just
directly set coin_selection_params.effective_fee.
Does not change behavior.
Github-Pull: #21083
Rebased-From: e2f429e6bbf7098f278c0247b954ecd3ba53cf37
During each loop of CreateTransaction, instead of constantly getting a
new feerate, use the feerate that we have already fetched for all
fee calculations. Thix fixes a race condition where the feerate required
changes during each iteration of the loop.
This commit changes behavior as the "Fee estimation failed" error will
now take priority over "Signing transaction failed".
Github-Pull: #21083
Rebased-From: 1a6a0b0dfb90f9ebd4b86d7934c6aa5594974f5f
5a2d98c640 doc: Remove outdated comment (Hennadii Stepanov)
8426e3a8a1 fuzz: Bump FuzzedDataProvider.h (MarcoFalke)
14e3f2a1c9 fuzz: Bump FuzzedDataProvider.h (MarcoFalke)
a48c9d3161 fuzz: Update FuzzedDataProvider.h from upstream (LLVM) (practicalswift)
6746cd078b doc: add signet to doc/bitcoin-conf.md (Jon Atack)
58975d5c0a doc: add signet to share/examples/bitcoin.conf (Jon Atack)
b35711efde Update vcpkg checkout commit. (Aaron Clauson)
3a12672419 GUI: Write PSBTs to file with binary mode (Andrew Chow)
36ecf5eb87 tests: Test that a fully signed tx given to signrawtx is unchanged (Andrew Chow)
4ef1e4bd40 test: disallow sendtoaddress/sendmany when private keys disabled (Jon Atack)
d6b5eb5fcc Disallow sendtoaddress and sendmany when private keys disabled (Andrew Chow)
08dada8456 util: Disallow negative mocktime (MarcoFalke)
95218ee95c net: Avoid UBSan warning in ProcessMessage(...) (practicalswift)
4607019798 fix the unreachable code at feature_taproot (Bruno Garcia)
6dc58e9945 qt: Use "fusion" style on macOS Big Sur with old Qt (Hennadii Stepanov)
e2ebc8567a raise helpMessageDialog (randymcmillan)
a98f211940 Fix MSVC build after gui#176 (Hennadii Stepanov)
bdc64c9030 qt: Stop the effect of hidden widgets on the size of QStackedWidget (Hennadii Stepanov)
7bc4498234 qt: Fix TxViewDelegate layout (Hennadii Stepanov)
b7086e69ff qt: Add TransactionOverviewWidget class (Hennadii Stepanov)
0dba346a56 qt: Use layout manager for Create Wallet dialog (Hennadii Stepanov)
7bf3ed495b Bugfix: GUI: Restore SendConfirmationDialog button default to "Yes" (Luke Dashjr)
bdce029191 test: add test for banning of non-IP addresses (Vasil Dimov)
c33fbab25c net: allow CSubNet of non-IP networks (Vasil Dimov)
Pull request description:
Current backports for *0.21.1*.
One conflict was in the test case.
ACKs for top commit:
ajtowns:
ACK 5a2d98c640 -- checked 'rebased-from' patches are in master, and rebased patches are clean rebases (except for the first one which changes `""s` to `std::string("")` to avoid c++17 dependency). commits seem fine, but haven't reviewed in detail.
fanquake:
ACK 5a2d98c640 - branched off `0.21` and redid the backports. Minor conflict in c33fbab25c. The diff between my branch and #20901 was just in release notes, `_CLIENT_VERSION_RC` (#20901 branched before 95ea54ba08) and #21490 which has already been merged into `0.21`.
Tree-SHA512: 75d16d3cf9066a45759758b8185dc3b9dad6a6102c2ac9921f758a310e48d5d3122f0dafa515df42475235fc66a42cc04dd156ee1e61c86a1238bd11707642ea
e775b0a6dd tests: Add fuzzing harness for versionbits (Anthony Towns)
0c471a5f30 tests: check never active versionbits (Anthony Towns)
3ba9283a47 tests: more helpful errors for failing versionbits tests (Anthony Towns)
Pull request description:
Backport of unit test (#21334) and fuzz test (#21380) changes for versionbits.
Top commit has no ACKs.
Tree-SHA512: b68b570e48e0076bb2ade3b91c59612029235d2c9e39048d548aa141fa0906343fa492e9a981065fbdbbebecbbb3dcbaf39ec69228c7581178fcca567e8201b8