Commit Graph

30181 Commits

Author SHA1 Message Date
John Newbery
37dcd12d53 scripted-diff: Rename recentRejects
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); }

ren recentRejects m_recent_rejects
-END VERIFY SCRIPT-
2021-07-20 13:14:32 +01:00
John Newbery
cd9902ac50 [net processing] Default initialize recentRejects
Now that recentRejects is owned by PeerManagerImpl, and
PeerManagerImpl's lifetime is managed by the node context, we can just
default initialize recentRejects during object initialization. We can
also remove the unique_ptr indirection.
2021-07-20 13:13:59 +01:00
John Newbery
a28bfd1d4c [net processing] Default initialize m_stale_tip_check_time 2021-07-20 13:12:42 +01:00
John Newbery
9190b01d8d [net processing] Add Orphanage empty consistency check
When removing the final peer, assert that m_tx_orphanage is empty.
2021-07-20 13:12:42 +01:00
Jon Atack
7b3a20b260
mempool: apply rule of 5 to epochguard.h, fix compiler warnings 2021-07-20 13:58:14 +02:00
John Newbery
65332b1178 [addrman] Remove RemoveInvalid()
Instead of deserializing addresses, placing them in the buckets, and
then removing them if they're invalid, check first and don't place in
the buckets if they're invalid.
2021-07-20 11:45:52 +01:00
fanquake
5c8820b399
Merge bitcoin/bitcoin#22436: build: use aarch64 Clang if cross-compiling for darwin on aarch64
54c7754f31 build: use aarch64 Clang if cross-compiling for darwin on aarch64 (fanquake)

Pull request description:

  If we're cross-compiling for darwin on aarch64 hardware, we need to
  use a Clang that will run on that hardware.

  Only tested in a Linux Docker container (aarch64-unknown-linux-gnu),
  running on an Apple M1 mac-mini (aarch64-apple-darwin20.5.0).

ACKs for top commit:
  hebasto:
    ACK 54c7754f31, I agree it can be merged (fix in #22448 is orthogonal to this one).

Tree-SHA512: 66c530097a5dc072a0a00dc22eb3d4a7d923dfa8ab8160f7c3e395cbe58da324f367548d673c0510606f5225d5d37bb5607a76b1703b8b03ac7d2cceeccbd542
2021-07-20 18:23:35 +08:00
João Barbosa
20edf4bcf6 rpc: Return block time in getblockchaininfo 2021-07-20 10:43:26 +01:00
Nelson Galdeman
179a051704
util: improves error messages on get_previous_releases script
If a requested version doesn't exist on our list of checksums it says it cannot do a checksum comparision instead of saying it did not match
2021-07-20 09:50:54 +01:00
fanquake
201c5e4aec
Merge bitcoin/bitcoin#22465: guix: Pin kernel-header version, time-machine to upstream 1.3.0 commit
e6a94d4446 guix: Bump to version-1.3.0 from upstream (Carl Dong)
90fd13b954 guix: Pin kernel header version (Carl Dong)

Pull request description:

  ```
  - Use 4.19 for riscv64 (earliest LTS release w/ riscv64 support)
  - Use 4.9 for all others (second-oldest LTS release, released in
    combination with glibc glibc 2.24 in Debian stretch)
  ```

  ```
  The chosen commit is the HEAD of Guix's version-1.3.0 branch as of July
  15th, 2021.

  Also fix visual indenting.
  ```

  -----

  This + the documentation PR should make our Guix system ready for release!

ACKs for top commit:
  MarcoFalke:
    review ACK e6a94d4446 to change to vanilla guix. Did not review the kernel change.
  laanwj:
    ACK e6a94d4446
  fanquake:
    ACK e6a94d4446

Tree-SHA512: a175e4ddb3ee786a39f5e800ce336932ad2f6797a3a28400a6f723875d0f19833fd36cedc41b3580e4604110517211bd9f557be36adf7265fd8e591c434ae032
2021-07-20 12:23:56 +08:00
fanquake
4fdd0ff9ee
Merge bitcoin/bitcoin#22199: macdeploy: minor fixups and simplifications
0a5723beea macdeploy: cleanup .temp.dmg if present (fanquake)
ecffe8689d macdeploy: remove qt4 related code (fanquake)
639f064253 macdeploy: select the plugins we need, rather than excluding those we don't (fanquake)
3d26b6b9e9 macdeploy: fix framework printing when passing -verbose (fanquake)
dca6c90329 macdeploy: remove unused plistlib import (fanquake)

Pull request description:

  This includes [one followup](https://github.com/bitcoin/bitcoin/pull/20422#discussion_r534207899) and [one bug fix](3d26b6b9e9) from #20422, as well as some simplifications to the `macdeployqtplus` code.

ACKs for top commit:
  hebasto:
    ACK 0a5723beea, tested on macOS Big Sur 11.4 (20F71, x86_64) + Homebrew's Qt 5.15.2.

Tree-SHA512: cfad9505eacd32fe3a9d06eb13b2de0b6d2cad7b17778e90b503501cbf922e53d4e7f7f74952d1aed58410bdae9b0bb3248098583ef5b85689cb27d4dc06c029
2021-07-20 11:39:47 +08:00
fanquake
e7441a6a45
Merge bitcoin/bitcoin#21711: guix: Add full installation and usage documentation
fac4814106 doc/release-process: Add torrent creation details (Carl Dong)
5d24cc3d82 guix/INSTALL: Guix installs init scripts in libdir (Carl Dong)
5da2ee49d5 guix/INSTALL: Add coreutils/inotify-dir-recreate troubleshooting (Carl Dong)
318c60700b guix: Adapt release-process.md to new Guix process (Carl Dong)
fcab35b229 guix-attest: Produce and sign normalized documents (Carl Dong)
c2541fd0ca guix: Overhaul README (Carl Dong)
46ce6ce378 tree-wide: Rename gitian-keys to builder-keys (Carl Dong)
fc4f8449f3 guix: Update various check_tools lists (Carl Dong)
263220a85c guix: Check for a sane services database (Carl Dong)

Pull request description:

  Based on: #21462

  Keeping the README in one file so that it's easy to search through. Will add more jumping links later so navigation is easier.

  Current TODOs:
  - [x] Shell installer option: prompt user to re-login for `/etc/profile.d` entry to be picked up
  - [x] Binary tarball option: prompt user to create `/etc/profile.d` entry and re-login
  - [x] Fanquake docker option: complete section
  - [x] Arch Linux AUR option: prompt to start `guix-daemon-latest` unit after finishing "optional setup" section
  - [x] Building from source option: Insert dependency tree diagram that I made
  - [x] Building from source option: redo sectioning, kind of a mess right now
  - [x] Optional setup: make clear which parts are only needed if building from source
  - [x] Workaround 1 for GnuTLS: perhaps mention how to remove Guix build farm's key
  - [x] Overall (after everything): Make the links work.

  Note to self: wherever possible, tell user how to check that something is true rather than branching by installation option.

ACKs for top commit:
  fanquake:
    ACK fac4814106 - going to go ahead and merge this now. It's a lot of documentation, and could probably be nit-picked / improved further, however, that can continue over the next few weeks. I'm sure more (backportable) improvements / clarifications will be made while we progress through RCs towards a new release.

Tree-SHA512: dc46c0ecdfc67c7c7743ca26e4a603eb3f54adbf81be2f4c1f4c20577ebb84b5250b9c9ec89c0e9860337ab1c7cff94d7963c603287267deecfe1cd987fa070a
2021-07-20 11:09:39 +08:00
fanquake
d542603c5a
Merge bitcoin/bitcoin#22502: scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue"
facd56750c scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue" (MarcoFalke)

Pull request description:

  No longer needed, as it wouldn't help to debug this issue. See https://github.com/bitcoin/bitcoin/pull/22472#issuecomment-882692900

ACKs for top commit:
  fanquake:
    ACK facd56750c

Tree-SHA512: 13352b3529c43d6e65ab127134b32158d3072dc2fbbb326fea9adfeada5a8610d0477ea75748b8b68e7abb3b9869a989df3a3169e92bdd458053d64bae6ed379
2021-07-20 10:46:56 +08:00
fanquake
624a193330
Merge bitcoin/bitcoin#22497: scripted-diff: remove ResetI2PPorts() (revert e0a2b390c1)
d4b67c8ebc scripted-diff: remove ResetI2PPorts() (revert e0a2b390c1) (Vasil Dimov)

Pull request description:

  `CAddrMan::ResetI2PPorts()` was temporary. Remove it:
  * it has partially achieved its goal: probably ran on about half of the
    I2P nodes
  * it is hackish, deemed risky and two bugs where found in it:
    https://github.com/bitcoin/bitcoin/issues/22467
    https://github.com/bitcoin/bitcoin/issues/22470

  -BEGIN VERIFY SCRIPT-
  git show e0a2b390c1 |git apply -R
  -END VERIFY SCRIPT-

  Fixes https://github.com/bitcoin/bitcoin/issues/22467
  Fixes https://github.com/bitcoin/bitcoin/issues/22470

ACKs for top commit:
  laanwj:
    ACK d4b67c8ebc
  MarcoFalke:
    review ACK d4b67c8ebc 😲
  jonatack:
    ACK d4b67c8ebc per IRC discussions https://www.erisian.com.au/bitcoin-core-dev/log-2021-07-16.html#l-212 and https://www.erisian.com.au/bitcoin-core-dev/log-2021-07-19.html#l-210

Tree-SHA512: 60d8f0ea0f66a8fcedfcb9c8944a419b974b15509b54ddfeec58db49ae9418e6916df712bba3fbd6b29497d85f7951fb9aa2e48eb9c59f88d09435685bd00b4c
2021-07-20 09:02:34 +08:00
Carl Dong
fac4814106 doc/release-process: Add torrent creation details
Source: https://github.com/bitcoin/bitcoin/pull/21711#discussion_r668754244
2021-07-19 18:24:36 -04:00
Carl Dong
5d24cc3d82 guix/INSTALL: Guix installs init scripts in libdir 2021-07-19 18:24:36 -04:00
Carl Dong
5da2ee49d5 guix/INSTALL: Add coreutils/inotify-dir-recreate troubleshooting 2021-07-19 18:24:36 -04:00
Carl Dong
318c60700b guix: Adapt release-process.md to new Guix process
Also, clean up release-process.md
2021-07-19 18:24:36 -04:00
Carl Dong
fcab35b229 guix-attest: Produce and sign normalized documents
That way we can easily combine the document and detached signature to
produce cleartext signature files for upload during the release process.

See subsequent commits which modify doc/release-process.md for more
details.
2021-07-19 18:24:36 -04:00
Carl Dong
c2541fd0ca guix: Overhaul README
- Added detailed Guix bootstrap/installation instructions
2021-07-19 18:24:36 -04:00
MarcoFalke
facd56750c
scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue"
-BEGIN VERIFY SCRIPT-
git show faf1af58f8 | git apply --reverse
-END VERIFY SCRIPT-
2021-07-19 19:12:54 +02:00
Andrew Chow
9b85a5e2f7 tests: Test for dumpwallet lock order issue
Adds a test for the condition which can trigger a lock order assertion.
Specifically, there must be an unconfirmed transaction in the mempool
which belongs to the wallet being loaded. This will establish the order
of cs_wallet -> cs_main -> cs_KeyStore. Then dumpwallet is called on
that wallet. Previously, this would have used a lock order of cs_wallet
-> cs_KeyStore -> cs_main, but this should be fixed now. The test
ensures that.
2021-07-19 12:25:11 -04:00
Andrew Chow
25d99e6511 Reorder dumpwallet so that cs_main functions go first
DEBUG_LOCKORDER expects cs_wallet, cs_main, and cs_KeyStore to be
acquired in that order. However dumpwallet would take these in the order
cs_wallet, cs_KeyStore, cs_main. So when configured with
`--enable-debug`, it is possible to hit the lock order assertion when
using dumpwallet.

To fix this, cs_wallet and cs_KeyStore are no longer locked at the same
time. Instead cs_wallet will be locked first. Then the functions which
lock cs_main will be run. Lastly cs_KeyStore will be locked afterwards.
This avoids the lock order issue.

Furthermore, since GetKeyBirthTimes (only used by dumpwallet) also uses
a function that locks cs_main, and itself also locks cs_KeyStore, the
same reordering is done here.
2021-07-19 12:25:11 -04:00
MarcoFalke
aaaa9c6019
fuzz: Extend addrman fuzz test with deserialize 2021-07-19 18:18:24 +02:00
Sriram
eeddd1c8fa Update assumed chain params
Note: 10% overhead to the base value of `mainnet` in `m_assumed_blockchain_size`
2021-07-19 19:34:30 +05:30
Vasil Dimov
d4b67c8ebc
scripted-diff: remove ResetI2PPorts() (revert e0a2b390c1)
`CAddrMan::ResetI2PPorts()` was temporary. Remove it:
* it has partially achieved its goal: probably ran on about half of the
  I2P nodes
* it is hackish, deemed risky and two bugs where found in it
  https://github.com/bitcoin/bitcoin/issues/22467
  https://github.com/bitcoin/bitcoin/issues/22470

-BEGIN VERIFY SCRIPT-
git show e0a2b390c1 |git apply -R
-END VERIFY SCRIPT-

Fixes https://github.com/bitcoin/bitcoin/issues/22467
Fixes https://github.com/bitcoin/bitcoin/issues/22470
2021-07-19 14:33:21 +02:00
MarcoFalke
54e31742d2
Merge bitcoin/bitcoin#22455: addrman: detect on-disk corrupted nNew and nTried during unserialization
816f29eab2 addrman: detect on-disk corrupted nNew and nTried during unserialization (Vasil Dimov)

Pull request description:

  Negative `nNew` or `nTried` are not possible during normal operation.
  So, if we read such values during unserialize, report addrman
  corruption.

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

ACKs for top commit:
  MarcoFalke:
    cr ACK 816f29eab2
  jonatack:
    ACK 816f29eab2
  lsilva01:
    Code Review ACK 816f29eab2.  This change provides a more accurate description of the error.

Tree-SHA512: 01bdd72d2d86a0ef770a319fee995fd1e147b24a8db84ddb8cd121688e7f94fed73fddc0084758e7183c4f8d08e971f0b1b224f5adb10928a5aa4dbbc8709d74
2021-07-19 14:25:53 +02:00
W. J. van der Laan
d3474b8df2
Merge bitcoin/bitcoin#22387: Rate limit the processing of rumoured addresses
a4bcd687c9 Improve tests using statistics (John Newbery)
f424d601e1 Add logging and addr rate limiting statistics (Pieter Wuille)
b4ece8a1cd Functional tests for addr rate limiting (Pieter Wuille)
5648138f59 Randomize the order of addr processing (Pieter Wuille)
0d64b8f709 Rate limit the processing of incoming addr messages (Pieter Wuille)

Pull request description:

  The rate at which IP addresses are rumoured (through ADDR and ADDRV2 messages) on the network seems to vary from 0 for some non-participating nodes, to 0.005-0.025 addr/s for recent Bitcoin Core nodes. However, the current codebase will happily accept and process an effectively unbounded rate from attackers. There are measures to limit the influence attackers can have on the addrman database (bucket restrictions based on source IPs), but still - there is no need to permit them to feed us addresses at a rate that's orders of magnitude larger than what is common on the network today, especially as it will cause us to spam our peers too.

  This PR implements a [token bucket](https://en.wikipedia.org/wiki/Token_bucket) based rate limiter, allowing an average of 0.1 addr/s per connection, with bursts up to 1000 addresses at once. Whitelisted peers as well as responses to GETADDR requests are exempt from the limit. New connections start with 1 token, so as to not interfere with the common practice of peers' self-announcement.

ACKs for top commit:
  laanwj:
    ACK a4bcd687c9
  vasild:
    ACK a4bcd687c9
  jnewbery:
    ACK a4bcd687c9
  jonatack:
    ACK a4bcd687c9

Tree-SHA512: b757de76ad78a53035b622944c4213b29b3b55d3d98bf23585afa84bfba10808299d858649f92269a16abfa75eb4366ea047eae3216f7e2f6d3c455782a16bea
2021-07-19 12:42:07 +02:00
sanket1729
007910388b [Refactor] Rename scriptPubKey -> exec_script
Rename misleading scriptPubKey in ExecuteWitnessScript() function to
correctly relfect what is being executed.
2021-07-19 03:16:00 -07:00
Hennadii Stepanov
acaac6e86a
ci: Bump Android NDK to r22 which supports std::filesystem 2021-07-18 12:10:28 +03:00
Hennadii Stepanov
cac7890386
build: Add support for Android NDK r22+ 2021-07-18 12:10:01 +03:00
Samuel Dobson
e8f85e0e86
Merge bitcoin/bitcoin#22421: Make IsSegWitOutput return true for taproot outputs
8465978f23 Make IsSegWitOutput return true for taproot outputs (Pieter Wuille)

Pull request description:

  This fixes a bug: currently `utxoupdatepsbt` will not fill in UTXO data for PSBTs spending taproot outputs.

ACKs for top commit:
  achow101:
    Code Review ACK 8465978f23
  jonatack:
    ACK 8465978f23
  meshcollider:
    utACK 8465978f23

Tree-SHA512: 2f8f873450bef4b5a4ce5962a231297b386c6b1445e69ce5f36ab28eca7343be3a11bc09c38534b0f75e6f99ba15d78d3ba5d484f6c63e5a9775e1f3f55a74e0
2021-07-18 20:07:52 +12:00
MarcoFalke
0eea1dfe80
Merge bitcoin/bitcoin#22445: fuzz: Move implementations of non-template fuzz helpers from util.h to util.cpp
a2aca207b1 Move implementations of non-template fuzz helpers (Sriram)

Pull request description:

  There are 78 cpp files that include `util.h` (`grep -iIr "#include <test/fuzz/util.h>" src/test/fuzz | wc -l`). Modifying the implementation of a fuzz helper in `src/test/fuzz/util.h` will cause all fuzz tests to be recompiled. Keeping the declarations of these non-template fuzz helpers in `util.h` and moving their implementations to `util.cpp` will skip the redundant recompilation of all the fuzz tests, and builds these helpers only once in `util.cpp`.

  Functions moved from `util.h` to `util.cpp`:
  - `ConsumeTxMemPoolEntry`
  - `ContainsSpentInput`
  - `ConsumeNetAddr`
  - Methods of `FuzzedFileProvider::(open, read, write, seek, close)`

ACKs for top commit:
  MarcoFalke:
    review ACK a2aca207b1 🍂

Tree-SHA512: e7037ebb86d0fc56048e4f3d8733eefc21da11683b09d2b22926bda410719628d89c52ddd9b4c18aa243607a66fdb4d13a63e62ca010e66b3ec9174fd18107f0
2021-07-18 09:46:06 +02:00
Samuel Dobson
5341c3b1b3
Merge bitcoin/bitcoin#22461: wallet: Change ScriptPubKeyMan::Upgrade default to True
5012a7912e Test that descriptor wallet upgrade does nothing (Andrew Chow)
48bd7d3b77 Change ScriptPubKeyMan::Upgrade to default to return true (Andrew Chow)

Pull request description:

  When adding a new ScriptPubKeyMan, it's likely that there will be nothing for `Upgrade` to do. If it is called (via `upgradewallet`), then it should do nothing, successfully. This PR changes the default `ScriptPubKeyMan::Upgrade` function so that it returns a success instead of failure when doing nothing.

  Fixes #22460

ACKs for top commit:
  jonatack:
    ACK 5012a7912e
  meshcollider:
    utACK 5012a7912e

Tree-SHA512: 578c6521e997f7bb5cc44be2cfe9e0a760b6bd4aa301026a6b8b3282e8757473e4cb9f68b2e79dacdc2b42dddae718450072e0a38817df205dfea177a74d7f3d
2021-07-18 19:33:10 +12:00
fanquake
4371e635d6
Merge bitcoin/bitcoin#22410: Avoid GCC 7.1 ABI change warning in guix build
1edddf5de4 Avoid GCC 7.1 ABI change warning in guix build (Pieter Wuille)

Pull request description:

  The arm-linux-gnueabihf guix build output is littered with warnings like:

  ```
  /gnu/store/7a96hdqdb2qi8a39f09n84xjy2hr23rs-gcc-cross-arm-linux-gnueabihf-8.4.0/include/c++/bits/stl_vector.h:1085:4: note:
                   parameter passing for argument of type '__gnu_cxx::__normal_iterator<CRecipient*, std::vector<CRecipient> >' changed in GCC 7.1
  ```

  These are irrelevant for us. Disable them using `-Wno-psabi`.

ACKs for top commit:
  laanwj:
    ACK 1edddf5de4
  hebasto:
    ACK 1edddf5de4, after thorough reading related materials, I agree this change can be merged. As I mentioned above, I have been compiling my arm-32bit binaries with `-Wno-psabi` flag for two years, and no related flaws were observed.

Tree-SHA512: 485c7500547ac5da567ad23847341c18ff832607f5a1002676404cc647e437cf3445b6894ecff5b52929ca52bea946c06bd90eace1997c895e56204e787065e4
2021-07-18 14:33:22 +08:00
fanquake
4315dc02a1
Merge bitcoin/bitcoin#20641: depends: Use Qt top-level build facilities
1155978d8f build, qt: Do not install *.prl files (Hennadii Stepanov)
763793b60e build, qt: Fix wrong cross-compiling detection on macOS (Hennadii Stepanov)
30982721ab build, qt: Force bootstrap while building linguist tools (Hennadii Stepanov)
689320e307 build, qt: Drop translations.pro hack (Hennadii Stepanov)
6a1f98f253 build, qt: Drop lrelease dependency patch (Hennadii Stepanov)
39e561e087 build, qt: Add linguist_tools list (Hennadii Stepanov)
27d3def1c6 build: Use Qt top-level build facilities (Hennadii Stepanov)

Pull request description:

  This PR:
  - uses Qt top-level build facilities without the need to download all-in-one archive
  - is based on **BlockMechanic**'s [idea](https://github.com/bitcoin/bitcoin/pull/20600), and is an alternative to #20600
  - makes it easy to integrate [new modules](https://github.com/bitcoin/bitcoin/pull/16883) into static builds
  - has the minimal diff
  - makes the qt package build process streamlined by dropping some patches and hacks (an alternative to  #21420 and #20642)

  Fixes #18536 (a non-intrusive alternative to #21589 and #19785).

  Fixes #14648.

  Fixes #21588 (a non-intrusive alternative to #21591).

  Required for adding [Wayland support](https://github.com/bitcoin/bitcoin/issues/19950) on Linux.

  ---

  **Note for reviewers**: With 9046de8a4cbc3899fed9eae084115f423e7ac5bd from #21995 it is easy to verify that there are no changes in the resulted `qt` package archive on the per commit basis. For example, for `HOST=i686-pc-linux-gnu` no commit in this PR introduces any changes.

ACKs for top commit:
  fanquake:
    ACK 1155978d8f

Tree-SHA512: 667b06b72cb7ff26d68b9b88e8dddb51084783ca9e3d80b3392710794c1dc7fd77bbcc3ccf4ccece9919d33b9bf8fce13c5059502bd228021dc7c93fdb87ca7a
2021-07-18 14:05:39 +08:00
fanquake
b5889611c7
Merge bitcoin/bitcoin#22234: build: Mark print-% target as phony.
fb7be92b09 Mark print-% target as phony. (Dmitry Goncharov)

Pull request description:

  .PHONY does not take patterns (such as print-%) as prerequisites.
  Have print-% depend on force and mark force as phony.

  This change ensures print-% rule works even when there is a file that matches the target.

  ```
  $ # on master
  $ make print-host
  host=x86_64-pc-linux-gnu
  $ touch print-host
  $ make print-host
  make: 'print-host' is up to date.
  $
  $ git co mark_print_as_phony
  Switched to branch 'mark_print_as_phony'
  $ make print-host
  host=x86_64-pc-linux-gnu
  $ touch force
  $ make print-host
  host=x86_64-pc-linux-gnu
  ```

ACKs for top commit:
  hebasto:
    ACK fb7be92b09, tested on Linux Mint 20.2 (x86_64).

Tree-SHA512: b89ae66aa8c7aa6a7ab5f0956f9eb3b3ef9d56994b60dc2a97d498d4c1bba537845c190723e8a10310280b1b35df2cd935cc30aeb76735cac2dc621ad7823772
2021-07-18 13:41:24 +08:00
fanquake
6baabc4d1d
Merge bitcoin/bitcoin#21430: build: Add -Werror=implicit-fallthrough compile flag
3c4c8e79ba build: Add -Werror=implicit-fallthrough compile flag (Hennadii Stepanov)
014110c47d Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 3c4c8e79ba - looks ok to me now. Checked that warnings occur in our code & leveldb by removing a `[[fallthrough]]` or `FALLTHROUGH_INTENDED`.
  jarolrod:
    ACK 3c4c8e79ba
  theStack:
    ACK 3c4c8e79ba

Tree-SHA512: 4dce91f0f26b8a3de09bd92bb3d7e1995e078e3a8b3ff861c4fbf6c0b32b2327d063633b07b89c4aa94a1141d7f78d46d9d43ab8df865273e342693ad30645b6
2021-07-18 11:06:10 +08:00
Andrew Chow
5012a7912e Test that descriptor wallet upgrade does nothing 2021-07-16 15:34:56 -04:00
MarcoFalke
f8b20fd35b
Merge bitcoin/bitcoin#22464: bench: fix 32-bit narrowing warning in bench/peer_eviction.cpp
e49d50cf40 bench: fix 32-bit narrowing warning in bench/peer_eviction.cpp (Jon Atack)

Pull request description:

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

ACKs for top commit:
  hebasto:
    ACK e49d50cf40, tested on Debian 10.10 (i386):

Tree-SHA512: 8ca366fc296c633dbc8b8e0e7d80f4f6a64d02fb3da86d199881364f027d34b816a3c964b3fea2c1cc0b3ad51dd02d93c8bb14b5ebbd99fb4073cd1031766332
2021-07-16 08:04:43 +02:00
Carl Dong
e6a94d4446 guix: Bump to version-1.3.0 from upstream
The chosen commit is the HEAD of Guix's version-1.3.0 branch as of July
15th, 2021.

Also fix visual indenting.
2021-07-15 21:50:48 -04:00
Carl Dong
90fd13b954 guix: Pin kernel header version
- Use 4.19 for riscv64 (earliest LTS release w/ riscv64 support)
- Use 4.9 for all others (second-oldest LTS release, released in
  combination with glibc glibc 2.24 in Debian stretch)
2021-07-15 21:47:57 -04:00
Pieter Wuille
8465978f23 Make IsSegWitOutput return true for taproot outputs 2021-07-15 17:08:52 -07:00
John Newbery
a4bcd687c9 Improve tests using statistics 2021-07-15 16:31:47 -07:00
Sebastian Falbesoner
a006d7d730 test: add logging to wallet_listtransactions
Co-authored-by: Jon Atack <jon@atack.com>
2021-07-16 01:15:49 +02:00
Sebastian Falbesoner
47915b1187 test: remove unneeded/redundant code in wallet_listtransactions
-> remove unneeded get-out-of IBD generate()
(The test framework already sets up the nodes to be out of IBD
 in setup_nodes(), if setup_clean_chain is not set to True)

-> remove duplicate code line assigning an utxo
2021-07-16 01:15:48 +02:00
Sebastian Falbesoner
fb6c6a7938 test: speedup wallet_listtransactions by whitelisting peers (immediate tx relay)
By whitelisting the peers via -whitelist, the inventory is transmissioned
immediately rather than on average every 5 seconds, speeding up the test by at
least a factor of two:

before:
$ time ./wallet_listtransactions.py
...
0m40.25s real     0m01.74s user     0m01.70s system

with this PR:
$ time ./wallet_listtransactions.py
...
0m14.93s real     0m01.68s user     0m01.87s system

This commit also moves the wallet_listtransactions tests into the < 30s group.
2021-07-16 01:15:45 +02:00
Jon Atack
e49d50cf40
bench: fix 32-bit narrowing warning in bench/peer_eviction.cpp 2021-07-15 23:05:10 +02:00
Pieter Wuille
f424d601e1 Add logging and addr rate limiting statistics
Includes logging improvements by Vasil Dimov and John Newbery.
2021-07-15 13:03:20 -07:00
Pieter Wuille
b4ece8a1cd Functional tests for addr rate limiting 2021-07-15 13:03:17 -07:00