Age | Commit message (Collapse) | Author |
|
positions, first
632aad9e6d8369750f4327a886ca5b3d3fed89bd Make CAddrman::Select_ select buckets, not positions, first (Pieter Wuille)
Pull request description:
The original CAddrMan behaviour (before #5941) was to pick a uniformly random non-empty bucket, and then pick a random element from that bucket. That commit, which introduced deterministic placement of entries in buckets, changed this to picking a uniformly random non-empty bucket position instead.
I believe that was a mistake. Buckets are our best metric for spreading out requests across independently-controlled nodes. That
does mean that if a bucket has fewer entries, its entries are supposed to be picked more frequently.
This PR reverts to the original high-level behavior, but on top of the deterministic placement logic.
ACKs for top commit:
jnewbery:
utACK 632aad9e6d8369750f4327a886ca5b3d3fed89bd
naumenkogs:
ACK 632aad9e6d8369750f4327a886ca5b3d3fed89bd
mzumsande:
ACK 632aad9e6d8369750f4327a886ca5b3d3fed89bd
Tree-SHA512: 60768afba2b6f0abd0dddff04381cab5acf374df48fc0e883ee16dde7cf7fd33056a04b573cff24a1b4d8e2a645bf0f0b3689eec84da4ff330e7b59ef142eca1
|
|
This change avoids downloading of the cached vcpkg tools that could fail
accidentally, and it makes CI task more robust.
|
|
9c1052a5218e191fd23c0d9fc06f2fca34b03411 wallet: Default new wallets to descriptor wallets (Andrew Chow)
f19ad404631010a5e2dac2c7cbecd057b005fe2a rpc, wallet: Descriptor wallets are no longer experimental (Andrew Chow)
Pull request description:
Changes the default wallet type from legacy to descriptors. Descriptor wallets will now by the default type. Additionally, descriptor wallets will no longer be marked as experimental.
This follows the timeline proposed in #20160
ACKs for top commit:
lsilva01:
Tested ACK https://github.com/bitcoin/bitcoin/pull/23002/commits/9c1052a5218e191fd23c0d9fc06f2fca34b03411 on Ubuntu 20.04
prayank23:
tACK https://github.com/bitcoin/bitcoin/pull/23002/commits/9c1052a5218e191fd23c0d9fc06f2fca34b03411
meshcollider:
Code review ACK 9c1052a5218e191fd23c0d9fc06f2fca34b03411
Tree-SHA512: 834e6fec88e0c18673af7ebe135bd5333694d1be502164eb93a90e3e76c27974165aa4e59426945100c88e4eca07356e16886ef5b05cf789683ecb23fc71a12a
|
|
disconnecting misbehaving peer
fa2662c293ec0aaa93092b59b6632f74729c4283 net: Avoid logging AlreadyHaveTx when disconnecting misbehaving peer (MarcoFalke)
Pull request description:
There is no need to log `AlreadyHaveTx` for an inv when a peer is marked for disconnection due to sending that inv. In fact, I find it confusing that a `block-relay-only` connection calls `AlreadyHaveTx` at all. Also there is no need to call `AddKnownTx` when the peer is marked for disconnection.
ACKs for top commit:
naumenkogs:
ACK fa2662c293ec0aaa93092b59b6632f74729c4283
jnewbery:
Code review ACK fa2662c293ec0aaa93092b59b6632f74729c4283
dunxen:
Concept and code review ACK fa2662c293ec0aaa93092b59b6632f74729c4283
Tree-SHA512: 9996b807a824021f992b5281d82ff0cbbe6a442c2fedf7dfd6adda64ccc5e0ef4fb0ff91ab75086f975837bbbb7a5934ac7e671a80dcababa7203c92fc0c7f84
|
|
|
|
|
|
4307849256761fe2440d82bbec892d0e8e6b4dd4 [mempool] delete exists(uint256) function (glozow)
d50fbd4c5b4bc72415854d582cedf94541a46983 create explicit GenTxid::{Txid, Wtxid} ctors (glozow)
Pull request description:
We use the same type for txids and wtxids, `uint256`. In places where we want the ability to pass either one, we distinguish them using `GenTxid`.
The (overloaded) `CTxMemPool::exists()` function is defined as follows:
```c
bool exists(const uint256& txid) const { return exists(GenTxid{false, txid}); }
```
It always assumes that a uint256 is a txid, which is a footgunny interface.
Querying by wtxid returns a false negative if the transaction has a witness. :bug:
Another approach would be to try both:
```c
bool exists(const uint256& txid) const { return exists(GenTxid{false, txid}) || exists(GenTxid{false, txid}); }
```
But that's slower and wrongfully placing the burden on the callee; the caller always knows whether the hash is a txid or a wtxid.
ACKs for top commit:
laanwj:
Code review ACK 4307849256761fe2440d82bbec892d0e8e6b4dd4
jnewbery:
Tested and code review ACK 4307849256761fe2440d82bbec892d0e8e6b4dd4
MarcoFalke:
review ACK 4307849256761fe2440d82bbec892d0e8e6b4dd4 👘
Tree-SHA512: 8ed167a96f3124b6c14e41073c8358658114ce121a15a4cca2db7a5ac565903a6236e34e88ac03382b8bb8b68e3999abbfc5718bc8c22476554d6b49a5298eec
|
|
fs.cpp
077a875d94b51e3c87381133657be98989c8643e refactor: include a missing <limits> header in fs.cpp (Joan Karadimov)
Pull request description:
I get this compilation error on versions `0.21.1` and `22.0`:
```
fs.cpp: In member function 'bool fsbridge::FileLock::TryLock()':
fs.cpp:123:89: error: 'numeric_limits' is not a member of 'std'
123 | if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
| ^~~~~~~~~~~~~~
fs.cpp:123:109: error: expected primary-expression before '>' token
123 | if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
| ^
fs.cpp:123:112: error: '::max' has not been declared; did you mean 'std::max'?
123 | if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
| ^~~
| std::max
In file included from C:/dev/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39,
from C:/dev/msys64/mingw64/include/c++/11.2.0/string:40,
from ./fs.h:9,
from fs.cpp:5:
C:/dev/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: 'std::max' declared here
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
fs.cpp:123:124: error: 'numeric_limits' is not a member of 'std'
123 | if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
| ^~~~~~~~~~~~~~
fs.cpp:123:144: error: expected primary-expression before '>' token
123 | if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
| ^
fs.cpp:123:147: error: '::max' has not been declared; did you mean 'std::max'?
123 | if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
| ^~~
| std::max
In file included from C:/dev/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39,
from C:/dev/msys64/mingw64/include/c++/11.2.0/string:40,
from ./fs.h:9,
from fs.cpp:5:
C:/dev/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: 'std::max' declared here
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
```
It appears that `std::numeric_limits<T>::max` is used without the `limits` header being included. Probably on other STL implementations it's included transitively, but not in the one in MinGW. Including it fixes the compilation problem.
Environment:
OS: Windows 10
Compiler: gcc 11.2.0
Qt: 5.15.2 (included in msys2)
Using the latest mingw w64 shipped with msys2.
ACKs for top commit:
fanquake:
ACK 077a875d94b51e3c87381133657be98989c8643e - Thanks.
hebasto:
ACK 077a875d94b51e3c87381133657be98989c8643e
Tree-SHA512: 2289cb72fa3a28470f4250833be66079482d1392189b1e4679330dad109a8ae67b1d6d51cb635dbc1947c00c6c4cfbc4d7c9ae02269b932cfa1475583adaf73d
|
|
fa38d98aa98bcf34b5b59ff894bbb5da67355b29 doc: Add note on deleting past-EOL release branches (MarcoFalke)
Pull request description:
This is being done for years now, but wasn't documented.
Some reasons to do it:
* Backports to those branches are unlikely to be tested both on CI (since it is often fragile and broken for stale branches) and by users (since those users likely don't exist). If a user exists, they are better off backporting any fixes they need from the last still-supported branch and test them on their own infrastructure.
* Community support of those branches is still possible, though this will need to be done in another project to relieve the burden on this project.
* All release tags will remain, so no historic code is lost.
ACKs for top commit:
hebasto:
ACK fa38d98aa98bcf34b5b59ff894bbb5da67355b29
fanquake:
ACK fa38d98aa98bcf34b5b59ff894bbb5da67355b29 - I think this is fine as-is.
Tree-SHA512: caa714af541a6902925c89cc6a896b125f61bd77e901c5d384d84b34def2ee654bdae9f3e995001154c29672f60d2b689d0ff92d345666564fd5aa321a5b3fe7
|
|
e8692cf2c151d2abc206ca699e04ae05d4c31dcd ci: Improve vcpkg binary cache settings (Hennadii Stepanov)
b00646bc770e0b70400fdc4545756405fb307dba ci, refactor: Rename VCPKG_TAG variable and vcpkg_cache script (Hennadii Stepanov)
Pull request description:
On master (c8bae2be341c921823eee95a9eec7e2b74f2f0ae), the size of the vcpkg binary cache is potentially unbounded.
The reason of such behavior is the internal caching logic, following which, any change in the [set of parameters](https://vcpkg.io/en/docs/users/binarycaching.html#implementation-notes-internal-details-subject-to-change-without-notice) defined by the vcpkg implementation will cause compiling of a new binaries following by adding them to the current cache.
This PR defines two obvious cases when the vcpkg binary cache will be invalidated.
ACKs for top commit:
sipsorcery:
ACK e8692cf2c151d2abc206ca699e04ae05d4c31dcd.
Tree-SHA512: 125312b9b90a9f932702ae3a8c0ed9939fca73feb92b5cdd2ebff181ae7ac50a17f8956ff11dc115da05f79030a1b56decfa25b26e37faf3505a1f30ddd8a80f
|
|
... needed for std::numeric_limits<T>::max on WIN32
|
|
Follow-up to:
* commit 700c42b85d20e624bef4228eef062c93084efab5, which replaced pIndex
with block_hash in AddToWalletIfInvolvingMe.
* commit 9700fcb47feca9d78e005b8d18b41148c8f6b25f, which replaced
posInBlock with confirm.nIndex.
|
|
wallet_abandonconflict
fa6c62f34b50818102ad58f2ffd152189f54d973 test: Replace log with assert_equal in wallet_abandonconflict (MarcoFalke)
Pull request description:
This will make the test fail as soon as the bug is fixed, forcing it to
be updated. Otherwise, the bug might be fixed (or made worse)
accidentally, leaving the test in an inconsistent state.
ACKs for top commit:
theStack:
Concept and code-review ACK fa6c62f34b50818102ad58f2ffd152189f54d973
brunoerg:
tACK fa6c62f34b50818102ad58f2ffd152189f54d973
Tree-SHA512: 416f72380164bf3f93332a5cfa81a8e61d8ada3714ef6815889ed3cf2d16c09411760dee4acf19629227e565b765b3dea491a0b23efd38eb370254cfadf7c441
|
|
1946af2c45372e3de39000a45a5954bb5870bc1b Add comment to COIN constant. (Kennan Mell)
Pull request description:
The COIN constant is critical in understanding Bitcoin's supply, but what it represents isn't clear from the name of the constant. Adding a comment clarifies the meaning of the constant for future readers.
ACKs for top commit:
lsilva01:
ACK 1946af2
shaavan:
ACK 1946af2c45372e3de39000a45a5954bb5870bc1b
Tree-SHA512: ba27c6bd4a4c92664a71ef081104e9e50e47022d68eb955c247b7c49a0046a42bf64bf23a14563c646411b7be6027fea918cc62baa01bbf319b82d14d368f280
|
|
fadf1186c899f45787a91c28120b0608bdc6c246 p2p: Use mocktime for ping timeout (MarcoFalke)
Pull request description:
It is slightly confusing to use mocktime for some times, but not others.
Start fixing that by making the ping timeout use mocktime.
The only downside would be that tests that use mocktime disconnect peers after this patch. However, I don't think this is an issue, as the inactivity check is already disabled for all functional tests after commit 6d76b57ca0cdf6f9c19ce065b9a4a628930a78b5. Only one unit test needed the inactivity check disabled as part of this patch.
A nice side effect of this patch is that the `p2p_ping` functional test now runs 4 seconds faster.
ACKs for top commit:
laanwj:
Code review ACK fadf1186c899f45787a91c28120b0608bdc6c246
Tree-SHA512: e9e7b21040a89d9d574b3038f85a67e6336de6cd6e41aa286769cd03cada6e75a94ec01700e052e56d822ef85d7813cc06bf7e67b81543eff8917a16cdccf942
|
|
ChaCha20-Poly1305 AEAD
be7f4130f996b2564041719177f0a907e5c2011b Fix K1/K2 use in the comments in ChaCha20-Poly1305 AEAD (=)
Pull request description:
As per [#22331](https://github.com/bitcoin/bitcoin/pull/22331) and the [Detailed Construction of the ChaCha20Forward4064-Poly1305@Bitcoin cipher suite](https://gist.github.com/jonasschnelli/c530ea8421b8d0e80c51486325587c52#detailed-construction) mentioned in BIP 324, K1 is used for encrypting the associated data(message length) and instantiating the Poly1305 MAC while K2 is used for encrypting the payload. This PR fixes the comments which need to be updated in:
1. The test vector in `src/test/crypto_tests.cpp`
2. In `src/crypto/chacha_poly_aead.h`, `m_chacha_main` is a K2 ChaCha20 cipher instance and should be used for encrypting the payload. Also, `m_chacha_header` is a K1 ChaCha20 cipher instance and is used for encrypting the length and instantiating the Poly1305 MAC.
ACKs for top commit:
siv2r:
ACK be7f413
jonatack:
ACK be7f4130f996b2564041719177f0a907e5c2011b
Zero-1729:
ACK be7f413
shaavan:
reACK be7f4130f996b2564041719177f0a907e5c2011b
Tree-SHA512: 9d3d0f45cf95d0a87b9f04c26f04b9ea78b2f2fa578d3722146a79dd0d377b9867532fc62e02b8e1487420df7702a1f033d15db562327535940c2049cbde401f
|
|
-netinfo
96f469f91bc02a19703344cc439eab064b72081a netinfo: print peer counts for all reachable networks (Jon Atack)
Pull request description:
instead of only for networks we have peer connections to.
Users reported the previous behavior caused confusion, as no column was printed when a network was reachable but no peers were connected. Users expected a column to be printed with 0 peers. This commit aligns behavior with that expectation.
In addition, the ipv4, ipv6, and onion columns were always printed whether or not they were reachable. With this change, only the reachable ones will be returned.
Example with CJDNS reachable but no CJDNS peers (built on #23077 and #23175):
before
```
ipv4 ipv6 onion i2p total block manual
in 0 0 12 5 17
out 8 1 6 4 19 2 8
total 8 1 18 9 36
```
after
```
ipv4 ipv6 onion i2p cjdns total block manual
in 0 0 12 5 0 17
out 8 1 6 4 0 19 2 8
total 8 1 18 9 0 36
```
There is one additional space between the in/out/total row headers and the network counts.
ACKs for top commit:
jsarenik:
Tested ACK 96f469f91
prayank23:
utACK https://github.com/bitcoin/bitcoin/commit/96f469f91bc02a19703344cc439eab064b72081a
laanwj:
Code review and lightly tested ACK 96f469f91bc02a19703344cc439eab064b72081a
naumenkogs:
ACK 96f469f91bc02a19703344cc439eab064b72081a.
hebasto:
ACK 96f469f91bc02a19703344cc439eab064b72081a, tested by comparing the output of `watch src/bitcoin-cli -netinfo` with the Peer tab of the Node window in the GUI :tiger2:
Tree-SHA512: 3489f40148a2bd0afc9eef1e1577d44150c1fccec8dbf2a675bc23aa9343bfcae6c4039f5b96e54730668c83f40bc932fb6808f5540e86ff7249fde8dc0fff67
|
|
Allowing callers to pass in a uint256 (which could be txid or wtxid)
but then always assuming that it's a txid is a footgunny interface.
|
|
|
|
`external_spk_managers` entry
In the method `CWallet::LoadActiveScriptPubKeyMan`, the map
`external_spk_managers` (or `internal_spk_managers`, if parameter
`internal` is false) is accessed via std::map::operator[], which means
that a default-ctored entry is created with a null-pointer as value, if
the key doesn't exist. As soon as this value is dereferenced, a
segmentation fault occurs, e.g. in `CWallet::KeypoolCountExternalKeys`.
The bevaviour can be reproduced by the following steps (starting with empty regtest datadir):
$ ./src/bitcoind -regtest -daemon
$ ./src/bitcoin-cli -regtest -named createwallet_name=wallet descriptors=true blank=true
$ cat regtest-descriptors.txt
[
{
"desc": "tr([e4445899/49'/1'/0']tprv8ZgxMBicQKsPd8jCeBWsYLEoWxbVgzJDatJ7XkwQ6G3uF4FsHuaziHQ5JZAW4K515nj6kVVwPaNWZSMEcR7aFCwL4tQqTcaoprMKTTtm6Zg/1/*)#mr3llm7f",
"timestamp": 1634652324,
"active": true,
"internal": true,
"range": [
0,
999
],
"next": 0
}
]
$ ./src/bitcoin-cli -regtest importdescriptors "$(cat regtest-descriptors.txt)"
[
{
"success": true
}
]
$ ./src/bitcoin-cli -regtest getwalletinfo
error: timeout on transient error: Could not connect to the server 127.0.0.1:18443 (error code 1 - "EOF reached")
Bug reported by Josef Vondrlik (josef-v).
|
|
This will make the test fail as soon as the bug is fixed, forcing it to
be updated. Otherwise, the bug might be fixed (or made worse)
accidentally, leaving the test in an inconsistent state.
|
|
b7884dd1b68814c59ff4fb5f7a199e306b015e85 test: bip125-replaceable in listsinceblock (brunoerg)
Pull request description:
This PR adds test coverage for bip125-replaceable in listsinceblock. I added this test into wallet_listtransactions.py instead of putting it into wallet_listsinceblock.py to utilize the scenario already created in wallet_listtransactions.py and avoid repetition.
ACKs for top commit:
theStack:
ACK b7884dd1b68814c59ff4fb5f7a199e306b015e85
promag:
ACK b7884dd1b68814c59ff4fb5f7a199e306b015e85.
stratospher:
tested ACK b7884dd. Verified the bip125-replaceable status of some transactions with listsinceblock.
lsilva01:
tACK b7884dd on Ubuntu 20.04
Tree-SHA512: 510dfe5a6f9d68e5a656514d356dc8fe99324296ed8caa78f0eb4b6c6906cf70b1fb50bde80aa6f61d726b2fa1d4ce1fe48c635ce24285588e56ceff92291617
|
|
descendants in mempool
4ac8c89ad96de9ad61cad756b10c9dee2d9e1405 test: check that bumpfee RPC fails for txs with descendants in mempool (Sebastian Falbesoner)
Pull request description:
This PR adds missing test coverage for the bumpfee RPC error _"Transaction has descendants in the mempool"_,
https://github.com/bitcoin/bitcoin/blob/6419bdfeb130b20ccfed229d9ba7eca7f385d036/src/wallet/feebumper.cpp#L29-L32
which is thrown if the bumped tx has descendants in the mempool and is _not_ connected to the bitcoin wallet (for those, the error "Transaction has descendants in the Wallet" is thrown a few lines above). To achieve that, the test framework's MiniWallet is used.
ACKs for top commit:
brunoerg:
tACK 4ac8c89ad96de9ad61cad756b10c9dee2d9e1405
promag:
Code review ACK 4ac8c89ad96de9ad61cad756b10c9dee2d9e1405. Nice stuff!
lsilva01:
Tested ACK 4ac8c89 cad756b10c9dee2d9e1405 on Ubuntu 20.04.
stratospher:
tested ACK 4ac8c89.
Tree-SHA512: 83e99f9dd2b140c0c0597c0c36c9c948fa334871be40e58a5e004440698d9685661c69bb83ab937d30f692545a3799705f991b31904f2ef31a2fbc3ae1179fa8
|
|
`gettransaction` RPC call
130ee481082d2612d452d7d69131ade935b225b5 test: get and decode tx with a single `gettransaction` RPC call (Sebastian Falbesoner)
Pull request description:
Rather than subsequently calling `gettransaction` and `decoderawtransaction` to get the decoded information for a specific tx-id, we can simply use the verbose version of `gettransaction`, which returns this in a 'decoded' key. I.e.
```
node.decoderawtransaction(node.gettransaction(txid)['hex'])
```
can simply be replaced by:
```
node.gettransaction(txid=txid, verbose=True)['decoded']
```
Rationale: shorter code, shorter test logs, less RPC calls.
ACKs for top commit:
stratospher:
tested ACK 130ee48
amadeuszpawlik:
tACK 130ee481082d2612d452d7d69131ade935b225b5
lsilva01:
Tested ACK 130ee48 on Ubuntu 20.04.
shaavan:
ACK 130ee481082d2612d452d7d69131ade935b225b5
Tree-SHA512: cf0bd26e1e21b8022fb8062857906e0706f0ee32d3277f985c461e2519405afe445ab005f5f763fb268c7b4d6e48b2d47eda7af8621b3bce67cece8dfc9bc153
|
|
functional tests
fa44406ffd34670af929f14484042e1de29ffcdd ci: Disable syscall sandbox in valgrind functional tests (MarcoFalke)
Pull request description:
Otherwise this will fail:
```
$ valgrind ./src/bitcoind -regtest -datadir=/tmp -sandbox=log-and-abort
==204660== Memcheck, a memory error detector
==204660== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==204660== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==204660== Command: ./src/bitcoind -regtest -datadir=/tmp -sandbox=log-and-abort
==204660==
Bad system call (core dumped)
ACKs for top commit:
practicalswift:
cr ACK fa44406ffd34670af929f14484042e1de29ffcdd
Tree-SHA512: 41853e6d5697d99bd5775a9b9017859290b3119e83726036d7e58856fcbb3459ef794b129bfaba6eca54b9bc034e2baf74cc2c177767ad5d5af3f3be2a45507f
|
|
fa2d611bedc2a755dcf84a82699c70b57b903cf6 style: Sort (MarcoFalke)
fa1e5de2db2c7c95b96773a4ac231ab4249317e9 scripted-diff: Move bloom to src/common (MarcoFalke)
fac303c504ab19b863fddc7a0093068fee9d4ef3 refactor: Remove unused MakeUCharSpan (MarcoFalke)
Pull request description:
To avoid having all files at the top level `./src` directory, start moving them to their respective sub directory according to https://github.com/bitcoin/bitcoin/issues/15732.
`bloom` currently depends on libconsensus (`CTransaction`, `CScript`, ...) and it is currently located in the libcommon. Thus, move it to `src/common/`. (libutil in `src/util/` is for stuff that doesn't depend on libconsensus).
ACKs for top commit:
theStack:
Code-review ACK fa2d611bedc2a755dcf84a82699c70b57b903cf6
ryanofsky:
Code review ACK fa2d611bedc2a755dcf84a82699c70b57b903cf6
fanquake:
ACK fa2d611bedc2a755dcf84a82699c70b57b903cf6 - source shuffle starts now.
Tree-SHA512: d2fbc31b81741e9f0be539e1149542c9ca39958c240e12e8e757d882beccd0f0debdc10dcce146a05f03ef9f5c6247900a461a7a4799b515e8716dfb9af1fde2
|
|
17ae2601c786e6863cee1bd62297d79521219295 build: remove build stubs for external leveldb (Cory Fields)
Pull request description:
Presumably these stubs indicate to packagers that external leveldb is meant to be supported in some way. It is not. Remove the stubs to avoid sending any mixed messages.
For context, this was reported on IRC:
> \<Talkless> bitcoind fails to start with undefined symbol: _ZTIN7leveldb6LoggerE in Debian Sid after leveldb upgraded from 1.22 to 1.23: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996486
ACKs for top commit:
fanquake:
ACK 17ae2601c786e6863cee1bd62297d79521219295
hebasto:
ACK 17ae2601c786e6863cee1bd62297d79521219295. I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: 2f1ac2cb30dac64791933a245a2b66ce237bde3955e6f4a6b7ec181248f77a9b1b10597d865d3e2c2b6def696af70de40e905ec274e4ae7cccd1daf461473957
|
|
b65a25a84666d41a0af4ad98ffadfa4ac802d1bb log: improve addrman logging (Martin Zumsande)
Pull request description:
The addrman helper functions `GetNewBucket()` and `GetTriedBucket()`
1) log into the wrong category (`BCLog::NET` instead of `BCLog::ADDRMAN`)
2) log too unspecifically - especially `GetTriedBucket()` gets called from many different places (e.g. `Check_()`, `Serialize()`), it seems sufficient to me logging these when moving an address from new to tried. Running a node with `-checkaddrman=1`and net logging currently results in a lot of repetitive log entries.
This PR moves these log entries to `Add_()` and `Good_()` and also adds logging for `Select_()` (allowing statistics about New/Tried success probabilities), `GetAddr_()`, `ClearNew()` and `MakeTried()`.
ACKs for top commit:
jnewbery:
ACK b65a25a84666d41a0af4ad98ffadfa4ac802d1bb
vasild:
ACK b65a25a84666d41a0af4ad98ffadfa4ac802d1bb
Tree-SHA512: 90ab0f64eb44b7388a198efccb613577b74989fea73194bda7de8bfbd50bdb19127cb12f5ec645c7859afdb89290614a79e255f3af0a63a58d4f21aa8fe7b696
|
|
Includes allocator::pointer, allocator::const_pointer, allocator::reference and allocator::const_reference which are deprecated in c++17 and removed in c++20. See https://en.cppreference.com/w/cpp/memory/allocator
Also prefer `using` over `typedef` see: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rt-using
|
|
This change comes with two improvements:
1) using the VCPKG_DEFAULT_BINARY_CACHE variable drops dependency on
vcpkg default cached archives location, and improves readability
2) two obvious cases when binary cache is invalidated are defined, that
guaranties it won't grow boundlessly when, for example, vcpkg has being
updated.
|
|
The VCPKG_TAG variable renamed to CI_VCPKG_TAG to prevent any possible
name clash with vcpkg-specific variables.
The vcpkg_cache script renamed into more meaningful one.
|
|
|
|
|
|
|
|
faf13e272cad44917c4e5516172617fe8d68c00a Add missing gettimeofday to syscall sandbox (MarcoFalke)
Pull request description:
Fixes:
```
2021-10-18T09:12:31Z [init] [httpserver.cpp:181] [InitHTTPAllowList] Allowing HTTP connections from: 127.0.0.0/8 ::1/128
2021-10-18T09:12:31Z [init] [util/syscall_sandbox.cpp:487] [SyscallSandboxDebugSignalHandler] ERROR: The syscall "gettimeofday" (syscall number 96) is not allowed by the syscall sandbox in thread "init". Please report.
ACKs for top commit:
practicalswift:
cr ACK faf13e272cad44917c4e5516172617fe8d68c00a
Tree-SHA512: fb7b56124e3c9b04fc03224e421f54e9b3a28992e03500a23c465819d5f7c0700b1c04eb0e4cf8e2378ef69694d9f068f4356a85245289b04cb02e08c58b7c9b
|
|
7b3c9e4ee8feb552dc0fc4347db2d06e60894a9f Make explicit the node param in init_wallet() (lsilva01)
Pull request description:
This PR changes the definition of `def init_wallet(self, i)` to `def init_wallet(self, *, node)` to make the node parameter explicit, as suggested in https://github.com/bitcoin/bitcoin/pull/22794#discussion_r713287448 .
ACKs for top commit:
stratospher:
tested ACK 7b3c9e4.
Tree-SHA512: 2ef036f4c2110b2f7dc893dc6eea8faa0a18edd7f8f59b25460a6c544df7238175ddd6a0d766e2bb206326b1c9afc84238c75613a0f01eeda89a8ccb7d86a4f1
|
|
based tests
d7524546abf1fa5be8e6317ee50585e966ae6b4c build: explicitly disable libsecp256k1 openssl based tests (fanquake)
Pull request description:
These tests are failing when run against OpenSSL 3, and have been
removed upstream, bitcoin-core/secp256k1#983, so
disabled them for now to avoid `make check` failures.
Note that this will also remove warning output from our build, due to
the use of deprecated OpenSSL API functions. See bitcoin#23048.
ACKs for top commit:
MarcoFalke:
cr ACK d7524546abf1fa5be8e6317ee50585e966ae6b4c
elichai:
Code review ACK d7524546abf1fa5be8e6317ee50585e966ae6b4c
Tree-SHA512: a3805b4123ec49aaf21378066d86be382d11a022a7530682c2d8c0e756e785f32f18bea6fe73b1eca73f70bc3aee9166c391a9bf6adc0e450ebb0ce0bcf5a45e
|
|
instead of only for networks we have peer connections to.
Users reported the previous behavior caused confusion,
as no column was printed when a network was reachable
but no peers were connected. Users expected a column
to be printed with 0 peers. This commit aligns
behavior with that expectation.
|
|
due to SegWit
ef72e9bd4124645fe2d00521a71c1c298d760225 doc: nChainTx needs to become a 64-bit earlier due to SegWit (Sjors Provoost)
Pull request description:
As of block 597,379 txcount is 460,596,047 (see `chainparams.cpp`), while `uint32` can handle up to 4,294,967,296.
Pre segwit the [minimum transaction size](https://en.bitcoin.it/wiki/Maximum_transaction_rate) was 166 bytes, so the worst case number of transactions per block was ~6000. As the original source comment for `unsigned int nChainTx` says, that should last until the year 2030.
With SegWit the smallest possible transaction is 60 bytes (potentially increased to 65 with a future soft fork, see #15482), without a witness:
```
4 bytes version
1 byte input count
36 bytes outpoint
1 byte scriptSigLen (0x00)
0 bytes scriptSig
4 bytes sequence
1 byte output count
8 bytes value
1 byte scriptPubKeyLen
1 byte scriptPubKey (OP_TRUE)
4 bytes locktime
```
That puts the maximum number of transactions per block at 16,666 so we might have to deal with this as early as a block 827,450 in early 2024.
Given that it's a memory-only thing and we want to allow users many years to upgrade, I would suggest fixing this in v0.20 and back-porting it.
ACKs for top commit:
practicalswift:
re-ACK ef72e9bd4124645fe2d00521a71c1c298d760225
jarolrod:
ACK ef72e9bd4124645fe2d00521a71c1c298d760225
theStack:
ACK ef72e9bd4124645fe2d00521a71c1c298d760225
Tree-SHA512: d8509ba7641796cd82af156354ff3a12ff7ec0f7b11215edff6696e95f8ca0e3596f719f3492ac3acb4b0884ac4e5bddc76f107b656bc2ed95a8ef1b2b5d4f71
|
|
These tests are failing when run against OpenSSL 3, and have been
removed upstream, https://github.com/bitcoin-core/secp256k1/pull/983, so
disabled them for now to avoid `make check` failures.
Note that this will also remove warning output from our build, due to
the use of deprecated OpenSSL API functions. See #23048.
|
|
a78137ec3393fab8b2253995f91b22800886f82b build: fix python detection post #23182 (fanquake)
Pull request description:
#23182 was broken. Fixup the changes, and add python3.11 as suggested. Was going to include this in other changes, but no point leaving this broken any longer.
ACKs for top commit:
MarcoFalke:
cr ACK a78137ec3393fab8b2253995f91b22800886f82b
hebasto:
ACK a78137ec3393fab8b2253995f91b22800886f82b, tested on Ubuntu Impish 21.10 running `./configure`:
Tree-SHA512: f77cbea76710617eaea85787351a707cc2dcfb7e5962fc6d63ea11e737ee96cb2a496a2a4bb5a147b37ba87b0428977d9295ea053e25417ea13f43137c959919
|
|
This is done for the ChaCha20-Poly1305 AEAD test vector
and for the K1/K2 ChaCha20 cipher instances in chacha_poly_aead.h
|
|
::ChainActive()
a0efe529e4fd053b890450413b9ca5e1bcd8f2c2 Fix outdated comments referring to ::ChainActive() (Samuel Dobson)
Pull request description:
After #21866 there are a few outdated comments referring to `::ChainActive()`, which should instead refer to `ChainstateManager::ActiveChain()`.
ACKs for top commit:
jamesob:
ACK https://github.com/bitcoin/bitcoin/pull/23258/commits/a0efe529e4fd053b890450413b9ca5e1bcd8f2c2
Tree-SHA512: 80da19c105ed29ac247e6df4c8e916c3bf3f37230b63f07302114eef9c115add673e9649f0bbe237295be0c6da7b1030b5b93e14daf6768f17ce5de7cf2c9ff2
|
|
23182 was broken. Fix up the changes, and add python3.11 as suggested.
|
|
|
|
`--with-system-univalue`
0f95247246344510c9a51810c14c633abb382e95 Integrate univalue into our buildsystem (Cory Fields)
9b49ed656fb2b687fbbe8a3236d18285957eee16 Squashed 'src/univalue/' changes from 98fadc0909..a44caf65fe (fanquake)
Pull request description:
This PR more tightly integrates building Univalue into our build system. This follows the same approach we use for [LevelDB](https://github.com/bitcoin-core/leveldb/), ([`Makefile.leveldb.include`](https://github.com/bitcoin/bitcoin/blob/master/src/Makefile.leveldb.include)), and [CRC32C](https://github.com/bitcoin-core/crc32c) ([`Makefile.crc32c.include`](https://github.com/bitcoin/bitcoin/blob/master/src/Makefile.crc32c.include)), and will be the same approach we use for [minisketch](https://github.com/sipa/minisketch); see #23114.
This approach yields a number of benefits, including:
* Faster configuration due to one less subconfigure being run during `./configure` i.e 22s with this PR vs 26s
* Faster autoconf i.e 13s with this PR vs 17s
* Improved caching
* No more issues with compiler flags i.e https://github.com/bitcoin/bitcoin/pull/12467
* More direct control means we can build exactly the objects we want
There might be one argument against making this change, which is that builders should have the option to use "proper shared/system libraries". However, I think that falls down for a few reasons. The first being that we already don't support building with a number of system libraries (secp256k1, leveldb, crc32c); some for good reason. Univalue is really the odd one out at the moment.
Note that the only fork of Core I'm aware of, that actively patches in support for using system libs, also explicitly marks them as ["DANGEROUS"](https://github.com/bitcoinknots/bitcoin/blob/a886811721ce66eb586871706b3f5dd27518ac3e/configure.ac#L1430) and ["NOT SUPPORTED"](https://github.com/bitcoinknots/bitcoin/blob/a886811721ce66eb586871706b3f5dd27518ac3e/configure.ac#L1312). So it would seem they exist more to satisfy a distro requirement, as opposed to something that anyone should, or would actually use in practice.
PRs like #22412 highlight the "issue" with us operating with our own Univalue fork, where we actively fix bugs, and make improvements, when upstream (https://github.com/jgarzik/univalue) may not be taking those improvements, and by all accounts, is not currently actively maintained. Bitcoin Core should not be hamstrung into not being able to fix bugs in a library, and/or have to litter our source with "workarounds", i.e #22412, for bugs we've already fixed, based on the fact that an upstream project is not actively being maintained. Allowing builders to use system libs is really only exacerbating this problem, with little benefit to our project. Bitcoin Core is not quite like your average piece of distro packaged software.
There is the potential for us to give the same treatment to libsecp256k1, however it seems doing that is currently less straightforward.
ACKs for top commit:
dongcarl:
ACK 0f95247246 less my comment above, always nice to have an include-able `sources.mk` which makes integration easier.
theuni:
ACK 0f95247246344510c9a51810c14c633abb382e95. Thanks fanquake for keeping this going.
Tree-SHA512: a7f2e41ee7cba06ae72388638e86b264eca1b9a8b81c15d1d7b45df960c88c3b91578b4ade020f8cc61d75cf8d16914575f9a78fa4cef9c12be63504ed804b99
|
|
13ae56864e0960fa996ceb82384f21c9656f7b0b ci: Bump vcpkg release tag (Hennadii Stepanov)
Pull request description:
In the new vcpkg release the "Binary Caching" and "Manifest Mode" features are [available by default](https://devblogs.microsoft.com/cppblog/all-vcpkg-enterprise-features-now-generally-available-versioning-binary-caching-manifests-and-registries/).
Suggested in https://github.com/bitcoin/bitcoin/pull/23215#issuecomment-946968130 and https://github.com/bitcoin/bitcoin/pull/23215#issuecomment-946998547.
ACKs for top commit:
sipsorcery:
tACK 13ae56864e0960fa996ceb82384f21c9656f7b0b.
Tree-SHA512: 55558f2a2d395a3ad168eb1b36ffe3b0e6a3336b9a7c764d841345d8bb696b231d697dad36cc723d922d07be65c1b77a05cc9604a09e05e8f13ca8090ecb966d
|
|
|
|
A portion of feature_segwit deals with the legacy wallet IsMine and
import behavior. This is now hidden behind --legacy-wallet
|
|
When setting up the multisig addresses in feature_segwit.py, use
descriptors rather than addmultisigaddress.
|