Commit Graph

36680 Commits

Author SHA1 Message Date
fanquake
424fc603d8
Merge bitcoin/bitcoin#26997: psbt: s/transcation/transaction/
906631450d s/transcation/transaction/ (Greg Sanders)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 906631450d - looks like other comments are being addressed elsewhere.

Tree-SHA512: c835a14db2e0cf5e0317c95c8c7441df1f7c6cb14be7809fd947e07ea9d23f1f171f111429aabd0509b7f17601bc742041316b18e1135e547a966961f2c65038
2023-02-16 09:39:50 +00:00
Andrew Chow
54742532ce
Merge bitcoin-core/gui#711: refactor: Disable unused special members functions in UnlockContext
9fa43b5af6 refactor: Disable unused special members functions in `UnlockContext` (Hennadii Stepanov)

Pull request description:

  Also `UnlockContext::valid` and `UnlockContext::relock` are `const` now.

ACKs for top commit:
  achow101:
    ACK 9fa43b5af6
  john-moffett:
    ACK 9fa43b5af6
  furszy:
    ACK 9fa43b5a

Tree-SHA512: 6d9fa8208676b9bd5d85b73cb2d3136e7f28ef59e68ee34915ec598458868e302a80b9ef1384c0bf7a4c42f936830c3add9662ca0bae73860a55a25cc374b699
2023-02-15 18:41:44 -05:00
fanquake
5ecd14a31c
Merge bitcoin/bitcoin#26844: Net: Pass MSG_MORE flag when sending non-final network messages (round 2)
691eaf8873 Pass MSG_MORE flag when sending non-final network messages (Matt Whitlock)

Pull request description:

  **N.B.:** This is my second attempt at introducing this optimization. #12519 (2018) was closed in deference to switching to doing gathering socket writes using `sendmsg(2)`, which I agree would have superior performance due to fewer syscalls, but that work was apparently abandoned in late 2018. Ever since, Bitcoin Core has continued writing tons of runt packets to the wire. Can we proceed with my halfway solution for now?

  ----

  Since Nagle's algorithm is disabled, each and every call to `send(2)` can potentially generate a separate TCP segment on the wire. This is especially inefficient when sending the tiny header preceding each message payload.

  Linux implements a `MSG_MORE` flag that tells the kernel not to push the passed data immediately to the connected peer but rather to collect it in the socket's internal transmit buffer where it can be combined with data from successive calls to `send(2)`. Where available, specify this flag when calling `send(2)` in `CConnman::SocketSendData(CNode &)` if the data buffer being sent is not the last one in `node.vSendMsg`.

ACKs for top commit:
  sipa:
    ACK 691eaf8873
  vasild:
    ACK 691eaf8873

Tree-SHA512: 9a7f46bc12edbf78d488f05d1c46760110a24c95af74b627d2604fcd198fa3f511c5956bac36d0034e88c632d432f7d394147e667a11b027af0a30f70a546d70
2023-02-15 16:10:46 +00:00
merge-script
a65d2259f1
Merge bitcoin/bitcoin#27035: test: simplify and speedup mempool_updatefromblock.py by using MiniWallet
dee8549be3 test: simplify and speedup mempool_updatefromblock.py by using MiniWallet (Sebastian Falbesoner)

Pull request description:

  This PR simplifies the functional test mempool_updatefromblock.py by using MiniWallet in order to avoid manual low-level tx creation (signing, outputs selection, fee calculation). Most of the tedious work is done by the method `MiniWallet.send_self_transfer_multi` (calling `create_self_transfer_multi` internally) which supports spending a given set of UTXOs and creating a certain number of outputs.

  As a nice side-effect, the test's performance increases significantly (~3.5x on my system):

  ```
  master
      1m56.80s real     1m50.10s user     0m06.36s system

  PR
      0m32.34s real     0m30.26s user     0m01.41s system
  ```

  The arguments `start_input_txid` and `end_address` have been removed from the `transaction_graph_test` method, as they are currently unused and I don't see them being needed for future tests.

ACKs for top commit:
  brunoerg:
    crACK dee8549be3
  MarcoFalke:
    lgtm ACK dee8549be3 🚏

Tree-SHA512: 9f6da634bdc8c272f9a2af1cddaa364ee371d4e95554463a066249eecebb668d8c6cb123ec8a5404c41b3291010c0c8806a8a01dd227733cec03e73aa93b0103
2023-02-15 16:26:00 +01:00
fanquake
1e0198b6c1
Merge bitcoin/bitcoin#26153: Reduce wasted pseudorandom bytes in ChaCha20 + various improvements
511aa4f1c7 Add unit test for ChaCha20's new caching (Pieter Wuille)
fb243d25f7 Improve test vectors for ChaCha20 (Pieter Wuille)
93aee8bbda Inline ChaCha20 32-byte specific constants (Pieter Wuille)
62ec713961 Only support 32-byte keys in ChaCha20{,Aligned} (Pieter Wuille)
f21994a02e Use ChaCha20Aligned in MuHash3072 code (Pieter Wuille)
5d16f75763 Use ChaCha20 caching in FastRandomContext (Pieter Wuille)
38eaece67b Add fuzz test for testing that ChaCha20 works as a stream (Pieter Wuille)
5f05b27841 Add xoroshiro128++ PRNG (Martin Leitner-Ankerl)
12ff72476a Make unrestricted ChaCha20 cipher not waste keystream bytes (Pieter Wuille)
6babf40213 Rename ChaCha20::Seek -> Seek64 to clarify multiple of 64 (Pieter Wuille)
e37bcaa0a6 Split ChaCha20 into aligned/unaligned variants (Pieter Wuille)

Pull request description:

  This is an alternative to #25354 (by my benchmarking, somewhat faster), subsumes #25712, and adds additional test vectors.

  It separates the multiple-of-64-bytes-only "core" logic (which becomes simpler) from a layer around which performs caching/slicing to support arbitrary byte amounts. Both have their uses (in particular, the MuHash3072 code can benefit from multiple-of-64-bytes assumptions), plus the separation results in more readable code. Also, since FastRandomContext effectively had its own (more naive) caching on top of ChaCha20, that can be dropped in favor of ChaCha20's new built-in caching.

  I thought about rebasing #25712 on top of this, but the changes before are fairly extensive, so redid it instead.

ACKs for top commit:
  ajtowns:
    ut reACK 511aa4f1c7
  dhruv:
    tACK crACK 511aa4f1c7

Tree-SHA512: 3aa80971322a93e780c75a8d35bd39da3a9ea570fbae4491eaf0c45242f5f670a24a592c50ad870d5fd09b9f88ec06e274e8aa3cefd9561d623c63f7198cf2c7
2023-02-15 14:58:47 +00:00
fanquake
2b0cd7679f
Merge bitcoin/bitcoin#27076: verify-commits: Bump trusted git root to after most recent laanwj merge
6ada37d44c verify-commits: Bump trusted git root to after most recent laanwj merge (Andrew Chow)

Pull request description:

  To prepare for the removal of laanwj's key from trusted key (#27054), the trusted git root needs to be newer than the most recent merge commit signed by his key.

  This can be tested by removing the laanwj's key from trusted keys (e.g. by merging with #27054) and running `verify-commits.py` with `--clean-merge 0`: `./contrib/verify-commits/verify-commits.py --clean-merge 0 HEAD~`. (`--clean-merge 0` disables the clean merge check which will checkout some commits, which results in the `trusted-keys` used in checking of subsequent commits to be different than expected).

ACKs for top commit:
  fanquake:
    ACK 6ada37d44c
  hebasto:
    ACK 6ada37d44c, I've verified the history of laanwj's merge commits.

Tree-SHA512: 55cafeddd54aa2b62d7b7cd41c542f4fd974b322a0405de546600d88658575714ebc893b087eb31f28c205559a7b213f88d9038de431271fca00be866610df74
2023-02-15 12:30:38 +00:00
Hennadii Stepanov
e43ff4eab2
Merge bitcoin-core/gui#603: Add settings.json prune-prev, proxy-prev, onion-prev settings
9d3127b11e Add settings.json prune-prev, proxy-prev, onion-prev settings (Ryan Ofsky)

Pull request description:

  With #602, if proxy and pruning settings are disabled in the GUI and the GUI is restarted, proxy and prune values are not stored anywhere. So if these settings are enabled in the future, default values will be shown, not previous values.

  This PR stores previous values so they will preserved across restarts. I'm not sure I like this behavior because showing default values seems simpler and safer to me. Previous values may just have been set temporarily and may have never actually worked, and it adds some code complexity to store them.

  This PR is one way of resolving #596. Other solutions are possible and could be implemented as alternatives.

ACKs for top commit:
  hebasto:
    ACK 9d3127b11e, tested on Ubuntu 22.04.
  vasild:
    ACK 9d3127b11e
  jarolrod:
    tACK 9d3127b11e

Tree-SHA512: 1778d1819443490c880cfd5c1711d9c5ac75ea3ee8440e2f0ced81d293247163a78ae8aba6027215110aec6533bd7dc6472aeead6796bfbd51bf2354e28f24a9
2023-02-15 12:21:31 +00:00
merge-script
68e484afbb
Merge bitcoin/bitcoin#26584: cli: include local ("unroutable") peers in -netinfo table
77192c9598 cli: include local ("unreachable") peers in -netinfo table (Matthew Zipkin)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/26579

  The `-netinfo` dashboard did not list peers that were connected via "unroutable" networks. This included local peers including local-network peers. Personally, I run one bitcoind instance on my network that is used by other services like Wasabi Wallet and LND running on other machines.

  This PR adds an "npr" (not publicly routable) column to the table of networks (ipv4, ipv6, onion, etc) so that every connection to the node is listed, and the totals are accurate as they relate to max inbound and max outbound limits.

  Example connecting in regtest mode to one local and one remote peer:

  ```
  Bitcoin Core client v24.99.0-151ce099ea8f-dirty regtest - server 70016/Satoshi:24.99.0/

  <->   type   net  mping   ping send recv  txn  blk  hb addrp addrl  age id address         version
   in          npr      0      0   90   90                              1  1 127.0.0.1:59180 70016/Satoshi:24.99.0/
  out manual  ipv4     63     63   84   84         3                    3  0 143.244.175.41  70016/Satoshi:24.0.1/
                       ms     ms  sec  sec  min  min                  min

           ipv4    ipv6     npr   total   block  manual
  in          0       0       1       1
  out         1       0       0       1       0       1
  total       1       0       1       2

  Local addresses: n/a

  ```

ACKs for top commit:
  jonatack:
    Re-tested ACK 77192c9598

Tree-SHA512: 78aa68bcff0dbaadb5f0604bf023fe8fd921313bd8276d12581f7655c089466a48765f9e123cb31d7f1d294d5ca45fdefdf8aa220466ff738f32414f41099c06
2023-02-15 09:18:57 +01:00
Andrew Chow
576e16e702
Merge bitcoin/bitcoin#26184: test: p2p: check that headers message with invalid proof-of-work disconnects peer
772671245d test: p2p: check that headers message with invalid proof-of-work disconnects peer (Sebastian Falbesoner)

Pull request description:

  One of the earliest anti-DoS checks done after receiving and deserializing a `headers` message from a peer is verifying whether the proof-of-work is valid (called in method `PeerManagerImpl::ProcessHeadersMessage`):
  f227e153e8/src/net_processing.cpp (L2752-L2762)
  The called method `PeerManagerImpl::CheckHeadersPoW` calls `Misbehaving` with a score of 100, i.e. leading to an immediate disconnect of the peer:
  f227e153e8/src/net_processing.cpp (L2368-L2372)

  This PR adds a simple test for both the misbehaving log and the resulting disconnect. For creating a block header with invalid proof-of-work, we first create one that is accepted by the node (the difficulty field `nBits` is copied from the genesis block) and based on that the nonce is modified until we have block header hash prefix that is too high to fulfill even the minimum difficulty.

ACKs for top commit:
  Sjors:
    ACK 772671245d
  achow101:
    ACK 772671245d
  brunoerg:
    crACK 772671245d
  furszy:
    Code review ACK 77267124 with a non-blocking speedup.

Tree-SHA512: 680aa7939158d1dc672b90aa6554ba2b3a92584b6d3bcb0227776035858429feb8bc66eed18b47de0fe56df7d9b3ddaee231aaeaa360136603b9ad4b19e6ac11
2023-02-14 18:45:35 -05:00
Hennadii Stepanov
9fa43b5af6
refactor: Disable unused special members functions in UnlockContext 2023-02-14 17:55:57 +00:00
fanquake
fb2f093479
Merge bitcoin/bitcoin#27097: descriptors: fix docstring (param [in] vs [out])
588fad868d descriptors: fix docstring (param [in] vs [out]) (SomberNight)

Pull request description:

  As in title, these docstrings look incorrect.

ACKs for top commit:
  john-moffett:
    ACK 588fad868d

Tree-SHA512: 1ab343a1b1fc57a7d6bd8363b84db9d96e8ea11a4cec85bcf79885c9df53da889fe2fb10b1fa92d824ddf0dee800c07353f46f1fea9887d2ad518bed0afebe3d
2023-02-14 17:02:29 +00:00
fanquake
af49d86dd7
Merge bitcoin/bitcoin#27093: test: Fix intermittent sync issue in wallet_pruning
fa9ec7b0fe test: Fix intermittent sync issue in wallet_pruning (MarcoFalke)

Pull request description:

  The `sync_fun=self.no_op` has no motivation or rationale, and seems to be causing issues.

  Fix that by removing it.

  Actually fixes https://github.com/bitcoin/bitcoin/issues/27065, see https://github.com/bitcoin/bitcoin/pull/27066#issuecomment-1428249997

ACKs for top commit:
  fanquake:
    ACK fa9ec7b0fe

Tree-SHA512: 3c67da6705d6698fcabb29de169a2b4723f74705c979380d1fddce5fe9595b4595445fd7d9790a6b2a89f10ce8ec3c64ce45248f58fd920b72b7b6fba8afb09f
2023-02-14 16:52:18 +00:00
SomberNight
588fad868d
descriptors: fix docstring (param [in] vs [out])
As in title, these docstrings look incorrect.
2023-02-14 14:28:08 +00:00
fanquake
d6ef44cccb
Merge bitcoin/bitcoin#27081: Modernize rpcauth.py
e4e17907b6 Modernize rpcauth.py and its tests (Pieter Wuille)

Pull request description:

  Use Python3 constructions, and f-strings.

ACKs for top commit:
  jamesob:
    Github ACK e4e17907b6

Tree-SHA512: 005573d967e04400fec727f45739f138879be703e692745c0a639272d37d221d230f388de23f2615cb954bb47179fb46e53da0410ae9f0865319b91bb2dc01f4
2023-02-14 11:26:17 +00:00
Pieter Wuille
e4e17907b6 Modernize rpcauth.py and its tests 2023-02-13 17:11:15 -05:00
Andrew Chow
2c1fe27bf3
Merge bitcoin/bitcoin#27080: Wallet: Zero out wallet master key upon locking so it doesn't persist in memory
3a11adc700 Zero out wallet master key upon lock (John Moffett)

Pull request description:

  When an encrypted wallet is locked (for instance via the RPC `walletlock`), the documentation indicates that the key is removed from memory:

  b92d609fb2/src/wallet/rpc/encrypt.cpp (L157-L158)

  However, the vector (a `std::vector<unsigned char, secure_allocator<unsigned char>>`) is merely _cleared_. As it is a member variable, it also stays in scope as long as the wallet is loaded, preventing the secure allocator from deallocating. This allows the key to persist indefinitely in memory. I confirmed this behavior on my macOS machine by using an open-source third party memory inspector ("Bit Slicer"). I was able to find my wallet's master key in Bit Slicer after unlocking and re-locking my encrypted wallet. I then confirmed the key data was at the address in LLDB.

  This PR manually fills the bytes with zeroes before calling `clear()` by using our `memory_cleanse` function, which is designed to prevent the compiler from optimizing it away. I confirmed that it does remove the data from memory on my machine upon locking.

  Note: An alternative approach could be to call `vMasterKey.shrink_to_fit()` after the `clear()`, which would trigger the secure allocator's deallocation. However, `shrink_to_fit()` is not _guaranteed_ to actually change the vector's capacity, so I think it's unwise to rely on it.

  ## Edit: A little more clarity on why this is an improvement.

  Since `mlock`ed memory is guaranteed not to be swapped to disk and our threat model doesn't consider a super-user monitoring the memory in realtime, why is this an improvement? Most importantly, consider hibernation. Even `mlock`ed memory may get written to disk. From the `mlock` [manpage](https://man7.org/linux/man-pages/man2/mlock.2.html):

  > (But be aware that the suspend mode on laptops and some desktop computers will save a copy of the system's RAM to disk, regardless of memory locks.)

  As far as I can tell, this is true of [Windows](https://web.archive.org/web/20190127110059/https://blogs.msdn.microsoft.com/oldnewthing/20140207-00/?p=1833#:~:text=%5BThere%20does%20not%20appear%20to%20be%20any%20guarantee%20that%20the%20memory%20won%27t%20be%20written%20to%20disk%20while%20locked.%20As%20you%20noted%2C%20the%20machine%20may%20be%20hibernated%2C%20or%20it%20may%20be%20running%20in%20a%20VM%20that%20gets%20snapshotted.%20%2DRaymond%5D) and macOS as well.

  Therefore, a user with a strong OS password and a strong wallet passphrase could still have their keys stolen if a thief takes their (hibernated) machine and reads the permanent storage.

ACKs for top commit:
  S3RK:
    Code review ACK 3a11adc700
  achow101:
    ACK 3a11adc700

Tree-SHA512: c4e3dab452ad051da74855a13aa711892c9b34c43cc43a45a3b1688ab044e75d715b42843c229219761913b4861abccbcc8d5cb6ac54957d74f6e357f04e8730
2023-02-13 15:18:16 -05:00
MarcoFalke
fa9ec7b0fe
test: Fix intermittent sync issue in wallet_pruning 2023-02-13 17:32:42 +01:00
fanquake
1ad0711d7c
Merge bitcoin/bitcoin#27016: mapport: require miniupnpc API version 17 or later
b3b673f704 mapport: require miniupnpc API version 17 or later (fanquake)

Pull request description:

  Version 17 is currently the latest version, see: https://github.com/miniupnp/miniupnp/blob/master/miniupnpc/apiversions.txt, and has been available since the release of 2.1. 2.1 or newer is readily available across all distros, see https://repology.org/project/miniupnpc/versions, so drop support for the older API versions.

  Split out of #22644.

ACKs for top commit:
  hebasto:
    ACK b3b673f704, tested on Ubuntu 20.04 w/ and w/o [`libminiupnpc-dev`](https://packages.ubuntu.com/focal/libminiupnpc-dev) package.
  TheCharlatan:
    ACK b3b673f704

Tree-SHA512: f53b36b82462c4ea83d9b83413dca8097885d1620f7ca0a53a79d6b3d3cf37c7773828b23f4278ccfcc3b14fcb0faffa35f60191b519b04570f3d2783d0303e2
2023-02-13 16:25:09 +00:00
merge-script
8126551d54
Merge bitcoin/bitcoin#27011: Add simulation-based CCoinsViewCache fuzzer
561848aaf2 Exercise non-DIRTY spent coins in caches in fuzz test (Pieter Wuille)
59e6828bb5 Add deterministic mode to CCoinsViewCache (Pieter Wuille)
b0ff310840 Add CCoinsViewCache::SanityCheck() and use it in fuzz test (Pieter Wuille)
3c9cea1340 Add simulation-based CCoinsViewCache fuzzer (Pieter Wuille)

Pull request description:

  The fuzzer goes through a sequence of operations that get applied to both a real stack of `CCoinsViewCache` objects, and to simulation data, comparing the two at the end.

ACKs for top commit:
  jamesob:
    re-ACK 561848aaf2
  dergoegge:
    Code review ACK 561848aaf2

Tree-SHA512: 68634f251fdb39436b128ecba093f651bff12ac11508dc9885253e57fd21efd44edf3b22b0f821c228175ec507df7d46c7f9f5404fc1eb8187fdbd136a5d5ee2
2023-02-13 15:31:50 +01:00
merge-script
141115a060
Merge bitcoin/bitcoin#27033: ci: Cache stuff in volumes, not host folders
fa8e92c022 doc: Update ci docs (721217.xyz)
5fffff54e9 ci: Cache stuff in volumes, not host folders (MarcoFalke)

Pull request description:

  Storing cached stuff in host system folders may lead to unexpected issues when the ci-built stuff is used for a non-ci build or a ci task leaks into another ci task.

ACKs for top commit:
  john-moffett:
    ACK fa8e92c022

Tree-SHA512: 8b0c9019452fbe507a272c1037c3dce3c178c21f85ab1096ed3372ad9d4b3c7aa27d89e5bf80c9a6260ea652e0268be0cbe61d6a4fcb3add569fa38076d32287
2023-02-13 11:53:50 +01:00
merge-script
a6316590d5
Merge bitcoin/bitcoin#26970: test: fix immediate tx relay in wallet_groups.py
ab4efad51b test: fix immediate tx relay in wallet_groups.py (Sebastian Falbesoner)

Pull request description:

  In the functional test wallet_groups.py we whitelist peers on all nodes (`-whitelist=noban@127.0.0.1`) to enable immediate tx relay for fast mempool synchronization. However, considering that this setting only applies to inbound peers and the default test topology looks like this:
  ```
      node0 <--- node1 <---- node2 <--- ... <-- nodeN
  ```

  txs propagate fast only from lower- to higher-numbered nodes (i.e. "left to right" in the above diagram) and take long from higher- to lower-numbered nodes ("right to left") since in the latter direction we only have outbound peers, where the trickle relay is still active. As a consequence, if a tx is submitted from any node other than node0, the mempool synchronization can take quite long.

  This PR fixes this by simply adding another connection from node0 to the last node, leading to a ~2-3x speedup (5 runs measured via `time ./test/functional/wallet_groups.py` are shown):

  ```
  master:
      0m53.31s real     0m08.22s user     0m05.60s system
      0m32.85s real     0m07.44s user     0m04.08s system
      0m46.40s real     0m09.18s user     0m04.23s system
      0m46.96s real     0m11.10s user     0m05.74s system
      0m57.23s real     0m10.53s user     0m05.59s system

  PR:
      0m19.64s real     0m09.58s user     0m05.50s system
      0m18.05s real     0m07.77s user     0m04.03s system
      0m18.99s real     0m07.90s user     0m04.25s system
      0m17.49s real     0m07.56s user     0m03.92s system
      0m18.11s real     0m07.74s user     0m03.88s system
  ```
  Note that in most tests this is not a problem since txs very often originate from node0.

ACKs for top commit:
  brunoerg:
    utACK ab4efad51b

Tree-SHA512: 12675357e6eb5a18383f2bfe719a184c0790863b37a98749d8e757dd5dc3a36212e16a81f0a192340c11b793eda00db359c7011f46f7c27e3a093af4f5b62147
2023-02-13 11:51:03 +01:00
John Moffett
3a11adc700 Zero out wallet master key upon lock
When an encrypted wallet is locked (for instance via the
RPC `walletlock`), the docs indicate that the key is
removed from memory. However, the vector (with a secure
allocator) is merely cleared. This allows the key to persist
indefinitely in memory. Instead, manually fill the bytes with
zeroes before clearing.
2023-02-10 20:21:23 -05:00
Andrew Chow
6ada37d44c verify-commits: Bump trusted git root to after most recent laanwj merge
To prepare for the removal of laanwj's key from trusted key, the trusted
git root needs to be newer than the most recent merge commit signed by
his key.
2023-02-10 11:36:06 -05:00
721217.xyz
fa8e92c022
doc: Update ci docs 2023-02-10 17:05:39 +01:00
merge-script
b92d609fb2
Merge bitcoin/bitcoin#27072: doc: Remove unused REVIEWERS file
fa8e3aa60d doc: Remove unused REVIEWERS file (721217.xyz)

Pull request description:

  Unused for way more than two months after https://github.com/bitcoin/bitcoin/pull/25613#issuecomment-1200113115

  See also bb5ebadeaa

ACKs for top commit:
  sipa:
    ACK fa8e3aa60d
  john-moffett:
    ACK fa8e3aa60d

Tree-SHA512: def650d34f04abd18e37cf19b5df34463157a99fbb537c4c98092c8312eb2a572ccde13ec5374f3b9e7cb90cef220cfe07f4522ffbfeb9407b20b3ada1d7706c
2023-02-10 16:57:53 +01:00
merge-script
e0d8378f2d
Merge bitcoin/bitcoin#27069: net: add Ensure{any}Banman
2d955ff006 net: add `Ensure{any}Banman` (brunoerg)

Pull request description:

  This PR adds `Ensure{any}Banman` functions to avoid code repetition and make it cleaner. Same approach as done with argsman, chainman, connman and others.

ACKs for top commit:
  davidgumberg:
    ACK [2d955ff](2d955ff006)

Tree-SHA512: 0beb7125312168a3df130c1793a1412ab423ef0f46023bfe2a121630c79df7e55d3d143fcf053bd09e2d96e9385a7a04594635da3e5c6be0c5d3a9cafbe3b631
2023-02-10 15:10:21 +01:00
721217.xyz
fa8e3aa60d
doc: Remove unused REVIEWERS file 2023-02-10 14:11:31 +01:00
merge-script
4f841cbb81
Merge bitcoin/bitcoin#27070: ci: Fix fingerprint_script for depends subdir caches
d66efa30cd ci: Fix `fingerprint_script` for `depends` subdir caches (Hennadii Stepanov)

Pull request description:

  https://github.com/bitcoin/bitcoin/pull/26977 made current `git rev-list -1 HEAD ./depends` [not working](https://github.com/bitcoin/bitcoin/pull/26977#issuecomment-1424614490).

  This PR fixes this issue with an idea from https://github.com/bitcoin/bitcoin/pull/26977#issuecomment-1424636503.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK d66efa30cd

Tree-SHA512: e6dbb1a80439bf8c044e50afc44b8b08b0903d20da5ef9dcbb265f2d64b6810ea5f4cb8abb44e00b96673082f1dbdd350627627d9d28f362bdb662c92ef257d8
2023-02-10 09:39:11 +01:00
merge-script
ffdf630790
Merge bitcoin/bitcoin#27066: test: Fix intermittent sync issue in wallet_pruning
fa6f67837b test: Fix intermittent sync issue in wallet_pruning (721217.xyz)

Pull request description:

  Setting the mocktime on each loop iteration will make net processing racy and cause a disconnect due to timeout.

  Fix that by setting the mocktime only once.

  Fixes https://github.com/bitcoin/bitcoin/issues/27065

ACKs for top commit:
  brunoerg:
    crACK fa6f67837b

Tree-SHA512: 128b962c05a6fa3caf3ce392e870fff6609ce2206a43bbae6661ecb45291df93bed77fe362a514d4472056f83fb6631df39a5170fa34e41a7577b9685dd26b1f
2023-02-10 09:35:40 +01:00
Sebastian Falbesoner
772671245d test: p2p: check that headers message with invalid proof-of-work disconnects peer 2023-02-10 00:01:04 +01:00
Hennadii Stepanov
d66efa30cd
ci: Fix fingerprint_script for depends subdir caches 2023-02-09 22:20:42 +00:00
brunoerg
2d955ff006 net: add Ensure{any}Banman
it adds `Ensure{any}Banman` functions to avoid
code repetition and make it cleaner. Similar
approach as done with argsman, chainman, connman
and others.
2023-02-09 17:14:01 -03:00
Hennadii Stepanov
1313b90735
Merge bitcoin-core/gui#701: Persist Mask Values option
4de02def84 qt: Persist Mask Values option (Andrew Chow)

Pull request description:

  The mask values option is memory only. If a user has enabled this option, it's reasonable to expect that they would want to have it enabled on the next start.

ACKs for top commit:
  RandyMcMillan:
    tACK 4de02def84
  jarolrod:
    tACK 4de02def84
  pablomartin4btc:
    > tACK [4de02de](4de02def84)
  john-moffett:
    tACK 4de02def84

Tree-SHA512: 247deb78df4911516625bf8b25d752feb480ce30eb31335cf9baeb07b7c6c225fcc37d5c45de62d6e6895ec10c7eefabb15527e3c9723a3b8ddda1e12ebbf46b
2023-02-09 20:11:11 +00:00
merge-script
af2bd07587
Merge bitcoin/bitcoin#27062: ci: Re-introduce depends_built cache back in macOS and Android tasks
73a3b161b7 ci: Inline `MACOS_NATIVE_TASK_TEMPLATE` (Hennadii Stepanov)
8a61527cf6 ci: Re-introduce `depends_built` cache back in macOS and Android tasks (Hennadii Stepanov)

Pull request description:

  This PR brings a `depends_built` cache back to the "macOS 10.15" and "ARM64 Android APK" CI tasks.

  Fixes #27031.

ACKs for top commit:
  MarcoFalke:
    reACK 73a3b161b7 🌻

Tree-SHA512: 2eb845f865ee2ee453c1fd284d5eeddbebb2653586b17946822fec03d46e73c5eb483499761a0de6c3c466b06623957664e22dee01f7312ad18e212f1c9c6439
2023-02-09 19:05:49 +01:00
Hennadii Stepanov
73a3b161b7
ci: Inline MACOS_NATIVE_TASK_TEMPLATE 2023-02-09 12:11:47 +00:00
Hennadii Stepanov
8a61527cf6
ci: Re-introduce depends_built cache back in macOS and Android tasks 2023-02-09 12:11:26 +00:00
721217.xyz
fa6f67837b
test: Fix intermittent sync issue in wallet_pruning 2023-02-09 12:28:56 +01:00
merge-script
dc905f6c2a
Merge bitcoin/bitcoin#27063: ci: Use the latest Ubuntu LTS for "ARM64 Android APK" task
887bb53b67 ci: Use the latest Ubuntu LTS for "ARM64 Android APK" task (Hennadii Stepanov)

Pull request description:

  Suggested in https://github.com/bitcoin/bitcoin/pull/25797#discussion_r1100172227:

  >  I don't expect that anyone is building for android, and if they did, it should be fine to just require the latest Ubuntu LTS, which is Jammy

ACKs for top commit:
  fanquake:
    ACK 887bb53b67 - but I'd also suggest we remove this task entirely, and either replacing it with another task, maybe a *BSD, or delegating the resources to other jobs.

Tree-SHA512: 1f4b6155e5bbb8ca3580809c5999e3abf6b15b409d164a719b0a89205ca48c178aa6401039a22151ce464009adc48ba272a5a2ff05dc3ca06d3b2d64c99e3e22
2023-02-09 10:44:48 +01:00
fanquake
835af48e03
Merge bitcoin/bitcoin#27057: build: set boost cppflags with --enable-fuzz
b03a98291b build: set boost cppflags with --enable-fuzz (fanquake)

Pull request description:

  Even though all other targets are disabled, we still need Boost CPPFLAGS (`use_boost`) to compile. This currently works everywhere, except on arm macOS (where the include path is non-standard), because generally, the Boost include path is generic, i.e `/usr/include`.

ACKs for top commit:
  hebasto:
    ACK b03a98291b

Tree-SHA512: 7544a903ce641fd4b994ae51423a7007de85628ae29be36362a5cbdd62f9b16ac0a62e9edadaaa998ad4c1e82c0fde0d8c53aba41f94ad30ffa9f10ba0984521
2023-02-08 17:09:40 +00:00
fanquake
b03a98291b
build: set boost cppflags with --enable-fuzz
Even though all other targets are disabled, we still need Boost CPPFLAGS
(use_boost) to compile. This currently works everywhere, except on arm
macOS (where the include path is pretty non-standard), because
generally, the Boost include path is generic, i.e `/usr/include`.
2023-02-08 16:10:34 +00:00
merge-script
07a23b4946
Merge bitcoin/bitcoin#26994: depends: define __BSD_VISIBLE for FreeBSD bdb build
0e02f72548 depends: define `__BSD_VISIBLE` for FreeBSD bdb build (fanquake)

Pull request description:

  Required for additional definitions (`IPC_R` & friends), to be available, when compiling under C11, which would otherwise cause compile fails.

  See: https://github.com/MarcoFalke/btc_nightly/pull/4.

ACKs for top commit:
  hebasto:
    ACK 0e02f72548, tested on FreeBSD 13.1:

Tree-SHA512: 885d4aa341d9668da360cf6dfafb97ce816803c54e76c0a06e448db39a723666d42cd14b3e713d17ecbe33163f5af69924567cf449d679a2db95b36357005d43
2023-02-08 16:37:09 +01:00
fanquake
7b850bc2a1
Merge bitcoin/bitcoin#27061: doc: Document affected gcc versions for -fstack-reuse=none workaround
fa83005a26 doc: Document affected gcc versions for -fstack-reuse=none workaround (MarcoFalke)

Pull request description:

  gcc version(s) 11 and prior won't be fixed, looking at the activity in the bug report. So it seems best to just document gcc 12.1+ as fixed, so that in the future the workaround can be removed once the minimum compiler is gcc12.1.

ACKs for top commit:
  fanquake:
    ACK fa83005a26
  hebasto:
    re-ACK fa83005a26

Tree-SHA512: a19723457eb1925196828a5fafd4e7f75a04f86ffae63cb86679d732c662fd1a22e17fe3c69195a97438ff189ba3ff681be3650cf99aa195d7a3e89cd8ee137c
2023-02-08 14:59:43 +00:00
Hennadii Stepanov
887bb53b67
ci: Use the latest Ubuntu LTS for "ARM64 Android APK" task 2023-02-08 14:15:13 +00:00
MarcoFalke
fa83005a26
doc: Document affected gcc versions for -fstack-reuse=none workaround 2023-02-08 13:06:11 +01:00
MarcoFalke
de1d189534
Merge bitcoin/bitcoin#27056: doc: use arch agnostic clang path in fuzzing doc (macOS)
b49e19ccd9 doc: use arch agnostic clang path in fuzzing doc (macOS) (fanquake)

Pull request description:

  The current path will only work for clang installed via brew on x86_64 macOS.

ACKs for top commit:
  hebasto:
    ACK b49e19ccd9, similar to 702836530f.

Tree-SHA512: 8ae4845e1953d5a7178f2b422e2241af1057d8cce1ab79da65df0cd068456dbf85da3489355f81fc4ee09ba602a4b53e989e2dc02476b4abf6c5b3bc3e96473b
2023-02-08 12:49:49 +01:00
MarcoFalke
51d51d3082
Merge bitcoin/bitcoin#26507: test: remove unused vars in feature_block
741c215b5f test: remove unused vars in `feature_block` (brunoerg)

Pull request description:

  There is no need to assign `self.next_block` to variables if we're not using its return value. Most cases touched here, we're reassigning it right after with the value from `self.update_block`.

Top commit has no ACKs.

Tree-SHA512: 25bbea2a09f38c3a3483fa363f024d2a8edd06a00cccc93cef99e489b9a3485d58bbd6a1ed2dddc00f1cebec7e63aed8ad95701a2645ce20a0db9b69573c20a7
2023-02-08 11:42:22 +01:00
fanquake
8d69b614cc
Merge bitcoin/bitcoin#23810: docs: avoid C-style casts; use modern C++ casts
75347236f2 docs: document c-style cast prohibition (Pasta)

Pull request description:

  In the words of practicalswift:
  ```
  A C-style cast is equivalent to try casting in the following order:

      const_cast(...)
      static_cast(...)
      const_cast(static_cast(...))
      reinterpret_cast(...)
      const_cast(reinterpret_cast(...))

  By using static_cast<T>(...) explicitly we avoid the possibility of an unintentional and
  dangerous reinterpret_cast. Furthermore static_cast<T>(...) allows for easier grepping of casts.

  For a more thorough discussion, see "ES.49: If you must use a cast, use a named cast"
  in the C++ Core Guidelines (Stroustrup & Sutter).
  ```

  Modern tooling, specifically `-Wold-style-cast` can enable us to enforce never using C-style casts. I believe this is especially important due to the number of C-style casts the codebase is currently being used as a reinterpret_cast. reinterpret_casts are especially dangerous, and should never be done via C-style casts.

  Update the docs to suggest the use of named cast or functional casts.

Top commit has no ACKs.

Tree-SHA512: 29a98de396f0c78e32d8a1831319162203c4405a670da5add5da956fcc7df200a1cec162ef1cfac4ddfb02714b66406081d40ed435c7f0f28581cfa24d94fac1
2023-02-08 10:36:43 +00:00
MarcoFalke
5fffff54e9
ci: Cache stuff in volumes, not host folders 2023-02-08 11:21:23 +01:00
fanquake
b49e19ccd9
doc: use arch agnostic clang path in fuzzing doc (macOS) 2023-02-08 09:45:04 +00:00
MarcoFalke
1bcabe6f2a
Merge bitcoin-core/gui#697: Remove reindex special case from the progress bar label
faff2ba4f8 Remove reindex special case from the progress bar label (MarcoFalke)

Pull request description:

  The user knows which option they passed to the program, so it seems overly verbose to offer the user feedback whether or not they passed `-reindex`. Treat it as `DISK`, like all other cases that are treated as `DISK`:

  * `-reindex-chainstate`
  * `-loadblock`

ACKs for top commit:
  john-moffett:
    Re-ACK faff2ba4f8
  hebasto:
    ACK faff2ba4f8, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 7f110c4beb1451d26f32da3a60150dac91c8a7b8d1c01749017204712b73cc1b77578af492930e4b6704097a73ed051f77bc39d8f60e0ff15a797a201805312e
2023-02-07 16:49:13 +01:00