Commit graph

32024 commits

Author SHA1 Message Date
MarcoFalke
20aea4945d
Merge bitcoin/bitcoin#23797: ci: Use Cirrus "greedy" flag to use idle CPU time when available
cfeb1942bc ci: Use Cirrus "greedy" flag to use idle CPU time when available (Luke Dashjr)

Pull request description:

  Disabled for MSan to avoid excessive RAM usage

Top commit has no ACKs.

Tree-SHA512: 4351d477b8749b3578a1f808ba7e963a44e0a4a1b695605b473ab3cf424d75ade6e13e7401a39675843e7c9b48a3e46936909d6bcc4af1f7abe1b690fe5b7a55
2021-12-20 12:02:20 +01:00
MarcoFalke
3ec8f9f123
Merge bitcoin/bitcoin#23801: Refactor: Change time variable type from int64_t to std::chrono::seconds in net_processing.cpp
92082ea0bb Change time variable type to std::chrono::seconds in src/net_processing.cpp (Shashwat)

Pull request description:

  - This is a follow-up to PR #23758
  - This changes the remaining time variable in `net_processing.cpp` from **int64_t** to **std::chrono::seconds**

ACKs for top commit:
  naumenkogs:
    ACK 92082ea0bb
  hebasto:
    re-ACK 92082ea0bb

Tree-SHA512: 559e351d9046d4ba2b842ae38da13b4befc7feee71f0762f97907812471e2840b0d43c90c92222d15619fe40cc21f11d40900500ca07b470f7ac8b0046cc1d68
2021-12-20 11:48:54 +01:00
MarcoFalke
23afc5f47b
Merge bitcoin/bitcoin#23711: docs: RBF policy and mempool limit exemptions
82858bab64 [doc] CPFP carve out and single-conflict RBF exemption (glozow)
1fd49eb498 [doc] clarify RBF difference from BIP125 (glozow)
919ae8b8cd [doc] current rbf policy (glozow)

Pull request description:

  Since RBF was first implemented and BIP125 was written, our code has changed, people have highlighted implementation differences, and some people have proposed further changes to it. Many people seem to support the idea of documenting our _current_ RBF policy as it stands today.

  As the ancestor/descendant limit carve-out exemptions are very related to RBF, it seemed appropriate to group them with this PR.

  Related to #22806 - it seems that these policies are the most confusing for people, or at least the most documentation-requested.

ACKs for top commit:
  dunxen:
    ACK 82858ba
  t-bast:
    ACK 82858bab64, thanks @glozow!
  darosior:
    re-ACK 82858bab64
  ariard:
    ACK 82858ba

Tree-SHA512: 5d296537cce3488c18179c0aa76c739ca02fdc424e5aa17129b4cdd0d057358f86bcc1e92a9857bd2c60495f834fe9d9406d1a9f8ac5cfc8f0f4f4c27ec4f8e1
2021-12-20 10:06:59 +01:00
MarcoFalke
d1dc6b895f
Merge bitcoin/bitcoin#23780: refactor, test: update addrman_tests.cpp to use output from AddrMan::Good()
bf4f817135 refactor: addrman_select test (josibake)
5a64dc018c refactor: addrman_evictionworks test (josibake)
e281fccd8a refactor: addrman_noevict test (josibake)
8bdd9240d4 refactor: addrman_selecttriedcollisions test (josibake)

Pull request description:

  As a follow-up to #23713 , this PR refactors the remaining tests in `src/tests/addrman_tests.cpp` to use the output from `AddrMan::Good()` where appropriate.

ACKs for top commit:
  naumenkogs:
    ACK bf4f817135
  mzumsande:
    Code Review ACK bf4f817135

Tree-SHA512: 93cc127aecff42c1c174daa04911af7e3460a5c40ddf96952fe4a6ab86fa1ff22d66724326abb709008d7f9f79c26c55c6d62753c40059c9ac60f869507ec913
2021-12-20 09:20:34 +01:00
MarcoFalke
1c41fb9181
Merge bitcoin/bitcoin#23812: test: fix intermittent failures in p2p_timeouts.py
0a1b6fa5a1 test: fix intermittent timeouts in p2p_timeouts.py (Martin Zumsande)

Pull request description:

  Fixes  #23800 by making sure that all peers are connected (i.e. `m_connected` is set) before the mocktime is bumped.
  We can't wait for verack here, but we can wait for a debug log entry ("Added connection peer=2") instead.

  In the failed CI runs (e.g. https://cirrus-ci.com/task/5600553806856192?logs=ci#L7469)  different peers were added at different mocktimes.

ACKs for top commit:
  naumenkogs:
    ACK 0a1b6fa5a1
  theStack:
    Concept and approach ACK 0a1b6fa5a1

Tree-SHA512: 1a3c8a9a79339d4adc6ecb1731eb0d0eadb2e5024ad3c6779b4696691f85d6c3304ef8689746d0332150a4cf04489ca4b2ff3eeb0bb76feec28c1e4bb9dbca19
2021-12-20 09:13:20 +01:00
MarcoFalke
70d6a09f5c
Merge bitcoin/bitcoin#17631: Expose block filters over REST
2b64fa3251 Update REST docs with new accessors (Matt Corallo)
ef7c8228fd Expose block filters over REST. (Matt Corallo)

Pull request description:

  This adds a new rest endpoint:
  /rest/blockfilter/filtertype/requesttype/blockhash (eg
  /rest/blockfilter/basic/header/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.hex)
  which exposes either the filter "header" or the filter data itself.
  Most of the code is cribbed from the equivalent RPC.

  You can test it at 000000005b.hex

ACKs for top commit:
  dergoegge:
    ACK 2b64fa3251 - Adding blockfilters to the REST interface is analogous to serving other public data such as transactions or blocks.

Tree-SHA512: d487bc694266375c94d6fcf2e9d788a8a42a3b94e8d3290e46335a64cbcde55084ce5ea6119b79a4065888d94d7c3ae25a59a901fa46e3711f0eb296add12696
2021-12-20 09:00:34 +01:00
fanquake
8eeb4e997b
Merge bitcoin/bitcoin#23798: contrib: add achow101 to trusted keys
33b511251a contrib: add achow101 to trusted keys (Andrew Chow)

Pull request description:

  For maintaining the wallet and psbt things

ACKs for top commit:
  glozow:
    concept ACK 33b511251a
  michaelfolkson:
    ACK 33b511251a
  kiminuo:
    ACK 33b511251a
  jb55:
    ACK 33b511251a
  gruve-p:
    ACK 33b511251a
  prayank23:
    ACK 33b511251a
  meshcollider:
    ACK 33b511251a
  darosior:
    Concept ACK 33b511251a
  shaavan:
    ACK 33b511251a
  benthecarman:
    ACK 33b511251a
  hebasto:
    ACK 33b511251a
  Zero-1729:
    ACK 33b511251a

Tree-SHA512: 2e242b5f763a3d9fab00413760973a41a41c78f327f4a8f7bed788d6dd9f31043a644ff5f612ff033f8a3c7b4e9936737475fec67536935257053a9f6a3fb9bb
2021-12-20 14:57:49 +08:00
Shashwat
92082ea0bb Change time variable type to std::chrono::seconds in src/net_processing.cpp
- This commit is a followup to commit: 60b579
- This changes the remaining time variable in net_processing.cpp from
int64_t to std::chrono
2021-12-20 11:32:37 +05:30
fanquake
d05be150ca
Merge bitcoin/bitcoin#23811: scripts: match on EXE_FORMATS rather than name string
d1711a40b3 scripts: match on exe type over str in symbol-check.py (fanquake)
feee308401 scripts: match on exe type over str in security-check.py (fanquake)

Pull request description:

  This is a minor change, but matching on the `EXE_FORMAT` is slightly simpler and more robust, and this reduces the diff for a future change I plan on making.

  Guix build:
  ```bash
  ba2e4f2ff66206cc793483977386016ffd8c018c553f76e3a432ffdf7d33cc00  guix-build-d1711a40b30a/output/aarch64-linux-gnu/SHA256SUMS.part
  296feb453c6b3f6a24ef45ccabe6e35b4b6728f8dab34493d76debd0cf38cb70  guix-build-d1711a40b30a/output/aarch64-linux-gnu/bitcoin-d1711a40b30a-aarch64-linux-gnu-debug.tar.gz
  319ce7e2178c479e0e065593e903c1696d38504b69bc0a7cca45a0aeccbb83dc  guix-build-d1711a40b30a/output/aarch64-linux-gnu/bitcoin-d1711a40b30a-aarch64-linux-gnu.tar.gz
  7e961a14ace0523303e6a381f2d59aac1072cb68517a205cce704c5f324c97fa  guix-build-d1711a40b30a/output/arm-linux-gnueabihf/SHA256SUMS.part
  7cb96340ccd7911114e84aba731b7924500aa18731e6a10e4750898c523052a5  guix-build-d1711a40b30a/output/arm-linux-gnueabihf/bitcoin-d1711a40b30a-arm-linux-gnueabihf-debug.tar.gz
  8c5858498054753363a14a57447b77c9c3ad4b8a5584fa3ff9e96b58c358008f  guix-build-d1711a40b30a/output/arm-linux-gnueabihf/bitcoin-d1711a40b30a-arm-linux-gnueabihf.tar.gz
  10299105a0011df9d5ec5ff0af500b902d1d16617c1f620f7836a255e6ecf155  guix-build-d1711a40b30a/output/dist-archive/bitcoin-d1711a40b30a.tar.gz
  3115d3e51c50e1c41374544be76386684f6bc3a3ad3bce8fa47ad953950d1f6f  guix-build-d1711a40b30a/output/powerpc64-linux-gnu/SHA256SUMS.part
  e1ac147d026323f486a702872cd05e96c1dfa6dc052512e80e01a9a6b9957aac  guix-build-d1711a40b30a/output/powerpc64-linux-gnu/bitcoin-d1711a40b30a-powerpc64-linux-gnu-debug.tar.gz
  6f793fe6218754d78f3353644cc34d8caa1aff5d3ffd4b2fd3f3c2d5547c50b1  guix-build-d1711a40b30a/output/powerpc64-linux-gnu/bitcoin-d1711a40b30a-powerpc64-linux-gnu.tar.gz
  44b5e75dc090ba409fb426d41aa546e14c280a0f89038cbef483ffa26644703c  guix-build-d1711a40b30a/output/powerpc64le-linux-gnu/SHA256SUMS.part
  cdebf42e32efab57ce82bb431db0666e5df539d65bf2936cb9e766d4b903126a  guix-build-d1711a40b30a/output/powerpc64le-linux-gnu/bitcoin-d1711a40b30a-powerpc64le-linux-gnu-debug.tar.gz
  2646ec19f145ef302f75f5d5aa0b565573077e474dfa9e0650fb3da61b97d102  guix-build-d1711a40b30a/output/powerpc64le-linux-gnu/bitcoin-d1711a40b30a-powerpc64le-linux-gnu.tar.gz
  2b45352095a32f058fe55358a875a8b43bc76daeb834f42346a01e0e5aec4e95  guix-build-d1711a40b30a/output/riscv64-linux-gnu/SHA256SUMS.part
  11119508a14f75af5d3eb47e7be059dc171691a5d6e6aefd2ab89cc57bdebce9  guix-build-d1711a40b30a/output/riscv64-linux-gnu/bitcoin-d1711a40b30a-riscv64-linux-gnu-debug.tar.gz
  7f834a91e2cb2c114101f1dd030dde56591bad42ca94cb25e33251a24aa05976  guix-build-d1711a40b30a/output/riscv64-linux-gnu/bitcoin-d1711a40b30a-riscv64-linux-gnu.tar.gz
  26c36170daaa91187367a1137ed5cce6707a20dbea7d4a18fcf6c69e3201a50a  guix-build-d1711a40b30a/output/x86_64-apple-darwin/SHA256SUMS.part
  9cbe875de7fa98684682786da66a10ee9bdf111f51cd01174355b2de0cff69e6  guix-build-d1711a40b30a/output/x86_64-apple-darwin/bitcoin-d1711a40b30a-osx-unsigned.dmg
  83fe4ebe0d9a23b55c990f9587af78cf54a9323e4f809f354945cff234889164  guix-build-d1711a40b30a/output/x86_64-apple-darwin/bitcoin-d1711a40b30a-osx-unsigned.tar.gz
  68b03467521d678cf7c6b4ae95eb13685b5684492106c5fa98a6243e21b51433  guix-build-d1711a40b30a/output/x86_64-apple-darwin/bitcoin-d1711a40b30a-osx64.tar.gz
  52b85be0df8c041ea280833ba1f6ead15bff57f8f7d96e0660756c5d22676893  guix-build-d1711a40b30a/output/x86_64-linux-gnu/SHA256SUMS.part
  df43b04f4cb720996dc3d6006d8d7cf19123806b5168429e2c63012763122a4a  guix-build-d1711a40b30a/output/x86_64-linux-gnu/bitcoin-d1711a40b30a-x86_64-linux-gnu-debug.tar.gz
  ccdecd3b22c70fd1f7efef9a42ba22e1fa7d28d5adc4235587b77a7d98373a73  guix-build-d1711a40b30a/output/x86_64-linux-gnu/bitcoin-d1711a40b30a-x86_64-linux-gnu.tar.gz
  b1a80c07945cbfc768981ecbb35646d84fde8fa9ea7d68b1024fe0602224c007  guix-build-d1711a40b30a/output/x86_64-w64-mingw32/SHA256SUMS.part
  c7888791485e5ee37e987aa516b7c1d5cb3d39d77eed5a75110be164e2da81bc  guix-build-d1711a40b30a/output/x86_64-w64-mingw32/bitcoin-d1711a40b30a-win-unsigned.tar.gz
  650d3544cfea1a76967a8ddcc77340245280d0a07045bfaef01e65f579a33d68  guix-build-d1711a40b30a/output/x86_64-w64-mingw32/bitcoin-d1711a40b30a-win64-debug.zip
  2f068168a9261517f8be577fc78f13bc11bb6bb018b9bb949707043016cdf526  guix-build-d1711a40b30a/output/x86_64-w64-mingw32/bitcoin-d1711a40b30a-win64-setup-unsigned.exe
  f8776caf9c363a680589b50397f5aa2d57378cbf8dd49d4574e1ea636fe5ebbe  guix-build-d1711a40b30a/output/x86_64-w64-mingw32/bitcoin-d1711a40b30a-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Code review ACK d1711a40b3
  hebasto:
    ACK d1711a40b3, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 507950df63924dcc33a2d320f1c55ccda618ffbedfd614843d9c0278f3d2eb93646216040f710ad824bf2adf3fb71d00d7ef098ad5574f40f7b90e05c9431ea4
2021-12-19 10:35:18 +08:00
Luke Dashjr
cfeb1942bc ci: Use Cirrus "greedy" flag to use idle CPU time when available
MAKEJOBS limited for MSan to avoid excessive RAM usage
2021-12-18 17:32:25 +00:00
W. J. van der Laan
c006ab29ce
Merge bitcoin/bitcoin#23219: p2p, refactor: tidy up LookupSubNet()
c44c20108f p2p, refactor: drop unused DNSLookupFn param in LookupSubnet() (Vasil Dimov)
f0c9e68080 p2p, refactor: tidy up LookupSubNet() (Jon Atack)

Pull request description:

  This pull originally resolved a code `TO-DO`, as well as fixing different param names between the function declaration and definition, updating the function to current style standards, clearer variable naming, and improving the Doxygen documentation.

  Following the merge of #17160, it now does the non-`TODO` changes and also now drops an unused param to simplify the function.

ACKs for top commit:
  dunxen:
    ACK c44c201
  vasild:
    ACK c44c20108f
  shaavan:
    crACK c44c20108f

Tree-SHA512: 55f64c7f403819dec84f4da06e63db50f7c0601a2d9a1ec196fda667c220ec6f5ad2a3c95e0e02275da9f6da6b984275d1dc10e19ed82005c5e13da5c5ecab02
2021-12-18 15:56:24 +01:00
MarcoFalke
cb27d60f96
Merge bitcoin/bitcoin#23814: ci: Bump the macOS image to the latest Monterey
34fd25eaf0 ci: Use system sqlite in native macOS task (Hennadii Stepanov)
836d02722c ci: Bump the macOS image to the latest Monterey (Hennadii Stepanov)

Pull request description:

  We usually follow the latest available macOS image.

ACKs for top commit:
  Zero-1729:
    Light crACK 34fd25eaf0

Tree-SHA512: 8af8483fab38b20bda60c0b0778fafa50d3aebd3fbaf7914805ba91bc1521f73f967f5567969073e12b6b98787c8c96834b3aa98a500de2d2385cff241628805
2021-12-18 14:42:03 +01:00
W. J. van der Laan
1220af5e6d
Merge bitcoin/bitcoin#23781: test: Fix system_tests/run_command on Windows
edd0313ae7 test: Improve "invalid_command" subtest in system_tests for Windows (Hennadii Stepanov)
fb1b0590af test: Fix "non-zero exit code" subtest in system_tests for Windows (Hennadii Stepanov)
0aad33db64 test: Fix "false" subtest in system_tests for Windows (Hennadii Stepanov)
507c009c1e test: Fix "echo" subtest in the system_tests for Windows (Hennadii Stepanov)

Pull request description:

  An attempt to fix bitcoin/bitcoin#23775.

  With this PR on Windows 10 Pro 21H1 (build 19043.1348):
  ```
  C:\Users\hebasto\bitcoin>src\test_bitcoin.exe --run_test=system_tests/run_command
  Running 1 test case...

  *** No errors detected

  C:\Users\hebasto\bitcoin>src\test_bitcoin.exe
  Running 482 test cases...

  *** No errors detected

  ```

ACKs for top commit:
  sipsorcery:
    tACK edd0313ae7
  Tru3Nrg:
    tACK edd0313ae7

Tree-SHA512: 66a4f2372858011ff862b71c6530bedb8bc731b18595636fac9affc9189d9320f212c68b62498f2b57ee7a07f59e842dbec085b76a7419791d1a06c8e80e7744
2021-12-18 13:54:59 +01:00
Hennadii Stepanov
34fd25eaf0
ci: Use system sqlite in native macOS task 2021-12-18 14:03:46 +02:00
Hennadii Stepanov
836d02722c
ci: Bump the macOS image to the latest Monterey 2021-12-18 14:02:57 +02:00
Martin Zumsande
0a1b6fa5a1 test: fix intermittent timeouts in p2p_timeouts.py
by checking that all nodes are added before the mocktime is bumped.
Fixes #23800
2021-12-18 11:40:55 +01:00
MarcoFalke
98a2ddcd6e
Merge bitcoin/bitcoin#23806: fuzz: follow up for #22704
8f79831ab5 Refactor the chacha20 differential fuzz test (stratospher)

Pull request description:

  This PR addresses [comments from #22704](https://github.com/bitcoin/bitcoin/pull/22704/files#discussion_r771510963)  to make the following changes in `src/test/fuzz/crypto_diff_fuzz_chacha20.cpp`:

  - replace `memcmp()` with ==
  - add a missing assert statement to compare the encrypted bytes

Top commit has no ACKs.

Tree-SHA512: 02338460fb3a89e732558bf00f3aebf8f04daba194e03ae0e3339bb2ff6ba35d06841452585b739047a29f8ec64f36b1b4ce2dfa39a08f6ad44a6a937e7b3acb
2021-12-18 10:09:01 +01:00
fanquake
c06cda3e48
Merge bitcoin/bitcoin#23383: Update libsecp256k1 subtree to current master
314195c8be Remove unnecessary cast in CKey::SignSchnorr (Pieter Wuille)
a1f76cdb22 Remove --disable-openssl-tests for libsecp256k1 configure (Pieter Wuille)
86dbc4d075 Squashed 'src/secp256k1/' changes from be8d9c262f..0559fc6e41 (Pieter Wuille)

Pull request description:

  The motivation for this bump is getting rid of a cast in `CKey::SignSchnorr`; the `aux_rand` argument isn't modified by the `secp256k1_schnorrsig_sign` function, but was marked as non-`const` anyway. This is fixed now (bitcoin-core/secp256k1#966), and the cast is removed in this PR.

  There are a few other relevant changes:
  * (bitcoin-core/secp256k1#956): replaces a runtime-computed table with a precomputed one; this adds arouns 1 MiB to the binary size, but is a step towards significantly simplifying the API. If 1 MiB is too much, it can be reduced by 2 or 4 (or more) for a slight verification performance reduction.
  * (bitcoin-core/secp256k1#983): removes (test/bench only) OpenSSL support entirely, removing the need to pass `--disable-openssl-tests` (see #23314).
  * (bitcoin-core/secp256k1#810): mild performance increase for 64-bit non-x86 platforms.
  * (bitcoin-core/secp256k1#1002): Make aux_rnd32==NULL behave identical to 0x0000..00 (which impacts BIP341/BIP342 signing in Bitcoin Core, making it more strictly BIP340 compliant, though not in a manner that affects security).

ACKs for top commit:
  fanquake:
    ACK 314195c8be - this includes a nice simplification to the lilbsecp build system (and thus our build system), and fixes issues like #22854. Did a Guix build on x86 (above), as well as a build on arm64 (except for the arm64 host):

Tree-SHA512: 0e048390fc148fbbdf5b98d9cce8c71067564e7d69d97b68347808a9bc45a04f4fc653c392c880d79d5d8b9cf282195520955581ac4f1595f6a948080cf5949d
2021-12-18 14:47:44 +08:00
fanquake
d1711a40b3
scripts: match on exe type over str in symbol-check.py 2021-12-18 11:41:49 +08:00
fanquake
feee308401
scripts: match on exe type over str in security-check.py 2021-12-18 11:41:36 +08:00
fanquake
97b2fc03f6
Merge bitcoin/bitcoin#23803: ci: Disable s390x gui tests for now
fa6a548f54 ci: Disable s390x gui tests for now (MarcoFalke)

Pull request description:

ACKs for top commit:
  hebasto:
    ACK fa6a548f54, tested locally with

Tree-SHA512: 077bcda0b4612dfbf538eb2999ce9f32ec3739c2ed5709f7c4c5d1a39738fbe6e549bd54b237152fd808736c15af1024e67c95dc87b4c3102738543522cb14d7
2021-12-18 10:33:24 +08:00
W. J. van der Laan
14ba286556
Merge bitcoin/bitcoin#23695: p2p: Always serialize local timestamp for version msg
fa1dc9b36a p2p: Always serialize local timestamp for version msg (MarcoFalke)

Pull request description:

  Currently we serialize the local time when connecting to outbound connections and the "adjusted network" time when someone connects to us.

  I presume the reason is to avoid a fingerprint in case the local time is misconfigured. However, the fingerprint still exits when:
  * The local time goes out-of-sync after timedata is filled up, in which case the adjusted time is *not* adjusted. See comment in `src/timedata.cpp`. (In practise I expect no adjustment to happen after timedata is filled up by one entry more than half its size).
  * The local time is off by more than 70 minutes. See `DEFAULT_MAX_TIME_ADJUSTMENT`. While there is a warning in this case, the warning might be missed by the node operator.
  * The adjusted time is poisoned by an attacker. This is only a theoretical concern after commit e457513eb1.

  Using the adjusted time does help in a the case where the local time is off by a constant less than 70 minutes and the node quickly connects to 5 outbound peers to retrieve the adjusted time.

  Still, I think using `GetAdjustedTime` here gives a false sense of security. It will be better for node operators to instead set the correct time.

ACKs for top commit:
  naumenkogs:
    ACK fa1dc9b36a
  laanwj:
    Code review ACK fa1dc9b36a
  w0xlt:
    crACK fa1dc9b

Tree-SHA512: 70a0f4ab3500e6ddcde291620e35273018cefd1d9e94b91ad333e360139ed18862718bb1a9854af2bf79990bf74b05d95492f77d0747c7b9bdd276c020116dcb
2021-12-17 21:44:59 +01:00
W. J. van der Laan
784a21d354
Merge bitcoin/bitcoin#22283: build: Replace $(AT) with .SILENT
8494dcae0e Replace $(AT) with .SILENCE. (Dmitry Goncharov)

Pull request description:

  This reduces the amount of syntax noise in the makefiles.
  Setting V=1 still enables verbose logging.

  The only noticeable difference in behavior is that, unless V=1 is specified, make won't print its own messages like
  make: Nothing to be done for 'all', make: 'all' is up to date, or touch <file>, if -t is specified.

ACKs for top commit:
  laanwj:
    Tested ACK 8494dcae0e

Tree-SHA512: 66b9111229995aa54a9e87f4571648727d89b8529caec651063cdfe5c00a64341371b648701d192b2334df0614617a00c28eaa56c7f08ee9c00127cada0293ab
2021-12-17 21:34:42 +01:00
stratospher
8f79831ab5 Refactor the chacha20 differential fuzz test 2021-12-17 23:04:04 +05:30
MarcoFalke
fa6a548f54
ci: Disable s390x gui tests for now 2021-12-17 17:09:51 +01:00
W. J. van der Laan
4ad59042b3
Merge bitcoin/bitcoin#22704: fuzz: Differential fuzzing to compare Bitcoin Core's and D. J. Bernstein's implementation of ChaCha20
4d0ac72f3a [fuzz] Add fuzzing harness to compare both implementations of ChaCha20 (stratospher)
65ef93203c [fuzz] Add D. J. Bernstein's implementation of ChaCha20 (stratospher)

Pull request description:

  This PR compares Bitcoin Core's implementation of ChaCha20 with D. J. Bernstein's in order to find implementation discrepancies if any.

ACKs for top commit:
  laanwj:
    Code review ACK 4d0ac72f3a

Tree-SHA512: f826144b4db61b9cbdd7efaaca8fa9cbb899953065bc8a26820a566303b2ab6a17431e7c114635789f0a63fbe3b65cb0bf2ab85baf882803a5ee172af4881544
2021-12-17 16:56:05 +01:00
Andrew Chow
33b511251a
contrib: add achow101 to trusted keys
For maintaining the wallet and psbt things
2021-12-16 14:52:39 -05:00
glozow
82858bab64 [doc] CPFP carve out and single-conflict RBF exemption 2021-12-16 18:44:13 +00:00
glozow
1fd49eb498 [doc] clarify RBF difference from BIP125
It can be argued that BIP125#1 signaling is honored because
descendants of signaling transactions are replaceable by RBF.

Regardless, since there are multiple details in our RBF policy that are
not captured in BIP125, point to our doc instead.
2021-12-16 18:44:13 +00:00
glozow
919ae8b8cd [doc] current rbf policy 2021-12-16 18:44:13 +00:00
MarcoFalke
8c0bd871fc
Merge bitcoin/bitcoin#23785: refactor: Move stuff to ChainstateManager
fab6d6b2d1 Move pindexBestInvalid to ChainstateManager (MarcoFalke)
facd2137ec Move m_failed_blocks to ChainstateManager (MarcoFalke)
fa47b5c100 Move AcceptBlockHeader to ChainstateManager (MarcoFalke)
fa3d62cf7b Move FindForkInGlobalIndex from BlockManager to CChainState (MarcoFalke)

Pull request description:

  Move globals or members of the wrong class to the right class.

ACKs for top commit:
  naumenkogs:
    ACK fab6d6b2d1
  Sjors:
    ACK fab6d6b2d1
  shaavan:
    ACK fab6d6b2d1

Tree-SHA512: 926cbdfa22838517497bacb79ed5f521f64117c2aacf96a0176f62831b4713314a32abc0213df5ee067edf63e4a4300f752a26006d36e5aab415bb91209a271f
2021-12-16 15:13:31 +01:00
MarcoFalke
6b212cbbb9
Merge bitcoin/bitcoin#23720: test: Refactor addr_relay.py addr generation, increase mocktime
261dddb924 test: Combine addr generation helper functions (Martin Zumsande)
aeeccd9aa6 test: Fix intermittent issue in p2p_addr_relay.py (Martin Zumsande)

Pull request description:

  Fixes #22449 by increasing the mocktime jump (just as in 6168eb06b2), which prevents failures due to rare Poisson timer events, or at least makes them a lot more unlikely.

  The second commit combines the addr generation helper functions `setup_addr_msg` and `setup_rand_addr_msg`. It also changes the way `addr.time` is filled to random, because before, if too many addresses (>600) were created in a batch, they would stop being relayed because their timestamp would be too far in the future.

ACKs for top commit:
  josibake:
    reACK 261dddb924
  jnewbery:
    utACK 261dddb924

Tree-SHA512: d0eca887de4bc85092730284cf612193d2c12b0a3d624a2bfa5fef4a5890d3b6375c564333c5927425958e4b6ec86b8854b18b2233c7b6f1691d9ddc397948a9
2021-12-16 15:07:45 +01:00
Martin Zumsande
261dddb924 test: Combine addr generation helper functions
This combines the addr generation helper functions setup_addr_msg
and setup_rand_addr_msg.
It also changes the way addr.time is filled to random, because before,
if too many addresses (>600) were created in a batch, they would stop
being relayed because their timestamp would be too far in the future.
2021-12-16 12:43:38 +00:00
Martin Zumsande
aeeccd9aa6 test: Fix intermittent issue in p2p_addr_relay.py
by increasing the mocktime bump for m_next_addr_send, which is on a
Poisson timer, and explain why. Closes #22449
2021-12-16 12:43:38 +00:00
MarcoFalke
df6e961c41
Merge bitcoin/bitcoin#23777: doc: follow-ups from #23365 (index backwards search)
e4a8d561ed doc: add explanations for assert in index and magic numbers in test (Martin Zumsande)

Pull request description:

  This adds two explanations suggested in the review of #23365,  that I didn't manage to address before that PR was merged:

  https://github.com/bitcoin/bitcoin/pull/23365#discussion_r763981042
  https://github.com/bitcoin/bitcoin/pull/23365#discussion_r763982639

ACKs for top commit:
  jnewbery:
    ACK e4a8d561ed

Tree-SHA512: 0500c8abb37bb3e3694463ad5e74b2e1483615ccf1d7529b0d5faa694652ada17d242dc7fda6d995733766c627d54178a2c8fa21a570cdf13292f64ff5425b56
2021-12-16 08:55:06 +01:00
MarcoFalke
ce463cf450
Merge bitcoin/bitcoin#23750: rpcwallet: mention labels are disabled for ranged descriptors
65efbba45d rpcwallet: mention labels are deactivated for ranged descriptors (Antoine Poinsot)

Pull request description:

  It was confusing when trying to use it as a blackbox. So mention it so next ones don't have to open the said box :)

  See #23749 for context

ACKs for top commit:
  Sjors:
    utACK 65efbba45d
  achow101:
    ACK 65efbba45d

Tree-SHA512: d8a3d1f81c16d95855ac2b01e8fd20e83d6dac1721b3da464a9a890e46102992a6882918be87b2a28b929349ee7f1beb1af6c88b22f065fbbb6948275a6d2b8f
2021-12-16 08:46:09 +01:00
MarcoFalke
a30642926a
Merge bitcoin/bitcoin#23721: wallet, refactor: Move restorewallet() logic to the wallet section
62fa61fa4a refactor: remove the wallet folder if the restore fails (w0xlt)
abbb7eccef refactor: Move restorewallet() RPC logic to the wallet section (w0xlt)
4807f73f48 refactor: Implement restorewallet() logic in the wallet section (w0xlt)

Pull request description:

  Currently `restorewallet()` logic is written in the RPC layer and it can´t be reused by GUI. So it moves this to the wallet section and then, GUI can access it.

  This is necessary to implement the "Restore Wallet" menu item in the GUI (which is already implemented  in https://github.com/bitcoin-core/gui/pull/471 ).

  This commit also simplifies error handling and adds a new behavior: if the restore fails, the invalid wallet folder is removed.

ACKs for top commit:
  achow101:
    ACK 62fa61fa4a
  shaavan:
    crACK 62fa61fa4a

Tree-SHA512: 7ccfbad5943f38616ba0c2dd443c97a4b5bc1f6612dbf5a9e7a0263100aba36671fae929a2e7688442667be394645f44484af137a4802f204a33c4689eb27c39
2021-12-16 08:42:44 +01:00
MarcoFalke
98c362a4d3
Merge bitcoin/bitcoin#23782: test: include two more interruptions points
618f4d2890 test: re-organized array according to order of logs and included 2 more interruption events (seaona)
71115a5e23 test: include two more interruptions points (seaona)

Pull request description:

  This PR aims to introduce 2 more interruption points in the process of initialization, in order to make the` feature_init `testcase more complete. These are the following:

  -` Checking all blk files are present`
  -` init message: Starting network threads`

  It is a small improvement for increasing the coverage of potential interruptions, and making sure that the node can restart successfully after these interruptions.

ACKs for top commit:
  jamesob:
    ACK 618f4d2890, pending CI
  jarolrod:
    ACK 618f4d2890

Tree-SHA512: 9d709734e298e955709094bb97478ca7f18859874f1ba026f7c9014d87205aea63f6cf2093ebee600eaf82d3245adb11e77fae24a1ae48b69efefd57f3def921
2021-12-16 07:47:40 +01:00
w0xlt
62fa61fa4a refactor: remove the wallet folder if the restore fails 2021-12-15 18:41:40 -03:00
w0xlt
abbb7eccef refactor: Move restorewallet() RPC logic to the wallet section
It also simplifies restorewallet() and loadwallet() RPC error handling.
2021-12-15 18:41:40 -03:00
W. J. van der Laan
fee16b15fa
Merge bitcoin/bitcoin#23744: build, qt: Drop support for i686-linux-android host
66a20a54a2 build, qt: Drop support for `i686-linux-android` host (Hennadii Stepanov)

Pull request description:

  There are no reasons to keep support for `i686-linux-android` host, which is actually broken in master (50c502f54a), and this fact has been unnoticed for months :)

  https://github.com/bitcoin/bitcoin/pull/23675#issuecomment-986206434:
  > I'm surprised `i686-linux-android` ABI is still supported. I would love to drop it...

  https://github.com/bitcoin/bitcoin/pull/23675#issuecomment-991340132
  > What is `i686-linux-android`? 32-bit x86 android? is that really a thing?

ACKs for top commit:
  prusnak:
    utACK 66a20a54a2

Tree-SHA512: 211f794de2fc569f0ade2a4da805b8bfd4ce2ab0930c5d427acc4f5d015fcdc4911f02fc64f6401197f7641aed79944a9594be80c817547be3269cdd721cf79b
2021-12-15 21:56:01 +01:00
W. J. van der Laan
216f4ca9e7
Merge bitcoin/bitcoin#22674: validation: mempool validation and submission for packages of 1 child + parents
046e8ff264 [unit test] package submission (glozow)
e12fafda2d [validation] de-duplicate package transactions already in mempool (glozow)
8310d942e0 [packages] add sanity checks for package vs mempool limits (glozow)
be3ff151a1 [validation] full package accept + mempool submission (glozow)
144a29099a [policy] require submitted packages to be child-with-unconfirmed-parents (glozow)
d59ddc5c3d [packages/doc] define and document package rules (glozow)
ba26169f60 [unit test] context-free package checks (glozow)
9b2fdca7f0 [packages] add static IsChildWithParents function (glozow)

Pull request description:

  This is 1 chunk of [Package Mempool Accept](https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a); it restricts packages to 1 child with its parents, doesn't allow conflicts, and doesn't have CPFP (yet).  Future PRs (see #22290) will add RBF and CPFP within packages.

ACKs for top commit:
  laanwj:
    Code review ACK 046e8ff264

Tree-SHA512: 37dbba37d527712f8efef71ee05c90a8308992615af35f5e0cfeafc60d859cc792737d125aac526e37742fe7683ac8c155ac24af562426213904333c01260c95
2021-12-15 20:42:33 +01:00
MarcoFalke
fab6d6b2d1
Move pindexBestInvalid to ChainstateManager
A private member is better than a global.
2021-12-15 17:46:39 +01:00
MarcoFalke
facd2137ec
Move m_failed_blocks to ChainstateManager
The member is unrelated to block storage (BlockManager). It is related
to validation.

Fix the confusion by moving it.

Can be reviewed with
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2021-12-15 17:46:08 +01:00
MarcoFalke
fa47b5c100
Move AcceptBlockHeader to ChainstateManager
This is needed for the next commit.
2021-12-15 17:46:01 +01:00
MarcoFalke
fa3d62cf7b
Move FindForkInGlobalIndex from BlockManager to CChainState
The helper was moved in commit b026e318c3,
which also mentioned that it could be moved to CChainState. So do that,
as the functionality is not block-storage related.

This also allows to drop one function argument.
2021-12-15 17:45:48 +01:00
seaona
618f4d2890 test: re-organized array according to order of logs and included 2 more interruption events 2021-12-15 16:17:54 +01:00
MarcoFalke
c09b41dc66
Merge bitcoin/bitcoin#23769: Disallow copies of CChain
faf2614f60 style: Use 4 spaces for indendation, not 5 (MarcoFalke)
fada66fc2c Disallow copies of CChain (MarcoFalke)

Pull request description:

  Creating a copy of the chain is not a valid use case in normal operation. Also, it massively degrades performance.

  However, it seems to be a mistake that no one looks out for during review:

  * https://github.com/bitcoin/bitcoin/pull/22677#discussion_r760400537

  Fix this by disallowing it.

ACKs for top commit:
  jamesob:
    ACK faf2614f60 ([`jamesob/ackr/23769.1.MarcoFalke.disallow_copies_of_cchai`](https://github.com/jamesob/bitcoin/tree/ackr/23769.1.MarcoFalke.disallow_copies_of_cchai))
  glozow:
    utACK faf2614f60, nice.
  prusnak:
    utACK faf2614

Tree-SHA512: 27b908c78842e4700e118adb876c09c3d1ec04662310e983309e2cd6fa8ad38c9359ff45f36a804359b9f117e351c4739e651b3e6754c14e6c6fcd7ae5e68342
2021-12-15 16:10:23 +01:00
Pieter Wuille
314195c8be Remove unnecessary cast in CKey::SignSchnorr 2021-12-15 09:20:26 -05:00
Pieter Wuille
a1f76cdb22 Remove --disable-openssl-tests for libsecp256k1 configure 2021-12-15 09:20:12 -05:00