Commit graph

38677 commits

Author SHA1 Message Date
fanquake
8e0d9796da
Merge bitcoin/bitcoin#25284: net: Use serialization parameters for CAddress serialization
fa626af3ed Remove unused legacy CHashVerifier (MarcoFalke)
fafa3fc5a6 test: add tests that exercise WithParams() (MarcoFalke)
fac81affb5 Use serialization parameters for CAddress serialization (MarcoFalke)
faec591d64 Support for serialization parameters (MarcoFalke)
fac42e9d35 Rename CSerAction* to Action* (MarcoFalke)
aaaa3fa947 Replace READWRITEAS macro with AsBase wrapping function (MarcoFalke)

Pull request description:

  It seems confusing that picking a wrong value for `ADDRV2_FORMAT` could have effects on consensus. (See the docstring of `ADDRV2_FORMAT`).

  Fix this by implementing https://github.com/bitcoin/bitcoin/issues/19477#issuecomment-1147421608 .

  This may also help with libbitcoinkernel, see https://github.com/bitcoin/bitcoin/pull/28327

ACKs for top commit:
  TheCharlatan:
    ACK fa626af3ed
  ajtowns:
    ACK fa626af3ed

Tree-SHA512: 229d379da27308890de212b1fd2b85dac13f3f768413cb56a4b0c2da708f28344d04356ffd75bfcbaa4cabf0b6cc363c4f812a8f1648cff9e436811498278318
2023-09-07 11:34:34 +01:00
fanquake
5ad4eb3365
Merge bitcoin/bitcoin#28426: doc: s/--no-substitute/--no-substitutes in guix/INSTALL
8f541023b9 doc: s/--no-substitute/--no-substitutes in guix/INSTALL (fanquake)

Pull request description:

  https://guix.gnu.org/manual/en/html_node/Common-Build-Options.html

ACKs for top commit:
  hebasto:
    ACK 8f541023b9.
  TheCharlatan:
    ACK 8f541023b9

Tree-SHA512: 4d79791a8fa772d35723d35e85aaf9ab86304f2a1238e883bbb85051d0cc5f9841dab99ef0fe1e9d67f6259798e98942be00ae7c4320328987234293d9bf3012
2023-09-07 11:24:19 +01:00
fanquake
d98180a969
Merge bitcoin/bitcoin#28419: fuzz: introduce and use ConsumePrivateKey helper
583af18fd1 fuzz: introduce and use `ConsumePrivateKey` helper (Sebastian Falbesoner)

Pull request description:

  In the course of reviewing BIP324 related PRs I noticed a frequent pattern of creating private keys (`CKey` instances) with data consumed from the fuzz data provider:
  ```
      auto key_data = provider.ConsumeBytes<unsigned char>(32);
      key_data.resize(32);
      CKey key;
      key.Set(key_data.begin(), key_data.end(), /*fCompressedIn=*/true);
  ```
  This PR introduces a corresponding helper `ConsumePrivateKey` in order to deduplicate code. The compressed flag can either be set to a fixed value, or, if `std::nullopt` is passed (=default), is also consumed from the fuzz data provider via `.ConsumeBool()`.

  Note that this is not a pure refactor, as some of the replaced call-sites previously consumed a random length (`ConsumeRandomLengthByteVector`) instead of a fixed size of 32 bytes for key data. As far as I can see, there is not much value in using a random size, as in all those cases we can only proceed or do something useful with a valid private key, and key data with sizes other than 32 bytes always lead to invalid keys.

ACKs for top commit:
  sipa:
    utACK 583af18fd1
  brunoerg:
    crACK 583af18fd1

Tree-SHA512: 58a178432ba1eb0a2f7597b6700e96477e8b10f429ef642445a52db12e74d81aec307888315b772bfda9610f90df3e1d556cf024c2bef1d520303b12584feaaa
2023-09-07 11:20:12 +01:00
fanquake
8f541023b9
doc: s/--no-substitute/--no-substitutes in guix/INSTALL 2023-09-07 09:51:12 +01:00
Andrew Chow
d2ccca253f
Merge bitcoin/bitcoin#26567: Wallet: estimate the size of signed inputs using descriptors
10546a569c wallet: accurately account for the size of the witness stack (Antoine Poinsot)
9b7ec393b8 wallet: use descriptor satisfaction size to estimate inputs size (Antoine Poinsot)
8d870a9873 script/signingprovider: introduce a MultiSigningProvider (Antoine Poinsot)
fa7c46b503 descriptor: introduce a method to get the satisfaction size (Antoine Poinsot)
bdba7667d2 miniscript: introduce a helper to get the maximum witness size (Antoine Poinsot)
4ab382c2cd miniscript: make GetStackSize independent of P2WSH context (Antoine Poinsot)

Pull request description:

  The wallet currently estimates the size of a signed input by doing a dry run of the signing logic. This is unnecessary since all outputs we can sign for can be represented by a descriptor, and we can derive the size of a satisfaction ("signature") directly from the descriptor itself.
  In addition, the current approach does not generalize well: dry runs of the signing logic are only possible for the most basic scripts. See for instance the discussion in #24149 around that.

  This introduces a method to get the maximum size of a satisfaction from a descriptor, and makes the wallet use that instead of the dry-run.

ACKs for top commit:
  sipa:
    utACK 10546a569c
  achow101:
    re-ACK 10546a569c

Tree-SHA512: 43ed1529fbd30af709d903c8c5063235e8c6a03b500bc8f144273d6184e23a53edf0fea9ef898ed57d8a40d73208b5d935cc73b94a24fad3ad3c63b3b2027174
2023-09-06 13:31:03 -04:00
fanquake
cf421820f5
Merge bitcoin/bitcoin#28409: test: Combine sync_send_with_ping and sync_with_ping
fae0b21e6c test: Combine sync_send_with_ping and sync_with_ping (MarcoFalke)

Pull request description:

  This reduces bloat, complexity, and makes tests less fragile to intermittent failures, see https://github.com/bitcoin/bitcoin/pull/27675#discussion_r1315648343.

  This should not cause any noticeable slowdown, or may even be faster, because active polling will be done at most once.

ACKs for top commit:
  glozow:
    Concept ACK fae0b21e6c
  theStack:
    ACK fae0b21e6c 🏓

Tree-SHA512: 6c543241a7b85458dc7ff6a6203316b80a6227d83d38427e74f53f4c666a882647a8a221e5259071ee7bb5dfd63476fb03c9b558a1ea546734b14728c3c619ba
2023-09-06 17:08:33 +01:00
Matthew Zipkin
2e249b9227
doc: add release note for PR #28414 2023-09-06 11:56:19 -04:00
ismaelsadeeq
4614332fc4
test: remove unnecessary finalizepsbt rpc calls 2023-09-06 11:52:19 -04:00
fanquake
7d5815293e
depends: cctools 986 & ld64 711 2023-09-06 16:36:40 +01:00
fanquake
1ed1183f47
depends: libtapi 1300.0.6.5 2023-09-06 16:36:33 +01:00
Matthew Zipkin
5c2185b3b6
ci: enable chattr +i capability inside containers 2023-09-06 10:40:09 -04:00
Matthew Zipkin
e573f24202
unit test: add coverage for BlockManager 2023-09-06 10:39:54 -04:00
Sebastian Falbesoner
583af18fd1 fuzz: introduce and use ConsumePrivateKey helper 2023-09-06 13:59:12 +02:00
Matthew Zipkin
e3d484b603
wallet rpc: return final tx hex from walletprocesspsbt if complete 2023-09-05 09:14:32 -04:00
fanquake
9d3b216e00
Merge bitcoin/bitcoin#28151: build: use -muse-unaligned-vector-move for Windows builds
96f2cf8d2c build: use -muse-unaligned-vector-move for Windows (fanquake)

Pull request description:

  We currently work around a longstanding GCC issue with aligned vector instructions, by patching the behaviour we want into GCC (see discussion in #24736). Possibly in response to the GCC thread (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412#c40), a new option was [introduced into the binutils assembler](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c8480b58e1968f209b6365af7422678f348222c2) with the 2.38 release:
  ```
  x86: Add -muse-unaligned-vector-move to assembler

  Unaligned load/store instructions on aligned memory or register are as
  fast as aligned load/store instructions on modern Intel processors.  Add
  a command-line option, -muse-unaligned-vector-move, to x86 assembler to
  encode encode aligned vector load/store instructions as unaligned
  vector load/store instructions.
  ```

ACKs for top commit:
  theuni:
    ACK 96f2cf8d2c.

Tree-SHA512: f5aaa125922bb17bbb51454103b3394d293184214b0dea554c36c2f130488a3ede2f39678044ec846fa0fdf4cd441d4227f4565c29d380f5a73b50bf6f3b9a67
2023-09-05 13:44:59 +01:00
brunoerg
3eb03803c4 test: remove unused variables in p2p_invalid_block 2023-09-05 09:09:45 -03:00
fanquake
ecab855838
Merge bitcoin/bitcoin#28195: blockstorage: Drop legacy -txindex check
fae405556d scripted-diff: Rename CBlockTreeDB -> BlockTreeDB (MarcoFalke)
faf63039cc Fixup style of moved code (MarcoFalke)
fa65111b99 move-only: Move CBlockTreeDB to node/blockstorage (MarcoFalke)
fa8685597e index: Drop legacy -txindex check (MarcoFalke)
fa69148a0a scripted-diff: Use blocks_path where possible (MarcoFalke)

Pull request description:

  The only reason for the check was to print a warning about an increase in storage use. Now that 22.x is EOL and everyone should have migrated (or decided to not care about storage use), remove the check.

  Also, a move-only commit is included. (Rebased from https://github.com/bitcoin/bitcoin/pull/22242)

ACKs for top commit:
  TheCharlatan:
    ACK fae405556d, though I lack historical context to really judge the second commit fa8685597e.
  stickies-v:
    ACK fae405556d

Tree-SHA512: 9da8f48767ae52d8e8e21c09a40c949cc0838794f1856cc5f58a91acd3f00a3bca818c8082242b3fdc9ca5badb09059570bb3870850d3807b75a8e23b5222da1
2023-09-05 11:37:35 +01:00
MarcoFalke
fae0b21e6c
test: Combine sync_send_with_ping and sync_with_ping 2023-09-05 12:11:10 +02:00
fanquake
8c7e735456
Merge bitcoin/bitcoin#28404: Update libsecp256k1 subtree to release 0.4.0
c0da4f60e2 Squashed 'src/secp256k1/' changes from c545fdc374..199d27cea3 (Pieter Wuille)

Pull request description:

  We had previously pulled in a non-released commit along with #27479. The necessary changes have now been released in version 0.4.0, so update to that.

ACKs for top commit:
  hebasto:
    ACK 0e0fc18c3c, having a zero diff with my local branch that updates the `secp256k1` subtree up to v0.4.0.
  fanquake:
    ACK 0e0fc18c3c

Tree-SHA512: 8b771e7da89b9cdb7a680b9dd4eb99a6f737b32914b0b62c485b3c484e5438f9f60942030d3072243aaa196da22d2b1fdb3b6a668d75a46e6ac78c9d86b4bd8b
2023-09-05 10:38:21 +01:00
fanquake
260445bee8
Merge bitcoin/bitcoin#28359: ci: Asan with -ftrivial-auto-var-init=pattern
fa07ac48d8 ci: Asan with -ftrivial-auto-var-init=pattern (MarcoFalke)

Pull request description:

  This makes memory bugs deterministic. `-ftrivial-auto-var-init=pattern` is incompatible with other memory sanitizers (like valgrind and msan), but that is irrelevant here, because the address sanitizer in this fuzz CI config is already incompatible with them.

  `-ftrivial-auto-var-init=pattern` goes well with `-fsanitize=bool` and `-fsanitize=enum`, but those are already enabled via `-fsanitize=undefined`. See https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks

ACKs for top commit:
  fanquake:
    ACK fa07ac48d8 - going to get back to fixing up the cxxflags usage in CI, but not a blocker here:

Tree-SHA512: 2ea6c5128a9cd262bdd1b1475c7e1be23ce2c520fad05f6c2aace6c29e203573323c0564d272e25da35ad5ff46fde488a5eae1ed14d3349e793d14a5e2533fb1
2023-09-05 10:07:50 +01:00
fanquake
c004ba48f4
Merge bitcoin/bitcoin#28386: test: remove fixed timeouts from feature_config_args
fbcacd4cf0 test: remove fixed timeouts from feature_config_args (Martin Zumsande)

Pull request description:

  Fixes #28290

  These fixed timeouts aren't affected by the `timeout_factor` option and can therefore cause timeouts in slow environments.
  They are also unnecessary for the test because they measure the wrong thing:
  While there is an internal waiting time of 60s within `ThreadOpenConnections` (beginning only when that thread is started) for fixed seeds querying, the timeouts here don't measure that but the time from startup until a debug log message is encountered, during which many other things happen in init, so they don't make much sense to me in the first place.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK fbcacd4cf0

Tree-SHA512: 7bb3b7db2f9666b1929ffb7773c838ee98b0845569428e5d00ecf5234973d534c4f474e213896c71baabd6096a79347bd21b41a17b130053049714eb8a447c79
2023-09-05 09:59:33 +01:00
fanquake
fb619e1bc3
Merge bitcoin/bitcoin#28396: test: p2p: check that getaddr msgs are only responded once per connection
668aa6af8d test: p2p: check that `getaddr` msgs are only responded once per connection (Sebastian Falbesoner)

Pull request description:

  This simple PR adds missing test coverage for ignoring repeated `getaddr` requests (introduced in #7856, commit 66b07247a7):
  6f03c45f6b/src/net_processing.cpp (L4642-L4648)

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 668aa6af8d
  brunoerg:
    crACK 668aa6af8d

Tree-SHA512: edcdc6501c684fb41911e393f55ded9b044cd2f92918877eca152edd5a4287d1a9d57ae999f1cb42185eae00c3a0af411fcb9bcd5b990ef48849c3834b141584
2023-09-05 09:58:50 +01:00
fanquake
818bfd6dfe
Merge bitcoin/bitcoin#28402: ci: Bump actions/checkout version
f10acecd43 ci: Bump `actions/checkout` version (Hennadii Stepanov)

Pull request description:

  See: https://github.com/actions/checkout/releases/tag/v4.0.0.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK f10acecd43

Tree-SHA512: fc71876ee1df881a61295fc3b3cd3dac0c17b3651ad725076d3ff0b8975bab0d37c03cd421e6e88ddcf2e28910c96e3f1fa8fd5d5280e06e5a7a7ec683f7b930
2023-09-05 11:43:51 +03:00
fanquake
337d6f35a2
Merge bitcoin/bitcoin#28291: rpc: removed StrFormatInternalBug quote delimitation
6e8f6468cb removed StrFormatInternalBug quote delimitation (Reese Russell)

Pull request description:

  This PR rectifies an unnecessary set of quotes delimiting the contents of  ```StrFormatInternalBug```. This is a follow up to MarcoFalke https://github.com/bitcoin/bitcoin/pull/28123#discussion_r1297191493.  The method of action was to remove the escaped quotes that were a part of strprintf. A single functional test case was modified to reflect the new output format.

  ```STR_INTERNAL_BUG``` was applied to https://github.com/bitcoin/bitcoin/pull/28123 in ```std::string RPCArg::ToString(const bool oneline)``` in ```rpc/util.cpp```

  The results can be seen below.

  Previously
  ![image](https://github.com/bitcoin/bitcoin/assets/3104223/53f9ea59-317f-4c62-9fc1-04255eeb4641)

  This PR
  ![image](https://github.com/bitcoin/bitcoin/assets/3104223/5c6a3110-f1f3-4b3c-8e8a-9c8f1c3176e7)

  Additional context can be found here.
  https://github.com/bitcoin/bitcoin/pull/28123#discussion_r1271871716

  Thank you.

ACKs for top commit:
  MarcoFalke:
    review ACK 6e8f6468cb
  stickies-v:
    ACK 6e8f6468cb

Tree-SHA512: 35317e31a527630495b566407e37db9941dab7f81cfaeb1ea3309683c48e4273284645ad615f73e646a137b4f2ae35933603e9182a7dbdd22cac98d038c491dc
2023-09-05 11:41:02 +03:00
MarcoFalke
fa626af3ed
Remove unused legacy CHashVerifier 2023-09-05 10:13:50 +02:00
MarcoFalke
fafa3fc5a6
test: add tests that exercise WithParams()
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2023-09-05 10:13:41 +02:00
MarcoFalke
fac81affb5
Use serialization parameters for CAddress serialization
This also cleans up the addrman (de)serialization code paths to only
allow `Disk` serialization. Some unit tests previously forced a
`Network` serialization, which does not make sense, because Bitcoin Core
in production will always `Disk` serialize.
This cleanup idea was suggested by Pieter Wuille and implemented by Anthony
Towns.

Co-authored-by: Pieter Wuille <pieter@wuille.net>
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2023-09-05 10:13:25 +02:00
Pieter Wuille
0e0fc18c3c Update secp256k1 subtree to upstream release 0.4.0 2023-09-04 12:51:20 -04:00
Pieter Wuille
c0da4f60e2 Squashed 'src/secp256k1/' changes from c545fdc374..199d27cea3
199d27cea3 Merge bitcoin-core/secp256k1#1415: release: Prepare for 0.4.0
16339804c9 release: Prepare for 0.4.0
d9a85065a9 changelog: Catch up in preparation of release
0b4640aedd Merge bitcoin-core/secp256k1#1413: ci: Add `release` job
8659a01714 ci: Add `release` job
f9b38894ba ci: Update `actions/checkout` version
727bec5bc2 Merge bitcoin-core/secp256k1#1414: ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot
2635068abf ci/gha: Let MSan continue checking after errors in all jobs
e78c7b68eb ci/Dockerfile: Reduce size of Docker image further
2f0d3bbffb ci/Dockerfile: Warn if `ulimit -n` is too high when running Docker
4b8a647ad3 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot
6ebe7d2bb3 ci/Dockerfile: Always use versioned clang packages
65c79fe2d0 Merge bitcoin-core/secp256k1#1412: ci: Switch macOS from Ventura to Monterey and add Valgrind
c223d7e33d ci: Switch macOS from Ventura to Monterey and add Valgrind
ea26b71c3a Merge bitcoin-core/secp256k1#1411: ci: Make repetitive command the default one
cce0456304 ci: Make repetitive command the default one
317a4c48f0 ci: Move `git config ...` to `run-in-docker-action`
4d7fe60905 Merge bitcoin-core/secp256k1#1409: ci: Move remained task from Cirrus to GitHub Actions
676ed8f9cf ci: Move "C++ (public headers)" from Cirrus to GitHub Actions
61fc3a2dc8 ci: Move "C++ -fpermissive..." from Cirrus to GitHub Actions
d51fb0a533 ci: Move "MSan" from Cirrus to GitHub Actions
c22ac27529 ci: Move sanitizers task from Cirrus to GitHub Actions
26a989924b Merge bitcoin-core/secp256k1#1410: ci: Use concurrency for pull requests only
ee1be62d84 ci: Use concurrency for pull requests only
6ee14550c8 Merge bitcoin-core/secp256k1#1406: ci, gha: Move more non-x86_64 tasks from Cirrus CI to GitHub Actions
fc3dea29ea ci: Move "ppc64le: Linux..." from Cirrus to GitHub Actions
7782dc8276 ci: Move "ARM64: Linux..." from Cirrus to GitHub Actions
0a16de671c ci: Move "ARM32: Linux..." from Cirrus to GitHub Actions
ea33914e00 ci: Move "s390x (big-endian): Linux..." from Cirrus to GitHub Actions
880be8af99 ci: Move "i686: Linux (Debian stable)" from Cirrus to GiHub Actions
2e6cf9bae5 Merge bitcoin-core/secp256k1#1396: ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job
5373693e45 Merge bitcoin-core/secp256k1#1405: ci: Drop no longer needed workaround
ef9fe959de ci: Drop no longer needed workaround
e10878f58e ci, gha: Drop `driver-opts.network` input for `setup-buildx-action`
4ad4914bd1 ci, gha: Add `retry_builder` Docker image builder
6617a620d9 ci: Remove "x86_64: Linux (Debian stable)" task from Cirrus CI
03c9e6508c ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job
ad3e65d9fe ci: Remove GCC build files and sage to reduce size of Docker image
6b9507adf6 Merge bitcoin-core/secp256k1#1398: ci, gha: Add Windows jobs based on Linux image
87d35f30c0 ci: Rename `cirrus.sh` to more general `ci.sh`
d6281dd008 ci: Remove Windows tasks from Cirrus CI
2b6f9cd546 ci, gha: Add Windows jobs based on Linux image
48b1d939b5 Merge bitcoin-core/secp256k1#1403: ci, gha: Ensure only a single workflow processes `github.ref` at a time
0ba2b94551 Merge bitcoin-core/secp256k1#1373: Add invariant checking for scalars
060e32cb60 Merge bitcoin-core/secp256k1#1401: ci, gha: Run all MSVC tests on Windows natively
de657c2044 Merge bitcoin-core/secp256k1#1062: Removes `_fe_equal_var`, and unwanted `_fe_normalize_weak` calls (in tests)
bcffeb14bc Merge bitcoin-core/secp256k1#1404: ci: Remove "arm64: macOS Ventura" task from Cirrus CI
c2f6435802 ci: Add comment about switching macOS to M1 on GHA later
4a24fae0bc ci: Remove "arm64: macOS Ventura" task from Cirrus CI
b0886fd35c ci, gha: Ensure only a single workflow processes `github.ref` at a time
3d05c86d63 Merge bitcoin-core/secp256k1#1394: ci, gha: Run "x86_64: macOS Ventura" job on GitHub Actions
d78bec7001 ci: Remove Windows MSVC tasks from Cirrus CI
3545dc2b9b ci, gha: Run all MSVC tests on Windows natively
5d8fa825e2 Merge bitcoin-core/secp256k1#1274: test: Silent noisy clang warnings about Valgrind code on macOS x86_64
8e54a346d2 ci, gha: Run "x86_64: macOS Ventura" job on GitHub Actions
b327abfcea Merge bitcoin-core/secp256k1#1402: ci: Use Homebrew's gcc in native macOS task
d62db57427 ci: Use Homebrew's gcc in native macOS task
54058d16fe field: remove `secp256k1_fe_equal_var`
bb4efd6404 tests: remove unwanted `secp256k1_fe_normalize_weak` call
eedd781085 Merge bitcoin-core/secp256k1#1348: tighten group magnitude limits, save normalize_weak calls in group add methods (revival of #1032)
b2f6712dd3 Merge bitcoin-core/secp256k1#1400: ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift
9c91ea41b1 ci: Enable ellswift module where it's missing
db32a24761 ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift
ce765a5b8e Merge bitcoin-core/secp256k1#1399: ci, gha: Run "SageMath prover" job on GitHub Actions
8408dfdc4c Revert "ci: Run sage prover on CI"
c8d9914fb1 ci, gha: Run "SageMath prover" job on GitHub Actions
8d2960c8e2 Merge bitcoin-core/secp256k1#1397: ci: Remove "Windows (VS 2022)" task from Cirrus CI
f1774e5ec4 ci, gha: Make MSVC job presentation more explicit
5ee039bb58 ci: Remove "Windows (VS 2022)" task from Cirrus CI
96294c00fb Merge bitcoin-core/secp256k1#1389: ci: Run "Windows (VS 2022)" job on GitHub Actions
a2f7ccdecc ci: Run "Windows (VS 2022)" job on GitHub Actions
374e2b54e2 Merge bitcoin-core/secp256k1#1290: cmake: Set `ENVIRONMENT` property for examples on Windows
1b13415df9 Merge bitcoin-core/secp256k1#1391: refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2)
a1bd4971d6 refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2)
b7c685e74a Save _normalize_weak calls in group add methods
c83afa66e0 Tighten group magnitude limits
26392da2fb Merge bitcoin-core/secp256k1#1386: ci: print $ELLSWIFT in cirrus.sh
d23da6d557 use secp256k1_scalar_verify checks
4692478853 ci: print $ELLSWIFT in cirrus.sh
c7d0454932 add verification for scalars
c734c64278 Merge bitcoin-core/secp256k1#1384: build: enable ellswift module via SECP_CONFIG_DEFINES
ad152151b0 update max scalar in scalar_cmov_test and fix schnorrsig_verify exhaustive test
78ca880788 build: enable ellswift module via SECP_CONFIG_DEFINES
0e00fc7d10 Merge bitcoin-core/secp256k1#1383: util: remove unused checked_realloc
b097a466c1 util: remove unused checked_realloc
2bd5f3e618 Merge bitcoin-core/secp256k1#1382: refactor: Drop unused cast
4f8c5bd761 refactor: Drop unused cast
173e8d061a Implement current magnitude assumptions
49afd2f5d8 Take use of _fe_verify_magnitude in field_impl.h
4e9661fc42 Add _fe_verify_magnitude (no-op unless VERIFY is enabled)
690b0fc05a add missing group element invariant checks
175db31149 ci: Drop no longer needed `PATH` variable update on Windows
116d2ab3df cmake: Set `ENVIRONMENT` property for examples on Windows
cef373997c cmake, refactor: Use helper function instead of interface library
747ada3587 test: Silent noisy clang warnings about Valgrind code on macOS x86_64

git-subtree-dir: src/secp256k1
git-subtree-split: 199d27cea32203b224b208627533c2e813cd3b21
2023-09-04 12:51:20 -04:00
MarcoFalke
fa5356cd49
ci: Limit test-each-commit to --max-count=6 2023-09-04 18:04:49 +02:00
MarcoFalke
fafcd2e9ef
ci: Add test-each-commit task 2023-09-04 18:04:47 +02:00
Hennadii Stepanov
f10acecd43
ci: Bump actions/checkout version
See: https://github.com/actions/checkout/releases/tag/v4.0.0
2023-09-04 15:25:41 +01:00
Sebastian Falbesoner
668aa6af8d test: p2p: check that getaddr msgs are only responded once per connection 2023-09-03 14:19:41 +02:00
fanquake
6f03c45f6b
Merge bitcoin/bitcoin#28383: Update translations for 26.0 soft translation string freeze
162ce4e5dd qt: Update translation source file (Hennadii Stepanov)
19520bff09 qt: Bump Transifex slug for 26.x (Hennadii Stepanov)
69821b27f5 qt: Translation updates from Transifex (Hennadii Stepanov)

Pull request description:

  This PR follows our [Release Process](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md).

  Required to open Transifex translations for 26.0 on 2023-09-01 as it's [planned](https://github.com/bitcoin/bitcoin/issues/27758).

  The previous similar PR: https://github.com/bitcoin/bitcoin/pull/27169.

ACKs for top commit:
  stickies-v:
    ACK 162ce4e5dd
  jarolrod:
    ACK 162ce4e5dd

Tree-SHA512: a810c727e5c9fb3ffe4ff88ca7c5484178c483b38adb4b67758fb1f3e75b0d0ffb755fdc43de3fa59607f45833ec3594d87649fd6f0a40ed8a249ee5fa6979dd
2023-09-02 20:46:33 +03:00
Martin Zumsande
fbcacd4cf0 test: remove fixed timeouts from feature_config_args
They cannot be scaled by the timeout_factor option and can
therefore cause timeouts in slow environments.
They are also not necessary for the test, since they measure time
frome startup until a debug message is encountered, which
is not restricted to 1 minute by any internal logic within bitcoind.
2023-09-01 14:48:55 -04:00
Andrew Chow
df98a12fc2
Merge bitcoin/bitcoin#28350: Log explicit error message when coindb is found in inconsistent state
df60de770d log: Print error message when coindb is in inconsistent state (Fabian Jahr)

Pull request description:

  While doing manual testing on assumeutxo this week I managed to put the coindb into an inconsistent state twice. For a normal user, this can also happen if their computer crashes during a flush or if they try to stop their node during a flush and then get tired of waiting and just shut their computer down or kill the process. It's an edge case but I wouldn't be surprised if this does happen more often when assumeutxo gets used more widely because there might be multiple flushes happening during loading of the UTXO set in the beginning and users may think something is going wrong because of the unexpected wait or they forgot some configs and want to start over quickly.

  The problem is, when this happens at first the node starts up normally until it's time to flush again and then it hits an assert that the user can not understand.

  ```
  2023-08-25T16:31:09Z [httpworker.0] [snapshot] 52000000 coins loaded (43.30%, 6768 MB)
  2023-08-25T16:31:16Z [httpworker.0] Cache size (7272532192) exceeds total space (7256510300)
  2023-08-25T16:31:16Z [httpworker.0] FlushSnapshotToDisk: flushing coins cache (7272 MB) started
  Assertion failed: (old_heads[0] == hashBlock), function BatchWrite, file txdb.cpp, line 126.
  Abort trap: 6
  ```

  We should at least log an error message that gives users a hint of what the problem is and what they can do to resolve it. I am keeping this separate from the assumeutxo project since this issue can also happen during any regular flush.

ACKs for top commit:
  jonatack:
    ACK df60de770d
  achow101:
    ACK df60de770d
  ryanofsky:
    Code review ACK df60de770d
  jamesob:
    Code review ACK df60de770d

Tree-SHA512: b546aa0b0323ece2962867a29c38e014ac83ae8f1ded090da2894b4ff2450c05229629c7e8892f7b550cf7def4038a0b4119812e548e11b00c60b1dc3d4276d2
2023-09-01 13:25:01 -04:00
glozow
b2f1d732cb
Merge bitcoin/bitcoin#28384: ci: Avoid oversubscription in functional tests on Windows
f2d4e510b3 ci: Avoid saving the same Ccache cache (Hennadii Stepanov)
14e5de6d02 ci: Avoid oversubscription in functional tests on Windows (Hennadii Stepanov)

Pull request description:

  This PR aims to reduce the frequency of functional test failures on Windows like this [one](https://github.com/bitcoin/bitcoin/actions/runs/6040229997):
  ```

  2023-09-01T01:05:01.850000Z TestFramework (ERROR): Assertion failed
  Traceback (most recent call last):
    File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_framework.py", line 552, in start_nodes
      node.wait_for_rpc_connection()
    File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_node.py", line 296, in wait_for_rpc_connection
      self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout))
    File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_node.py", line 177, in _raise_assertion_error
      raise AssertionError(self._node_msg(msg))
  AssertionError: [node 1] Unable to connect to bitcoind after 2400s
  ```

  This code has had zero failures in my personal repository in more than 25 runs (and is still counting).

  ---

  The second commit is a minor improvement to avoid "Cache save failed." warnings during job re-runs. For [example](https://github.com/bitcoin/bitcoin/actions/runs/5998688759):

  ![image](https://github.com/bitcoin/bitcoin/assets/32963518/d8a049df-fccd-4395-99c9-4be01d0ea706)

ACKs for top commit:
  MarcoFalke:
    lgtm ACK f2d4e510b3 🐾

Tree-SHA512: 0c92817d37325a114886900e49a4d644201397d98d6ac9f2dcd41170c7e7ea2cb1873f7e51b5cb3ad3cc2e59554ad1c8f87d439ea6c1c960bf5c339153be7040
2023-09-01 13:55:11 +01:00
Hennadii Stepanov
f2d4e510b3
ci: Avoid saving the same Ccache cache
This occurred when a job was being rerun.
2023-09-01 11:08:20 +01:00
Hennadii Stepanov
14e5de6d02
ci: Avoid oversubscription in functional tests on Windows 2023-09-01 11:08:05 +01:00
Hennadii Stepanov
162ce4e5dd
qt: Update translation source file
The diff is generated by executing `make -C src translate`.
2023-09-01 08:08:36 +01:00
Hennadii Stepanov
19520bff09
qt: Bump Transifex slug for 26.x 2023-09-01 07:49:31 +01:00
Hennadii Stepanov
69821b27f5
qt: Translation updates from Transifex
The diff is generated by executing the `update-translations.py` script.
2023-09-01 07:39:00 +01:00
Andrew Chow
5666966dff
Merge bitcoin/bitcoin#28364: log: log wtxids when possible, add TXPACKAGES category
a3b55c94b9 [doc] move comment about AlreadyHaveTx DoS score to the right place (glozow)
3b8c17838a [log] add more logs related to orphan handling (glozow)
51b3275cd1 [log] add category TXPACKAGES for orphanage and package relay (glozow)
a33dde1e41 [log] include wtxid in tx {relay,validation,orphanage} logging (glozow)

Pull request description:

  This was taken from #28031 (see #27463 for project tracking).

  - Log wtxids in addition to txids when possible. This allows us to track the fate of a transaction from inv to mempool accept/reject through logs.
  - Additional orphan-related logging to make testing and debugging easier. Suggested in https://github.com/bitcoin/bitcoin/pull/28031#pullrequestreview-1531022386 and https://github.com/bitcoin/bitcoin/pull/28031#discussion_r1269622220
  - Add `TXPACKAGES` category for logging.
  - Move a nearby comment block that was in the wrong place.

ACKs for top commit:
  instagibbs:
    reACK a3b55c94b9
  achow101:
    ACK a3b55c94b9
  brunoerg:
    crACK a3b55c94b9
  mzumsande:
    Code review ACK a3b55c94b9

Tree-SHA512: 21884ef7c2ea2fd006e715574a9dd3e6cbbe8f82d62c6187fe1d39aad5a834051203fda5f355a06ca40c3e2b9561aec50d7c922a662b1edc96f7b552c9f4b24d
2023-08-31 12:55:38 -04:00
fanquake
a4e0bcb6c9
Merge bitcoin/bitcoin#28369: doc: Fill in the required skills in the good_first_issue template
fa3b816240 doc: Fill in the required skills in the good_first_issue template (MarcoFalke)

Pull request description:

  Compiling and running the tests is always required, so fill it in to avoid having to type it manually every time.

ACKs for top commit:
  willcl-ark:
    ACK fa3b816

Tree-SHA512: 1bcb93aaff235dd62513cda05547db90d12ad7638c050ee125845d20df1e1bc457bf4ec590677a0875fae8729dcc58842398e637e517997b35e3b3adffc34a72
2023-08-31 13:37:09 +01:00
Hennadii Stepanov
9561e497e9
Merge bitcoin-core/gui#749: make '-min' minimize wallet loading dialog
32db15450a gui: make '-min' minimize wallet loading dialog (furszy)

Pull request description:

  Simple fix for #748.

  When '-min' is enabled, no loading dialog should
  be presented on screen during startup.

ACKs for top commit:
  hebasto:
    ACK 32db15450a, tested on Debian 11 + XFCE.

Tree-SHA512: d08060b044938c67e8309db77b49ca645850fc21fdd7d78d5368d336fb9f602dcc66ea398a7505b00bf7d43afa07108347c7260480319fad3ec84cb41332f780
2023-08-31 12:29:24 +01:00
josibake
1580e3be83
fuzz: add ConstructPubKeyBytes function
Today, this code only has one spot where it needs well-formed pubkeys,
but future PRs will want to reuse this code.

Add a function which creates a well-formed byte array that can be turned
into a pubkey. It is not required that the pubkey is valid, just that it
can be recognized as a compressed or uncompressed pubkey.

Note: while the main intent of this commit is to wrap the existing
logic into a function, it also switches to `PickValueFromArray` so that
we are only choosing one of 0x04, 0x06, or 0x07. The previous code,
`ConsumeIntegralInRange` would have also picked 0x05, which is not
definied in the context of compressed vs uncompressed keys.

See https://bitcoin.stackexchange.com/questions/57855/c-secp256k1-what-do-prefixes-0x06-and-0x07-in-an-uncompressed-public-key-signif
for more details.
2023-08-30 17:45:51 +02:00
fanquake
96f2cf8d2c
build: use -muse-unaligned-vector-move for Windows
We currently work around a longstanding GCC issue with aligned vector
instructions, in our release builds, by patching the behaviour we want
into GCC (see discussion in #24736).

A new option now exists in the binutils assembler,
`-muse-unaligned-vector-move`, which should also achieve the behaviour
we want (at least for our code). This was added in the 2.38 release,
see
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c8480b58e1968f209b6365af7422678f348222c2.
```bash
x86: Add -muse-unaligned-vector-move to assembler

Unaligned load/store instructions on aligned memory or register are as
fast as aligned load/store instructions on modern Intel processors.  Add
a command-line option, -muse-unaligned-vector-move, to x86 assembler to
encode encode aligned vector load/store instructions as unaligned
vector load/store instructions.
```

Even if we introduce this option into our build system, we'll have to
maintain our GCC patching, as we want all code that ends up in the
binary, to avoid these instructions. However, there may be some value in
adding the option, as it could be an improvement for someone building
(bitcoind.exe) with an unpatched compiler.
2023-08-30 16:34:37 +01:00
fanquake
df5af114df
Merge bitcoin/bitcoin#28353: ci: Remove /ro_base bind mount, Remove LC_ALL=C from s390x task
fa70cbd969 ci: Remove unused TEST_RUNNER_ENV="LC_ALL=C" from s390x task (MarcoFalke)
fa33354dcb ci: Remove /ro_base bind mount (MarcoFalke)
fa0df9d4c4 doc: Remove sudo from command that is already run as root (MarcoFalke)

Pull request description:

  Remove some CI stuff no longer needed.

ACKs for top commit:
  fanquake:
    ACK  fa70cbd969 - did not test the s390x job.

Tree-SHA512: 3a6ed0cfc855a92c2f834e59494c0a19a5647510247aece5e40a1aa78074894fe7454e684a1ea1f8f0662c50ac1caf2e390398b0fcfbf81544e6488fa9b8915e
2023-08-30 16:23:39 +01:00
fanquake
505ea30b47
Merge bitcoin/bitcoin#28370: guix: remove GCC 10 workaround from NSIS
588068d5a1 guix: remove GCC 10 workaround from NSIS (fanquake)

Pull request description:

  Fixed upstream in 3.06.
  See 229b6136c4 and https://sourceforge.net/p/nsis/bugs/1248/.

  Split from #27897, as that is still WIP, and GCC 12 isn't required to make this change.
  This commit could have gone in with #28328.

  Guix Build (same for x86_64 & aarch64):
  ```bash
  81a565bc5c719d04cb6640cf7593d7fdd6e37935dc2ac9280f638e625c1c5f87  guix-build-588068d5a12b/output/aarch64-linux-gnu/SHA256SUMS.part
  6f1ed3a2a053c3e90f1511fe33239378fc2631f46d795a955807ab39e2b93dfc  guix-build-588068d5a12b/output/aarch64-linux-gnu/bitcoin-588068d5a12b-aarch64-linux-gnu-debug.tar.gz
  c8a2904c651b862d9dce3f4094b59b66be5e745111b75c420452bd04ab9cdbe3  guix-build-588068d5a12b/output/aarch64-linux-gnu/bitcoin-588068d5a12b-aarch64-linux-gnu.tar.gz
  654bb5d89e12f936e63e2c910c78842c43db7048a895052295f613a50b639857  guix-build-588068d5a12b/output/arm-linux-gnueabihf/SHA256SUMS.part
  8a1b67f3c12b579b374c559f59d709bd83bcd3cff3ec5a4274119c0e5f6c388f  guix-build-588068d5a12b/output/arm-linux-gnueabihf/bitcoin-588068d5a12b-arm-linux-gnueabihf-debug.tar.gz
  7d8a3327599702a94be4b8d49eda7857f732c290773a775c6de507da656e271b  guix-build-588068d5a12b/output/arm-linux-gnueabihf/bitcoin-588068d5a12b-arm-linux-gnueabihf.tar.gz
  215786257409612206db7ff4008dbcb6a60dcf6cc92a1a437124a1483612f699  guix-build-588068d5a12b/output/arm64-apple-darwin/SHA256SUMS.part
  e36b41c531d34ca843028b778163bed4ce4c52310ed8056eff8a1a1b47b61fb7  guix-build-588068d5a12b/output/arm64-apple-darwin/bitcoin-588068d5a12b-arm64-apple-darwin-unsigned.dmg
  ecb488625bdf566e7c63781795f296ec4f630ef90edf7e6073591ed1d9b90bda  guix-build-588068d5a12b/output/arm64-apple-darwin/bitcoin-588068d5a12b-arm64-apple-darwin-unsigned.tar.gz
  d8f9759a903cd052ea3e562d1ef186c9dad38089205650d1bcb218e7506c378f  guix-build-588068d5a12b/output/arm64-apple-darwin/bitcoin-588068d5a12b-arm64-apple-darwin.tar.gz
  385084fe6d80d0b563b1b20d558b29681fd5bf624bc70c403e831cd8aae45dc0  guix-build-588068d5a12b/output/dist-archive/bitcoin-588068d5a12b.tar.gz
  89504c8be28482d4f70740d6865aa26db0e1854d0b35598c43462cd35f0b49c4  guix-build-588068d5a12b/output/powerpc64-linux-gnu/SHA256SUMS.part
  5836bfb4c9a11318362a89db25e4cd9363688ae6be18a6abfd1974a52c0b2759  guix-build-588068d5a12b/output/powerpc64-linux-gnu/bitcoin-588068d5a12b-powerpc64-linux-gnu-debug.tar.gz
  3e6f4481a594316ab08ea946c5fac6055ca8a81a91ce0a20c44976b3bc4f8d0d  guix-build-588068d5a12b/output/powerpc64-linux-gnu/bitcoin-588068d5a12b-powerpc64-linux-gnu.tar.gz
  4e753efe5a20cf6f1e83e604d9f8ba0d79b3c96fc5d5487ec7ed0f33c819b99a  guix-build-588068d5a12b/output/powerpc64le-linux-gnu/SHA256SUMS.part
  9d29e49b519ce1d683531699dd15e72495052151b21404affc50e7b228155eb1  guix-build-588068d5a12b/output/powerpc64le-linux-gnu/bitcoin-588068d5a12b-powerpc64le-linux-gnu-debug.tar.gz
  511179d90bbf6beb45b6168575a78600d38a060891dc1aa8f11f0adc5ba51f87  guix-build-588068d5a12b/output/powerpc64le-linux-gnu/bitcoin-588068d5a12b-powerpc64le-linux-gnu.tar.gz
  d46184105524d59a75066b067b63df6bfd2203d8003c343a5898ee7d4e4f78e5  guix-build-588068d5a12b/output/riscv64-linux-gnu/SHA256SUMS.part
  b6434ec5a4a046b9448f36f5596f6db0f8cd71a3e4383827869fcbaa25e005e4  guix-build-588068d5a12b/output/riscv64-linux-gnu/bitcoin-588068d5a12b-riscv64-linux-gnu-debug.tar.gz
  237e37ccae4095a1d8aa34d6b967655561ba0a524dfb79e3dcd4c18ad8f8a222  guix-build-588068d5a12b/output/riscv64-linux-gnu/bitcoin-588068d5a12b-riscv64-linux-gnu.tar.gz
  db28897936262e344da8011d37afde97ed53ba4f5ce1a3f935d258284b22e649  guix-build-588068d5a12b/output/x86_64-apple-darwin/SHA256SUMS.part
  8d71763fc748cde1f68785eef4b1a498c1ec4c13cf94f02ad8727debe0d94a1d  guix-build-588068d5a12b/output/x86_64-apple-darwin/bitcoin-588068d5a12b-x86_64-apple-darwin-unsigned.dmg
  1e0bf2ef0f65f2e7fe5439fe0a15a4803e06d7c42dae06133be5d1b67fa30657  guix-build-588068d5a12b/output/x86_64-apple-darwin/bitcoin-588068d5a12b-x86_64-apple-darwin-unsigned.tar.gz
  2d71083593583f3a3ed2e83d4a05f67338e9cb51cb730d238827eef7d3e9007e  guix-build-588068d5a12b/output/x86_64-apple-darwin/bitcoin-588068d5a12b-x86_64-apple-darwin.tar.gz
  cc3cc2c1077a04d5643ca21a43b8b7f233b8c743eb73f066643ddfd4a1e1ce27  guix-build-588068d5a12b/output/x86_64-linux-gnu/SHA256SUMS.part
  e18c1c0c1cf836c9e540edd969d2657afd3847345b1e0a6e5a9bebfd35782c47  guix-build-588068d5a12b/output/x86_64-linux-gnu/bitcoin-588068d5a12b-x86_64-linux-gnu-debug.tar.gz
  4c88aa50227ccd7bb9069369cfc2196de42212f5d0553902155346ae39ef2401  guix-build-588068d5a12b/output/x86_64-linux-gnu/bitcoin-588068d5a12b-x86_64-linux-gnu.tar.gz
  51f9f0d9c21598d9d37132e21c786378468c50c393b46e084d81c504186238cd  guix-build-588068d5a12b/output/x86_64-w64-mingw32/SHA256SUMS.part
  a4a0b55a40ba17b70c93eaba132e31c94cb2380cad0fe4e2ebe199c68a49c293  guix-build-588068d5a12b/output/x86_64-w64-mingw32/bitcoin-588068d5a12b-win64-debug.zip
  75495c9a00ee7401b96afa51c93fe56d8b10a531ce0526f5b4713b9e8aaab9a5  guix-build-588068d5a12b/output/x86_64-w64-mingw32/bitcoin-588068d5a12b-win64-setup-unsigned.exe
  a6e8416846ebea253d2b3c5c40f60a227bd5cfb2272a477cf364a085fea140e4  guix-build-588068d5a12b/output/x86_64-w64-mingw32/bitcoin-588068d5a12b-win64-unsigned.tar.gz
  2bbd6cd49ad0297a5b3279a5cfbcbb35586cfdd72388e5e1ef2d87e1c8a9cf97  guix-build-588068d5a12b/output/x86_64-w64-mingw32/bitcoin-588068d5a12b-win64.zip
  ```

ACKs for top commit:
  hebasto:
    ACK 588068d5a1.

Tree-SHA512: e5876d64ee02fef8a7152b9f649949933b356347de713e00a58aba278243b7de999c3fc50f3cc88e625d07a38e5a6ec2afcb6e836d256b6ac91e91f90f473e64
2023-08-30 16:19:59 +01:00
fanquake
1348454d82
Merge bitcoin/bitcoin#28352: test: Support powerpc64le in get_previous_releases.py
faf7e69862 test: Support powerpc64le in get_previous_releases.py (MarcoFalke)

Pull request description:

  To test: `test/get_previous_releases.py -b -t /tmp/prev_releases v22.0`

  On master: `Not sure which binary to download for powerpc64le-unknown-linux-gnu`
  Here: (pass)

ACKs for top commit:
  fanquake:
    ACK faf7e69862

Tree-SHA512: 33d9348f99e0d3924a6a5cba8833ec9e413e80167012b557922f3628069dabd555b02f98a6bfd0eb80e2bbbcdb50865b7bca216e1d080b1546ee4812abda4bc2
2023-08-30 16:16:44 +01:00