Compare commits

..

237 Commits

Author SHA1 Message Date
merge-script
398c176ea8 Merge bitcoin/bitcoin#33534: [29.x] Finalise 29.2rc2
d82fc69829 doc: update release notes for 29.2rc2 (fanquake)
513cef75ee doc: update manual pages for v29.2rc2 (fanquake)
eea16f7de7 build: bump version to v29.2rc2 (fanquake)
6b3c1dbc5c contrib: fix using macdploy script without translations. (amisha)

Pull request description:

  It's been 2 weeks since rc1: https://github.com/bitcoin/bitcoin/releases/tag/v29.2rc1.
  We've backported more changes:
  * #33403
  * #33474
  * #33482

  Lets do `rc2`.

ACKs for top commit:
  davidgumberg:
    reACK d82fc69
  glozow:
    ACK d82fc69829
  darosior:
    utACK d82fc69829. Changes look good to me, but i have not been through the process of regenerating the doc myself.

Tree-SHA512: c829efe89f86c9c76767ffe60a3779ece902ee9e3c8f6b4203562aaf257019484bfa49916ddfabdcabbd1478368d9b80a3f0a15057778aa1984852ea245283a6
2025-10-03 14:01:58 -04:00
fanquake
d82fc69829 doc: update release notes for 29.2rc2 2025-10-03 18:07:20 +01:00
fanquake
513cef75ee doc: update manual pages for v29.2rc2 2025-10-03 16:26:09 +01:00
fanquake
eea16f7de7 build: bump version to v29.2rc2 2025-10-03 16:26:09 +01:00
amisha
6b3c1dbc5c contrib: fix using macdploy script without translations.
QT translations are optional, but the script would error when
'translations_dir' falls back to its default value NULL.

This PR fixes it by moving the set-up of QT translations under
the check for 'translations_dir' presence.

Github-Pull: #33482
Rebased-From: 7b5261f7ef
2025-10-03 16:26:09 +01:00
merge-script
d1b5d4e9ca Merge bitcoin/bitcoin#33474: [29.x] Backports
2d7ebd2d91 doc: update release notes for 29.x (fanquake)
a8bb76b61f test: add more TRUC reorg coverge (Greg Sanders)
666aec7d49 Mempool: Do not enforce TRUC checks on reorg (Greg Sanders)
6f23ead4a2 fuzz: don't bypass_limits for most mempool harnesses (Greg Sanders)
9d9baafc6f doc: rpc: fix case typo in `finalizepsbt` help (final_scriptwitness) (Sebastian Falbesoner)
22ab141243 rpc: fix getblock(header) returns target for tip (Sjors Provoost)
118abf4c30 test: add block 2016 to mock mainnet (Sjors Provoost)

Pull request description:

  Backports:
  * #33446
  * #33484
  * #33504

ACKs for top commit:
  luke-jr:
    ACK 2d7ebd2d91
  dergoegge:
    ACK 2d7ebd2d91
  marcofleon:
    ACK 2d7ebd2d91

Tree-SHA512: 27b852177d8502d6c703cb0eeb1e4df9d651c9c8add5fbf6ae4eeb4b8aefc145471f38f9794c0ed276bf7ebba1844ecbaf5a84cb5913ca7d0a546f5216ea3b2d
2025-10-03 14:21:52 +01:00
fanquake
2d7ebd2d91 doc: update release notes for 29.x 2025-10-02 15:18:36 +01:00
Greg Sanders
a8bb76b61f test: add more TRUC reorg coverge
Github-Pull: #33504
Rebased-From: 06df14ba75
2025-10-02 15:17:34 +01:00
Greg Sanders
666aec7d49 Mempool: Do not enforce TRUC checks on reorg
Not enforcing TRUC topology on reorg was the intended
behavior, but the appropriate bypass argument was not
checked.

This mistake means we could potentially invalidate a long
chain of perfectly incentive-compatible transactions that
were made historically, including subsequent non-TRUC
transactions, all of which may have been very high feerate.

Lastly, it wastes CPU cycles doing topology checks since
this behavior cannot actually enforce the topology in
general for the reorg setting.

Github-Pull: #33504
Rebased-From: 26e71c237d
2025-10-02 15:17:31 +01:00
Greg Sanders
6f23ead4a2 fuzz: don't bypass_limits for most mempool harnesses
Using bypass_limits=true is essentially fuzzing part of a
reorg only, and results in TRUC invariants unable to be
checked. Remove most instances of bypassing limits, leaving
one harness able to do so.

Github-Pull: #33504
Rebased-From: bbe8e9063c
2025-10-02 15:17:10 +01:00
Sebastian Falbesoner
9d9baafc6f doc: rpc: fix case typo in finalizepsbt help (final_scriptwitness)
Github-Pull: #33484
Rebased-From: ff05bebcc4
2025-09-29 15:56:02 -04:00
Sjors Provoost
22ab141243 rpc: fix getblock(header) returns target for tip
A target field was added to the getblock and getblockheader RPC calls in bitcoin#31583, but it mistakingly always used the tip value.

Because regtest does not have difficulty adjustment, a test is added for mainnet instead.

Github-Pull: #33446
Rebased-From: bf7996cbc3
2025-09-24 10:34:21 -04:00
Sjors Provoost
118abf4c30 test: add block 2016 to mock mainnet
The next commit requires an additional mainnet block which changes the difficulty.

Also fix a few minor mistakes in the test (suite):
- rename the create_coinbase retarger_period argument to halving_period. Before bitcoin#31583 this was hardcoded for regtest where these values are the same.
- drop unused fees argument from mine helper

Finally the CPU miner instructions for generating the alternative mainnet chain are expanded.

Github-Pull: #33446
Rebased-From: 4c3c1f42cf
2025-09-24 10:25:02 -04:00
merge-script
f6d49d0a09 Merge bitcoin/bitcoin#33403: Backport Cirrus runners to 29.x
5750355139 ci: link against -lstdc++ in native fuzz with msan job (fanquake)
78d93effd0 ci: Checkout latest merged pulls (MarcoFalke)
4a034cbeb4 ci: reduce runner sizes on various jobs (will)
6ded1fe117 ci: remove un-needed lint_run*.sh files (willcl-ark)
4e8b64b181 ci: fix annoying docker warning (will)
773e4cda94 ci: add ccache hit-rate warning when < 75% (will)
4339787379 doc: Detail configuration of hosted CI runners (will)
c7f290b826 ci: dynamically match makejobs with cores (will)
a08c3cc51c ci: remove .cirrus.yml (will)
06424fb004 ci: port lint (will)
0f0378fe3c ci: port msan-depends (will)
643385b22d ci: port tsan-depends (will)
3b2dcc8b9a ci: port tidy (will)
b4286cf354 ci: port centos-depends-gui (will)
5057b9a6ff ci: port previous-releases-depends-debug (will)
85ec6c6882 ci: port fuzzer-address-undefined-integer-nodepends (will)
544f902b2a ci: port i686-multiprocess-DEBUG (will)
e826c3daa5 ci: port nowallet-libbitcoinkernel (will)
835b5b8bb1 ci: port mac-cross-gui-notests (will)
a91567a980 ci: force reinstall of kernel headers in asan (will)
819ee09af3 ci: update asan-lsan-ubsan (will)
894a3cbe42 ci: update windows-cross job (will)
82c60a3151 ci: port arm 32-bit job (will)
849993377d ci: add job to determine runner type (will)
f9f3e8b686 ci: add Cirrus cache host (will)
af086431e8 ci: have base install run in right dir (will)
0a649d07c9 ci: use docker build cache arg directly (will)
f3089fb2cf ci: use buildx in ci (will)
1faf918a16 ci: add configure-docker action (will)
954c1a55e4 ci: add REPO_USE_CIRRUS_RUNNERS (will)
301aa5d814 ci: add caching actions (will)
f63b8e960d ci: add configure environment action (will)

Pull request description:

  Backports #32989 to the 29.x branch

ACKs for top commit:
  m3dwards:
    ACK 5750355139

Tree-SHA512: c0509903043acd1c1e62f6382d9373a5c7a51377a76cbe6ea0cacf83cb03b10e658b8fd0dc2080acb9d6361f0a7883feb0134acd9bc53d164561364d42e111e7
2025-09-24 10:18:19 -04:00
fanquake
5750355139 ci: link against -lstdc++ in native fuzz with msan job
Github-Pull: #33425
Rebased-From: b77137a564
2025-09-23 15:26:11 +01:00
MarcoFalke
78d93effd0 ci: Checkout latest merged pulls
Github-Pull: #33303
Rebased-From: fa8f081af3
2025-09-23 15:26:10 +01:00
will
4a034cbeb4 ci: reduce runner sizes on various jobs
Github-Pull: #33319
Rebased-From: 5eeb2facbb

These jobs can use reduced runner size to avoid wasting CPU, as much of
the long-running part of the job is single-threaded.

Suggested in: https://github.com/bitcoin/bitcoin/pull/32989#discussion_r2321775620

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
2025-09-23 15:26:09 +01:00
willcl-ark
6ded1fe117 ci: remove un-needed lint_run*.sh files
Github-Pull: #32989
Rebased-From: 3c5da69a23

ci/lint_run_all.sh: Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
2025-09-23 15:26:08 +01:00
will
4e8b64b181 ci: fix annoying docker warning
Github-Pull: #32989
Rebased-From: 2aa288efdd

Docker currently warns that we are missing a default value.

Set this to scratch which will error if an appropriate image tag is not
passed in to silence the warning.
2025-09-23 15:26:07 +01:00
will
773e4cda94 ci: add ccache hit-rate warning when < 75%
Github-Pull: #32989
Rebased-From: dd1c5903e8

Print the ccache hit-rate for the job using a GitHub annotation if it
was below 75%.
2025-09-23 15:26:06 +01:00
will
4339787379 doc: Detail configuration of hosted CI runners
Github-Pull: #32989
Rebased-From: f427284483
2025-09-23 15:26:06 +01:00
will
c7f290b826 ci: dynamically match makejobs with cores
Github-Pull: #32989
Rebased-From: 3f339e99e0

Previously jobs were running on a large multi-core server where 10 jobs
as default made sense (or may even have been on the low side).

Using hosted runners with fixed (and lower) numbers of vCPUs we should
adapt compilation to match the number of cpus we have dynamically.

This is cross-platform compatible with macos and linux only.
2025-09-23 15:26:05 +01:00
will
a08c3cc51c ci: remove .cirrus.yml
Github-Pull: #32989
Rebased-From: 4393ffdd83

Removed as unused.
2025-09-23 15:26:04 +01:00
will
06424fb004 ci: port lint
Github-Pull: #32989
Rebased-From: bc41848d00

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:26:03 +01:00
will
0f0378fe3c ci: port msan-depends
Github-Pull: #32989
Rebased-From: d290a8e6ea

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:26:02 +01:00
will
643385b22d ci: port tsan-depends
Github-Pull: #32989
Rebased-From: 9bbae61e3b

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:26:01 +01:00
will
3b2dcc8b9a ci: port tidy
Github-Pull: #32989
Rebased-From: bf7d536452

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:26:00 +01:00
will
b4286cf354 ci: port centos-depends-gui
Github-Pull: #32989
Rebased-From: 549074bc64

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:59 +01:00
will
5057b9a6ff ci: port previous-releases-depends-debug
Github-Pull: #32989
Rebased-From: 58e38c3a04

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:58 +01:00
will
85ec6c6882 ci: port fuzzer-address-undefined-integer-nodepends
Github-Pull: #32989
Rebased-From: 341196d75c

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:57 +01:00
will
544f902b2a ci: port i686-multiprocess-DEBUG
Github-Pull: #32989
Rebased-From: f2068f26c1

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:56 +01:00
will
e826c3daa5 ci: port nowallet-libbitcoinkernel
Github-Pull: #32989
Rebased-From: 2a00b12d73

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:55 +01:00
will
835b5b8bb1 ci: port mac-cross-gui-notests
Github-Pull: #32989
Rebased-From: 9c2514de53

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:54 +01:00
will
a91567a980 ci: force reinstall of kernel headers in asan
Github-Pull: #32989
Rebased-From: 2c990d84a3

When using hosted runners in combination with cached docker images,
there is the possibility that the host runner image is updated,
rendering the linux-headers package (stored in the cached docker image)
incompatible.

Fix this by doing a re-install of the headers package in
03_test_script.sh.

If the underlying runner kernel has not changed thie has no effect, but
prevents the job from failing if it has.
2025-09-23 15:25:53 +01:00
will
819ee09af3 ci: update asan-lsan-ubsan
Github-Pull: #32989
Rebased-From: 884251441b

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:52 +01:00
will
894a3cbe42 ci: update windows-cross job
Github-Pull: #32989
Rebased-From: 04e7bfbceb

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:51 +01:00
will
82c60a3151 ci: port arm 32-bit job
Github-Pull: #32989
Rebased-From: f253031cb8

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:50 +01:00
will
849993377d ci: add job to determine runner type
Github-Pull: #32989
Rebased-From: cc1735d777

To remove multiple occurances of the respository name, against which we
compare `${{ github.repository }}` to check if we should use Cirrus
Runners, introduce a helper job which can check a single environment
variable and output this as an input to subsequent jobs.

Forks can maintain a trivial patch of their repo name against the
`REPO_USE_CIRRUS_RUNNERS` variable in ci.yml if they have Cirrus Runners
of their own, which will then enable cache actions and docker build
cache to use Cirrus Cache.

It's not possible to use `${{ env.USE_CIRRUS_RUNNERS }}` in the
`runs-on:` directive as the context is not supported by GitHub.

If it was, this job would no longer be necessary.
2025-09-23 15:25:49 +01:00
will
f9f3e8b686 ci: add Cirrus cache host
Github-Pull: #32989
Rebased-From: 020069e6b7

Whilst the action cirruslabs/actions/cache will automatically set this
host, the docker `gha` build cache backend will not be aware of it.

Set the value here, which will later be used in the docker build args to
enable docker build cache on the cirrus cache.
2025-09-23 15:25:48 +01:00
will
af086431e8 ci: have base install run in right dir
Github-Pull: #32989
Rebased-From: 9c2b96e0d0

This sets the build dir at build time so that Apple SDK gets installed
in the correct/expected location for the runtime to find it.

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-23 15:25:47 +01:00
will
0a649d07c9 ci: use docker build cache arg directly
Github-Pull: #32989
Rebased-From: 18f6be09d0

Reverts: e87429a2d0

This was added in PR #31545 with the intention that self-hosted runners
might use it to save build cache.

As we are not using hosted runners with a registry build cache, the bulk
of this commit can be reverted, simply using the value of
$DOCKER_BUILD_CACHE_ARG in the script.

link: https://github.com/bitcoin/bitcoin/pull/31545
2025-09-23 15:25:46 +01:00
will
f3089fb2cf ci: use buildx in ci
Github-Pull: #32989
Rebased-From: 94a0932547

Using buildx is required to properly load the correct driver, for use
with registry caching. Neither build, nor BUILDKIT=1 currently do this
properly.

Use of `docker buildx build` is compatible with podman.
2025-09-23 15:25:45 +01:00
will
1faf918a16 ci: add configure-docker action
Github-Pull: #32989
Rebased-From: fdf64e5532

Another action to reduce boilerplate in the main ci.yml file.

This action will set up a docker builder compatible with caching build
layers to a container registry using the `gha` build driver.

It will then configure the docker build cache args.
2025-09-23 15:25:44 +01:00
will
954c1a55e4 ci: add REPO_USE_CIRRUS_RUNNERS
Github-Pull: #32989
Rebased-From: 33ba073df7

If set, Cirrus runners will be used on pushes to, and pull requests
against, this repository.

Forks can set this if they have their own cirrus runners.
2025-09-23 15:25:43 +01:00
will
301aa5d814 ci: add caching actions
Github-Pull: #32989
Rebased-From: b232b0fa5e

Add "Restore" and "Save" caching actions.

These actions reduce boilerplate in the main ci.yml configuration file.

These actions are implemented so that caches will be saved on `push`
only.

When a pull request is opened it will cache hit on the caches from the
lastest push, or in the case of depends will hit on any matching depends
hash, falling back to partial matches.

Depends caches are hashed using
`$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)`
and this hash is passed in as an input to the actions. This means we
direct cache hit in cases where depends would not be re-built, otherwise
falling back to a partial match.

Previous releases cache is hashed similarly to depends, but using the
test/get_previous_releases.py file.

The cirruslabs cache action will fallback transparently to GitHub's
cache in the case that the job is not being run on a Cirrus Runner,
making these compatible with running on forks (on free GH hardware).
2025-09-23 15:25:42 +01:00
will
f63b8e960d ci: add configure environment action
Github-Pull: #32989
Rebased-From: b8fcc9fcbc
2025-09-23 15:25:41 +01:00
merge-script
7e1eca4882 Merge bitcoin/bitcoin#33344: [29.x] Backports
f2bd79f80c doc: update manual pages for v29.2rc1 (fanquake)
461dd13faf build: bump version to v29.2rc1 (fanquake)
9bc4afb62c doc: update release notes for 29.x (fanquake)
61cdc04a83 net: Do not apply whitelist permission to onion inbounds (Martin Zumsande)
1288d44804 test: send duplicate blocktxn message in p2p_compactblocks.py (Eugene Siegel)
569ceb0df4 net: check for empty header before calling FillBlock (Eugene Siegel)
4c940d4789 p2p: remove vestigial READ_STATUS_CHECKBLOCK_FAILED (Greg Sanders)
9b95ab5e9d p2p: Add witness mutation check inside FillBlock (Greg Sanders)
e97588fc3d trace: Workaround GCC bug compiling with old systemtap (Luke Dashjr)
324caa8497 ci: always use tag for LLVM checkout (fanquake)
2717331981 Fix benchmark CSV output (Hennadii Stepanov)

Pull request description:

  Backports:
  * #32646
  * #33296
  * #33310
  * #33340
  * #33364
  * #33395

  Plus changes for 29.2rc1.

ACKs for top commit:
  darosior:
    utACK f2bd79f80c
  mzumsande:
    utACK f2bd79f80c

Tree-SHA512: 346a92032b7a069e2941056c6273ff65e360c5834832b106350a9cd42b634518cc75b807da6e51a6292e3a33342bb7b145777d3538a2792e03c63962d747a025
2025-09-17 14:00:10 -04:00
fanquake
f2bd79f80c doc: update manual pages for v29.2rc1 2025-09-17 15:54:29 +01:00
fanquake
461dd13faf build: bump version to v29.2rc1 2025-09-17 15:47:34 +01:00
fanquake
9bc4afb62c doc: update release notes for 29.x 2025-09-17 15:45:45 +01:00
Martin Zumsande
61cdc04a83 net: Do not apply whitelist permission to onion inbounds
Tor inbound connections do not reveal the peer's actual network address.
Therefore do not apply whitelist permissions to them.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: #33395
Rebased-From: f563ce9081
2025-09-17 10:12:08 +01:00
Eugene Siegel
1288d44804 test: send duplicate blocktxn message in p2p_compactblocks.py
Add test_multiple_blocktxn_response that checks that the peer is
disconnected.

Github-Pull: #33296
Rebased-From: 8b62647680
2025-09-12 15:44:07 +01:00
Eugene Siegel
569ceb0df4 net: check for empty header before calling FillBlock
Previously in debug builds, this would cause an Assume crash if
FillBlock had been called previously. This could happen when multiple
blocktxn messages were received.

Co-Authored-By: Greg Sanders <gsanders87@gmail.com>

Github-Pull: #33296
Rebased-From: 5e585a0fc4
2025-09-12 15:44:03 +01:00
Greg Sanders
4c940d4789 p2p: remove vestigial READ_STATUS_CHECKBLOCK_FAILED
Github-Pull: #32646
Rebased-From: 28299ce776
2025-09-12 15:44:00 +01:00
Greg Sanders
9b95ab5e9d p2p: Add witness mutation check inside FillBlock
Since #29412, we have not allowed mutated blocks to continue
being processed immediately the block is received, but this
is only done for the legacy BLOCK message.

Extend these checks as belt-and-suspenders to not allow
similar mutation strategies to affect relay by honest peers
by applying the check inside
PartiallyDownloadedBlock::FillBlock, immediately before
returning READ_STATUS_OK.

This also removes the extraneous CheckBlock call.

Github-Pull: #32646
Rebased-From: bac9ee4830
2025-09-12 15:43:53 +01:00
Luke Dashjr
e97588fc3d trace: Workaround GCC bug compiling with old systemtap
Github-Pull: #33310
Rebased-From: 93a29ff283
2025-09-12 11:52:26 +01:00
fanquake
324caa8497 ci: always use tag for LLVM checkout
Rather than trying to match the apt installed clang version, which is
prone to intermittent issues. i.e #33345.

Github-Pull: #33364
Rebased-From: b736052e39
2025-09-12 09:48:59 +01:00
Hennadii Stepanov
2717331981 Fix benchmark CSV output
The `SHA256AutoDetect` return output is used, among other use cases, to
name benchmarks. Using a comma breaks the CSV output.

This change replaces the comma with a semicolon, which fixes the issue.

Github-Pull: #33340
Rebased-From: 790b440197
2025-09-09 10:13:49 +01:00
merge-script
a0e438bd49 Merge bitcoin/bitcoin#33294: [29.x] *san CI backports
7c6be9acae doc: update release notes for 29.x (fanquake)
ea40fa95d9 ci: use LLVM 21 (fanquake)
5513516241 ci: remove DEBUG_LOCKORDER from TSAN job (fanquake)
f9939cdbe0 ci: instrument libc++ in TSAN job (fanquake)
0fba5ae021 ci: allow libc++ instrumentation other than msan (fanquake)
10cbf2255d ci: Use APT_LLVM_V in msan task (MarcoFalke)

Pull request description:

  Backports:
  * #32999
  * #33099 (added `ninja-build`)
  * #33258

ACKs for top commit:
  marcofleon:
    ACK 7c6be9acae, looks okay to me

Tree-SHA512: 928882d505ed8101a6d4123947252a84d40bd350383408926b5c37aed56dc3359067d1d14c443c51351a6958a8dd9e141bb7713665295ff1f1ad86c5f8a36df0
2025-09-08 17:16:58 +01:00
fanquake
7c6be9acae doc: update release notes for 29.x 2025-09-05 12:04:09 +01:00
fanquake
ea40fa95d9 ci: use LLVM 21
Github-Pull: #33258
Rebased-From: 4cf0ae474b
2025-09-03 16:51:18 +01:00
fanquake
5513516241 ci: remove DEBUG_LOCKORDER from TSAN job
Github-Pull: #33099
Rebased-From: 7aa5b67132
2025-09-03 16:51:18 +01:00
fanquake
f9939cdbe0 ci: instrument libc++ in TSAN job
Qt is disabled, as the build is now taking a very long time.

Github-Pull: #33099
Rebased-From: b09af2ce50
2025-09-03 16:51:14 +01:00
fanquake
0fba5ae021 ci: allow libc++ instrumentation other than msan
Github-Pull: #33099
Rebased-From: 6653cafd0b
2025-09-03 16:16:08 +01:00
MarcoFalke
10cbf2255d ci: Use APT_LLVM_V in msan task
Also, use update-alternatives to avoid having to manually specify
clang-${APT_LLVM_V} or llvm-symbolizer-${APT_LLVM_V} everywhere.

Github-Pull: #32999
Rebased-From: fad040a578
2025-09-03 16:14:25 +01:00
merge-script
fd784f2774 Merge bitcoin/bitcoin#33271: [29.x] finalise v29.1
084c95a18c doc: update manual pages for v29.1 (fanquake)
37d115c67e build: bump version to v29.1 final (fanquake)
b0d88bcc50 doc: finalise release notes for 29.1 (fanquake)
99ab2e70e7 ci: return to using dash in CentOS job (fanquake)
6448ebb5a7 doc: Remove wrong and redundant doxygen tag (MarcoFalke)

Pull request description:

  Backports:
  * #33236
  * #33261

  Since `rc2`, #33212 was also backported in #33251.

ACKs for top commit:
  glozow:
    ACK 084c95a18c
  willcl-ark:
    ACK 084c95a18c

Tree-SHA512: 0698e5b2d12f7328bf5af8dbbd92b0049de401c0a4af27fda2209f9aab35d827c5ac65eb9268aa1fae241e3adf0d3dd89324bb288655ead8af2b5584aae1f6d2
2025-09-03 10:49:29 -04:00
fanquake
084c95a18c doc: update manual pages for v29.1 2025-09-03 13:41:57 +01:00
fanquake
37d115c67e build: bump version to v29.1 final 2025-09-03 13:23:31 +01:00
fanquake
b0d88bcc50 doc: finalise release notes for 29.1 2025-09-03 13:22:28 +01:00
fanquake
99ab2e70e7 ci: return to using dash in CentOS job
Github-Pull: #33261
Rebased-From: 509ffea40a
2025-09-03 11:51:12 +01:00
MarcoFalke
6448ebb5a7 doc: Remove wrong and redundant doxygen tag
Remove it in feerate.

Fix it in the other places.

Github-Pull: #33236
Rebased-From: 966666de9a
2025-08-29 14:53:02 +01:00
merge-script
162c009c1d Merge bitcoin/bitcoin#33251: [29.x] backport #33212
fcac8022d8 test: index with an unclean restart after a reorg (Martin Zumsande)
16b1710d97 index: don't commit state in BaseIndex::Rewind (Martin Zumsande)

Pull request description:

  Backports #33212 to 29.x

ACKs for top commit:
  achow101:
    ACK fcac8022d8
  stickies-v:
    ACK fcac8022d8
  mzumsande:
    Code Review ACK fcac8022d8

Tree-SHA512: eeb9213f03bbb1d48c3ccb12121a6e475f436895d314b5171007e7e4ee457c74b312fa7f0d1808d6221dc22b192700a93ea21c4e9e04689da7dde7e1f79e9569
2025-08-27 09:46:59 +01:00
Martin Zumsande
fcac8022d8 test: index with an unclean restart after a reorg
This test fails without the previous commit.

Github-Pull: #33212
Rebased-From: a602f6fb7b
2025-08-24 22:51:07 +01:00
Martin Zumsande
16b1710d97 index: don't commit state in BaseIndex::Rewind
The committed state of an index should never
be ahead of the flushed chainstate. Otherwise, in the case
of an unclean shutdown, the blocks necessary to revert
from the prematurely committed state would not be
available, which would corrupt the coinstatsindex in particular.
Instead, the index state will be committed with the next
ChainStateFlushed notification.

Github-Pull: #33212
Rebased-From: 01b95ac6f4
2025-08-24 22:48:09 +01:00
merge-script
027a60d218 Merge bitcoin/bitcoin#33234: doc: update example bitcoin conf for 29.1rc2
65dc198d2c doc: update example bitcoin conf for 29.1rc2 (fanquake)

Pull request description:

  Followup to #33226.

ACKs for top commit:
  dergoegge:
    ACK 65dc198d2c
  willcl-ark:
    ACK 65dc198d2c

Tree-SHA512: b2924783dd98890bd031dbca8c9c126cd3ab45c3cc8d2f14dd5b5f940fcc7061f3d1f73e2d36482afceaae786f3087b59baab98db0f10bc0d19e3f016f52851a
2025-08-21 15:03:20 +01:00
fanquake
65dc198d2c doc: update example bitcoin conf for 29.1rc2 2025-08-21 13:39:05 +01:00
merge-script
89fe999cda Merge bitcoin/bitcoin#33226: [29.x] 33106 backport and final changes for rc2
0034dcfba9 [doc] man pages for 29.1rc2 (glozow)
eb1574af0c [build] bump version to 29.1rc2 (glozow)
f9f1ca5445 [doc] update release notes (glozow)
9dd7efc8c3 [policy] lower default minrelaytxfee and incrementalrelayfee to 100sat/kvB (glozow)
bbdab3ef7b [prep/test] make wallet_fundrawtransaction's minrelaytxfee assumption explicit (glozow)
da30ca0efa [prep/util] help MockMempoolMinFee handle more precise feerates (glozow)
a0ae3fc8a7 [prep/test] replace magic number 1000 with respective feerate vars (glozow)
1c1970fb45 [miner] lower default -blockmintxfee to 1sat/kvB (glozow)
3a7e093f94 [doc] assert that default min relay feerate and incremental are the same (glozow)
567c3ee3cb [test] explicitly check default -minrelaytxfee and -incrementalrelayfee (glozow)
6b5396c4b1 [test] RBF rule 4 for various incrementalrelayfee settings (glozow)
03da7aff99 [test] check bypass of minrelay for various minrelaytxfee settings (glozow)
4e3cfa660d [test] check miner doesn't select 0fee transactions (glozow)

Pull request description:

  Backports #33106 and includes final changes for 29.1rc2. Based on current network conditions (in which nodes rejecting 0.1-1sat/vB are missing many transactions), it is recommended to change these policy settings.

  I did not include #32750 because it causes #33177 and I don't foresee any problems; it was just a nice to have.
  For reviewers: the backport is unclean but fairly straightforward. I just had to adapt a test that is no longer in master (#32973) and include `-datacarriersize` in order to pad transaction size (#32406).

ACKs for top commit:
  dergoegge:
    utACK 0034dcfba9
  marcofleon:
    ACK  0034dcfba9
  murchandamus:
    crACK 0034dcfba9
  brunoerg:
    crACK 0034dcfba9

Tree-SHA512: 1b7540ac3fec5b15cf36926dbf633054f14549d76aa445a2bf042b5667e8637db4f9c21c869af25a0c3f8c7cca6c585d17896d2f7e95a6264c1ff59817446694
2025-08-21 12:18:36 +01:00
glozow
0034dcfba9 [doc] man pages for 29.1rc2 2025-08-20 10:19:48 -04:00
glozow
eb1574af0c [build] bump version to 29.1rc2 2025-08-20 10:19:48 -04:00
glozow
f9f1ca5445 [doc] update release notes
Release notes are from 18720bc5d5
2025-08-20 10:19:32 -04:00
glozow
9dd7efc8c3 [policy] lower default minrelaytxfee and incrementalrelayfee to 100sat/kvB
Let's say an attacker wants to use/exhaust the network's bandwidth, and
has the choice between renting resources from a commercial provider and
getting the network to "spam" itself it by sending unconfirmed
transactions. We'd like the latter to be more expensive than the former.

The bandwidth for relaying a transaction across the network is roughly
its serialized size (plus relay overhead) x number of nodes. A 1000vB
transaction is 1000-4000B serialized. With 100k nodes, that's 0.1-0.4GB
If the going rate for commercial services is 10c/GB, that's like 1-4c per kvB
of transaction data, so a 1000vB transaction should pay at least $0.04.

At a price of 120k USD/BTC, 100sat is about $0.12. This price allows us
to tolerate a large decrease in the conversion rate or increase in the
number of nodes.

Github-Pull: #33106
Rebased-From: 6da5de58ca
2025-08-20 10:19:23 -04:00
glozow
bbdab3ef7b [prep/test] make wallet_fundrawtransaction's minrelaytxfee assumption explicit
Github-Pull: #33106
Rebased-From: 2e515d2897
2025-08-20 10:19:23 -04:00
glozow
da30ca0efa [prep/util] help MockMempoolMinFee handle more precise feerates
Use a virtual size of 1000 to keep precision when using a feerate
(which is rounded to the nearest satoshi per kvb) that isn't just an
integer.

Github-Pull: #33106
Rebased-From: 457cfb61b5
2025-08-20 10:19:23 -04:00
glozow
a0ae3fc8a7 [prep/test] replace magic number 1000 with respective feerate vars
Github-Pull: #33106
Rebased-From: 3eab8b7240
2025-08-20 10:19:23 -04:00
glozow
1c1970fb45 [miner] lower default -blockmintxfee to 1sat/kvB
Back when we implemented coin age priority as a miner policy, miners
mempools might admit transactions paying very low fees, but then want to
set a higher fee for block inclusion. However, since coin age priority
was removed in v0.15, the block assembly policy is solely based on fees,
so we do not need to apply minimum feerate rules in multiple places. In
fact, the block assembly policy ignoring transactions that are added to
the mempool is likely undesirable as we waste resources accepting and
storing this transaction.

Instead, rely on mempool policy to enforce a minimum entry feerate to
the mempool (minrelaytxfee). Set the minimum block feerate to the
minimum non-zero amount (1sat/kvB) so it collects everything it finds in
mempool into the block.

Github-Pull: #33106
Rebased-From:  5f2df0ef78
2025-08-20 10:19:23 -04:00
glozow
3a7e093f94 [doc] assert that default min relay feerate and incremental are the same
Github-Pull: #33106
Rebased-From: d6213d6aa1
2025-08-20 10:19:23 -04:00
glozow
567c3ee3cb [test] explicitly check default -minrelaytxfee and -incrementalrelayfee
Github-Pull: #33106
Rebased-From:  1fbee5d7b6
2025-08-20 10:19:23 -04:00
glozow
6b5396c4b1 [test] RBF rule 4 for various incrementalrelayfee settings
Github-Pull: #33106
Rebased-From: 72dc18467d
2025-08-20 10:19:23 -04:00
glozow
03da7aff99 [test] check bypass of minrelay for various minrelaytxfee settings
Github-Pull: #33106
Rebased-From: 85f498893f
2025-08-20 10:19:23 -04:00
glozow
4e3cfa660d [test] check miner doesn't select 0fee transactions
Github-Pull: #33106
Rebased-From: e5f896bb1f
2025-08-20 10:19:15 -04:00
merge-script
c5196bc9c4 Merge bitcoin/bitcoin#33225: [29.x] Backport logging ratelimiting
0022e25333 test: modify logging_filesize_rate_limit params (Eugene Siegel)
206f5902db config: add DEBUG_ONLY -logratelimit (Eugene Siegel)
dfdd407c42 test: logging_filesize_rate_limit improvements (stickies-v)
11538160b3 test: don't leak log category mask across tests (stickies-v)
4ed7a51642 test: add ReadDebugLogLines helper function (stickies-v)
acfa83d9d0 log: make m_limiter a shared_ptr (stickies-v)
81751341e9 log: clean up LogPrintStr_ and Reset, prefix all logs with "[*]" when there are suppressions (Eugene Siegel)
7c3820ff63 log: change LogLimitStats to struct LogRateLimiter::Stats (Eugene Siegel)
dfe4e19f66 log: clarify RATELIMIT_MAX_BYTES comment, use RATELIMIT_WINDOW (Eugene Siegel)
273ffda2c8 log: remove const qualifier from arguments in LogPrintFormatInternal (Eugene Siegel)
9cde68fa98 log: avoid double hashing in SourceLocationHasher (Eugene Siegel)
25f975b8df test: remove noexcept(false) comment in ~DebugLogHelper (Eugene Siegel)
24c793d06c doc: add release notes for new rate limiting logging behavior (Eugene Siegel)
0b6b096421 log: Add rate limiting to LogPrintf, LogInfo, LogWarning, LogError, LogPrintLevel (Eugene Siegel)
a0992a842e log: use std::source_location in place of __func__, __FILE__, __LINE__ (Eugene Siegel)
41262cc4d5 log: introduce LogRateLimiter, LogLimitStats, Status (Eugene Siegel)
4987c03531 test: Mark ~DebugLogHelper as noexcept(false) (Eugene Siegel)

Pull request description:

  Backports:
  * #32604
    * Note that 24c793d06c isn't clean, as it's added directly to `release-notes.md`.
  * #33011
  * #33211

ACKs for top commit:
  instagibbs:
    utACK 0022e25333
  dergoegge:
    utACK 0022e25333
  stickies-v:
    ACK 0022e25333 - all backports clean except the release notes one, as indicated.

Tree-SHA512: 466aa6884a2c936131cf222b94943148bc385fc9574840cc63933f510c40c2cc74d8c9a9b2560205926a0a70a93de0e191a623fa2352628d8cead45bbee59b1c
2025-08-20 09:54:28 -04:00
Eugene Siegel
0022e25333 test: modify logging_filesize_rate_limit params
Change time_window from 20s to 1h so Reset is not accidentally called
if the test takes a while.

Change num_lines from 1024 to 10 since LogRateLimiter is parameterized
and does not require logging 1MiB of data.

Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #33211
Rebased-From: 5dda364c4b
2025-08-20 12:01:59 +01:00
Eugene Siegel
206f5902db config: add DEBUG_ONLY -logratelimit
Use -nologratelimit by default in functional tests if the bitcoind
version supports it.

Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #33011
Rebased-From: 5c74a0b397
2025-08-20 12:01:35 +01:00
stickies-v
dfdd407c42 test: logging_filesize_rate_limit improvements
- Add helper functions and structs to improve readability and
  reusability of test code
- Make tests more specific by comparing all produced log lines with
  expected log lines instead of relying on approximations or proxies.

Github-Pull: #33011
Rebased-From: 9f3b017bcc
2025-08-20 12:01:12 +01:00
stickies-v
11538160b3 test: don't leak log category mask across tests
This ensures log tests behave consistently when other tests modify
the log category mask.

Github-Pull: #33011
Rebased-From: 350193e5e2
2025-08-20 12:00:48 +01:00
stickies-v
4ed7a51642 test: add ReadDebugLogLines helper function
Deduplicates repeated usage of the same functionality.

Github-Pull: #33011
Rebased-From: 05d7c22479
2025-08-20 12:00:22 +01:00
stickies-v
acfa83d9d0 log: make m_limiter a shared_ptr
This allows us to safely and explicitly manage the dual dependency
on the limiter: one for the Logger, and one for the CScheduler.

Github-Pull: #33011
Rebased-From: 3d630c2544
2025-08-20 11:59:45 +01:00
Eugene Siegel
81751341e9 log: clean up LogPrintStr_ and Reset, prefix all logs with "[*]" when there are suppressions
In LogPrintStr_:
- remove an unnecessary BCLog since we are in the BCLog namespace.
- remove an unnecessary \n when rate limiting is triggered since
  FormatLogStrInPlace will add it.
- move the ratelimit bool into an else if block.
- prefix all log lines with [*] when suppressions exist. Previously this
  was only done if should_ratelimit was true.

In Reset:
- remove an unnecessary \n since FormatLogStrInPlace will add it.
- Change Level::Info to Level::Warning.

Github-Pull: #33011
Rebased-From: e8f9c37a3b
2025-08-20 11:55:28 +01:00
Eugene Siegel
7c3820ff63 log: change LogLimitStats to struct LogRateLimiter::Stats
Clean up the noisy LogLimitStats and remove references to the time
window.

Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #33011
Rebased-From: 3c7cae49b6
2025-08-20 11:54:59 +01:00
Eugene Siegel
dfe4e19f66 log: clarify RATELIMIT_MAX_BYTES comment, use RATELIMIT_WINDOW
Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #33011
Rebased-From: 8319a13468
2025-08-20 11:53:48 +01:00
Eugene Siegel
273ffda2c8 log: remove const qualifier from arguments in LogPrintFormatInternal
Co-Authored-By: l0rinc <pap.lorinc@gmail.com>

Github-Pull: #33011
Rebased-From: 5f70bc80df
2025-08-20 11:52:01 +01:00
Eugene Siegel
9cde68fa98 log: avoid double hashing in SourceLocationHasher
Co-Authored-By: l0rinc <pap.lorinc@gmail.com>

Github-Pull: #33011
Rebased-From: b8e92fb3d4
2025-08-20 11:51:31 +01:00
Eugene Siegel
25f975b8df test: remove noexcept(false) comment in ~DebugLogHelper
Github-Pull: #33011
Rebased-From: 616bc22f13
2025-08-20 11:51:06 +01:00
Eugene Siegel
24c793d06c doc: add release notes for new rate limiting logging behavior
Github-Pull: #32604
Rebased-From: 4c772cbd83
2025-08-20 11:47:20 +01:00
Eugene Siegel
0b6b096421 log: Add rate limiting to LogPrintf, LogInfo, LogWarning, LogError, LogPrintLevel
To mitigate disk-filling attacks caused by unsafe usages of LogPrintf and
friends, we rate-limit them by passing a should_ratelimit bool that
eventually makes its way to LogPrintStr which may call
LogRateLimiter::Consume. The rate limiting is accomplished by
adding a LogRateLimiter member to BCLog::Logger which tracks source
code locations for the given logging window.

Every hour, a source location can log up to 1MiB of data. Source
locations that exceed the limit will have their logs suppressed for the
rest of the window determined by m_limiter.

This change affects the public LogPrintLevel function if called with
a level >= BCLog::Level::Info.

The UpdateTipLog function has been changed to use the private LogPrintLevel_
macro with should_ratelimit set to false. This allows UpdateTipLog to log
during IBD without hitting the rate limit.

Note that on restart, a source location that was rate limited before the
restart will be able to log until it hits the rate limit again.

Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com>
Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #32604
Rebased-From: d541409a64
2025-08-20 11:45:06 +01:00
Eugene Siegel
a0992a842e log: use std::source_location in place of __func__, __FILE__, __LINE__
The std::source_location conveniently stores the file name, line number,
and function name of a source code location. We switch to using it instead
of the __func__ identifier and the __FILE__ and __LINE__ macros.

BufferedLog is changed to have a std::source_location member, replacing the
source_file, source_line, and logging_function members. As a result,
MemUsage no longer explicitly counts source_file or logging_function as the
std::source_location memory usage is included in the MallocUsage call.

This also changes the behavior of -logsourcelocations as std::source_location
includes the entire function signature. Because of this, the functional test
feature_config_args.py must be changed to no longer include the function
signature as the function signature can differ across platforms.

Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com>
Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #32604
Rebased-From: a6a35cc0c2
2025-08-20 11:42:01 +01:00
Eugene Siegel
41262cc4d5 log: introduce LogRateLimiter, LogLimitStats, Status
LogRateLimiter will be used to keep track of source locations and our
current time-based logging window. It contains an unordered_map and a
m_suppressions_active bool to track source locations. The map is keyed
by std::source_location, so a custom Hash function (SourceLocationHasher)
and custom KeyEqual function (SourceLocationEqual) is provided.
SourceLocationHasher uses CSipHasher(0,0) under the hood to get a
uniform distribution.

A public Reset method is provided so that a scheduler (e.g. the
"b-scheduler" thread) can periodically reset LogRateLimiter's state when
the time window has elapsed.

The LogRateLimiter::Consume method checks if we have enough available
bytes in our rate limiting budget to log an additional string. It
returns a Status enum that denotes the rate limiting status and can
be used by the caller to emit a warning, skip logging, etc.

The Status enum has three states:
- UNSUPPRESSED     (logging was successful)
- NEWLY_SUPPRESSED (logging was succcesful, next log will be suppressed)
- STILL_SUPPRESSED (logging was unsuccessful)

LogLimitStats counts the available bytes left for logging per source
location for the current logging window. It does not track actual source
locations; it is used as a value in m_source_locations.

Also exposes a SuppressionsActive() method so the logger can use
that in a later commit to prefix [*] to logs whenenever suppressions
are active.

Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com>
Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #32604
Rebased-From: afb9e39ec5
2025-08-20 11:37:48 +01:00
Eugene Siegel
4987c03531 test: Mark ~DebugLogHelper as noexcept(false)
We mark ~DebugLogHelper as noexcept(false) to be able to catch the
exception it throws. This lets us use it in test in combination with
BOOST_CHECK_THROW and BOOST_CHECK_NO_THROW to check that certain log
messages are (not) logged.

Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com>

Github-Pull: #32604
Rebased-From: df7972a6cf
2025-08-20 11:37:17 +01:00
merge-script
837c5c7fd8 Merge bitcoin/bitcoin#33074: [29.x] Backports
b9e637bd0e doc: update release notes for 29.x (fanquake)
2b9738a083 test: Fix 'getdescriptoractivity' RPCHelpMan, add test to verify 'spend_vin' is the correct field (Chris Stewart)
4e8abca445 rpc: fix getpeerinfo ping duration unit docs (0xb10c)
a08886d564 doc: move `cmake -B build -LH` up in Unix build docs (Bufo)
264418f80c doc: Add rel note for breaking change in dumptxoutset RPC (Chris Stewart)
a18b53f99e guix: warn SOURCE_DATE_EPOCH set in guix-codesign (will)
9437415024 tracing: fix pointer argument handling in mempool_monitor.py (deadmanoz)
3cd8612cd7 doc/zmq: fix unix socket path example (Roman Zeyde)

Pull request description:

  Backports:
  * #33070
  * #33073
  * #33086
  * #33088
  * #33103
  * #33119
  * #33133

ACKs for top commit:
  glozow:
    ACK b9e637bd0e

Tree-SHA512: bf2a700ec4d730548cf5abf10930b41e26742ea23582149b0eddcaaa48c1db05ab657ef9ffc7dcba2d1af2e265d0ea866d7b484a321a9c9ac662a6dc2263d102
2025-08-15 13:59:08 +01:00
fanquake
b9e637bd0e doc: update release notes for 29.x 2025-08-06 11:18:21 +01:00
Chris Stewart
2b9738a083 test: Fix 'getdescriptoractivity' RPCHelpMan, add test to verify 'spend_vin' is the correct field
Github-Pull: #33119
Rebased-From: 3543bfdfec
2025-08-06 11:17:38 +01:00
0xb10c
4e8abca445 rpc: fix getpeerinfo ping duration unit docs
The getpeerinfo docs incorrectly specified the ping durations as
milliseconds. This was incorrectly changed in a3789c700b
(released in v25; master since Sept. 2022). The correct duration unit
is seconds.

Also, remove the documentation of the getpeerinfo RPC response from the
ping RPC since it's incomplete. Better to just reference the getpeerinfo
RPC and it's documenation for this.

Github-Pull: #33133
Rebased-From: 1252eeb997
2025-08-05 09:44:47 +01:00
Bufo
a08886d564 doc: move cmake -B build -LH up in Unix build docs
Github-Pull: #33088
Rebased-From: 6757052fc4
2025-08-03 12:25:29 +01:00
Chris Stewart
264418f80c doc: Add rel note for breaking change in dumptxoutset RPC
This was missed in the v29.0 release notes.
2025-07-30 16:49:37 +01:00
will
a18b53f99e guix: warn SOURCE_DATE_EPOCH set in guix-codesign
Currently there is a warning for this in guix-build, but we also need
one in guix-codesign, otherwise the codesigned hashes are not
reproducible.

Move common functionality into prelude and call the function in both
guix actions.

Github-Pull: #33073
Rebased-From: 1bed0f734b
2025-07-29 16:35:30 +01:00
deadmanoz
9437415024 tracing: fix pointer argument handling in mempool_monitor.py
The BPF code was incorrectly passing pointer variables by value to
bpf_usdt_readarg(), causing the function to fail silently and resulting
in transaction hashes and reason strings displaying as zeros or garbage.

This fix adds the missing reference operator (&) when passing pointer
variables to bpf_usdt_readarg(), allowing the function to properly
write the pointer values and enabling correct display of transaction
hashes and removal/rejection reasons.

Fixes the regression introduced in ec47ba349d where bpf_usdt_readarg_p
was replaced with bpf_usdt_readarg but the calling convention wasn't
properly updated for pointer arguments.

Github-Pull: #33086
Rebased-From: 0ce041ea88
2025-07-29 10:54:48 +01:00
Roman Zeyde
3cd8612cd7 doc/zmq: fix unix socket path example
Following 75a5c8258e/doc/release-notes/release-notes-28.0.md (L105)

Github-Pull: #33070
Rebased-From: e83699a626
2025-07-28 10:28:44 +01:00
merge-script
565af03c37 Merge bitcoin/bitcoin#33056: [29.x] final changes for v29.1rc1
4c2d285b70 [doc] update release notes for v29.1rc1 (glozow)
06eb42d83c [doc] manpages for 29.1rc1 (glozow)
735ffad864 [build] bump version to 29.1rc1 (glozow)

Pull request description:

ACKs for top commit:
  marcofleon:
    nice, ACK 4c2d285b70
  fanquake:
    ACK 4c2d285b70
  darosior:
    ACK 4c2d285b70

Tree-SHA512: ffcc45566e33b8c4b80da1c751a5045863e06a31de81ec6f3f5ba26717eb8e7087139f7d2696ed5c61170efb62b5b9416f350bcb108a03afcdfa38e77067d612
2025-07-25 16:28:46 +01:00
glozow
4c2d285b70 [doc] update release notes for v29.1rc1 2025-07-24 15:54:20 -04:00
glozow
06eb42d83c [doc] manpages for 29.1rc1 2025-07-24 13:20:21 -04:00
glozow
735ffad864 [build] bump version to 29.1rc1 2025-07-24 12:40:27 -04:00
merge-script
4bf77955ed Merge bitcoin/bitcoin#33013: [29.x] Backport #32521
f25dc84b28 doc: update release notes for 29.x (Antoine Poinsot)
313023369b qa: functional test a transaction running into the legacy sigop limit (Antoine Poinsot)
0a4671d5eb qa: unit test standardness of inputs packed with legacy sigops (Antoine Poinsot)
204b965915 policy: make pathological transactions packed with legacy sigops non-standard. (Antoine Poinsot)

Pull request description:

  This backports PR #32521 to make the change available to miners who can't (or don't want to) upgrade past version 29.

ACKs for top commit:
  marcofleon:
    reACK f25dc84b28
  glozow:
    ACK f25dc84b28

Tree-SHA512: d5e06618720ed1a96d8a5fccdd8d1dbcbb5748505aa0df69198326828fe13f220e55bbce813f6f2daae82d23348e1f83a3a20a28639ec3fc2455c5b6e79a56e6
2025-07-24 12:32:38 -04:00
merge-script
951b349af1 Merge bitcoin/bitcoin#33052: [29.x] backport #32069
c6fe6971bf doc: update release notes for 29.x (fanquake)
380b5aded2 test: fix intermittent failure in wallet_reorgsrestore.py (furszy)

Pull request description:

  Backport https://github.com/bitcoin/bitcoin/pull/32069 to 29. This is a test flakiness fix for https://github.com/bitcoin/bitcoin/pull/31757, which was backported to 29 in https://github.com/bitcoin/bitcoin/pull/32589.

ACKs for top commit:
  marcofleon:
    ACK c6fe6971bf

Tree-SHA512: 82517eef67c8d0fe57e70cb769d1b040ea8dea41c2d2e5b442477e1c7add7d7bac1c4aabbebc5b7d440db5b7bf00f1d70dc6ffb375b7a2e77d9599c543579122
2025-07-24 16:59:04 +01:00
fanquake
c6fe6971bf doc: update release notes for 29.x 2025-07-24 10:00:40 -04:00
furszy
380b5aded2 test: fix intermittent failure in wallet_reorgsrestore.py
Wait until the node's process has fully stopped before starting a new instance.

Since the same code is used in tool_wallet.py, this consolidates the behavior
into a 'kill_process()' function.

Github-Pull: bitcoin/bitcoin#32069
Rebased-From: 36b0713edc
2025-07-24 09:29:11 -04:00
merge-script
8063d55446 Merge bitcoin/bitcoin#33046: [29.x] test: Do not pass tests on unhandled exceptions
411e15194b doc: update release notes for 29.x (fanquake)
5e327e6703 test: Log KeyboardInterrupt as exception (MarcoFalke)
79e1a3c9c6 test: Do not pass tests on unhandled exceptions (MarcoFalke)

Pull request description:

  Backports #33001 to `29.x`.

ACKs for top commit:
  pablomartin4btc:
    ACK 411e15194b
  marcofleon:
    lgtm ACK 411e15194b

Tree-SHA512: ea930f8c24a0a5e18f2107e96540db5c39941442059190d6104dfcf88b4a33d06ecaa7dbdf8baa91e564ee7ca3d12df5118c7fa404a38108de4ad0e5f122f72d
2025-07-24 12:15:56 +01:00
Antoine Poinsot
f25dc84b28 doc: update release notes for 29.x 2025-07-23 12:47:50 -04:00
fanquake
411e15194b doc: update release notes for 29.x 2025-07-23 16:47:49 +01:00
MarcoFalke
5e327e6703 test: Log KeyboardInterrupt as exception
log.exception is more verbose and useful to debug timeouts.

Also, log stderr for CalledProcessError to make debugging easier.

Github-Pull: #33001
Rebased-From: faa3e68411
2025-07-23 16:47:12 +01:00
MarcoFalke
79e1a3c9c6 test: Do not pass tests on unhandled exceptions
This adds a missing catch for BaseException (e.g. SystemExit), which
would otherwise be silently ignored.

Also, remove the redundant other catches, which are just calling
log.exception with a redundant log message.

Github-Pull: #33001
Rebased-From: fa30b34026
2025-07-23 16:46:48 +01:00
Antoine Poinsot
313023369b qa: functional test a transaction running into the legacy sigop limit
It's useful to have an end-to-end test in addition to the unit test to sanity check the RPC error as
well as making sure the transaction is otherwise fully standard.

Github-Pull: bitcoin/bitcoin#32521
Rebased-From: 96da68a38f
2025-07-18 16:51:54 -04:00
Antoine Poinsot
0a4671d5eb qa: unit test standardness of inputs packed with legacy sigops
Check bounds and different output types.

Github-Pull: bitcoin/bitcoin#32521
Rebased-From: 367147954d
2025-07-18 16:51:54 -04:00
Antoine Poinsot
204b965915 policy: make pathological transactions packed with legacy sigops non-standard.
The Consensus Cleanup soft fork proposal includes a limit on the number of legacy signature
operations potentially executed when validating a transaction. If this change is to be implemented
here and activated by Bitcoin users in the future, we should prevent the ability for someone to
broadcast a transaction through the p2p network that is not valid according to the new rules. This
is because if it was possible it would be a trivial DoS to potentially unupgraded miners after the
soft fork activates.

We do not know for sure whether users will activate the Consensus Cleanup. However if they do such
transactions must have been made non-standard long in advance, due to the time it takes for most
nodes on the network to upgrade. In addition this limit may only be run into by pathological
transactions which pad the Script with sigops but do not use actual signatures when spending, as
otherwise they would run into the standard transaction size limit.

Github-Pull: bitcoin/bitcoin#32521
Rebased-From: 5863315e33
2025-07-18 16:51:53 -04:00
merge-script
ef380a454c Merge bitcoin/bitcoin#32863: [29.x] Backports
5300295083 doc: update release notes for 29.x (fanquake)
730886b92b depends: fix libevent _WIN32_WINNT usage (fanquake)
f798c317a0 cmake: Drop no longer necessary "cmakeMinimumRequired" object (Hennadii Stepanov)
bc2147c884 depends: Force `CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE` (Hennadii Stepanov)
58b1a65ab0 add more bad p2p ports (Jameson Lopp)
f85d41c224 test: retain the intended behavior of `feature_fee_estimation.py` nodes (ismaelsadeeq)
84c0c0e64b test: fix incorrect subtest in `feature_fee_estimation.py` (ismaelsadeeq)
83ee49b1dc doc: clarify that the "-j N" goes after the "--build build" part (Salvatore Ingala)
e5a7575a6d doc: Add workaround for vcpkg issue with paths with embedded spaces (Hennadii Stepanov)
59a83fb8d1 functional test: correctly detect nonstd TRUC tx vsize in feature_taproot (Greg Sanders)
9f3690b978 feature_taproot: sample tx version border values more (Greg Sanders)
8a4a938db5 depends: Override host compilers for FreeBSD and OpenBSD (Hennadii Stepanov)
3a57bfaaf9 test: Use rehash() in outbound eviction block-relay (pablomartin4btc)
f82015ccfc test: Clarify roles in outbound eviction comments (pablomartin4btc)
222fbfcc6a test: check P2SH sigop count for coinbase tx (brunoerg)

Pull request description:

  Backports
  - #32463
  - #32716
  - #32823
  - #32826
  - #32837
  - #32841
  - #32846
  - #32850
  - #32858
  - #32859
  - #32943
  - #32954

ACKs for top commit:
  hebasto:
    ACK 5300295083, I've backported all listed PRs locally (had 3 conflicts to resolve), and got zero diff with this PR.
  glozow:
    ACK 5300295083

Tree-SHA512: c2f764ce3dcd1b6c16bfbe73a548a815f8d7db83653436d17686541a5cb530255a96132865442aa2f569340c95abee31aadda8bf0736582c7a19720029096b1e
2025-07-18 13:47:15 -04:00
fanquake
5300295083 doc: update release notes for 29.x 2025-07-16 13:51:57 +01:00
fanquake
730886b92b depends: fix libevent _WIN32_WINNT usage
Starting with version 13.x, the mingw headers will define the value of
NTDDI_VERSION, based on the value of _WIN32_WINNT, if that version is <
Windows 10. Given that libevent was undefining our _WIN32_WINNT, and
redefining it to a value < Windows 10 (0x0501), NTDDI_VERSION was also
being defined to that value, leading to functions not being exposed in
the mingw-w64 headers; see here:
9c2668ef77/mingw-w64-headers/include/iphlpapi.h (L36-L41).

Imports a commit from usptream (a14ff91254f40cf36e0fee199e26fb11260fab49).

Fixes #32707.

Github-Pull: #32837
Rebased-From: f5647c6c5a
2025-07-16 13:50:53 +01:00
Hennadii Stepanov
f798c317a0 cmake: Drop no longer necessary "cmakeMinimumRequired" object
Github-Pull: #32954
Rebased-From: 12a6959892
2025-07-16 13:31:40 +01:00
Hennadii Stepanov
bc2147c884 depends: Force CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE
When using CMake policies 3.14 and below, the `export(PACKAGE)` command
by default populates the user package registry, which is stored outside
the build tree. Setting the `CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable
disables this side effect.

In CMake 3.15 and later, this behavior is disabled by default, and the
variable has no effect.

Github-Pull: #32943
Rebased-From: 44f3bae300
2025-07-14 13:34:27 +01:00
Jameson Lopp
58b1a65ab0 add more bad p2p ports
Github-Pull: #32826
Rebased-From: 6967e8e8ab
2025-07-04 16:35:35 +01:00
ismaelsadeeq
f85d41c224 test: retain the intended behavior of feature_fee_estimation.py nodes
- Increase block weight by 4000 for all nodes with custom -blockmaxweight.
  Prior to this commit, we generated blocks with 4000 weight units less worth of transactions.
  See https://github.com/bitcoin/bitcoin/issues/32461#issuecomment-2925282272 for details.
  This commit fixes it by increasing the block weight by 4000.

Github-Pull: #32463
Rebased-From: 9b75cfda4d
2025-07-04 09:34:31 +01:00
ismaelsadeeq
84c0c0e64b test: fix incorrect subtest in feature_fee_estimation.py
- Update `check_smart_estimates` to calculate the fee rate ceiling
   by taking the maximum of fees seen, minrelaytxfee, and mempoolminfee.
- Improve the subtest name and comments.

Github-Pull: #32463
Rebased-From: 5c1236f04a
2025-07-04 09:34:28 +01:00
Salvatore Ingala
83ee49b1dc doc: clarify that the "-j N" goes after the "--build build" part
Also, capitalized the comments in build-unix.md for uniformity
with the docs on other targets.

Github-Pull: #32846
Rebased-From: 0e9f409db3
2025-07-03 17:42:44 +01:00
Hennadii Stepanov
e5a7575a6d doc: Add workaround for vcpkg issue with paths with embedded spaces
Github-Pull: #32858
Rebased-From: 0a1af4418e
2025-07-03 16:25:19 +01:00
Greg Sanders
59a83fb8d1 functional test: correctly detect nonstd TRUC tx vsize in feature_taproot
Github-Pull: #32859
Rebased-From: f0524cda39
2025-07-03 12:03:30 +01:00
Greg Sanders
9f3690b978 feature_taproot: sample tx version border values more
Currently if the version 3 is selected for an otherwise
standard spender, the test will fail. It's unlikely but
possible, so change the test to update expectations and
sample more aggressively on border values to instigate
failures much quicker in the future if another version is
made standard.

Github-Pull: #32841
Rebased-From: 4be81e9746
2025-07-03 12:03:06 +01:00
Hennadii Stepanov
8a4a938db5 depends: Override host compilers for FreeBSD and OpenBSD
When building depends on FreeBSD/OpenBSD `aarch64`, the host compilers
default to `default_host_{CC,CXX}`, which resolves to `gcc`/`g++`. This
is incorrect on these systems, where Clang is the default system
compiler.

Github-Pull: #32716
Rebased-From: 4f10a57671
2025-07-03 11:58:03 +01:00
pablomartin4btc
3a57bfaaf9 test: Use rehash() in outbound eviction block-relay
Ensure that tip_header.rehash() is used instead of tip_header.hash, which is None when the header is deserialized from hex.

This avoids depending on wait_for_getheaders() falling back to any received message, making the test more explicit and robust.

Github-Pull: #32823
Rebased-From: ec004cdb86
2025-07-03 11:58:03 +01:00
pablomartin4btc
f82015ccfc test: Clarify roles in outbound eviction comments
Some ambiguous uses of "we" referring to either the node or the peer are replaced with clearer phrasing.

Also rephrase some comments for consistency and readability.

Applies to all relevant outbound eviction tests in p2p_eviction_logic.py.

Github-Pull: #32823
Rebased-From: 26598ed21e
2025-07-03 11:58:03 +01:00
brunoerg
222fbfcc6a test: check P2SH sigop count for coinbase tx
Github-Pull: #32850
Rebased-From: d6aaffcb11
2025-07-03 11:58:03 +01:00
merge-script
d360a6ef56 Merge bitcoin/bitcoin#32810: [29.x] More backports
ef2a013e31 doc: update release notes for 29.x (fanquake)
4b656e2023 test: Add msgtype to msg_generic slots (dergoegge)
1c0e19b93a node: cap -dbcache to 1GiB on 32-bit architectures (Antoine Poinsot)
eafea2393d init: cap -maxmempool to 500 MB on 32-bit systems (Antoine Poinsot)
a3c1939d6e cmake: Explicitly specify `Boost_ROOT` for Homebrew's package (Hennadii Stepanov)
a990c1002b cmake: Use `HINTS` instead of `PATHS` in `find_*` commands (Hennadii Stepanov)
5987c1b6ab test: fix catchup loop in outbound eviction functional test (Sebastian Falbesoner)
e37a70bf71 build: add root dir to CMAKE_PREFIX_PATH (will)

Pull request description:

  Backports:
  * #32530
  * #32742
  * #32798
  * #32805
  * #32814
  * #32833

  Fixes #31009.

ACKs for top commit:
  pinheadmz:
    ACK ef2a013e31
  hebasto:
    re-ACK ef2a013e31.
  willcl-ark:
    ACK ef2a013e31

Tree-SHA512: 936ccf732f9fa49acc90de8af0ebf7134aa54dbaf9533c8dfbe08cd178b87a3a091c837d5bb84d61869a69c3c7d499a565b33237b14330a6c66d9c8456d5a261
2025-07-03 11:57:31 +01:00
fanquake
ef2a013e31 doc: update release notes for 29.x 2025-06-30 13:29:28 +01:00
dergoegge
4b656e2023 test: Add msgtype to msg_generic slots
Github-Pull: #32833
Rebased-From: 7dc43ea503
2025-06-30 13:28:55 +01:00
Antoine Poinsot
1c0e19b93a node: cap -dbcache to 1GiB on 32-bit architectures
32-bit architecture is limited to 4GiB, so it doesn't make sense to set a too
high value. Since this setting is performance critical, pick an arbitrary value
higher than for -maxmempool but still reasonable.

Github-Pull: #32530
Rebased-From: 9f8e7b0b3b
2025-06-26 17:36:06 +01:00
Antoine Poinsot
eafea2393d init: cap -maxmempool to 500 MB on 32-bit systems
32-bit architecture is limited to 4GiB, so it doesn't make sense to set a too high value. 500 MB is
chosen as an arbitrary maximum value that seems reasonable.

Github-Pull: #32530
Rebased-From: 2c43b6adeb
2025-06-26 17:36:02 +01:00
Hennadii Stepanov
a3c1939d6e cmake: Explicitly specify Boost_ROOT for Homebrew's package
On macOS, this change ensures that the Boost package is located at its
real path rather than via the symlink in the default prefix.

Github-Pull: #32814
Rebased-From: 8800b5acc1
2025-06-26 15:02:08 +01:00
Hennadii Stepanov
a990c1002b cmake: Use HINTS instead of PATHS in find_* commands
According to the CMake documentation, `HINTS` "should be paths computed
by system introspection, such as a hint provided by the location of
another item already found", which is precisely the case in the
`FindQRencode` module.

Entries in `HINTS` are searched before those in `PATHS`. On macOS,
Homebrew’s `libqrencode` will therefore be located at its real path
rather than via the symlink in the default prefix.

Github-Pull: #32805
Rebased-From: ead4468748
2025-06-26 12:10:51 +01:00
Sebastian Falbesoner
5987c1b6ab test: fix catchup loop in outbound eviction functional test
The catchup loop in the outbound eviction functional test currently has
a small flaw, as the contained waiting for a `getheaders` message just
waits for any such message instead of one with the intended block hash.
The reason is that the `prev_prev_hash` variable is set incorrectly,
since the `tip_header` instance is not updated and its field `.hash` is
None. Fix that by updating `tip_header` and use the correct field -- we
want the tip header's previous hash (`.hashPrevBlock`).

Github-Pull: #32742
Rebased-From: dd8447f70f
2025-06-26 11:24:02 +01:00
will
e37a70bf71 build: add root dir to CMAKE_PREFIX_PATH
Nix patches cmake to remove the root directory `/` from
`CMAKE_SYSTEM_PREFIX_PATH`:
428b49b28e/pkgs/by-name/cm/cmake/001-search-path.diff (L10)

Without this, and when using the toolchain for depends builds, cmake's
`find_path()` and `find_package()` do not know where to find
dependencies, causing issues like:
https://github.com/bitcoin/bitcoin/issues/32428

Adding this path back via CMAKE_PREFIX_PATH is harmless on other
systems, and fixes the toolchain for Nix users.

We append the `/` dir a maximum of once, as the toolchain may be called
repeatedly during builds.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: josibake <josibake@protonmail.com>

Github-Pull: #32798
Rebased-From: e27a94596f
2025-06-25 11:38:37 +01:00
merge-script
983b268768 Merge bitcoin/bitcoin#32589: [29.x] More backports
0922f6bbc3 doc: update release notes for 29.x (fanquake)
5697605414 contrib: tracing: Correctly read msg type in p2p_monitor.py (David Gumberg)
4c7ed36c96 test: Fix list index out of range error in feature_bip68_sequence.py (zaidmstrr)
3e23b47a6f doc: fix transifex 404s (fanquake)
616baf3c27 doc: taproot became always active in v24.0 (Sjors Provoost)
ef6111bd18 depends: capnp 1.2.0 (fanquake)
8246c6a65f test: wallet, coverage for crash on dup block disconnection during unclean shutdown (Martin Zumsande)
a18085a18b wallet: fix crash on double block disconnection (furszy)
7264459c0d build: patch cmake min version on freetype (josibake)
27c533052c doc, windows: CompanyName "Bitcoin" => "Bitcoin Core project" (Hodlinator)
1b51d750ad depends: fix SHA256SUM command on OpenBSD (use GNU mode output) (Sebastian Falbesoner)
aea8a394b1 doc: make `-DWITH_ZMQ=ON` explicit on `build-unix.md` (Luis Schwab)
23e76ef520 guix: warn and abort when SOURCE_DATE_EPOCH is set (will)
876a7b2db5 doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md (Sebastian Falbesoner)
78688c8413 rpc, doc: update `listdescriptors` RCP help (rkrux)
c899334e36 rpc: Note in fundrawtransaction doc, fee rate is for package (benthecarman)
247ee59f55 doc: update tor docs to use bitcoind binary from path (ismaelsadeeq)
4a1143b083 depends: use "mkdir -p" when installing xproto (fanquake)
646fa1d028 test: fix sync function in rpc_psbt.py (Martin Zumsande)
17b31fc802 doc: Add missing top-level description to pruneblockchain RPC (nervana21)
e34b6fbcad guix: accomodate migration to codeberg (fanquake)
142153ee42 cmake: Add missed `SSE41_CXXFLAGS` (Hennadii Stepanov)

Pull request description:

  Backports
  - #31757
  - #32333
  - #32439
  - #32551 (just 800b7cc42c)
  - #32568
  - #32607
  - #32630
  - #32678
  - #32679
  - #32690 (just 8713e8060d)
  - #32693
  - #32696
  - #32708
  - #32711
  - #32719
  - #32760
  - #32765
  - #32771
  - #32776
  - #32777

  Closes #32625.

ACKs for top commit:
  instagibbs:
     ACK 0922f6bbc3
  willcl-ark:
    ACK 0922f6bbc3

Tree-SHA512: 0389e5d85fa897fdbefd37635f6ec822ca5ab48a57c4d40fdd4d1be2465c676f514b0db4d72c962ee15e0090b27ff17701e167d660eaa25f855d06bbb1fe0e6e
2025-06-25 11:03:05 +01:00
fanquake
0922f6bbc3 doc: update release notes for 29.x 2025-06-23 12:48:15 +01:00
David Gumberg
5697605414 contrib: tracing: Correctly read msg type in p2p_monitor.py
Github-Pull: #32771
Rebased-From: 3473986fe1
2025-06-23 10:01:45 +01:00
zaidmstrr
4c7ed36c96 test: Fix list index out of range error in feature_bip68_sequence.py
Github-Pull: #32765
Rebased-From: e285e691b7
2025-06-19 15:06:14 +01:00
fanquake
3e23b47a6f doc: fix transifex 404s
Github-Pull: #32777
Rebased-From: 53a996f122
2025-06-19 11:48:46 +01:00
Sjors Provoost
616baf3c27 doc: taproot became always active in v24.0
Github-Pull: #32776
Rebased-From: 8ee8a951c2
2025-06-19 11:42:10 +01:00
fanquake
ef6111bd18 depends: capnp 1.2.0
Github-Pull: #32760
Rebased-From: c7eaac326a
2025-06-19 10:40:41 +01:00
Martin Zumsande
8246c6a65f test: wallet, coverage for crash on dup block disconnection during unclean shutdown
Co-authored-by: furszy <matiasfurszyfer@protonmail.com>

Github-Pull: #31757
Rebased-From: 11f8ab140f
2025-06-19 10:39:27 +01:00
furszy
a18085a18b wallet: fix crash on double block disconnection
The wallet crashes if it processes the same block disconnection event twice in a row due
to an incompatible coinbase transaction state.
This happens because 'disconnectBlock' provides 'TxStateInactive' without the "abandoned"
flag for coinbase transactions to 'SyncTransaction', while 'AddToWallet()' internally
modifies it to retain the abandoned state.

The flow is as follows:
1) On the first disconnection, the transaction state transitions from "confirmed" to
"inactive," bypassing the state equality check since the provided state differs. Then,
'AddToWallet' internally updates the state to "inactive + abandoned"

2) On the second disconnection, as we provide only the "inactive" state
to 'SyncTransaction()', the state equality assertion fails and crashes the wallet.

Github-Pull: #31757
Rebased-From: 9ef429b6ae
2025-06-19 10:39:27 +01:00
josibake
7264459c0d build: patch cmake min version on freetype
Patch cmake_minimum_required version for freetype, using the version from
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/352/diffs

This fixes a failure when building with CMake 4, where compatibility
with CMake versions < 3.5 has been removed (see https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features)

Github-Pull: #32693
Rebased-From: d7c37906e7
2025-06-19 10:39:27 +01:00
Hodlinator
27c533052c doc, windows: CompanyName "Bitcoin" => "Bitcoin Core project"
Matches /share/setup.nsi.in:14

Github-Pull: #32719
Rebased-From: 239fc4d62e
2025-06-19 10:39:27 +01:00
Sebastian Falbesoner
1b51d750ad depends: fix SHA256SUM command on OpenBSD (use GNU mode output)
On OpenBSD, the `sha256` command by default outputs hashsums on files in
"BSD" mode, looking like this:

$ sha256 ~/.vimrc
SHA256 (/home/thestack/.vimrc) = 6ba69d100e8c5ca0488ded6293d4e5f740a6a5d5ace96cbcf0599c18d27389e4

This is not compatible with our depends commands, which expect the
hashes to be on the first column (to be extracted via `cut -d" " -f1`).
Fix this by switching to GNU mode output, looking like this:

$ sha256 -r ~/.vimrc
6ba69d100e8c5ca0488ded6293d4e5f740a6a5d5ace96cbcf0599c18d27389e4 /home/thestack/.vimrc

Without this change, the multiprocess depends build fails with the following output:

$ gmake -C depends MULTIPROCESS=1 NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_QR=1 NO_WALLET=1 NO_ZMQ=1 NO_USDT=1
[ ..... ]
Extracting native_libmultiprocess...
sha256: /home/thestack/bitcoin/depends/work/build/x86_64-unknown-openbsd7.7/native_libmultiprocess/-2bc902f4693/.src-ipc-libmultiprocess.tar.hash: no properly formatted checksum lines found
gmake: *** [funcs.mk:342: /home/thestack/bitcoin/depends/work/build/x86_64-unknown-openbsd7.7/native_libmultiprocess/-2bc902f4693/.stamp_extracted] Error 1

Github-Pull: #32690
Rebased-From: 8713e8060d
2025-06-19 10:39:27 +01:00
Luis Schwab
aea8a394b1 doc: make -DWITH_ZMQ=ON explicit on build-unix.md
Github-Pull: #32696
Rebased-From: 32d4e92b9a
2025-06-10 17:27:40 +01:00
will
23e76ef520 guix: warn and abort when SOURCE_DATE_EPOCH is set
Current behaviour will by-default use SOURCE_DATE_EPOCH from the
environment without warning. This breaks the default reproducibility
from a guix build.

Warn when and exit when this variable is set, and
FORCE_SOURCE_DATE_EPOCH is unset.

Github-Pull: #32678
Rebased-From: 5c4a0f8009
2025-06-10 15:22:51 +01:00
Sebastian Falbesoner
876a7b2db5 doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md
Github-Pull: #32711
Rebased-From: 89526deddf
2025-06-10 13:32:02 +01:00
rkrux
78688c8413 rpc, doc: update listdescriptors RCP help
This RPC lists all the descriptors present in the wallet, not only
the ones that were imported, but also the ones generated when a
new wallet is created.

It can be verified by creating a new wallet and calling the
`listdescriptors` RPC, which will contain 8 ranged descriptors that
are created for every new wallet.

Github-Pull: #32708
Rebased-From: b44514b876
2025-06-10 11:31:10 +01:00
benthecarman
c899334e36 rpc: Note in fundrawtransaction doc, fee rate is for package
Github-Pull: #32607
Rebased-From: f98e1aaf34
2025-06-09 16:13:01 +01:00
ismaelsadeeq
247ee59f55 doc: update tor docs to use bitcoind binary from path
Github-Pull: #32679
Rebased-From: 4ce53495e5
2025-06-09 16:12:25 +01:00
fanquake
4a1143b083 depends: use "mkdir -p" when installing xproto
It looks like the mkdir detection in xproto is broken on Alpine. Ensure
we always use `mkdir -p`.

Fixes #32494.

Github-Pull: #32568
Rebased-From: df9ebbf659
2025-06-03 20:26:27 +01:00
Martin Zumsande
646fa1d028 test: fix sync function in rpc_psbt.py
It currently only syncs between the first two nodes,
which may do nothing when the block is created on the
third node.

Github-Pull: #32630
Rebased-From: 4df4df45d7
2025-05-29 12:31:10 +01:00
nervana21
17b31fc802 doc: Add missing top-level description to pruneblockchain RPC
Previously, the `pruneblockchain` RPC help output included only the method signature and arguments, with no top-level description explaining its purpose or constraints.

This PR adds a concise top-level description, improving documentation consistency and alerting users to the potential impacts of using the command.

Github-Pull: #32333
Rebased-From: 135a0f0aa7
2025-05-29 12:15:57 +01:00
fanquake
e34b6fbcad guix: accomodate migration to codeberg
See https://guix.gnu.org/blog/2025/migrating-to-codeberg/.

When interacting with the old repo you may now also see:
```bash
warning: redirecting to https://codeberg.org/guix/guix/
```

Github-Pull: #32439
Rebased-From: c8d9baae94
2025-05-28 09:53:33 +01:00
Hennadii Stepanov
142153ee42 cmake: Add missed SSE41_CXXFLAGS
Github-Pull: #32551
Rebased-From: 800b7cc42c
2025-05-22 14:55:42 +01:00
merge-script
589b56192f Merge bitcoin/bitcoin#32292: [29.x] Backports
a0d1f69b55 doc: update release notes for 29.x (fanquake)
6c0f26d3bd test: check that creating a wallet does not log version info (Ava Chow)
e685b4eca2 test: Check that the correct versions are logged on wallet load (Ava Chow)
25aa15ee7f walletdb: Log the wallet version after it has been read from disk (Ava Chow)
cf034172bf test: fix another intermittent failure in wallet_basic.py (Martin Zumsande)
c966158426 test: Fix intermittent failure in wallet_basic.py (Martin Zumsande)
6c4e3de2ac test: Use uninvolved pruned node in feature_pruning undo test (enoch)
edd4073d70 test: Fix nTimes typo in feature_pruning test (enoch)
cc2fcdfc5e cmake: Allow `WITH_DBUS` on all Unix-like systems (Hennadii Stepanov)
caec3cc41b crypto: disable ASan for sha256_sse4 with Clang (fanquake)
fabf4ff237 tracing: fix invalid argument in mempool_monitor (William Casarin)
f9d2c67a0c cmake: Respect user-provided configuration-specific flags (Hennadii Stepanov)
6ed087dede doc: Fix test_bitcoin path (monlovesmango)
2f6c802b54 doc: Fix fuzz test_runner.py path (monlovesmango)
f4d9546425 qt: Replace stray tfm::format to cerr with qWarning (laanwj)
5aa4956cd3 gui: crash fix, disconnect numBlocksChanged() signal during shutdown (furszy)
3665310808 scripted-diff: Use bpf_cflags (MarcoFalke)
4ed5c34abb test: Add imports for util bpf_cflags (MarcoFalke)
3dbd2b3d17 refactor: Remove spurious virtual from final ~CZMQNotificationInterface (MarcoFalke)
64552c83b2 ci: Add workaround for vcpkg's libevent package (Hennadii Stepanov)
85f3e1de68 test: Handle empty string returned by CLI as None in RPC tests (Brandon Odiwuor)
ca70d5cb25 Remove support for RNDR/RNDRRS for aarch64 on Linux (laanwj)

Pull request description:

  Backports for `29.x`:

  - #32184
  - #32187
  - #32248
  - #32286
  - #32312
  - #32336
  - #32353
  - #32356
  - #32389
  - #32437
  - #32454
  - #32469
  - #32483
  - #32553
  - https://github.com/bitcoin-core/gui/pull/864
  - https://github.com/bitcoin-core/gui/pull/868

ACKs for top commit:
  willcl-ark:
    crACK a0d1f69b55

Tree-SHA512: 72aafd17348aa4b602661efd07d48c6af6637c7349e7b032a65f46364e50094723d1c80dced71f0d5ddec59d6dafb72f0463944413a4d810a35cdca6b8272780
2025-05-22 12:05:19 +01:00
fanquake
a0d1f69b55 doc: update release notes for 29.x 2025-05-20 12:30:25 +01:00
Ava Chow
6c0f26d3bd test: check that creating a wallet does not log version info
Github-Pull: #32553
Rebased-From: 4b2cd0b41f
2025-05-20 12:29:25 +01:00
Ava Chow
e685b4eca2 test: Check that the correct versions are logged on wallet load
Github-Pull: #32553
Rebased-From: 39a483c8e9
2025-05-20 12:29:21 +01:00
Ava Chow
25aa15ee7f walletdb: Log the wallet version after it has been read from disk
Logging the wallet version before anything has been read from disk results
in the wrong version being logged.

Also split the last client version logging as it may not always be
present to be logged.

Github-Pull: #32553
Rebased-From: 359ecd3704
2025-05-20 12:29:18 +01:00
Martin Zumsande
cf034172bf test: fix another intermittent failure in wallet_basic.py
During init, the test framework will start using rpc after the
mempool was loaded. It will not wait for postInitProcess or
outstanding transactionAddedToMempool notifications, leading to
a possible race, in which listunspent is being called while the
tx is still in Inactive status. Prevent this by processing
outstanding notifications.

Github-Pull: #32483
Rebased-From: e7ad86e1ca
2025-05-14 13:26:53 +01:00
Martin Zumsande
c966158426 test: Fix intermittent failure in wallet_basic.py
There could be a race with outstanding TxAddedToMempool notifications
being applied to the soon-to-be created wallet.

Fixes an intermittent timeout reproducable by adding a sleep to
AddToWallet.

Github-Pull: #32483
Rebased-From: 07350e204d
2025-05-14 13:26:48 +01:00
enoch
6c4e3de2ac test: Use uninvolved pruned node in feature_pruning undo test
After fixing the nTime variable name, the test_pruneheight_undo_presence
test began failing because node 2, which is involved in reorg testing,
could be on a different chain than other nodes. This caused failures
when trying to fetch blocks from other nodes that didn't recognize
node 2's chain.

Switch to using node 5 instead, which is also a pruned node but isn't
involved in reorg testing, ensuring it stays on the same chain as the
other nodes. This allows the block fetching to work as intended in the
test.

Github-Pull: #32312
Rebased-From: 2aa63d511a
2025-05-14 10:01:32 +01:00
enoch
edd4073d70 test: Fix nTimes typo in feature_pruning test
Fix incorrect variable name in comment (nTimes -> nTime) in
feature_pruning.py. This typo caused the test to always reset
mine_large_blocks.nTime to 0, rather than only on the first run
as intended.

Github-Pull: #32312
Rebased-From: 772ba7f9ce
2025-05-14 10:01:26 +01:00
Hennadii Stepanov
cc2fcdfc5e cmake: Allow WITH_DBUS on all Unix-like systems
This change makes the `WITH_DBUS` option available on all Unix-like
systems, not just Linux, thereby fixing a regression that was
overlooked during the migration from Autotools.

Note: Enabling D-Bus support on macOS still makes no sense, since the
`Notificator` class uses the User Notification Center regardless.

Github-Pull: #32469
Rebased-From: 5b7ed460c7
2025-05-12 14:25:19 +01:00
fanquake
caec3cc41b crypto: disable ASan for sha256_sse4 with Clang
This can alsofail to compile when optimisations are being used, see:
https://github.com/bitcoin/bitcoin/issues/31913.
So disable just ASan for this function under any optimisation level.

Github-Pull: #32437
Rebased-From: 4e8ab5e00f
2025-05-12 14:25:16 +01:00
William Casarin
fabf4ff237 tracing: fix invalid argument in mempool_monitor
The mempool_monitor tracing tool is incorrectly reading the reason
as the first argument. Fix this!

Github-Pull: #32454
Rebased-From: 31c5ebc400
2025-05-09 09:31:38 +01:00
Hennadii Stepanov
f9d2c67a0c cmake: Respect user-provided configuration-specific flags
Github-Pull: #32356
Rebased-From: edde96376a
2025-05-08 16:35:14 +01:00
monlovesmango
6ed087dede doc: Fix test_bitcoin path
This commit fixes a couple command paths for interacting with the
test_bitcoin binary within the Unit Test documentation.

Github-Pull: #32389
Rebased-From: 6cbc28b8dd
2025-05-06 18:04:28 +01:00
monlovesmango
2f6c802b54 doc: Fix fuzz test_runner.py path
This commit fixes the path listed in the documentation for the fuzz
testing test_runner.py. Previously the --help option worked but running
fuzz tests from the documented path did not.

Github-Pull: #32353
Rebased-From: 61f238e84a
2025-05-06 18:04:28 +01:00
laanwj
f4d9546425 qt: Replace stray tfm::format to cerr with qWarning
GUI warnings should go to the log, not to the console (which may not be
connected at all).

Github-Pull: gui#868
Rebased-From: edd46566bd
2025-05-06 18:04:28 +01:00
furszy
5aa4956cd3 gui: crash fix, disconnect numBlocksChanged() signal during shutdown
The crash stems from the order of the shutdown procedure:
We first unset the client model, then destroy the wallet controller—but we leave
the internal wallet models ('m_wallets') untouched for a brief period. As a result,
there’s a point in time where views still have connected signals and access to
wallet models that are not connected to any wallet controller.
Now.. since the clientModel is only replaced with nullptr locally and not destroyed
yet, signals like numBlocksChanged can still emit. Thus, when wallet views receive
them, they see a non-null wallet model ptr, and proceed to call backend functions
from a model that is being torn down.

As the shutdown procedure begins by unsetting clientModel from all views. It’s safe
to ignore events when clientModel is nullptr.

Github-Pull: gui#864
Rebased-From: 71656bdfaa
2025-05-06 18:04:28 +01:00
MarcoFalke
3665310808 scripted-diff: Use bpf_cflags
-BEGIN VERIFY SCRIPT-

 ren() { sed --regexp-extended -i "s/$1/$2/g" $( git grep --extended-regexp -l "$1" ) ; }

 ren 'cflags=\["-Wno-error=implicit-function-declaration"\]' 'cflags=bpf_cflags()'

-END VERIFY SCRIPT-

Github-Pull: #32336
Rebased-From: facb9b327b
2025-05-06 18:04:28 +01:00
MarcoFalke
4ed5c34abb test: Add imports for util bpf_cflags
This is required for the next commit.

Github-Pull: #32336
Rebased-From: fa0c1baaf8
2025-05-06 18:04:27 +01:00
MarcoFalke
3dbd2b3d17 refactor: Remove spurious virtual from final ~CZMQNotificationInterface
Github-Pull: #32187
Rebased-From: fa69c42fdf
2025-05-06 18:04:27 +01:00
Hennadii Stepanov
64552c83b2 ci: Add workaround for vcpkg's libevent package
This change is necessary for Windows GHA images, which provide
CMake >= 4.0.

Github-Pull: #32184
Rebased-From: ef00a28414
2025-05-06 18:04:27 +01:00
Brandon Odiwuor
85f3e1de68 test: Handle empty string returned by CLI as None in RPC tests
Github-Pull: #32286
Rebased-From: a4041c77f0
2025-05-06 18:04:27 +01:00
laanwj
ca70d5cb25 Remove support for RNDR/RNDRRS for aarch64 on Linux
This hardware feature is

- rarely supported on SoCs (and broken on like half of the chips that support it in the first place) (#31817)
- apparently not compiled into the release binary (https://github.com/bitcoin/bitcoin/issues/31817#issuecomment-2795885962)
- hard to test in CI, due to unavailable of hardware

Better to remove it.

This reverts commit aee5404e02.

Closes #31817.

Github-Pull: #32248
Rebased-From: 7749d929a0
2025-05-06 18:04:27 +01:00
merge-script
3fad438b83 Merge bitcoin/bitcoin#32352: [29.x] qt: 29.1 translations update
fc60337733 qt: 29.1 translations update (Hennadii Stepanov)

Pull request description:

  This PR fetches the recent translation updates from Transifex.

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

  **Notes for reviewers:**

  1. "fr_CM" and "fr_LU" have been dropped as part of [phasing out of territory-specific translations](https://app.transifex.com/bitcoin/communication/d:402657d1-6254-4ce9-8d26-e7827652c627/?q=project%3Abitcoin).

  2. The translations for the following languages, which appear to be the result of a mistake or an act of vandalism, have been discarded (also see https://github.com/bitcoin/bitcoin/pull/32004):
      - Czech (cs)
      - Danish (da)
      - Dutch (nl)
      - Vietnamese (vi)

  3. Update for Silesian (szl) has been discarded as malicious.

ACKs for top commit:
  laanwj:
    ACK fc60337733

Tree-SHA512: 0003a3ec67553f046ac8f98f61fd799cdcdac731f417e936af6782f8559270cc4f4fa40ffd8de5b40d7988d674dbac7eab73879aec974433bdf61a7790efd2a4
2025-05-06 18:03:01 +01:00
Hennadii Stepanov
fc60337733 qt: 29.1 translations update 2025-05-02 11:43:10 +01:00
merge-script
f490f5562d Merge bitcoin/bitcoin#32252: [29.x] doc: minor rel notes changes
87e53781f7 doc: minor rel notes changes (fanquake)

Pull request description:

  Remove two unused headers.
  Remove the empty-template, as point releases will modify `release-notes.md`.

ACKs for top commit:
  jonatack:
    LGTM ACK 87e53781f7
  janb84:
    ACK [87e5378](87e53781f7)

Tree-SHA512: 69ff0d7863c1598ab2b4daf2a7f9ca3edae513a7d5ebb85aa1b468150cfd17da2f503ac0a41dc77fe04c3670cb7d58df46b00837d08aad624f024756f575fca1
2025-04-11 16:20:13 +01:00
fanquake
87e53781f7 doc: minor rel notes changes
Remove two unused headers.
Remove the empty-template, as point releases will modify release-notes.md.
2025-04-11 16:00:42 +01:00
merge-script
56ed476a29 Merge bitcoin/bitcoin#32241: [29.x] 29.0 final changes
977db54233 [doc] update man pages for 29.0 (glozow)
190e718e83 [build] bump to 29.0 final (glozow)
50108104d7 [doc] copy over Release Notes draft from wiki (glozow)

Pull request description:

  There weren't any reports from rc2 and rc3 binaries have been up since April 2 (1 week ago).

ACKs for top commit:
  hebasto:
    ACK 977db54233.
  janb84:
    ACK [977db54](977db54233)
  laanwj:
    ACK 977db54233

Tree-SHA512: f0dee957c56a7b24cc361b0450efeaaad5ead6401ba649f8af6cf5cb464fea4357e1eaedaaa80accdeb18d47321a604979c43be57e14aa3ae5603d083e7df250
2025-04-11 15:55:48 +01:00
glozow
977db54233 [doc] update man pages for 29.0 2025-04-09 11:34:37 -04:00
glozow
190e718e83 [build] bump to 29.0 final 2025-04-09 11:34:37 -04:00
glozow
50108104d7 [doc] copy over Release Notes draft from wiki 2025-04-09 11:34:37 -04:00
merge-script
1344d3bd0f Merge bitcoin/bitcoin#32136: [29.x] backports and 29.0rc3
f80ab9a5d8 [doc] update man pages for 29.0rc3 (glozow)
7c05ef5673 [build] bump to 29.0rc3 (glozow)
c0756b758f depends: set CMAKE_*_COMPILER_TARGET in toolchain (fanquake)
477345207b cmake: Add `NO_CACHE_IF_FAILED` option for checking linker flags (Hennadii Stepanov)
7bc7af9951 fuzz: extract unsequenced operations with side-effects (Lőrinc)
288163ea0f fuzz: Fix off-by-one in package_rbf target (MarcoFalke)
a3060483fa test: avoid disk space warning for non-regtest (Sjors Provoost)

Pull request description:

  Backports + final changes for 29.0rc3.

  Backports:
  - #32057
  - #32122
  - #32141
  - #32027
  - #31849

ACKs for top commit:
  hebasto:
    ACK f80ab9a5d8, I've verified back-ports locally and reviewed release related changes.
  fanquake:
    ACK f80ab9a5d8

Tree-SHA512: 15c882eac98825c41859859af1621e63a5b9d98f3b492c451c14f2d2232220dfa8d1ef933adae773918e188c6ade085f254f2853ff078bf1f99b8cd77facb182
2025-04-01 19:59:46 +08:00
glozow
f80ab9a5d8 [doc] update man pages for 29.0rc3 2025-03-28 14:56:29 -04:00
glozow
7c05ef5673 [build] bump to 29.0rc3 2025-03-28 14:37:09 -04:00
fanquake
c0756b758f depends: set CMAKE_*_COMPILER_TARGET in toolchain
According to the CMake docs, this is the correct way to setup a
toolchain file for cross-compilation using Clang. See
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-using-clang

Internally it looks like CMake will only take this variable into account
if it detects the compiler to be Clang, so this shouldn't effect other
builds, but in the case of our Apple cross builds, we'd end up with a
duplicated `--target=arm64-apple-darwin` on the compiler line, given we
are already setting `--target` for Darwin builds.

Would fix #31748.

Github-Pull: #31849
Rebased-From: 963355037f
2025-03-28 14:24:37 -04:00
Hennadii Stepanov
477345207b cmake: Add NO_CACHE_IF_FAILED option for checking linker flags
Use it for checking `-fsanitize`.

This change improves the user experience when the configuration step
fails due to a missing library. Now, there is no need to manually clean
the CMake cache after installing the required library.

Github-Pull: #32027
Rebased-From: 52ac17757e
2025-03-28 14:24:09 -04:00
Lőrinc
7bc7af9951 fuzz: extract unsequenced operations with side-effects
https://github.com/bitcoin/bitcoin/pull/30746#discussion_r1817851827 introduced an unsequenced operations with side-effects - which is undefined behavior, i.e. the right hand side can be evaluated before the left hand side, which happens to mutate it.

Tried:
```
clang++ --analyze -std=c++20 -I./src -I./src/test -I./src/test/fuzz src/test/fuzz/base_encode_decode.cpp src/psbt.cpp
```
but it didn't warn about UB.

Grepped for similar ones, but could find any other one in the codebase:
> grep -rnE --include='*.cpp' --include='*.h' '\b(\w+)\(([^)]*\b(\w+)\b[^)]*)\)\s*==\s*\3\.' .
```
./src/test/arith_uint256_tests.cpp:373:    BOOST_CHECK(R1L.GetHex() == R1L.ToString());
./src/test/arith_uint256_tests.cpp:374:    BOOST_CHECK(R2L.GetHex() == R2L.ToString());
./src/test/arith_uint256_tests.cpp:375:    BOOST_CHECK(OneL.GetHex() == OneL.ToString());
./src/test/arith_uint256_tests.cpp:376:    BOOST_CHECK(MaxL.GetHex() == MaxL.ToString());
./src/test/fuzz/cluster_linearize.cpp:565:        assert(depgraph.FeeRate(best_anc.transactions) == best_anc.feerate);
./src/test/fuzz/cluster_linearize.cpp:646:        assert(depgraph.FeeRate(found.transactions) == found.feerate);
./src/test/fuzz/cluster_linearize.cpp:765:            assert(depgraph.FeeRate(chunk_info.transactions) == chunk_info.feerate);
./src/test/fuzz/base_encode_decode.cpp:95:    assert(DecodeBase64PSBT(psbt, random_string, error) == error.empty());
./src/test/fuzz/key.cpp:102:        assert(pubkey.data() == pubkey.begin());
./src/test/skiplist_tests.cpp:42:        BOOST_CHECK(vIndex[from].GetAncestor(0) == vIndex.data());
./src/script/signingprovider.cpp:535:                   ComputeTapbranchHash(node.sub[1]->hash, node.sub[1]->hash) == node.hash) {
./src/pubkey.h:78:      return vch.size() > 0 && GetLen(vch[0]) == vch.size();
./src/cluster_linearize.h:881:            Assume(elem.inc.feerate.IsEmpty() == elem.pot_feerate.IsEmpty());
```

Hodlinator deduced the UB on Windows in https://github.com/bitcoin/bitcoin/issues/32135#issuecomment-2751723855

Github-Pull: #32141
Rebased-From: b1de59e896

Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
2025-03-28 14:23:42 -04:00
MarcoFalke
288163ea0f fuzz: Fix off-by-one in package_rbf target
Github-Pull: #32122
Rebased-From: fa5674c264
2025-03-25 16:58:12 -04:00
Sjors Provoost
a3060483fa test: avoid disk space warning for non-regtest
feature_config_args.py incorrectly assumed that its testnet4 node
would not log a disk space warning.

0683b8ebf3 increased m_assumed_blockchain_size
on testnet4 from 1 to 11 GiB which triggers this bug on more
systems, e.g. a RAM disk.

Prevent the warning by setting -prune for these nodes.

Fix the same issue in feature_signet.py

Github-Pull: #32057
Rebased-From: 20fe41e9e8
2025-03-25 10:31:08 -04:00
merge-script
d6db87165c Merge bitcoin/bitcoin#32062: [29.x] backports and rc2
74df31cb0b [doc] update example bitcoin.conf with missing options (glozow)
8082f88d1a [doc] update man pages for 29.0rc2 (glozow)
472d582bfe [build] bump to 29.0rc2 (glozow)
a4c30bd00a qt: doc: adapt outdated binary paths to CMake changes (Sebastian Falbesoner)
4e438d326e build: use make < 3.82 syntax for define directive (Sjors Provoost)
7ff0b02161 build: Remove manpages when making MacOS app (Ava Chow)
5ebcb59fdb test: fix intermittent failure in p2p_orphan_handling.py (Martin Zumsande)
458655bca8 fuzz: make sure DecodeBase58(Check) is called with valid values more often (Lőrinc)
15ecae31a8 fuzz: Always restrict base conversion input lengths (Lőrinc)
80c5d57bd1 contrib: Fix `gen-bitcoin-conf.sh`. (David Gumberg)

Pull request description:

  backports:
  - #32049
  - #32063
  - #32064
  - #32070
  - #31917

ACKs for top commit:
  Sjors:
    ACK 74df31cb0b
  hebasto:
    ACK 74df31cb0b, I have reviewed the code and it looks OK.
  ismaelsadeeq:
    Code review ACK 74df31cb0b

Tree-SHA512: df4ef832a03c9c3f89d30d3f65d81b7c7e4793d2cad8a269f1ff221454a4b0b05e06109f4556926c1c4f7fcbd2537052b4d58b4b3911dfcfc35726c600b587d9
2025-03-18 08:38:18 +08:00
glozow
74df31cb0b [doc] update example bitcoin.conf with missing options 2025-03-17 06:16:22 -04:00
glozow
8082f88d1a [doc] update man pages for 29.0rc2 2025-03-17 06:16:22 -04:00
glozow
472d582bfe [build] bump to 29.0rc2 2025-03-17 06:16:22 -04:00
Sebastian Falbesoner
a4c30bd00a qt: doc: adapt outdated binary paths to CMake changes
Github-Pull: bitcoin-core/gui#858
Rebased-From: 7ebc458a8c
2025-03-17 06:16:03 -04:00
Sjors Provoost
4e438d326e build: use make < 3.82 syntax for define directive
From the GNU make 3.82 release announcement:

* The 'define' make directive now allows a variable assignment operator
  after the variable name, to allow for simple, conditional, or appending
  multi-line variable assignment.

macOS ships with 3.81. This caused the multiprocess config options
to be ignored.

Fixes #32068

Github-Pull: #32070
Rebased-From: 9157d9e449

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2025-03-16 22:07:20 -04:00
Ava Chow
7ff0b02161 build: Remove manpages when making MacOS app
Github-Pull: #32064
Rebased-From: 80b5e7f2cb
2025-03-16 22:07:20 -04:00
Martin Zumsande
5ebcb59fdb test: fix intermittent failure in p2p_orphan_handling.py
If we bump the mocktime before the node has successfully disconnected
the peer, the requests for both parents could be spread over
two GETDATAS, which would make the test fail.

Github-Pull: #32063
Rebased-From: 02942056fd
2025-03-16 22:07:20 -04:00
Lőrinc
458655bca8 fuzz: make sure DecodeBase58(Check) is called with valid values more often
In Base58 fuzz the two roundtrips are merged now, the new `decode_input` switches between a completely random input and a valid encoded one, to make sure the decoding passes more often.
The `max_ret_len` can also exceed the original length now and is being validated more thoroughly.

Github-Pull: #31917
Rebased-From: d5537c18a9

Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
Co-authored-by: marcofleon <marleo23@proton.me>
2025-03-16 22:07:20 -04:00
Lőrinc
15ecae31a8 fuzz: Always restrict base conversion input lengths
They seem to cause timeouts:
> Issue 397734700: bitcoin-core:base58check_encode_decode: Timeout in base58check_encode_decode

The `encoded_string.empty()` check was corrected here to `decoded.empty()` to make sure the `(0, decoded.size() - 1)` range is always valid.

Github-Pull: #31917
Rebased-From: bad1433ef2

Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
Co-authored-by: marcofleon <marleo23@proton.me>
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2025-03-16 22:07:20 -04:00
David Gumberg
80c5d57bd1 contrib: Fix gen-bitcoin-conf.sh.
In #31118, the format of bitcoind's `--help` output changed slightly in
a way that breaks `gen-bitcoin-conf.sh`, modify the script to accomodate
the new format, by starting after the line that says "Options:" and
strip the `-help` option and its description from the output.

Github-Pull: #32049
Rebased-From: a24419f8be
2025-03-13 17:06:10 -04:00
merge-script
e9e6825b8c Merge bitcoin/bitcoin#32046: [29.x] bump to v29.0rc1
47e2fa86dc [doc] release notes link for 29.0 (glozow)
21f423939e [examples] generate example bitcoin.conf (glozow)
86a3ce6209 [doc] update man pages for 29.0rc1 (glozow)
95c21b1fdd [build] bump version to 29.0rc1 (glozow)
153bd443ec [build] bump CLIENT_VERSION_MAJOR to 29 (glozow)

Pull request description:

  - "backport" #32041
  - bump version to v29.0rc1
  - generate manpages
  - add example bitcoin.conf
  - add release-notes.md pointing to wiki

ACKs for top commit:
  achow101:
    ACK 47e2fa86dc
  davidgumberg:
    ACK 47e2fa86dc
  hebasto:
    ACK 47e2fa86dc.

Tree-SHA512: 4e4eec31ab12990d933b6313950e779b7b58fc349f294f59d2504a8db3c28d5dea64b79e588e2c0fe62836db306fb4c3fb3fcd7bd1f51350e880370cec3437d6
2025-03-13 11:49:25 +08:00
glozow
47e2fa86dc [doc] release notes link for 29.0 2025-03-12 15:09:22 -04:00
glozow
21f423939e [examples] generate example bitcoin.conf 2025-03-12 15:09:22 -04:00
glozow
86a3ce6209 [doc] update man pages for 29.0rc1 2025-03-12 15:02:24 -04:00
glozow
95c21b1fdd [build] bump version to 29.0rc1 2025-03-12 13:48:01 -04:00
glozow
153bd443ec [build] bump CLIENT_VERSION_MAJOR to 29
Github-Pull: #32041
Rebased-From: a3f0e9a
2025-03-12 13:47:38 -04:00
1411 changed files with 95537 additions and 69948 deletions

View File

@@ -28,7 +28,7 @@ body:
id: useful-skills
attributes:
label: Useful Skills
description: For example, “`std::thread`”, “Qt6 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
description: For example, “`std::thread`”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
value: |
* Compiling Bitcoin Core from source
* Running the C++ unit tests and the Python functional tests

View File

@@ -1,12 +1,9 @@
name: 'Configure Docker'
description: 'Set up Docker build driver and configure build cache args'
inputs:
cache-provider:
description: 'gha or cirrus cache provider'
use-cirrus:
description: 'Use cirrus cache'
required: true
options:
- gh
- cirrus
runs:
using: 'composite'
steps:
@@ -35,7 +32,7 @@ runs:
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis
# Use cirrus cache host
if [[ ${{ inputs.cache-provider }} == 'cirrus' ]]; then
if [[ ${{ inputs.use-cirrus }} == 'true' ]]; then
url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}"
else
url_args=""

View File

@@ -1,67 +0,0 @@
#!/usr/bin/env python3
# Copyright (c) The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
import subprocess
import sys
import shlex
def run(cmd, **kwargs):
print("+ " + shlex.join(cmd), flush=True)
try:
return subprocess.run(cmd, check=True, **kwargs)
except Exception as e:
sys.exit(e)
def main():
print("Running tests on commit ...")
run(["git", "log", "-1"])
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
run([
"cmake",
"-B",
"build",
"-Werror=dev",
# Use clang++, because it is a bit faster and uses less memory than g++
"-DCMAKE_C_COMPILER=clang",
"-DCMAKE_CXX_COMPILER=clang++",
# Use mold, because it is faster than the default linker
"-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold",
# Use Debug build type for more debug checks, but enable optimizations
"-DAPPEND_CXXFLAGS='-O3 -g2'",
"-DAPPEND_CFLAGS='-O3 -g2'",
"-DCMAKE_BUILD_TYPE=Debug",
"-DWERROR=ON",
"-DWITH_ZMQ=ON",
"-DBUILD_GUI=ON",
"-DBUILD_BENCH=ON",
"-DBUILD_FUZZ_BINARY=ON",
"-DWITH_USDT=ON",
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
])
run(["cmake", "--build", "build", "-j", str(num_procs)])
run([
"ctest",
"--output-on-failure",
"--stop-on-failure",
"--test-dir",
"build",
"-j",
str(num_procs),
])
run([
sys.executable,
"./build/test/functional/test_runner.py",
"-j",
str(num_procs * 2),
"--combinedlogslen=99999999",
])
if __name__ == "__main__":
main()

View File

@@ -1,6 +1,6 @@
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit.
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
name: CI
on:
@@ -22,26 +22,20 @@ env:
CIRRUS_CACHE_HOST: http://127.0.0.1:12321/ # When using Cirrus Runners this host can be used by the docker `gha` build cache type.
REPO_USE_CIRRUS_RUNNERS: 'bitcoin/bitcoin' # Use cirrus runners and cache for this repo, instead of falling back to the slow GHA runners
defaults:
run:
# Enforce fail-fast behavior for all platforms.
# See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
shell: bash
jobs:
runners:
name: 'determine runners'
runs-on: ubuntu-latest
outputs:
provider: ${{ steps.runners.outputs.provider }}
use-cirrus-runners: ${{ steps.runners.outputs.use-cirrus-runners }}
steps:
- id: runners
run: |
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then
echo "provider=cirrus" >> "$GITHUB_OUTPUT"
echo "use-cirrus-runners=true" >> "$GITHUB_OUTPUT"
echo "::notice title=Runner Selection::Using Cirrus Runners"
else
echo "provider=gha" >> "$GITHUB_OUTPUT"
echo "use-cirrus-runners=false" >> "$GITHUB_OUTPUT"
echo "::notice title=Runner Selection::Using GitHub-hosted runners"
fi
@@ -55,7 +49,7 @@ jobs:
steps:
- name: Determine fetch depth
run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.FETCH_DEPTH }}
@@ -88,18 +82,14 @@ jobs:
EXCLUDE_MERGE_BASE_ANCESTORS=^${MERGE_BASE}^@
fi
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD $EXCLUDE_MERGE_BASE_ANCESTORS | head -1)" >> "$GITHUB_ENV"
- run: |
git fetch origin "${GITHUB_BASE_REF}"
git config user.email "ci@example.com"
git config user.name "CI"
- run: |
sudo apt-get update
sudo apt-get install clang mold ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev capnproto libcapnp-dev -y
sudo pip3 install --break-system-packages pycapnp
sudo apt-get install clang ccache build-essential cmake pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
- name: Compile and run tests
run: |
# Run tests on commits after the last merge commit and before the PR head commit
git rebase --exec "git merge --no-commit origin/${GITHUB_BASE_REF} && python3 ./.github/ci-test-each-commit-exec.py && git reset --hard" ${{ env.TEST_BASE }}
# Use clang++, because it is a bit faster and uses less memory than g++
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 )) --combinedlogslen=99999999" ${{ env.TEST_BASE }}
macos-native-arm64:
name: ${{ matrix.job-name }}
@@ -155,12 +145,7 @@ jobs:
run: |
# A workaround for "The `brew link` step did not complete successfully" error.
brew install --quiet python@3 || brew link --overwrite python@3
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode capnp
- name: Install Python packages
run: |
git clone -b v2.1.0 https://github.com/capnproto/pycapnp
pip3 install ./pycapnp -C force-bundled-libcapnp=True --break-system-packages
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@5 qrencode
- name: Set Ccache directory
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
@@ -186,8 +171,10 @@ jobs:
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
windows-native-dll:
win64-native:
name: ${{ matrix.job-name }}
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
# See: https://github.com/actions/runner-images#available-images.
runs-on: windows-2022
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
@@ -202,11 +189,11 @@ jobs:
job-type: [standard, fuzz]
include:
- job-type: standard
generate-options: '-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
job-name: 'Windows native, VS 2022'
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
job-name: 'Win64 native, VS 2022'
- job-type: fuzz
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
job-name: 'Windows native, fuzz, VS 2022'
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
job-name: 'Win64 native fuzz, VS 2022'
steps:
- *CHECKOUT
@@ -218,7 +205,6 @@ jobs:
arch: x64
- name: Get tool information
shell: pwsh
run: |
cmake -version | Tee-Object -FilePath "cmake_version"
Write-Output "---"
@@ -226,11 +212,12 @@ jobs:
$env:VCToolsVersion | Tee-Object -FilePath "toolset_version"
py -3 --version
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
bash --version
- name: Using vcpkg with MSBuild
shell: bash
run: |
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
# Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
@@ -249,7 +236,7 @@ jobs:
- name: Generate build system
run: |
cmake -B build -Werror=dev --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
- name: Save vcpkg binary cache
uses: actions/cache/save@v4
@@ -261,44 +248,32 @@ jobs:
- name: Build
working-directory: build
run: |
cmake --build . -j $NUMBER_OF_PROCESSORS --config Release
- name: Get bitcoind manifest
if: matrix.job-type == 'standard'
working-directory: build
run: |
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -out:bitcoind.manifest
cat bitcoind.manifest
echo
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -validate_manifest
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
- name: Run test suite
if: matrix.job-type == 'standard'
working-directory: build
env:
QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins'
run: |
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
- name: Run functional tests
if: matrix.job-type == 'standard'
working-directory: build
env:
BITCOIN_BIN: '${{ github.workspace }}\build\bin\Release\bitcoin.exe'
BITCOIND: '${{ github.workspace }}\build\bin\Release\bitcoind.exe'
BITCOINCLI: '${{ github.workspace }}\build\bin\Release\bitcoin-cli.exe'
BITCOINTX: '${{ github.workspace }}\build\bin\Release\bitcoin-tx.exe'
BITCOINUTIL: '${{ github.workspace }}\build\bin\Release\bitcoin-util.exe'
BITCOINWALLET: '${{ github.workspace }}\build\bin\Release\bitcoin-wallet.exe'
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="${RUNNER_TEMP}" --combinedlogslen=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA}
shell: cmd
run: py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
- name: Clone corpora
if: matrix.job-type == 'fuzz'
run: |
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${RUNNER_TEMP}/qa-assets"
cd "${RUNNER_TEMP}/qa-assets"
echo "Using qa-assets repo from commit ..."
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets"
Set-Location "$env:RUNNER_TEMP\qa-assets"
Write-Host "Using qa-assets repo from commit ..."
git log -1
- name: Run fuzz tests
@@ -306,123 +281,14 @@ jobs:
working-directory: build
env:
BITCOINFUZZ: '${{ github.workspace }}\build\bin\Release\fuzz.exe'
shell: cmd
run: |
py -3 test/fuzz/test_runner.py --par $NUMBER_OF_PROCESSORS --loglevel DEBUG "${RUNNER_TEMP}/qa-assets/fuzz_corpora"
windows-cross:
name: 'Linux->Windows cross, no tests'
needs: runners
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
env:
FILE_ENV: './ci/test/00_setup_env_win64.sh'
DANGER_CI_ON_HOST_FOLDERS: 1
steps:
- *CHECKOUT
- name: Configure environment
uses: ./.github/actions/configure-environment
- name: Restore caches
id: restore-cache
uses: ./.github/actions/restore-caches
- name: Configure Docker
uses: ./.github/actions/configure-docker
with:
cache-provider: ${{ needs.runners.outputs.provider }}
- name: CI script
run: ./ci/test_run_all.sh
- name: Save caches
uses: ./.github/actions/save-caches
- name: Upload built executables
uses: actions/upload-artifact@v4
with:
name: x86_64-w64-mingw32-executables-${{ github.run_id }}
path: |
${{ env.BASE_BUILD_DIR }}/bin/*.exe
${{ env.BASE_BUILD_DIR }}/src/secp256k1/bin/*.exe
${{ env.BASE_BUILD_DIR }}/src/univalue/*.exe
${{ env.BASE_BUILD_DIR }}/test/config.ini
windows-native-test:
name: 'Windows, test cross-built'
runs-on: windows-2022
needs: windows-cross
env:
PYTHONUTF8: 1
TEST_RUNNER_TIMEOUT_FACTOR: 40
steps:
- *CHECKOUT
- name: Download built executables
uses: actions/download-artifact@v4
with:
name: x86_64-w64-mingw32-executables-${{ github.run_id }}
- name: Run bitcoind.exe
run: ./bin/bitcoind.exe -version
- name: Find mt.exe tool
shell: pwsh
run: |
$sdk_dir = (Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' -Name KitsRoot10).KitsRoot10
$sdk_latest = (Get-ChildItem "$sdk_dir\bin" -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object Name -Descending | Select-Object -First 1).Name
"MT_EXE=${sdk_dir}bin\${sdk_latest}\x64\mt.exe" >> $env:GITHUB_ENV
- name: Get bitcoind manifest
shell: pwsh
run: |
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
Get-Content bitcoind.manifest
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -validate_manifest
- name: Run unit tests
# Can't use ctest here like other jobs as we don't have a CMake build tree.
run: |
./bin/test_bitcoin.exe -l test_suite # Intentionally run sequentially here, to catch test case failures caused by dirty global state from prior test cases.
./src/secp256k1/bin/exhaustive_tests.exe
./src/secp256k1/bin/noverify_tests.exe
./src/secp256k1/bin/tests.exe
./src/univalue/object.exe
./src/univalue/unitester.exe
- name: Run benchmarks
run: ./bin/bench_bitcoin.exe -sanity-check
- name: Adjust paths in test/config.ini
shell: pwsh
run: |
(Get-Content "test/config.ini") -replace '(?<=^SRCDIR=).*', '${{ github.workspace }}' -replace '(?<=^BUILDDIR=).*', '${{ github.workspace }}' -replace '(?<=^RPCAUTH=).*', '${{ github.workspace }}/share/rpcauth/rpcauth.py' | Set-Content "test/config.ini"
Get-Content "test/config.ini"
- name: Set previous release directory
run: |
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> "$GITHUB_ENV"
- name: Get previous releases
working-directory: test
run: ./get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
- name: Run functional tests
env:
# TODO: Fix the excluded test and re-enable it.
# feature_unsupported_utxo_db.py fails on windows because of emojis in the test data directory
EXCLUDE: '--exclude wallet_multiwallet.py,feature_unsupported_utxo_db.py'
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $EXCLUDE $TEST_RUNNER_EXTRA
py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
ci-matrix:
name: ${{ matrix.name }}
needs: runners
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && matrix.cirrus-runner || matrix.fallback-runner }}
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && matrix.cirrus-runner || matrix.fallback-runner }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
timeout-minutes: ${{ matrix.timeout-minutes }}
@@ -439,7 +305,12 @@ jobs:
fallback-runner: 'ubuntu-24.04-arm'
timeout-minutes: 120
file-env: './ci/test/00_setup_env_arm.sh'
provider: 'gha'
- name: 'win64 Cross'
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
fallback-runner: 'ubuntu-24.04'
timeout-minutes: 120
file-env: './ci/test/00_setup_env_win64.sh'
- name: 'ASan + LSan + UBSan + integer, no depends, USDT'
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md' # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
@@ -459,11 +330,11 @@ jobs:
timeout-minutes: 120
file-env: './ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh'
- name: 'no IPC, i686, DEBUG'
- name: 'i686, multiprocess, DEBUG'
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
fallback-runner: 'ubuntu-24.04'
timeout-minutes: 120
file-env: './ci/test/00_setup_env_i686_no_ipc.sh'
file-env: './ci/test/00_setup_env_i686_multiprocess.sh'
- name: 'fuzzer,address,undefined,integer, no depends'
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
@@ -514,7 +385,7 @@ jobs:
- name: Configure Docker
uses: ./.github/actions/configure-docker
with:
cache-provider: ${{ matrix.provider || needs.runners.outputs.provider }}
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
- name: Enable bpfcc script
if: ${{ env.CONTAINER_NAME == 'ci_native_asan' }}
@@ -551,7 +422,7 @@ jobs:
- name: Configure Docker
uses: ./.github/actions/configure-docker
with:
cache-provider: ${{ needs.runners.outputs.provider }}
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
- name: CI script
run: |

9
.gitignore vendored
View File

@@ -1,8 +1,3 @@
# Patterns that are specific to a text editor, IDE, operating system, or user
# environment are not added here. They should be added to your local gitignore
# file instead:
# https://docs.github.com/en/get-started/git-basics/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer
# Build subdirectories.
/*build*
!/build-aux
@@ -20,8 +15,8 @@
# Previous releases
/releases
# cargo default target dir
target/
#build tests
test/lint/test_runner/target/
/guix-build-*

View File

@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
[o:bitcoin:p:bitcoin:r:qt-translation-030x]
[o:bitcoin:p:bitcoin:r:qt-translation-029x]
file_filter = src/qt/locale/bitcoin_<lang>.xlf
source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en

View File

@@ -27,8 +27,8 @@ get_directory_property(precious_variables CACHE_VARIABLES)
# Project / Package metadata
#=============================
set(CLIENT_NAME "Bitcoin Core")
set(CLIENT_VERSION_MAJOR 30)
set(CLIENT_VERSION_MINOR 0)
set(CLIENT_VERSION_MAJOR 29)
set(CLIENT_VERSION_MINOR 2)
set(CLIENT_VERSION_BUILD 0)
set(CLIENT_VERSION_RC 2)
set(CLIENT_VERSION_IS_RELEASE "true")
@@ -94,12 +94,11 @@ endif()
#=============================
include(CMakeDependentOption)
# When adding a new option, end the <help_text> with a full stop for consistency.
option(BUILD_BITCOIN_BIN "Build bitcoin executable." ON)
option(BUILD_DAEMON "Build bitcoind executable." ON)
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
option(BUILD_CLI "Build bitcoin-cli executable." ON)
option(BUILD_TESTS "Build test_bitcoin and other unit test executables." ON)
option(BUILD_TESTS "Build test_bitcoin executable." ON)
option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS})
option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})
@@ -107,16 +106,35 @@ option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable."
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
option(ENABLE_WALLET "Enable wallet." ON)
if(ENABLE_WALLET)
option(WITH_SQLITE "Enable SQLite wallet support." ${ENABLE_WALLET})
if(WITH_SQLITE)
if(VCPKG_TARGET_TRIPLET)
# Use of the `unofficial::` namespace is a vcpkg package manager convention.
find_package(unofficial-sqlite3 CONFIG REQUIRED)
else()
find_package(SQLite3 3.7.17 REQUIRED)
endif()
set(USE_SQLITE ON)
endif()
option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF)
cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF)
if(WITH_BDB)
find_package(BerkeleyDB 4.8 MODULE REQUIRED)
set(USE_BDB ON)
if(NOT BerkeleyDB_VERSION VERSION_EQUAL 4.8)
message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n"
"BDB (legacy) wallets opened by this build will not be portable!"
)
if(WARN_INCOMPATIBLE_BDB)
message(WARNING "If this is intended, pass \"-DWARN_INCOMPATIBLE_BDB=OFF\".\n"
"Passing \"-DWITH_BDB=OFF\" will suppress this warning."
)
endif()
endif()
endif()
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
option(ENABLE_HARDENING "Attempt to harden the resulting executables." ON)
option(REDUCE_EXPORTS "Attempt to reduce exported symbols in the resulting executables." OFF)
option(WERROR "Treat compiler warnings as errors." OFF)
option(WITH_CCACHE "Attempt to use ccache for compiling." ON)
@@ -131,7 +149,7 @@ if(WITH_USDT)
find_package(USDT MODULE REQUIRED)
endif()
option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON)
cmake_dependent_option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON "NOT WIN32" OFF)
cmake_dependent_option(WITH_QRENCODE "Enable QR code support." ON "BUILD_GUI" OFF)
if(WITH_QRENCODE)
@@ -141,9 +159,8 @@ endif()
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "NOT CMAKE_SYSTEM_NAME MATCHES \"(Windows|Darwin)\" AND BUILD_GUI" OFF)
cmake_dependent_option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables." ON "NOT WIN32" OFF)
cmake_dependent_option(WITH_EXTERNAL_LIBMULTIPROCESS "Build with external libmultiprocess library instead of with local git subtree when ENABLE_IPC is enabled. This is not normally recommended, but can be useful for developing libmultiprocess itself." OFF "ENABLE_IPC" OFF)
if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
option(WITH_MULTIPROCESS "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF)
if(WITH_MULTIPROCESS)
find_package(Libmultiprocess REQUIRED COMPONENTS Lib)
find_package(LibmultiprocessNative REQUIRED COMPONENTS Bin
NAMES Libmultiprocess
@@ -163,7 +180,7 @@ if(BUILD_GUI)
if(BUILD_GUI_TESTS)
list(APPEND qt_components Test)
endif()
find_package(Qt 6.2 MODULE REQUIRED
find_package(Qt 5.11.3 MODULE REQUIRED
COMPONENTS ${qt_components}
)
unset(qt_components)
@@ -203,7 +220,6 @@ target_link_libraries(core_interface INTERFACE
if(BUILD_FOR_FUZZING)
message(WARNING "BUILD_FOR_FUZZING=ON will disable all other targets and force BUILD_FUZZ_BINARY=ON.")
set(BUILD_BITCOIN_BIN OFF)
set(BUILD_DAEMON OFF)
set(BUILD_CLI OFF)
set(BUILD_TX OFF)
@@ -217,7 +233,6 @@ if(BUILD_FOR_FUZZING)
set(BUILD_TESTS OFF)
set(BUILD_GUI_TESTS OFF)
set(BUILD_BENCH OFF)
set(ENABLE_IPC OFF)
set(BUILD_FUZZ_BINARY ON)
target_compile_definitions(core_interface INTERFACE
@@ -279,10 +294,6 @@ if(WIN32)
/Zc:__cplusplus
/sdl
)
target_link_options(core_interface INTERFACE
# We embed our own manifests.
/MANIFEST:NO
)
# Improve parallelism in MSBuild.
# See: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/.
list(APPEND CMAKE_VS_GLOBALS "UseMultiToolTask=true")
@@ -341,28 +352,13 @@ target_link_libraries(core_interface INTERFACE
Threads::Threads
)
# Define sanitize_interface with -fsanitize flags intended to apply to all
# libraries and executables.
add_library(sanitize_interface INTERFACE)
target_link_libraries(core_interface INTERFACE sanitize_interface)
if(SANITIZERS)
# Transform list of sanitizers into -fsanitize flags, replacing "fuzzer" with
# "fuzzer-no-link" in sanitize_interface flags, and moving "fuzzer" to
# fuzzer_interface flags. If -DSANITIZERS=fuzzer is specified, the fuzz test
# binary should be built with -fsanitize=fuzzer (so it can use libFuzzer's
# main function), but libraries should be built with -fsanitize=fuzzer-no-link
# (so they can be linked into other executables that have their own main
# functions).
string(REGEX REPLACE "(^|,)fuzzer($|,)" "\\1fuzzer-no-link\\2" sanitize_opts "${SANITIZERS}")
set(fuzz_flag "")
if(NOT sanitize_opts STREQUAL SANITIZERS)
set(fuzz_flag "-fsanitize=fuzzer")
endif()
# First check if the compiler accepts flags. If an incompatible pair like
# -fsanitize=address,thread is used here, this check will fail. This will also
# fail if a bad argument is passed, e.g. -fsanitize=undfeined
try_append_cxx_flags("-fsanitize=${sanitize_opts}" TARGET sanitize_interface
try_append_cxx_flags("-fsanitize=${SANITIZERS}" TARGET sanitize_interface
RESULT_VAR cxx_supports_sanitizers
SKIP_LINK
)
@@ -375,11 +371,12 @@ if(SANITIZERS)
# flag. This is a separate check so we can give a better error message when
# the sanitize flags are supported by the compiler but the actual sanitizer
# libs are missing.
try_append_linker_flag("-fsanitize=${sanitize_opts}" VAR SANITIZER_LDFLAGS
try_append_linker_flag("-fsanitize=${SANITIZERS}" VAR SANITIZER_LDFLAGS
SOURCE "
#include <cstdint>
#include <cstddef>
extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
__attribute__((weak)) // allow for libFuzzer linking
int main() { return 0; }
"
RESULT_VAR linker_supports_sanitizers
@@ -391,10 +388,8 @@ if(SANITIZERS)
endif()
target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS})
# Define fuzzer_interface with flags intended to apply to the fuzz test binary,
# and perform a test compilation to determine correct value of
# FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION.
if(BUILD_FUZZ_BINARY)
target_link_libraries(core_interface INTERFACE ${FUZZ_LIBS})
include(CheckSourceCompilesWithFlags)
check_cxx_source_compiles_with_flags("
#include <cstdint>
@@ -402,12 +397,9 @@ if(BUILD_FUZZ_BINARY)
extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
// No main() function.
" FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION
LDFLAGS ${SANITIZER_LDFLAGS} ${fuzz_flag}
LDFLAGS ${SANITIZER_LDFLAGS}
LINK_LIBRARIES ${FUZZ_LIBS}
)
add_library(fuzzer_interface INTERFACE)
target_link_options(fuzzer_interface INTERFACE ${fuzz_flag})
target_link_libraries(fuzzer_interface INTERFACE ${FUZZ_LIBS})
endif()
include(AddBoostIfNeeded)
@@ -444,7 +436,6 @@ else()
try_append_cxx_flags("-Wvla" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wshadow-field" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wthread-safety" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wthread-safety-pointer" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wloop-analysis" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wredundant-decls" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wunused-member-function" TARGET warn_interface SKIP_LINK)
@@ -497,70 +488,62 @@ try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK
# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag).
try_append_cxx_flags("-fstack-reuse=none" TARGET core_interface)
if(MSVC)
try_append_linker_flag("/DYNAMICBASE" TARGET core_interface)
try_append_linker_flag("/HIGHENTROPYVA" TARGET core_interface)
try_append_linker_flag("/NXCOMPAT" TARGET core_interface)
else()
if(ENABLE_HARDENING)
add_library(hardening_interface INTERFACE)
target_link_libraries(core_interface INTERFACE hardening_interface)
if(MSVC)
try_append_linker_flag("/DYNAMICBASE" TARGET hardening_interface)
try_append_linker_flag("/HIGHENTROPYVA" TARGET hardening_interface)
try_append_linker_flag("/NXCOMPAT" TARGET hardening_interface)
else()
# _FORTIFY_SOURCE requires that there is some level of optimization,
# otherwise it does nothing and just creates a compiler warning.
try_append_cxx_flags("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
RESULT_VAR cxx_supports_fortify_source
SOURCE "int main() {
# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
#error
#endif
}"
)
if(cxx_supports_fortify_source)
target_compile_options(core_interface INTERFACE
-U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=3
# _FORTIFY_SOURCE requires that there is some level of optimization,
# otherwise it does nothing and just creates a compiler warning.
try_append_cxx_flags("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
RESULT_VAR cxx_supports_fortify_source
SOURCE "int main() {
# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
#error
#endif
}"
)
endif()
unset(cxx_supports_fortify_source)
try_append_cxx_flags("-Wstack-protector" TARGET core_interface SKIP_LINK)
try_append_cxx_flags("-fstack-protector-all" TARGET core_interface)
try_append_cxx_flags("-fcf-protection=full" TARGET core_interface)
if(MINGW)
# stack-clash-protection is a no-op for Windows.
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
else()
try_append_cxx_flags("-fstack-clash-protection" TARGET core_interface)
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
try_append_cxx_flags("-mbranch-protection=bti" TARGET core_interface SKIP_LINK)
else()
try_append_cxx_flags("-mbranch-protection=standard" TARGET core_interface SKIP_LINK)
if(cxx_supports_fortify_source)
target_compile_options(hardening_interface INTERFACE
-U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=3
)
endif()
endif()
unset(cxx_supports_fortify_source)
try_append_linker_flag("-Wl,--enable-reloc-section" TARGET core_interface)
try_append_linker_flag("-Wl,--dynamicbase" TARGET core_interface)
try_append_linker_flag("-Wl,--nxcompat" TARGET core_interface)
try_append_linker_flag("-Wl,--high-entropy-va" TARGET core_interface)
try_append_linker_flag("-Wl,-z,relro" TARGET core_interface)
try_append_linker_flag("-Wl,-z,now" TARGET core_interface)
# TODO: This can be dropped once Bitcoin Core no longer supports
# NetBSD 10.0 or if upstream fix is backported.
# NetBSD's dynamic linker ld.elf_so < 11.0 supports exactly 2
# `PT_LOAD` segments and binaries linked with `-z separate-code`
# have 4 `PT_LOAD` segments.
# Relevant discussions:
# - https://github.com/bitcoin/bitcoin/pull/28724#issuecomment-2589347934
# - https://mail-index.netbsd.org/tech-userlevel/2023/01/05/msg013666.html
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD" AND CMAKE_SYSTEM_VERSION VERSION_LESS 11.0)
try_append_linker_flag("-Wl,-z,noseparate-code" TARGET core_interface)
else()
try_append_linker_flag("-Wl,-z,separate-code" TARGET core_interface)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
try_append_linker_flag("-Wl,-fixup_chains" TARGET core_interface)
try_append_cxx_flags("-Wstack-protector" TARGET hardening_interface SKIP_LINK)
try_append_cxx_flags("-fstack-protector-all" TARGET hardening_interface)
try_append_cxx_flags("-fcf-protection=full" TARGET hardening_interface)
if(MINGW)
# stack-clash-protection is a no-op for Windows.
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
else()
try_append_cxx_flags("-fstack-clash-protection" TARGET hardening_interface)
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
try_append_cxx_flags("-mbranch-protection=bti" TARGET hardening_interface SKIP_LINK)
else()
try_append_cxx_flags("-mbranch-protection=standard" TARGET hardening_interface SKIP_LINK)
endif()
endif()
try_append_linker_flag("-Wl,--enable-reloc-section" TARGET hardening_interface)
try_append_linker_flag("-Wl,--dynamicbase" TARGET hardening_interface)
try_append_linker_flag("-Wl,--nxcompat" TARGET hardening_interface)
try_append_linker_flag("-Wl,--high-entropy-va" TARGET hardening_interface)
try_append_linker_flag("-Wl,-z,relro" TARGET hardening_interface)
try_append_linker_flag("-Wl,-z,now" TARGET hardening_interface)
try_append_linker_flag("-Wl,-z,separate-code" TARGET hardening_interface)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
try_append_linker_flag("-Wl,-fixup_chains" TARGET hardening_interface)
endif()
endif()
endif()
@@ -591,9 +574,11 @@ set(Python3_FIND_FRAMEWORK LAST CACHE STRING "")
set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "")
mark_as_advanced(Python3_FIND_FRAMEWORK Python3_FIND_UNVERSIONED_NAMES)
find_package(Python3 3.10 COMPONENTS Interpreter)
if(NOT TARGET Python3::Interpreter)
if(Python3_EXECUTABLE)
set(PYTHON_COMMAND ${Python3_EXECUTABLE})
else()
list(APPEND configure_warnings
"Minimum required Python not found."
"Minimum required Python not found. Utils and rpcauth tests are disabled."
)
endif()
@@ -637,6 +622,8 @@ add_subdirectory(doc)
add_subdirectory(src)
include(cmake/tests.cmake)
include(Maintenance)
setup_split_debug_script()
add_maintenance_targets()
@@ -647,16 +634,15 @@ message("\n")
message("Configure summary")
message("=================")
message("Executables:")
message(" bitcoin ............................. ${BUILD_BITCOIN_BIN}")
message(" bitcoind ............................ ${BUILD_DAEMON}")
if(BUILD_DAEMON AND ENABLE_IPC)
if(BUILD_DAEMON AND WITH_MULTIPROCESS)
set(bitcoin_daemon_status ON)
else()
set(bitcoin_daemon_status OFF)
endif()
message(" bitcoin-node (multiprocess) ......... ${bitcoin_daemon_status}")
message(" bitcoin-qt (GUI) .................... ${BUILD_GUI}")
if(BUILD_GUI AND ENABLE_IPC)
if(BUILD_GUI AND WITH_MULTIPROCESS)
set(bitcoin_gui_status ON)
else()
set(bitcoin_gui_status OFF)
@@ -670,18 +656,12 @@ message(" bitcoin-chainstate (experimental) ... ${BUILD_UTIL_CHAINSTATE}")
message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}")
message("Optional features:")
message(" wallet support ...................... ${ENABLE_WALLET}")
if(ENABLE_WALLET)
message(" - descriptor wallets (SQLite) ...... ${WITH_SQLITE}")
message(" - legacy wallets (Berkeley DB) ..... ${WITH_BDB}")
endif()
message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}")
message(" ZeroMQ .............................. ${WITH_ZMQ}")
if(ENABLE_IPC)
if (WITH_EXTERNAL_LIBMULTIPROCESS)
set(ipc_status "ON (with external libmultiprocess)")
else()
set(ipc_status ON)
endif()
else()
set(ipc_status OFF)
endif()
message(" IPC ................................. ${ipc_status}")
message(" USDT tracing ........................ ${WITH_USDT}")
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
message(" DBus (GUI) .......................... ${WITH_DBUS}")
@@ -700,6 +680,7 @@ message("Cross compiling ....................... ${cross_status}")
message("C++ compiler .......................... ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, ${CMAKE_CXX_COMPILER}")
include(FlagsSummary)
flags_summary()
message("Attempt to harden executables ......... ${ENABLE_HARDENING}")
message("Treat compiler warnings as errors ..... ${WERROR}")
message("Use ccache for compiling .............. ${WITH_CCACHE}")
message("\n")

View File

@@ -61,7 +61,6 @@
"name": "dev-mode",
"displayName": "Developer mode, with all features/dependencies enabled",
"binaryDir": "${sourceDir}/build_dev_mode",
"errors": {"dev": true},
"cacheVariables": {
"BUILD_BENCH": "ON",
"BUILD_CLI": "ON",
@@ -77,9 +76,13 @@
"BUILD_UTIL_CHAINSTATE": "ON",
"BUILD_WALLET_TOOL": "ON",
"ENABLE_EXTERNAL_SIGNER": "ON",
"ENABLE_HARDENING": "ON",
"ENABLE_WALLET": "ON",
"ENABLE_IPC": "ON",
"WARN_INCOMPATIBLE_BDB": "OFF",
"WITH_BDB": "ON",
"WITH_MULTIPROCESS": "ON",
"WITH_QRENCODE": "ON",
"WITH_SQLITE": "ON",
"WITH_USDT": "ON",
"WITH_ZMQ": "ON"
}

View File

@@ -80,7 +80,7 @@ facilitates social contribution, easy testing and peer review.
To contribute a patch, the workflow is as follows:
1. Fork repository ([only for the first time](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo))
1. Fork repository ([only for the first time](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
1. Create topic branch
1. Commit patches
@@ -115,14 +115,13 @@ fixes or code moves with actual code changes.
Make sure each individual commit is hygienic: that it builds successfully on its
own without warnings, errors, regressions, or test failures.
This means tests must be updated in the same commit that changes the behavior.
Commit messages should be verbose by default consisting of a short subject line
(50 chars max), a blank line and detailed explanatory text as separate
paragraph(s), unless the title alone is self-explanatory (like "Correct typo
in init.cpp") in which case a single title line is sufficient. Commit messages should be
helpful to people reading your code in the future, so explain the reasoning for
your decisions. Further explanation [here](https://cbea.ms/git-commit/).
your decisions. Further explanation [here](https://chris.beams.io/posts/git-commit/).
If a particular commit references another issue, please add the reference. For
example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords
@@ -183,7 +182,7 @@ for more information on helping with translations.
### Work in Progress Changes and Requests for Comments
If a pull request is not to be considered for merging (yet), please
prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
in the body of the pull request to indicate tasks are pending.
### Address Feedback
@@ -402,7 +401,7 @@ about:
- It may be because your code is too complex for all but a few people, and those people
may not have realized your pull request even exists. A great way to find people who
are qualified and care about the code you are touching is the
[Git Blame feature](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files). Simply
[Git Blame feature](https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/tracking-changes-in-a-file). Simply
look up who last modified the code you are changing and see if you can find
them and give them a nudge. Don't be incessant about the nudging, though.
- Finally, if all else fails, ask on IRC or elsewhere for someone to give your pull request

View File

@@ -1 +1 @@
See [doc/build-\*.md](/doc)
See [doc/build-\*.md](/doc)

View File

@@ -19,7 +19,7 @@ License
-------
Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see https://opensource.org/license/MIT.
information or see https://opensource.org/licenses/MIT.
Development Process
-------------------
@@ -56,8 +56,8 @@ in Python.
These tests can be run (if the [test dependencies](/test) are installed) with: `build/test/functional/test_runner.py`
(assuming `build` is your build directory).
The CI (Continuous Integration) systems make sure that every pull request is tested on Windows, Linux, and macOS.
The CI must pass on all commits before merge to avoid unrelated CI failures on new pull requests.
The CI (Continuous Integration) systems make sure that every pull request is built for Windows, Linux, and macOS,
and that unit/sanity tests are run automatically.
### Manual Quality Assurance (QA) Testing

View File

@@ -6,19 +6,16 @@
export LC_ALL=C
set -o errexit -o pipefail -o xtrace
export CI_RETRY_EXE="/ci_retry --"
pushd "/"
${CI_RETRY_EXE} apt-get update
# Lint dependencies:
# - cargo (used to run the lint tests)
# - curl/xz-utils (to install shellcheck)
# - git (used in many lint scripts)
# - gpg (used by verify-commits)
${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg
${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg
PYTHON_PATH="/python_build"
if [ ! -d "${PYTHON_PATH}/bin" ]; then
@@ -38,20 +35,31 @@ export PATH="${PYTHON_PATH}/bin:${PATH}"
command -v python3
python3 --version
export LINT_RUNNER_PATH="/lint_test_runner"
if [ ! -d "${LINT_RUNNER_PATH}" ]; then
${CI_RETRY_EXE} apt-get install -y cargo
(
cd "/test/lint/test_runner" || exit 1
cargo build
mkdir -p "${LINT_RUNNER_PATH}"
mv target/debug/test_runner "${LINT_RUNNER_PATH}"
)
fi
${CI_RETRY_EXE} pip3 install \
codespell==2.4.1 \
lief==0.16.6 \
codespell==2.2.6 \
lief==0.13.2 \
mypy==1.4.1 \
pyzmq==25.1.0 \
ruff==0.5.5 \
vulture==2.6
SHELLCHECK_VERSION=v0.11.0
SHELLCHECK_VERSION=v0.8.0
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \
tar --xz -xf - --directory /tmp/
mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
MLC_VERSION=v1
MLC_VERSION=v0.19.0
MLC_BIN=mlc-x86_64-linux
curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc"
chmod +x /usr/bin/mlc

View File

@@ -16,7 +16,7 @@ if [ -n "$CIRRUS_PR" ]; then
fi
fi
RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml"
RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
# Sanity check only the last few commits to get notified of missing sigs,

View File

@@ -11,6 +11,7 @@ export LC_ALL=C
git config --global --add safe.directory /bitcoin
export PATH="/python_build/bin:${PATH}"
export LINT_RUNNER_PATH="/lint_test_runner"
if [ -z "$1" ]; then
bash -ic "./ci/lint/06_script.sh"

View File

@@ -4,7 +4,7 @@
# See test/lint/README.md for usage.
FROM mirror.gcr.io/ubuntu:24.04
FROM mirror.gcr.io/debian:bookworm
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
@@ -12,7 +12,8 @@ ENV LC_ALL=C.UTF-8
COPY ./ci/retry/retry /ci_retry
COPY ./.python-version /.python-version
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
COPY ./ci/lint/01_install.sh /install.sh
COPY ./ci/lint/04_install.sh /install.sh
COPY ./test/lint/test_runner /test/lint/test_runner
RUN /install.sh && \
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \

View File

@@ -64,7 +64,7 @@ export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}
# The folder for previous release binaries.
# This folder exists only on the ci guest, and on the ci host as a volume.
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake ninja-build}
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake}
export GOAL=${GOAL:-install}
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}

View File

@@ -10,13 +10,12 @@ export HOST=arm-linux-gnueabihf
export DPKG_ADD_ARCH="armhf"
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
export CONTAINER_NAME=ci_arm_linux
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.x, similar to guix) can cross-compile
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:noble" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.3, similar to guix) can cross-compile
export CI_IMAGE_PLATFORM="linux/arm64"
export USE_BUSY_BOX=true
export RUN_UNIT_TESTS=true
export RUN_FUNCTIONAL_TESTS=false
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
# This could be removed once the ABI change warning does not show up by default
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"

View File

@@ -7,17 +7,17 @@
export LC_ALL=C.UTF-8
export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_no_multiprocess
export CONTAINER_NAME=ci_i686_multiprocess
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CI_IMAGE_PLATFORM="linux/amd64"
export PACKAGES="llvm clang g++-multilib"
export DEP_OPTS="DEBUG=1 NO_IPC=1"
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
export TEST_RUNNER_EXTRA="--v2transport --usecli"
export TEST_RUNNER_EXTRA="--v2transport"
export BITCOIN_CONFIG="\
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER='clang;-m32' \
-DCMAKE_CXX_COMPILER='clang++;-m32' \
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
"
export BITCOIND=bitcoin-node # Used in functional tests

View File

@@ -10,10 +10,9 @@ export LC_ALL=C.UTF-8
# Therefore, `--break-system-packages` is needed.
export CONTAINER_NAME="ci_mac_native" # macos does not use a container, but the env var is needed for logging
export PIP_PACKAGES="--break-system-packages zmq"
export GOAL="install deploy"
export GOAL="install"
export CMAKE_GENERATOR="Ninja"
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""
export BITCOIN_CMD="bitcoin -m" # Used in functional tests

View File

@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
export CONTAINER_NAME="ci_mac_native_fuzz" # macos does not use a container, but the env var is needed for logging
export CMAKE_GENERATOR="Ninja"
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""

View File

@@ -20,18 +20,16 @@ fi
export CONTAINER_NAME=ci_native_asan
export APT_LLVM_V="21"
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE} libcapnp-dev capnproto python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qtbase5-dev qttools5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
export NO_DEPENDS=1
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
export BITCOIN_CONFIG="\
-DWITH_USDT=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON \
-DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern -Wno-error=deprecated-declarations' \
-DAPPEND_CXXFLAGS='-std=c++23' \
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
"

View File

@@ -8,14 +8,8 @@ export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_native_centos
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10"
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make ninja-build git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
export PIP_PACKAGES="pyzmq pycapnp"
export DEP_OPTS="DEBUG=1"
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
export PIP_PACKAGES="pyzmq"
export DEP_OPTS="DEBUG=1" # Temporarily enable a DEBUG=1 build to check for GCC-bug-117966 regressions. This can be removed once the minimum GCC version is bumped to 12 in the previous releases task, see https://github.com/bitcoin/bitcoin/issues/31436#issuecomment-2530717875
export GOAL="install"
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON \
-DBUILD_GUI=ON \
-DREDUCE_EXPORTS=ON \
-DCMAKE_BUILD_TYPE=Debug \
"
export BITCOIN_CMD="bitcoin -m" # Used in functional tests
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON -DCMAKE_BUILD_TYPE=Debug"

View File

@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_fuzz
export APT_LLVM_V="21"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev libcapnp-dev capnproto"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false

View File

@@ -15,8 +15,9 @@ LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${L
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
export CONTAINER_NAME="ci_native_fuzz_msan"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev"
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
# BDB generates false-positives and will be removed in future
export PACKAGES="ninja-build clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev"
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export GOAL="all"
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
# _FORTIFY_SOURCE is not compatible with MSAN.

View File

@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_fuzz_valgrind
export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto"
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libevent-dev libboost-dev libsqlite3-dev valgrind"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
@@ -17,5 +17,8 @@ export FUZZ_TESTS_CONFIG="--valgrind"
export GOAL="all"
export BITCOIN_CONFIG="\
-DBUILD_FOR_FUZZING=ON \
-DCMAKE_CXX_FLAGS='-Wno-error=array-bounds' \
-DSANITIZERS=fuzzer \
-DCMAKE_C_COMPILER=clang-16 \
-DCMAKE_CXX_COMPILER=clang++-16 \
"
export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-16"

View File

@@ -14,11 +14,10 @@ LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${L
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
export CONTAINER_NAME="ci_native_msan"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev ninja-build"
# BDB generates false-positives and will be removed in future
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
# _FORTIFY_SOURCE is not compatible with MSAN.
export BITCOIN_CONFIG="\

View File

@@ -9,8 +9,7 @@ export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:bookworm"
# Use minimum supported python3.10 (or best-effort 3.11) and clang-16, see doc/dependencies.md
export PACKAGES="python3-zmq python3-pip clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
export PIP_PACKAGES="--break-system-packages pycapnp"
export PACKAGES="python3-zmq clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON"

View File

@@ -10,17 +10,18 @@ export CONTAINER_NAME=ci_native_previous_releases
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:22.04"
# Use minimum supported python3.10 and gcc-11, see doc/dependencies.md
export PACKAGES="gcc-11 g++-11 python3-zmq"
export DEP_OPTS="CC=gcc-11 CXX=g++-11"
export DEP_OPTS="DEBUG=1 CC=gcc-11 CXX=g++-11"
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
export RUN_UNIT_TESTS_SEQUENTIAL="true"
export RUN_UNIT_TESTS="false"
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
export DOWNLOAD_PREVIOUS_RELEASES="true"
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-funsigned-char' \
-DCMAKE_C_FLAGS_DEBUG='-g2 -O2' \
-DCMAKE_C_FLAGS_DEBUG='-g0 -O2' \
-DCMAKE_CXX_FLAGS='-funsigned-char' \
-DCMAKE_CXX_FLAGS_DEBUG='-g2 -O2' \
-DCMAKE_CXX_FLAGS_DEBUG='-g0 -O2' \
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
"

View File

@@ -8,9 +8,9 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_tidy
export TIDY_LLVM_V="20"
export TIDY_LLVM_V="19"
export APT_LLVM_V="${TIDY_LLVM_V}"
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
@@ -19,7 +19,8 @@ export RUN_CHECK_DEPS=true
export RUN_TIDY=true
export GOAL="install"
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON \
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \
-DENABLE_HARDENING=OFF \
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \

View File

@@ -11,11 +11,9 @@ export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export APT_LLVM_V="21"
LIBCXX_DIR="/cxx_build/"
LIBCXX_FLAGS="-fsanitize=thread -nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-zmq python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-zmq ninja-build"
export DEP_OPTS="CC=clang CXX=clang++ CXXFLAGS='${LIBCXX_FLAGS}' NO_QT=1"
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DSANITIZERS=thread \
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES'"
export USE_INSTRUMENTED_LIBCPP="Thread"

View File

@@ -8,14 +8,14 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_valgrind
export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export PACKAGES="valgrind clang-16 llvm-16 libclang-rt-16-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev"
export USE_VALGRIND=1
export NO_DEPENDS=1
# bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra"
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # feature_init excluded for now, see https://github.com/bitcoin/bitcoin/issues/30011 ; bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export GOAL="install"
# TODO enable GUI
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON -DBUILD_GUI=OFF \
-DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \
-DCMAKE_C_COMPILER=clang-16 \
-DCMAKE_CXX_COMPILER=clang++-16 \
"

View File

@@ -7,12 +7,15 @@
export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_win64
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-mingw-w64-x86-64-posix (version 13.x, similar to guix) can cross-compile
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:noble" # Check that g++-mingw-w64-x86-64-posix (version 13.2, similar to guix) can cross-compile
export CI_IMAGE_PLATFORM="linux/amd64"
export HOST=x86_64-w64-mingw32
export PACKAGES="g++-mingw-w64-x86-64-posix nsis"
export RUN_UNIT_TESTS=false
export DPKG_ADD_ARCH="i386"
export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
# Install wine, but do not run unit tests, as they surface frequent
# false-positives.
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-false}
export RUN_FUNCTIONAL_TESTS=false
export GOAL="deploy"
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF \
-DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized'"
-DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized -Wno-error=array-bounds'"

View File

@@ -6,11 +6,11 @@
export LC_ALL=C.UTF-8
set -o errexit -o pipefail -o xtrace
set -ex
CFG_DONE="${BASE_ROOT_DIR}/ci.base-install-done" # Use a global setting to remember whether this script ran to avoid running it twice
CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
if [ "$( cat "${CFG_DONE}" || true )" == "done" ]; then
if [ "$(git config --global ${CFG_DONE})" == "true" ]; then
echo "Skip base install"
exit 0
fi
@@ -34,8 +34,7 @@ fi
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
bash -c "dnf -y install epel-release"
# The ninja-build package is available in the CRB repository.
bash -c "dnf -y --allowerasing --enablerepo crb install $CI_BASE_PACKAGES $PACKAGES"
bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES"
elif [ "$CI_OS_NAME" != "macos" ]; then
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
@@ -97,4 +96,4 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
fi
echo -n "done" > "${CFG_DONE}"
git config --global ${CFG_DONE} "true"

View File

@@ -1,52 +0,0 @@
#!/usr/bin/env python3
# Copyright (c) The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
import os
import shlex
import subprocess
import sys
def run(cmd, **kwargs):
print("+ " + shlex.join(cmd), flush=True)
try:
return subprocess.run(cmd, check=True, **kwargs)
except Exception as e:
sys.exit(e)
def main():
print("Export only allowed settings:")
settings = run(
["bash", "-c", "grep export ./ci/test/00_setup_env*.sh"],
stdout=subprocess.PIPE,
text=True,
encoding="utf8",
).stdout.splitlines()
settings = set(l.split("=")[0].split("export ")[1] for l in settings)
# Add "hidden" settings, which are never exported, manually. Otherwise,
# they will not be passed on.
settings.update([
"BASE_BUILD_DIR",
"CI_FAILFAST_TEST_LEAVE_DANGLING",
])
# Append $USER to /tmp/env to support multi-user systems and $CONTAINER_NAME
# to allow support starting multiple runs simultaneously by the same user.
env_file = "/tmp/env-{u}-{c}".format(
u=os.getenv("USER"),
c=os.getenv("CONTAINER_NAME"),
)
with open(env_file, "w", encoding="utf8") as file:
for k, v in os.environ.items():
if k in settings:
file.write(f"{k}={v}\n")
run(["cat", env_file])
run(["./ci/test/02_run_container.sh"]) # run the remainder
if __name__ == "__main__":
main()

View File

@@ -10,6 +10,10 @@ export CI_IMAGE_LABEL="bitcoin-ci-test"
set -o errexit -o pipefail -o xtrace
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
# Export all env vars to avoid missing some.
# Though, exclude those with newlines to avoid parsing problems.
python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]' | tee "/tmp/env-$USER-$CONTAINER_NAME"
# Env vars during the build can not be changed. For example, a modified
# $MAKEJOBS is ignored in the build process. Use --cpuset-cpus as an
# approximation to respect $MAKEJOBS somewhat, if cpuset is available.
@@ -61,11 +65,16 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
fi
if [ "$DANGER_CI_ON_HOST_CCACHE_FOLDER" ]; then
# Temporary exclusion for https://github.com/bitcoin/bitcoin/issues/31108
# to allow CI configs and envs generated in the past to work for a bit longer.
# Can be removed in March 2025.
if [ "${CCACHE_DIR}" != "/tmp/ccache_dir" ]; then
if [ ! -d "${CCACHE_DIR}" ]; then
echo "Error: Directory '${CCACHE_DIR}' must be created in advance."
exit 1
fi
CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=${CCACHE_DIR}"
fi # End temporary exclusion
fi
docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true
@@ -85,6 +94,8 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
# When detecting podman-docker, `--external` should be added.
docker image prune --force --filter "label=$CI_IMAGE_LABEL"
# Append $USER to /tmp/env to support multi-user systems and $CONTAINER_NAME
# to allow support starting multiple runs simultaneously by the same user.
# shellcheck disable=SC2086
CI_CONTAINER_ID=$(docker run --cap-add LINUX_IMMUTABLE $CI_CONTAINER_CAP --rm --interactive --detach --tty \
--mount "type=bind,src=$BASE_READ_ONLY_DIR,dst=$BASE_READ_ONLY_DIR,readonly" \
@@ -118,9 +129,13 @@ CI_EXEC () {
export -f CI_EXEC
# Normalize all folders to BASE_ROOT_DIR
CI_EXEC rsync --recursive --perms --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/"
CI_EXEC rsync --archive --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/"
CI_EXEC "${BASE_ROOT_DIR}/ci/test/01_base_install.sh"
# Fixes permission issues when there is a container UID/GID mismatch with the owner
# of the git source code directory.
CI_EXEC git config --global --add safe.directory \"*\"
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
CI_EXEC "${BASE_ROOT_DIR}/ci/test/03_test_script.sh"

View File

@@ -74,7 +74,7 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
echo "Using qa-assets repo from commit ..."
git log -1
)
elif [ "$RUN_UNIT_TESTS" = "true" ]; then
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
mkdir -p "$DIR_UNIT_TEST_DATA"
@@ -107,7 +107,7 @@ if [ -z "$NO_DEPENDS" ]; then
bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1"
fi
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
test/get_previous_releases.py --target-dir "$PREVIOUS_RELEASES_DIR"
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
fi
BITCOIN_CONFIG_ALL="-DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON"
@@ -123,27 +123,18 @@ PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
# Folder where the build is done.
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
mkdir -p "${BASE_BUILD_DIR}"
cd "${BASE_BUILD_DIR}"
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev"
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DENABLE_EXTERNAL_SIGNER=ON -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR"
if [[ "${RUN_TIDY}" == "true" ]]; then
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
fi
bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || (
cd "${BASE_BUILD_DIR}"
# shellcheck disable=SC2046
cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")
false
)
bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")) && false)"
# shellcheck disable=SC2086
cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target all $GOAL || (
echo "Build failure. Verbose build follows."
# shellcheck disable=SC2086
cmake --build "${BASE_BUILD_DIR}" -j1 --target all $GOAL --verbose
false
)
bash -c "cmake --build . $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build . --target all "$GOAL" --verbose ; false )
bash -c "${PRINT_CCACHE_STATISTICS}"
if [ "$CI" = "true" ]; then
@@ -155,8 +146,8 @@ fi
du -sh "${DEPENDS_DIR}"/*/
du -sh "${PREVIOUS_RELEASES_DIR}"
if [ -n "${CI_LIMIT_STACK_SIZE}" ]; then
ulimit -s 512
if [[ $HOST = *-mingw32 ]]; then
"${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
fi
if [ -n "$USE_VALGRIND" ]; then
@@ -164,32 +155,21 @@ if [ -n "$USE_VALGRIND" ]; then
fi
if [ "$RUN_CHECK_DEPS" = "true" ]; then
"${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" "${BASE_BUILD_DIR}"
"${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" .
fi
if [ "$RUN_UNIT_TESTS" = "true" ]; then
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" \
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
CTEST_OUTPUT_ON_FAILURE=ON \
ctest --test-dir "${BASE_BUILD_DIR}" \
--stop-on-failure \
"${MAKEJOBS}" \
--timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" CTEST_OUTPUT_ON_FAILURE=ON ctest --stop-on-failure "${MAKEJOBS}" --timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
fi
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_bitcoin --catch_system_errors=no -l test_suite
fi
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
# parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
"${BASE_BUILD_DIR}/test/functional/test_runner.py" \
--ci "${MAKEJOBS}" \
--tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" \
--ansi \
--combinedlogslen=99999999 \
--timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" \
"${TEST_RUNNER_EXTRA[@]}" \
--quiet \
--failfast
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/functional/test_runner.py --ci "${MAKEJOBS}" --tmpdirprefix "${BASE_SCRATCH_DIR}"/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA[@]}" --quiet --failfast
fi
if [ "${RUN_TIDY}" = "true" ]; then
@@ -223,11 +203,5 @@ fi
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
# shellcheck disable=SC2086
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
"${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \
${FUZZ_TESTS_CONFIG} \
"${MAKEJOBS}" \
-l DEBUG \
"${DIR_FUZZ_IN}" \
--empty_min_time=60
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} "${MAKEJOBS}" -l DEBUG "${DIR_FUZZ_IN}" --empty_min_time=60
fi

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (c) 2018-present The Bitcoin Core developers
# Copyright (c) 2018-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@ for b_name in "${BASE_OUTDIR}/bin"/*; do
echo "Wrap $b ..."
mv "$b" "${b}_orig"
echo '#!/usr/bin/env bash' > "$b"
echo "exec valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b"
echo "valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b"
chmod +x "$b"
done
done

20
ci/test/wrap-wine.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C.UTF-8
for b_name in {"${BASE_OUTDIR}/bin"/*,src/univalue/{test_json,unitester,object}}.exe; do
# shellcheck disable=SC2044
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do
if (file "$b" | grep "Windows"); then
echo "Wrap $b ..."
mv "$b" "${b}_orig"
echo '#!/usr/bin/env bash' > "$b"
echo "( wine \"${b}_orig\" \"\$@\" ) || ( sleep 1 && wine \"${b}_orig\" \"\$@\" )" >> "$b"
chmod +x "$b"
fi
done
done

View File

@@ -8,4 +8,4 @@ export LC_ALL=C.UTF-8
set -o errexit; source ./ci/test/00_setup_env.sh
set -o errexit
"./ci/test/02_run_container.py"
"./ci/test/02_run_container.sh"

View File

@@ -29,9 +29,18 @@
/* Copyright year */
#define COPYRIGHT_YEAR @COPYRIGHT_YEAR@
/* Define this symbol to build code that uses ARMv8 SHA-NI intrinsics */
#cmakedefine ENABLE_ARM_SHANI 1
/* Define this symbol to build code that uses AVX2 intrinsics */
#cmakedefine ENABLE_AVX2 1
/* Define if external signer support is enabled */
#cmakedefine ENABLE_EXTERNAL_SIGNER 1
/* Define this symbol to build code that uses SSE4.1 intrinsics */
#cmakedefine ENABLE_SSE41 1
/* Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing
*/
#cmakedefine ENABLE_TRACING 1
@@ -39,12 +48,20 @@
/* Define to 1 to enable wallet functions. */
#cmakedefine ENABLE_WALLET 1
/* Define this symbol to build code that uses x86 SHA-NI intrinsics */
#cmakedefine ENABLE_X86_SHANI 1
/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
*/
#cmakedefine01 HAVE_DECL_FORK
/* Define to 1 if '*ifaddrs' are available. */
#cmakedefine HAVE_IFADDRS 1
/* Define to 1 if you have the declaration of `freeifaddrs', and to 0 if you
don't. */
#cmakedefine01 HAVE_DECL_FREEIFADDRS
/* Define to 1 if you have the declaration of `getifaddrs', and to 0 if you
don't. */
#cmakedefine01 HAVE_DECL_GETIFADDRS
/* Define to 1 if you have the declaration of `pipe2', and to 0 if you don't.
*/
@@ -91,6 +108,18 @@
/* Define to 1 if std::system or ::wsystem is available. */
#cmakedefine HAVE_SYSTEM 1
/* Define to 1 if you have the <sys/prctl.h> header file. */
#cmakedefine HAVE_SYS_PRCTL_H 1
/* Define to 1 if you have the <sys/resources.h> header file. */
#cmakedefine HAVE_SYS_RESOURCES_H 1
/* Define to 1 if you have the <sys/vmmeter.h> header file. */
#cmakedefine HAVE_SYS_VMMETER_H 1
/* Define to 1 if you have the <vm/vm_param.h> header file. */
#cmakedefine HAVE_VM_VM_PARAM_H 1
/* Define to the address where bug reports for this package should be sent. */
#define CLIENT_BUGREPORT "@CLIENT_BUGREPORT@"
@@ -106,10 +135,16 @@
/* Define to 1 if strerror_r returns char *. */
#cmakedefine STRERROR_R_CHAR_P 1
/* Define if BDB support should be compiled in */
#cmakedefine USE_BDB 1
/* Define if dbus support should be compiled in */
#cmakedefine USE_DBUS 1
/* Define if QR support should be compiled in */
#cmakedefine USE_QRCODE 1
/* Define if sqlite support should be compiled in */
#cmakedefine USE_SQLITE 1
#endif //BITCOIN_CONFIG_H

View File

@@ -4,6 +4,13 @@
include(CheckCXXSourceCompiles)
include(CheckCXXSymbolExists)
include(CheckIncludeFileCXX)
# The following HAVE_{HEADER}_H variables go to the bitcoin-build-config.h header.
check_include_file_cxx(sys/prctl.h HAVE_SYS_PRCTL_H)
check_include_file_cxx(sys/resources.h HAVE_SYS_RESOURCES_H)
check_include_file_cxx(sys/vmmeter.h HAVE_SYS_VMMETER_H)
check_include_file_cxx(vm/vm_param.h HAVE_VM_VM_PARAM_H)
check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
@@ -11,7 +18,9 @@ check_cxx_symbol_exists(fork "unistd.h" HAVE_DECL_FORK)
check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
check_cxx_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID)
if(NOT WIN32)
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
check_include_file_cxx(ifaddrs.h HAVE_IFADDRS_H)
if(HAVE_SYS_TYPES_H AND HAVE_IFADDRS_H)
include(TestAppendRequiredLibraries)
test_append_socket_library(core_interface)
endif()
@@ -19,8 +28,6 @@ endif()
include(TestAppendRequiredLibraries)
test_append_atomic_library(core_interface)
# Even though ::system is part of the standard library, we still check
# for it, to support building targets that don't have it, such as iOS.
check_cxx_symbol_exists(std::system "cstdlib" HAVE_STD_SYSTEM)
check_cxx_symbol_exists(::_wsystem "stdlib.h" HAVE__WSYSTEM)
if(HAVE_STD_SYSTEM OR HAVE__WSYSTEM)
@@ -55,6 +62,13 @@ check_cxx_source_compiles("
# Check for posix_fallocate().
check_cxx_source_compiles("
// same as in src/util/fs_helpers.cpp
#ifdef __linux__
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#endif
#define _POSIX_C_SOURCE 200112L
#endif // __linux__
#include <fcntl.h>
int main()
@@ -163,6 +177,7 @@ if(NOT MSVC)
" HAVE_SSE41
CXXFLAGS ${SSE41_CXXFLAGS}
)
set(ENABLE_SSE41 ${HAVE_SSE41})
# Check for AVX2 intrinsics.
set(AVX2_CXXFLAGS -mavx -mavx2)
@@ -177,6 +192,7 @@ if(NOT MSVC)
" HAVE_AVX2
CXXFLAGS ${AVX2_CXXFLAGS}
)
set(ENABLE_AVX2 ${HAVE_AVX2})
# Check for x86 SHA-NI intrinsics.
set(X86_SHANI_CXXFLAGS -msse4 -msha)
@@ -193,6 +209,7 @@ if(NOT MSVC)
" HAVE_X86_SHANI
CXXFLAGS ${X86_SHANI_CXXFLAGS}
)
set(ENABLE_X86_SHANI ${HAVE_X86_SHANI})
# Check for ARMv8 SHA-NI intrinsics.
set(ARM_SHANI_CXXFLAGS -march=armv8-a+crypto)
@@ -210,4 +227,5 @@ if(NOT MSVC)
" HAVE_ARM_SHANI
CXXFLAGS ${ARM_SHANI_CXXFLAGS}
)
set(ENABLE_ARM_SHANI ${HAVE_ARM_SHANI})
endif()

View File

@@ -90,6 +90,9 @@ else()
try_append_cxx_flags("-Wconditional-uninitialized" TARGET nowarn_leveldb_interface SKIP_LINK
IF_CHECK_PASSED "-Wno-conditional-uninitialized"
)
try_append_cxx_flags("-Wsuggest-override" TARGET nowarn_leveldb_interface SKIP_LINK
IF_CHECK_PASSED "-Wno-suggest-override"
)
endif()
target_link_libraries(leveldb PRIVATE

View File

@@ -1,38 +0,0 @@
# Copyright (c) 2025 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
function(add_libmultiprocess subdir)
# Set BUILD_TESTING to match BUILD_TESTS. BUILD_TESTING is a standard cmake
# option that controls whether enable_testing() is called, but in the bitcoin
# build a BUILD_TESTS option is used instead.
set(BUILD_TESTING "${BUILD_TESTS}")
add_subdirectory(${subdir} EXCLUDE_FROM_ALL)
# Apply core_interface compile options to libmultiprocess runtime library.
target_link_libraries(multiprocess PUBLIC $<BUILD_INTERFACE:core_interface>)
target_link_libraries(mputil PUBLIC $<BUILD_INTERFACE:core_interface>)
target_link_libraries(mpgen PUBLIC $<BUILD_INTERFACE:core_interface>)
# Mark capproto options as advanced to hide by default from cmake UI
mark_as_advanced(CapnProto_DIR)
mark_as_advanced(CapnProto_capnpc_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_capnp_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_capnp-json_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_capnp-rpc_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_capnp-websocket_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_kj-async_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_kj-gzip_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_kj-http_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_kj_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_kj-test_IMPORTED_LOCATION)
mark_as_advanced(CapnProto_kj-tls_IMPORTED_LOCATION)
if(BUILD_TESTS)
# Add tests to "all" target so ctest can run them
set_target_properties(mptests PROPERTIES EXCLUDE_FROM_ALL OFF)
endif()
# Exclude examples from compilation database, because the examples are not
# built by default, and they contain generated c++ code. Without this
# exclusion, tools like clang-tidy and IWYU that make use of compilation
# database would complain that the generated c++ source files do not exist. An
# alternate fix could build "mpexamples" by default like "mptests" above.
set_target_properties(mpcalculator mpprinter mpexample PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
endfunction()

View File

@@ -29,17 +29,17 @@ function(add_boost_if_needed)
endif()
endif()
find_package(Boost 1.73.0 REQUIRED CONFIG)
mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR)
# Workaround for a bug in NetBSD pkgsrc.
# See: https://github.com/NetBSD/pkgsrc/issues/167.
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
get_filename_component(_boost_include_dir "${boost_headers_DIR}/../../../include/" ABSOLUTE)
set_target_properties(Boost::headers PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir}
)
unset(_boost_include_dir)
# We cannot rely on find_package(Boost ...) to work properly without
# Boost_NO_BOOST_CMAKE set until we require a more recent Boost because
# upstream did not ship proper CMake files until 1.82.0.
# Until then, we rely on CMake's FindBoost module.
# See: https://cmake.org/cmake/help/latest/policy/CMP0167.html
if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost 1.73.0 REQUIRED)
mark_as_advanced(Boost_INCLUDE_DIR)
set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE)
target_compile_definitions(Boost::headers INTERFACE
# We don't use multi_index serialization.
@@ -57,24 +57,34 @@ function(add_boost_if_needed)
# older than 1.80.
# See: https://github.com/boostorg/config/pull/430.
set(CMAKE_REQUIRED_DEFINITIONS -DBOOST_NO_CXX98_FUNCTION_BASE)
get_target_property(CMAKE_REQUIRED_INCLUDES Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR})
include(CMakePushCheckState)
cmake_push_check_state()
include(TryAppendCXXFlags)
set(CMAKE_REQUIRED_FLAGS ${working_compiler_werror_flag})
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <boost/config.hpp>
" NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
)
cmake_pop_check_state()
if(NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE)
target_compile_definitions(Boost::headers INTERFACE
BOOST_NO_CXX98_FUNCTION_BASE
)
else()
set(CMAKE_REQUIRED_DEFINITIONS)
endif()
# Some package managers, such as vcpkg, vendor Boost.Test separately
# from the rest of the headers, so we have to check for it individually.
if(BUILD_TESTS AND DEFINED VCPKG_TARGET_TRIPLET)
find_package(boost_included_unit_test_framework ${Boost_VERSION} EXACT REQUIRED CONFIG)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DBOOST_TEST_NO_MAIN)
include(CheckIncludeFileCXX)
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
if(NOT HAVE_BOOST_INCLUDED_UNIT_TEST_H)
message(FATAL_ERROR "Building test_bitcoin executable requested but boost/test/included/unit_test.hpp header not available.")
endif()
endif()
endfunction()

View File

@@ -4,21 +4,11 @@
include_guard(GLOBAL)
function(add_windows_resources target rc_file)
macro(add_windows_resources target rc_file)
if(WIN32)
target_sources(${target} PRIVATE ${rc_file})
endif()
endfunction()
# Add a fusion manifest to Windows executables.
# See: https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests
function(add_windows_application_manifest target)
if(WIN32)
configure_file(${PROJECT_SOURCE_DIR}/cmake/windows-app.manifest.in ${target}.manifest USE_SOURCE_PERMISSIONS)
file(CONFIGURE
OUTPUT ${target}-manifest.rc
CONTENT "1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ \"${target}.manifest\""
set_property(SOURCE ${rc_file}
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
)
add_windows_resources(${target} ${CMAKE_CURRENT_BINARY_DIR}/${target}-manifest.rc)
endif()
endfunction()
endmacro()

View File

@@ -0,0 +1,133 @@
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
#[=======================================================================[
FindBerkeleyDB
--------------
Finds the Berkeley DB headers and library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides imported target ``BerkeleyDB::BerkeleyDB``, if
Berkeley DB has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
``BerkeleyDB_FOUND``
"True" if Berkeley DB found.
``BerkeleyDB_VERSION``
The MAJOR.MINOR version of Berkeley DB found.
#]=======================================================================]
set(_BerkeleyDB_homebrew_prefix)
if(CMAKE_HOST_APPLE)
find_program(HOMEBREW_EXECUTABLE brew)
if(HOMEBREW_EXECUTABLE)
# The Homebrew package manager installs the berkeley-db* packages as
# "keg-only", which means they are not symlinked into the default prefix.
# To find such a package, the find_path() and find_library() commands
# need additional path hints that are computed by Homebrew itself.
execute_process(
COMMAND ${HOMEBREW_EXECUTABLE} --prefix berkeley-db@4
OUTPUT_VARIABLE _BerkeleyDB_homebrew_prefix
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
endif()
find_path(BerkeleyDB_INCLUDE_DIR
NAMES db_cxx.h
HINTS ${_BerkeleyDB_homebrew_prefix}/include
PATH_SUFFIXES 4.8 48 db4.8 4 db4 5.3 db5.3 5 db5
)
mark_as_advanced(BerkeleyDB_INCLUDE_DIR)
unset(_BerkeleyDB_homebrew_prefix)
if(NOT BerkeleyDB_LIBRARY)
if(VCPKG_TARGET_TRIPLET)
# The vcpkg package manager installs the berkeleydb package with the same name
# of release and debug libraries. Therefore, the default search paths set by
# vcpkg's toolchain file cannot be used to search libraries as the debug one
# will always be found.
set(CMAKE_FIND_USE_CMAKE_PATH FALSE)
endif()
get_filename_component(_BerkeleyDB_lib_hint "${BerkeleyDB_INCLUDE_DIR}" DIRECTORY)
find_library(BerkeleyDB_LIBRARY_RELEASE
NAMES db_cxx-4.8 db4_cxx db48 db_cxx-5.3 db_cxx-5 db_cxx libdb48
NAMES_PER_DIR
HINTS ${_BerkeleyDB_lib_hint}
PATH_SUFFIXES lib
)
mark_as_advanced(BerkeleyDB_LIBRARY_RELEASE)
find_library(BerkeleyDB_LIBRARY_DEBUG
NAMES db_cxx-4.8 db4_cxx db48 db_cxx-5.3 db_cxx-5 db_cxx libdb48
NAMES_PER_DIR
HINTS ${_BerkeleyDB_lib_hint}
PATH_SUFFIXES debug/lib
)
mark_as_advanced(BerkeleyDB_LIBRARY_DEBUG)
unset(_BerkeleyDB_lib_hint)
unset(CMAKE_FIND_USE_CMAKE_PATH)
include(SelectLibraryConfigurations)
select_library_configurations(BerkeleyDB)
# The select_library_configurations() command sets BerkeleyDB_FOUND, but we
# want the one from the find_package_handle_standard_args() command below.
unset(BerkeleyDB_FOUND)
endif()
if(BerkeleyDB_INCLUDE_DIR)
file(STRINGS "${BerkeleyDB_INCLUDE_DIR}/db.h" _BerkeleyDB_version_strings REGEX "^#define[\t ]+DB_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+.*")
string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _BerkeleyDB_version_major "${_BerkeleyDB_version_strings}")
string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _BerkeleyDB_version_minor "${_BerkeleyDB_version_strings}")
string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" _BerkeleyDB_version_patch "${_BerkeleyDB_version_strings}")
unset(_BerkeleyDB_version_strings)
# The MAJOR.MINOR.PATCH version will be logged in the following find_package_handle_standard_args() command.
set(_BerkeleyDB_full_version ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor}.${_BerkeleyDB_version_patch})
set(BerkeleyDB_VERSION ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor})
unset(_BerkeleyDB_version_major)
unset(_BerkeleyDB_version_minor)
unset(_BerkeleyDB_version_patch)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BerkeleyDB
REQUIRED_VARS BerkeleyDB_LIBRARY BerkeleyDB_INCLUDE_DIR
VERSION_VAR _BerkeleyDB_full_version
)
unset(_BerkeleyDB_full_version)
if(BerkeleyDB_FOUND AND NOT TARGET BerkeleyDB::BerkeleyDB)
add_library(BerkeleyDB::BerkeleyDB UNKNOWN IMPORTED)
set_target_properties(BerkeleyDB::BerkeleyDB PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${BerkeleyDB_INCLUDE_DIR}"
)
if(BerkeleyDB_LIBRARY_RELEASE)
set_property(TARGET BerkeleyDB::BerkeleyDB APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE
)
set_target_properties(BerkeleyDB::BerkeleyDB PROPERTIES
IMPORTED_LOCATION_RELEASE "${BerkeleyDB_LIBRARY_RELEASE}"
)
endif()
if(BerkeleyDB_LIBRARY_DEBUG)
set_property(TARGET BerkeleyDB::BerkeleyDB APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(BerkeleyDB::BerkeleyDB PROPERTIES
IMPORTED_LOCATION_DEBUG "${BerkeleyDB_LIBRARY_DEBUG}"
)
endif()
endif()

View File

@@ -27,6 +27,19 @@ if(CMAKE_HOST_APPLE)
endif()
endif()
# Save CMAKE_FIND_ROOT_PATH_MODE_LIBRARY state.
unset(_qt_find_root_path_mode_library_saved)
if(DEFINED CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
set(_qt_find_root_path_mode_library_saved ${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
endif()
# The Qt config files internally use find_library() calls for all
# dependencies to ensure their availability. In turn, the find_library()
# inspects the well-known locations on the file system; therefore, it must
# be able to find platform-specific system libraries, for example:
# /usr/x86_64-w64-mingw32/lib/libm.a or /usr/arm-linux-gnueabihf/lib/libm.a.
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION}
COMPONENTS ${Qt_FIND_COMPONENTS}
HINTS ${_qt_homebrew_prefix}
@@ -34,6 +47,14 @@ find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION}
)
unset(_qt_homebrew_prefix)
# Restore CMAKE_FIND_ROOT_PATH_MODE_LIBRARY state.
if(DEFINED _qt_find_root_path_mode_library_saved)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${_qt_find_root_path_mode_library_saved})
unset(_qt_find_root_path_mode_library_saved)
else()
unset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Qt
REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR

View File

@@ -7,7 +7,6 @@ function(generate_setup_nsi)
set(abs_top_builddir ${PROJECT_BINARY_DIR})
set(CLIENT_URL ${PROJECT_HOMEPAGE_URL})
set(CLIENT_TARNAME "bitcoin")
set(BITCOIN_WRAPPER_NAME "bitcoin")
set(BITCOIN_GUI_NAME "bitcoin-qt")
set(BITCOIN_DAEMON_NAME "bitcoind")
set(BITCOIN_CLI_NAME "bitcoin-cli")

View File

@@ -7,19 +7,14 @@ include(GNUInstallDirs)
function(install_binary_component component)
cmake_parse_arguments(PARSE_ARGV 1
IC # prefix
"HAS_MANPAGE;INTERNAL" # options
"" # one_value_keywords
"" # multi_value_keywords
IC # prefix
"HAS_MANPAGE" # options
"" # one_value_keywords
"" # multi_value_keywords
)
set(target_name ${component})
if(IC_INTERNAL)
set(runtime_dest ${CMAKE_INSTALL_LIBEXECDIR})
else()
set(runtime_dest ${CMAKE_INSTALL_BINDIR})
endif()
install(TARGETS ${target_name}
RUNTIME DESTINATION ${runtime_dest}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ${component}
)
if(INSTALL_MAN AND IC_HAS_MANPAGE)

View File

@@ -19,11 +19,11 @@ function(setup_split_debug_script)
endfunction()
function(add_maintenance_targets)
if(NOT TARGET Python3::Interpreter)
if(NOT PYTHON_COMMAND)
return()
endif()
foreach(target IN ITEMS bitcoin bitcoind bitcoin-node bitcoin-qt bitcoin-gui bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin)
foreach(target IN ITEMS bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin)
if(TARGET ${target})
list(APPEND executables $<TARGET_FILE:${target}>)
endif()
@@ -31,27 +31,19 @@ function(add_maintenance_targets)
add_custom_target(check-symbols
COMMAND ${CMAKE_COMMAND} -E echo "Running symbol and dynamic library checks..."
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables}
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/symbol-check.py ${executables}
VERBATIM
)
add_custom_target(check-security
COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..."
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables}
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/security-check.py ${executables}
VERBATIM
)
endfunction()
function(add_windows_deploy_target)
if(MINGW AND TARGET bitcoin AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
find_program(MAKENSIS_EXECUTABLE makensis)
if(NOT MAKENSIS_EXECUTABLE)
add_custom_target(deploy
COMMAND ${CMAKE_COMMAND} -E echo "Error: NSIS not found"
)
return()
endif()
if(MINGW AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
# TODO: Consider replacing this code with the CPack NSIS Generator.
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
include(GenerateSetupNsi)
@@ -59,7 +51,6 @@ function(add_windows_deploy_target)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/release
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-qt> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-qt>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoind> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoind>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-cli> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-cli>
@@ -67,7 +58,7 @@ function(add_windows_deploy_target)
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-wallet>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-util>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
VERBATIM
)
add_custom_target(deploy DEPENDS ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe)
@@ -100,7 +91,7 @@ function(add_macos_deploy_target)
if(CMAKE_HOST_APPLE)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/${osx_volname}.zip
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
VERBATIM
)
@@ -113,7 +104,7 @@ function(add_macos_deploy_target)
else()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
COMMAND OBJDUMP=${CMAKE_OBJDUMP} ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
VERBATIM
)
@@ -121,22 +112,16 @@ function(add_macos_deploy_target)
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
)
find_program(ZIP_EXECUTABLE zip)
if(NOT ZIP_EXECUTABLE)
add_custom_target(deploy
COMMAND ${CMAKE_COMMAND} -E echo "Error: ZIP not found"
)
else()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
WORKING_DIRECTORY dist
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${osx_volname}.zip
VERBATIM
)
add_custom_target(deploy
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
)
endif()
find_program(ZIP_COMMAND zip REQUIRED)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
WORKING_DIRECTORY dist
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_COMMAND} ${osx_volname}.zip
VERBATIM
)
add_custom_target(deploy
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
)
endif()
add_dependencies(deploydir bitcoin-qt)
add_dependencies(deploy deploydir)

View File

@@ -38,7 +38,8 @@ function(test_append_socket_library target)
message(FATAL_ERROR "Cannot figure out how to use getifaddrs/freeifaddrs.")
endif()
endif()
set(HAVE_IFADDRS TRUE PARENT_SCOPE)
set(HAVE_DECL_GETIFADDRS TRUE PARENT_SCOPE)
set(HAVE_DECL_FREEIFADDRS TRUE PARENT_SCOPE)
endfunction()
# Clang, when building for 32-bit,

View File

@@ -1,52 +0,0 @@
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
enable_language(C)
function(add_secp256k1 subdir)
message("")
message("Configuring secp256k1 subtree...")
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
set(SECP256K1_ENABLE_MODULE_ECDH OFF CACHE BOOL "" FORCE)
set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
set(SECP256K1_ENABLE_MODULE_MUSIG ON CACHE BOOL "" FORCE)
set(SECP256K1_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
set(SECP256K1_BUILD_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
if(NOT BUILD_TESTS)
# Always skip the ctime tests, if we are building no other tests.
# Otherwise, they are built if Valgrind is available. See SECP256K1_VALGRIND.
set(SECP256K1_BUILD_CTIME_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
endif()
set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
include(GetTargetInterface)
# -fsanitize and related flags apply to both C++ and C,
# so we can pass them down to libsecp256k1 as CFLAGS and LDFLAGS.
get_target_interface(SECP256K1_APPEND_CFLAGS "" sanitize_interface COMPILE_OPTIONS)
string(STRIP "${SECP256K1_APPEND_CFLAGS} ${APPEND_CPPFLAGS}" SECP256K1_APPEND_CFLAGS)
string(STRIP "${SECP256K1_APPEND_CFLAGS} ${APPEND_CFLAGS}" SECP256K1_APPEND_CFLAGS)
set(SECP256K1_APPEND_CFLAGS ${SECP256K1_APPEND_CFLAGS} CACHE STRING "" FORCE)
get_target_interface(SECP256K1_APPEND_LDFLAGS "" sanitize_interface LINK_OPTIONS)
string(STRIP "${SECP256K1_APPEND_LDFLAGS} ${APPEND_LDFLAGS}" SECP256K1_APPEND_LDFLAGS)
set(SECP256K1_APPEND_LDFLAGS ${SECP256K1_APPEND_LDFLAGS} CACHE STRING "" FORCE)
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)
if(config STREQUAL "")
continue()
endif()
string(TOUPPER "${config}" config)
set(CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
endforeach()
# If the CFLAGS environment variable is defined during building depends
# and configuring this build system, its content might be duplicated.
if(DEFINED ENV{CFLAGS})
deduplicate_flags(CMAKE_C_FLAGS)
endif()
add_subdirectory(${subdir})
set_target_properties(secp256k1 PROPERTIES
EXCLUDE_FROM_ALL TRUE
)
endfunction()

15
cmake/tests.cmake Normal file
View File

@@ -0,0 +1,15 @@
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
add_test(NAME util_test_runner
COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
)
endif()
if(PYTHON_COMMAND)
add_test(NAME util_rpcauth_test
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
)
endif()

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="org.bitcoincore.${target}"
version="${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_BUILD}.0"
/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -9,75 +9,4 @@ Example usage:
python3 asmap-tool.py encode /path/to/input.file /path/to/output.file
python3 asmap-tool.py decode /path/to/input.file /path/to/output.file
python3 asmap-tool.py diff /path/to/first.file /path/to/second.file
python3 asmap-tool.py diff_addrs /path/to/first.file /path/to/second.file addrs.file
```
These commands may take a few minutes to run with `python3`,
depending on the amount of data involved and your machine specs.
Consider using `pypy3` for a faster run time.
### Encoding and Decoding
ASmap files are somewhat large in text form, and need to be encoded
to binary before being used with Bitcoin Core.
The `encode` command takes an ASmap and an output file.
The `--fill`/`-f` flag further reduces the size of the output file
by assuming an AS assignment for an unmapped network if an adjacent network is assigned.
This procedure is lossy, in the sense that it loses information
about which ranges were unassigned.
However, if the input ASmap is incomplete,
this procedure will also reassign ranges that should have an AS assignment,
resulting in an ASmap that may diverge from reality significantly.
Finally, another consequence is that the resulting encoded file
will no longer be meaningful for diffs.
Therefore only use `--fill` if
you want to optimise space, you have a reasonably complete ASmap,
and do not intend to diff the file at a later time.
The `decode` command takes an encoded ASmap and an output file.
As with `encode`, the `--fill`/`-f` flag reduces the output file size
by reassigning subnets. Conversely, the `--non-overlapping`/`-n` flag
increases output size by outputting strictly non-overlapping network ranges.
### Comparing ASmaps
AS control of IP networks changes frequently, therefore it can be useful to get
the changes between two ASmaps via the `diff` and `diff_addrs` commands.
`diff` takes two ASmap files, and returns a file detailing the changes
in the state of a network's AS assignment between the first and the second file.
This command may take a few minutes to run, depending on your machine.
The example below shows the three possible output states:
- reassigned to a new AS (`AS26496 # was AS20738`),
- present in the first but not the second (`# 220.157.65.0/24 was AS9723`),
- or present in the second but not the first (`# was unassigned`).
```
217.199.160.0/19 AS26496 # was AS20738
# 220.157.65.0/24 was AS9723
216.151.172.0/23 AS400080 # was unassigned
2001:470:49::/48 AS20205 # was AS6939
# 2001:678:bd0::/48 was AS207631
2001:67c:308::/48 AS26496 # was unassigned
```
`diff` accepts a `--ignore-unassigned`/`-i` flag
which ignores networks present in the second but not the first.
`diff_addrs` is intended to provide changes between two ASmaps and
a node's known peers.
The command takes two ASmap files, and a file of IP addresses as output by
the `bitcoin-cli getnodeaddresses` command.
It returns the changes between the two ASmaps for the peer IPs provided in
the `getnodeaddresses` output.
The resulting file is in the same format as the `diff` command shown above.
You can output address data to a file:
```
bitcoin-cli getnodeaddresses 0 > addrs.json
```
and pass in the address file as the third argument:
```
python3 asmap-tool.py diff_addrs path/to/first.file path/to/second.file addrs.json
```

View File

@@ -39,7 +39,7 @@ _bitcoin_cli() {
if ((cword > 4)); then
case ${words[cword-4]} in
listtransactions|setban)
importaddress|listtransactions|setban)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
@@ -52,7 +52,10 @@ _bitcoin_cli() {
if ((cword > 3)); then
case ${words[cword-3]} in
getbalance|gettxout|listreceivedbyaddress|listsinceblock)
addmultisigaddress)
return 0
;;
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
@@ -77,7 +80,7 @@ _bitcoin_cli() {
fi
case "$prev" in
backupwallet)
backupwallet|dumpwallet|importwallet)
_filedir
return 0
;;

View File

@@ -121,6 +121,17 @@ Comment:
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
License: GPL-3+
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License, Version 3 or any
later version published by the Free Software Foundation.
Comment:
On Debian systems the GNU General Public License (GPL) version 3 is
located in '/usr/share/common-licenses/GPL-3'.
.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
License: public-domain
This work is in the public domain.

View File

@@ -8,42 +8,18 @@ deterministic-fuzz-coverage
A tool to check for non-determinism in fuzz coverage. To get the help, run:
```
cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- --help
RUST_BACKTRACE=1 cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- --help
```
To execute the tool, compilation has to be done with the build options:
To execute the tool, compilation has to be done with the build options
`-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++'
-DBUILD_FOR_FUZZING=ON -DCMAKE_CXX_FLAGS='-fPIC -fprofile-instr-generate
-fcoverage-mapping'`. Both llvm-profdata and llvm-cov must be installed. Also,
the qa-assets repository must have been cloned. Finally, a fuzz target has to
be picked before running the tool:
```
-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DBUILD_FOR_FUZZING=ON -DCMAKE_CXX_FLAGS='-fprofile-instr-generate -fcoverage-mapping'
```
Both llvm-profdata and llvm-cov must be installed. Also, the qa-assets
repository must have been cloned. Finally, a fuzz target has to be picked
before running the tool:
```
cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/build_dir $PWD/qa-assets/fuzz_corpora fuzz_target_name
```
deterministic-unittest-coverage
===========================
A tool to check for non-determinism in unit-test coverage. To get the help, run:
```
cargo run --manifest-path ./contrib/devtools/deterministic-unittest-coverage/Cargo.toml -- --help
```
To execute the tool, compilation has to be done with the build options:
```
-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_CXX_FLAGS='-fprofile-instr-generate -fcoverage-mapping'
```
Both llvm-profdata and llvm-cov must be installed.
```
cargo run --manifest-path ./contrib/devtools/deterministic-unittest-coverage/Cargo.toml -- $PWD/build_dir <boost unittest filter>
RUST_BACKTRACE=1 cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/build_dir $PWD/qa-assets/corpora-dir fuzz_target_name
```
clang-format-diff.py
@@ -159,6 +135,35 @@ For example:
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-bitcoin-conf.sh
```
security-check.py
=================
Perform basic security checks on a series of executables.
symbol-check.py
===============
A script to check that release executables only contain
certain symbols and are only linked against allowed libraries.
For Linux this means checking for allowed gcc, glibc and libstdc++ version symbols.
This makes sure they are still compatible with the minimum supported distribution versions.
For macOS and Windows we check that the executables are only linked against libraries we allow.
Example usage:
find ../path/to/executables -type f -executable | xargs python3 contrib/devtools/symbol-check.py
If no errors occur the return value will be 0 and the output will be empty.
If there are any errors the return value will be 1 and output like this will be printed:
.../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
.../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
circular-dependencies.py
========================

View File

@@ -41,6 +41,9 @@ ALLOWED_DEPENDENCIES+=(
# Declare list of known errors that should be suppressed.
declare -A SUPPRESS
# init.cpp file currently calls Berkeley DB sanity check function on startup, so
# there is an undocumented dependency of the node library on the wallet library.
SUPPRESS["init.cpp.o bdb.cpp.o _ZN6wallet27BerkeleyDatabaseSanityCheckEv"]=1
# init/common.cpp file calls InitError and InitWarning from interface_ui which
# is currently part of the node library. interface_ui should just be part of the
# common library instead, and is moved in

View File

@@ -22,6 +22,7 @@ EXCLUDE = [
'src/test/fuzz/FuzzedDataProvider.h',
'src/tinyformat.h',
'src/bench/nanobench.h',
'test/functional/test_framework/bignum.py',
# python init:
'*__init__.py',
]
@@ -93,6 +94,7 @@ EXPECTED_HOLDER_NAMES = [
r"Satoshi Nakamoto",
r"The Bitcoin Core developers",
r"BitPay Inc\.",
r"University of Illinois at Urbana-Champaign\.",
r"Pieter Wuille",
r"Wladimir J\. van der Laan",
r"Jeff Garzik",

View File

@@ -1,7 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "deterministic-fuzz-coverage"
version = "0.1.0"

View File

@@ -2,102 +2,89 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/license/mit/.
use std::collections::VecDeque;
use std::env;
use std::fs::{read_dir, DirEntry, File};
use std::path::{Path, PathBuf};
use std::process::{Command, ExitCode};
use std::fs::{read_dir, File};
use std::path::Path;
use std::process::{exit, Command, Stdio};
use std::str;
use std::thread;
/// A type for a complete and readable error message.
type AppError = String;
type AppResult = Result<(), AppError>;
const LLVM_PROFDATA: &str = "llvm-profdata";
const LLVM_COV: &str = "llvm-cov";
const GIT: &str = "git";
const DIFF: &str = "diff";
const DEFAULT_PAR: usize = 1;
fn exit_help(err: &str) -> AppError {
format!(
r#"
Error: {err}
Usage: program ./build_dir ./qa-assets/fuzz_corpora fuzz_target_name [parallelism={DEFAULT_PAR}]
Refer to the devtools/README.md for more details."#
)
fn exit_help(err: &str) -> ! {
eprintln!("Error: {}", err);
eprintln!();
eprintln!("Usage: program ./build_dir ./qa-assets-corpora-dir fuzz_target");
eprintln!();
eprintln!("Refer to the devtools/README.md for more details.");
exit(1)
}
fn sanity_check(corpora_dir: &Path, fuzz_exe: &Path) -> AppResult {
for tool in [LLVM_PROFDATA, LLVM_COV, GIT] {
let output = Command::new(tool).arg("--help").output();
fn sanity_check(corpora_dir: &Path, fuzz_exe: &Path) {
for tool in [LLVM_PROFDATA, LLVM_COV, DIFF] {
let output = Command::new(tool).arg("--version").output();
match output {
Ok(output) if output.status.success() => {}
_ => Err(exit_help(&format!("The tool {} is not installed", tool)))?,
_ => {
exit_help(&format!("The tool {} is not installed", tool));
}
}
}
if !corpora_dir.is_dir() {
Err(exit_help(&format!(
exit_help(&format!(
"Fuzz corpora path ({}) must be a directory",
corpora_dir.display()
)))?;
));
}
if !fuzz_exe.exists() {
Err(exit_help(&format!(
exit_help(&format!(
"Fuzz executable ({}) not found",
fuzz_exe.display()
)))?;
));
}
Ok(())
}
fn app() -> AppResult {
fn main() {
// Parse args
let args = env::args().collect::<Vec<_>>();
let build_dir = args.get(1).ok_or(exit_help("Must set build dir"))?;
let build_dir = args
.get(1)
.unwrap_or_else(|| exit_help("Must set build dir"));
if build_dir == "--help" {
Err(exit_help("--help requested"))?;
exit_help("--help requested")
}
let corpora_dir = args.get(2).ok_or(exit_help("Must set fuzz corpora dir"))?;
let corpora_dir = args
.get(2)
.unwrap_or_else(|| exit_help("Must set fuzz corpora dir"));
let fuzz_target = args
.get(3)
// Require fuzz target for now. In the future it could be optional and the tool could
// iterate over all compiled fuzz targets
.ok_or(exit_help("Must set fuzz target"))?;
let par = match args.get(4) {
Some(s) => s
.parse::<usize>()
.map_err(|e| exit_help(&format!("Could not parse parallelism as usize ({s}): {e}")))?,
None => DEFAULT_PAR,
}
.max(1);
if args.get(5).is_some() {
Err(exit_help("Too many args"))?;
.unwrap_or_else(|| exit_help("Must set fuzz target"));
if args.get(4).is_some() {
exit_help("Too many args")
}
let build_dir = Path::new(build_dir);
let corpora_dir = Path::new(corpora_dir);
let fuzz_exe = build_dir.join("bin/fuzz");
let fuzz_exe = build_dir.join("src/test/fuzz/fuzz");
sanity_check(corpora_dir, &fuzz_exe)?;
sanity_check(corpora_dir, &fuzz_exe);
deterministic_coverage(build_dir, corpora_dir, &fuzz_exe, fuzz_target, par)
deterministic_coverage(build_dir, corpora_dir, &fuzz_exe, fuzz_target);
}
fn using_libfuzzer(fuzz_exe: &Path) -> Result<bool, AppError> {
fn using_libfuzzer(fuzz_exe: &Path) -> bool {
println!("Check if using libFuzzer ...");
let stderr = Command::new(fuzz_exe)
.arg("-help=1") // Will be interpreted as option (libfuzzer) or as input file
.env("FUZZ", "addition_overflow") // Any valid target
.output()
.map_err(|e| format!("fuzz failed with {e}"))?
.expect("fuzz failed")
.stderr;
let help_output = str::from_utf8(&stderr)
.map_err(|e| format!("The libFuzzer -help=1 output must be valid text ({e})"))?;
Ok(help_output.contains("libFuzzer"))
let help_output = str::from_utf8(&stderr).expect("The -help=1 output must be valid text");
help_output.contains("libFuzzer")
}
fn deterministic_coverage(
@@ -105,177 +92,115 @@ fn deterministic_coverage(
corpora_dir: &Path,
fuzz_exe: &Path,
fuzz_target: &str,
par: usize,
) -> AppResult {
let using_libfuzzer = using_libfuzzer(fuzz_exe)?;
if using_libfuzzer {
println!("Warning: The fuzz executable was compiled with libFuzzer as sanitizer.");
println!("This tool may be tripped by libFuzzer misbehavior.");
println!("It is recommended to compile without libFuzzer.");
}
) {
let using_libfuzzer = using_libfuzzer(fuzz_exe);
let profraw_file = build_dir.join("fuzz_det_cov.profraw");
let profdata_file = build_dir.join("fuzz_det_cov.profdata");
let corpus_dir = corpora_dir.join(fuzz_target);
let mut entries = read_dir(&corpus_dir)
.map_err(|err| {
.unwrap_or_else(|err| {
exit_help(&format!(
"The fuzz target's input directory must exist! ({}; {})",
corpus_dir.display(),
err
))
})?
})
.map(|entry| entry.expect("IO error"))
.collect::<Vec<_>>();
entries.sort_by_key(|entry| entry.file_name());
let run_single = |run_id: char, entry: &Path, thread_id: usize| -> Result<PathBuf, AppError> {
let cov_txt_path = build_dir.join(format!("fuzz_det_cov.show.t{thread_id}.{run_id}.txt"));
let profraw_file = build_dir.join(format!("fuzz_det_cov.t{thread_id}.{run_id}.profraw"));
let profdata_file = build_dir.join(format!("fuzz_det_cov.t{thread_id}.{run_id}.profdata"));
{
let output = {
let run_single = |run_id: u8, entry: &Path| {
let cov_txt_path = build_dir.join(format!("fuzz_det_cov.show.{run_id}.txt"));
assert!({
{
let mut cmd = Command::new(fuzz_exe);
if using_libfuzzer {
cmd.args(["-runs=1", "-shuffle=1", "-prefer_small=0"]);
cmd.arg("-runs=1");
}
cmd
}
.env("LLVM_PROFILE_FILE", &profraw_file)
.env("FUZZ", fuzz_target)
.arg(entry)
.output()
.map_err(|e| format!("fuzz failed: {e}"))?;
if !output.status.success() {
Err(format!(
"fuzz failed!\nstdout:\n{}\nstderr:\n{}\n",
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
))?;
}
}
if !Command::new(LLVM_PROFDATA)
.status()
.expect("fuzz failed")
.success()
});
assert!(Command::new(LLVM_PROFDATA)
.arg("merge")
.arg("--sparse")
.arg(&profraw_file)
.arg("-o")
.arg(&profdata_file)
.status()
.map_err(|e| format!("{LLVM_PROFDATA} merge failed with {e}"))?
.success()
{
Err(format!("{LLVM_PROFDATA} merge failed. This can be a sign of compiling without code coverage support."))?;
}
let cov_file = File::create(&cov_txt_path)
.map_err(|e| format!("Failed to create coverage txt file ({e})"))?;
if !Command::new(LLVM_COV)
.expect("merge failed")
.success());
let cov_file = File::create(&cov_txt_path).expect("Failed to create coverage txt file");
let passed = Command::new(LLVM_COV)
.args([
"show",
"--show-line-counts-or-regions",
"--show-branches=count",
"--show-expansions",
"--show-instantiation-summary",
"-Xdemangler=llvm-cxxfilt",
&format!("--instr-profile={}", profdata_file.display()),
])
.arg(fuzz_exe)
.stdout(cov_file)
.stdout(Stdio::from(cov_file))
.spawn()
.map_err(|e| format!("{LLVM_COV} show failed with {e}"))?
.expect("Failed to execute llvm-cov")
.wait()
.map_err(|e| format!("{LLVM_COV} show failed with {e}"))?
.success()
{
Err(format!("{LLVM_COV} show failed"))?;
};
Ok(cov_txt_path)
.expect("Failed to execute llvm-cov")
.success();
if !passed {
panic!("Failed to execute llvm-profdata")
}
cov_txt_path
};
let check_diff = |a: &Path, b: &Path, err: &str| -> AppResult {
let same = Command::new(GIT)
.args(["--no-pager", "diff", "--no-index"])
let check_diff = |a: &Path, b: &Path, err: &str| {
let same = Command::new(DIFF)
.arg("--unified")
.arg(a)
.arg(b)
.status()
.map_err(|e| format!("{GIT} diff failed with {e}"))?
.expect("Failed to execute diff command")
.success();
if !same {
Err(format!(
r#"
The coverage was not deterministic between runs.
{err}"#
))?;
eprintln!();
eprintln!("The coverage was not determinstic between runs.");
eprintln!("{}", err);
eprintln!("Exiting.");
exit(1);
}
Ok(())
};
// First, check that each fuzz input is deterministic running by itself in a process.
// First, check that each fuzz input is determinisic running by itself in a process.
//
// This can catch issues and isolate where a single fuzz input triggers non-determinism, but
// all other fuzz inputs are deterministic.
//
// Also, This can catch issues where several fuzz inputs are non-deterministic, but the sum of
// their overall coverage trace remains the same across runs and thus remains undetected.
println!(
"Check each fuzz input individually ... ({} inputs with parallelism {par})",
entries.len()
);
let check_individual = |entry: &DirEntry, thread_id: usize| -> AppResult {
for entry in entries {
let entry = entry.path();
if !entry.is_file() {
Err(format!("{} should be a file", entry.display()))?;
}
let cov_txt_base = run_single('a', &entry, thread_id)?;
let cov_txt_repeat = run_single('b', &entry, thread_id)?;
assert!(entry.is_file());
let cov_txt_base = run_single(0, &entry);
let cov_txt_repeat = run_single(1, &entry);
check_diff(
&cov_txt_base,
&cov_txt_repeat,
&format!("The fuzz target input was {}.", entry.display()),
)?;
Ok(())
};
thread::scope(|s| -> AppResult {
let mut handles = VecDeque::with_capacity(par);
let mut res = Ok(());
for (i, entry) in entries.iter().enumerate() {
println!("[{}/{}]", i + 1, entries.len());
handles.push_back(s.spawn(move || check_individual(entry, i % par)));
while handles.len() >= par || i == (entries.len() - 1) || res.is_err() {
if let Some(th) = handles.pop_front() {
let thread_result = match th.join() {
Err(_e) => Err("A scoped thread panicked".to_string()),
Ok(r) => r,
};
if thread_result.is_err() {
res = thread_result;
}
} else {
return res;
}
}
}
res
})?;
);
}
// Finally, check that running over all fuzz inputs in one process is deterministic as well.
// This can catch issues where mutable global state is leaked from one fuzz input execution to
// the next.
println!("Check all fuzz inputs in one go ...");
{
if !corpus_dir.is_dir() {
Err(format!("{} should be a folder", corpus_dir.display()))?;
}
let cov_txt_base = run_single('a', &corpus_dir, 0)?;
let cov_txt_repeat = run_single('b', &corpus_dir, 0)?;
assert!(corpus_dir.is_dir());
let cov_txt_base = run_single(0, &corpus_dir);
let cov_txt_repeat = run_single(1, &corpus_dir);
check_diff(
&cov_txt_base,
&cov_txt_repeat,
&format!("All fuzz inputs in {} were used.", corpus_dir.display()),
)?;
}
println!("✨ Coverage test passed for {fuzz_target}. ✨");
Ok(())
}
fn main() -> ExitCode {
match app() {
Ok(()) => ExitCode::SUCCESS,
Err(err) => {
eprintln!("⚠️\n{}", err);
ExitCode::FAILURE
}
);
}
println!("Coverage test passed for {fuzz_target}.");
}

View File

@@ -1,7 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "deterministic-unittest-coverage"
version = "0.1.0"

View File

@@ -1,6 +0,0 @@
[package]
name = "deterministic-unittest-coverage"
version = "0.1.0"
edition = "2021"
[dependencies]

View File

@@ -1,149 +0,0 @@
// Copyright (c) The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/license/mit/.
use std::env;
use std::fs::File;
use std::path::{Path, PathBuf};
use std::process::{Command, ExitCode};
use std::str;
/// A type for a complete and readable error message.
type AppError = String;
type AppResult = Result<(), AppError>;
const LLVM_PROFDATA: &str = "llvm-profdata";
const LLVM_COV: &str = "llvm-cov";
const GIT: &str = "git";
fn exit_help(err: &str) -> AppError {
format!(
r#"
Error: {err}
Usage: program ./build_dir boost_unittest_filter
Refer to the devtools/README.md for more details."#
)
}
fn sanity_check(test_exe: &Path) -> AppResult {
for tool in [LLVM_PROFDATA, LLVM_COV, GIT] {
let output = Command::new(tool).arg("--help").output();
match output {
Ok(output) if output.status.success() => {}
_ => Err(exit_help(&format!("The tool {} is not installed", tool)))?,
}
}
if !test_exe.exists() {
Err(exit_help(&format!(
"Test executable ({}) not found",
test_exe.display()
)))?;
}
Ok(())
}
fn app() -> AppResult {
// Parse args
let args = env::args().collect::<Vec<_>>();
let build_dir = args.get(1).ok_or(exit_help("Must set build dir"))?;
if build_dir == "--help" {
Err(exit_help("--help requested"))?;
}
let filter = args
.get(2)
// Require filter for now. In the future it could be optional and the tool could provide a
// default filter.
.ok_or(exit_help("Must set boost test filter"))?;
if args.get(3).is_some() {
Err(exit_help("Too many args"))?;
}
let build_dir = Path::new(build_dir);
let test_exe = build_dir.join("bin/test_bitcoin");
sanity_check(&test_exe)?;
deterministic_coverage(build_dir, &test_exe, filter)
}
fn deterministic_coverage(build_dir: &Path, test_exe: &Path, filter: &str) -> AppResult {
let profraw_file = build_dir.join("test_det_cov.profraw");
let profdata_file = build_dir.join("test_det_cov.profdata");
let run_single = |run_id: char| -> Result<PathBuf, AppError> {
println!("Run with id {run_id}");
let cov_txt_path = build_dir.join(format!("test_det_cov.show.{run_id}.txt"));
if !Command::new(test_exe)
.env("LLVM_PROFILE_FILE", &profraw_file)
.env("BOOST_TEST_RUN_FILTERS", filter)
.env("RANDOM_CTX_SEED", "21")
.status()
.map_err(|e| format!("test failed with {e}"))?
.success()
{
Err("test failed".to_string())?;
}
if !Command::new(LLVM_PROFDATA)
.arg("merge")
.arg("--sparse")
.arg(&profraw_file)
.arg("-o")
.arg(&profdata_file)
.status()
.map_err(|e| format!("{LLVM_PROFDATA} merge failed with {e}"))?
.success()
{
Err(format!("{LLVM_PROFDATA} merge failed. This can be a sign of compiling without code coverage support."))?;
}
let cov_file = File::create(&cov_txt_path)
.map_err(|e| format!("Failed to create coverage txt file ({e})"))?;
if !Command::new(LLVM_COV)
.args([
"show",
"--show-line-counts-or-regions",
"--show-branches=count",
"--show-expansions",
"--show-instantiation-summary",
"-Xdemangler=llvm-cxxfilt",
&format!("--instr-profile={}", profdata_file.display()),
])
.arg(test_exe)
.stdout(cov_file)
.status()
.map_err(|e| format!("{LLVM_COV} show failed with {e}"))?
.success()
{
Err(format!("{LLVM_COV} show failed"))?;
}
Ok(cov_txt_path)
};
let check_diff = |a: &Path, b: &Path| -> AppResult {
let same = Command::new(GIT)
.args(["--no-pager", "diff", "--no-index"])
.arg(a)
.arg(b)
.status()
.map_err(|e| format!("{GIT} diff failed with {e}"))?
.success();
if !same {
Err("The coverage was not deterministic between runs.".to_string())?;
}
Ok(())
};
let r0 = run_single('a')?;
let r1 = run_single('b')?;
check_diff(&r0, &r1)?;
println!("✨ The coverage was deterministic across two runs. ✨");
Ok(())
}
fn main() -> ExitCode {
match app() {
Ok(()) => ExitCode::SUCCESS,
Err(err) => {
eprintln!("⚠️\n{}", err);
ExitCode::FAILURE
}
}
}

View File

@@ -9,7 +9,6 @@ import tempfile
import argparse
BINARIES = [
'bin/bitcoin',
'bin/bitcoind',
'bin/bitcoin-cli',
'bin/bitcoin-tx',

View File

@@ -12,13 +12,13 @@ import random
# Parameters:
# Aim for still working fine at some point in the future. [datetime]
TIME = datetime(2028, 4, 2)
TIME = datetime(2027, 10, 6)
# Expected block interval. [timedelta]
BLOCK_INTERVAL = timedelta(seconds=600)
# The number of headers corresponding to the minchainwork parameter. [headers]
MINCHAINWORK_HEADERS = 912683
MINCHAINWORK_HEADERS = 886157
# Combined processing bandwidth from all attackers to one victim. [bit/s]
# 6 Gbit/s is approximately the speed at which a single thread of a Ryzen 5950X CPU thread can hash

View File

@@ -6,10 +6,6 @@
Perform basic security checks on a series of executables.
Exit status will be 0 if successful, and the program will be silent.
Otherwise the exit status will be 1 and it will log which executables failed which checks.
Example usage:
find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/security-check.py
'''
import re
import sys
@@ -30,13 +26,13 @@ def check_ELF_RELRO(binary) -> bool:
# However, the dynamic linker need to write to this area so these are RW.
# Glibc itself takes care of mprotecting this area R after relocations are finished.
# See also https://marc.info/?l=binutils&m=1498883354122353
if segment.type == lief.ELF.Segment.TYPE.GNU_RELRO:
if segment.type == lief.ELF.SEGMENT_TYPES.GNU_RELRO:
have_gnu_relro = True
have_bindnow = False
try:
flags = binary.get(lief.ELF.DynamicEntry.TAG.FLAGS)
if flags.has(lief.ELF.DynamicEntryFlags.FLAG.BIND_NOW):
flags = binary.get(lief.ELF.DYNAMIC_TAGS.FLAGS)
if flags.value & lief.ELF.DYNAMIC_FLAGS.BIND_NOW:
have_bindnow = True
except Exception:
have_bindnow = False
@@ -55,9 +51,9 @@ def check_ELF_SEPARATE_CODE(binary):
based on their permissions. This checks for missing -Wl,-z,separate-code
and potentially other problems.
'''
R = lief.ELF.Segment.FLAGS.R
W = lief.ELF.Segment.FLAGS.W
E = lief.ELF.Segment.FLAGS.X
R = lief.ELF.SEGMENT_FLAGS.R
W = lief.ELF.SEGMENT_FLAGS.W
E = lief.ELF.SEGMENT_FLAGS.X
EXPECTED_FLAGS = {
# Read + execute
'.init': R | E,
@@ -99,7 +95,7 @@ def check_ELF_SEPARATE_CODE(binary):
# and for each section, remember the flags of the associated program header.
flags_per_section = {}
for segment in binary.segments:
if segment.type == lief.ELF.Segment.TYPE.LOAD:
if segment.type == lief.ELF.SEGMENT_TYPES.LOAD:
for section in segment.sections:
flags_per_section[section.name] = segment.flags
# Spot-check ELF LOAD program header flags per section
@@ -123,8 +119,8 @@ def check_ELF_CONTROL_FLOW(binary) -> bool:
def check_ELF_FORTIFY(binary) -> bool:
# bitcoin wrapper does not currently contain any fortified functions
if '--monolithic' in binary.strings:
# bitcoin-util does not currently contain any fortified functions
if 'Bitcoin Core bitcoin-util utility version ' in binary.strings:
return True
chk_funcs = set()
@@ -134,20 +130,21 @@ def check_ELF_FORTIFY(binary) -> bool:
if match:
chk_funcs.add(match.group(0))
# ignore stack-protector
# ignore stack-protector and bdb
chk_funcs.discard('__stack_chk')
chk_funcs.discard('__db_chk')
return len(chk_funcs) >= 1
def check_PE_DYNAMIC_BASE(binary) -> bool:
'''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
return lief.PE.OptionalHeader.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists
return lief.PE.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists
# Must support high-entropy 64-bit address space layout randomization
# in addition to DYNAMIC_BASE to have secure ASLR.
def check_PE_HIGH_ENTROPY_VA(binary) -> bool:
'''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR'''
return lief.PE.OptionalHeader.DLL_CHARACTERISTICS.HIGH_ENTROPY_VA in binary.optional_header.dll_characteristics_lists
return lief.PE.DLL_CHARACTERISTICS.HIGH_ENTROPY_VA in binary.optional_header.dll_characteristics_lists
def check_PE_RELOC_SECTION(binary) -> bool:
'''Check for a reloc section. This is required for functional ASLR.'''
@@ -178,7 +175,7 @@ def check_MACHO_NOUNDEFS(binary) -> bool:
'''
Check for no undefined references.
'''
return binary.header.has(lief.MachO.Header.FLAGS.NOUNDEFS)
return binary.header.has(lief.MachO.HEADER_FLAGS.NOUNDEFS)
def check_MACHO_FIXUP_CHAINS(binary) -> bool:
'''
@@ -203,13 +200,7 @@ def check_NX(binary) -> bool:
'''
Check for no stack execution
'''
# binary.has_nx checks are only for the stack, but MachO binaries might
# have executable heaps.
if binary.format == lief.Binary.FORMATS.MACHO:
return binary.concrete.has_nx_stack and binary.concrete.has_nx_heap
else:
return binary.has_nx
return binary.has_nx
def check_MACHO_CONTROL_FLOW(binary) -> bool:
'''
@@ -232,7 +223,6 @@ def check_MACHO_BRANCH_PROTECTION(binary) -> bool:
return False
BASE_ELF = [
('FORTIFY', check_ELF_FORTIFY),
('PIE', check_PIE),
('NX', check_NX),
('RELRO', check_ELF_RELRO),
@@ -257,21 +247,21 @@ BASE_MACHO = [
]
CHECKS = {
lief.Binary.FORMATS.ELF: {
lief.Header.ARCHITECTURES.X86_64: BASE_ELF + [('CONTROL_FLOW', check_ELF_CONTROL_FLOW)],
lief.Header.ARCHITECTURES.ARM: BASE_ELF,
lief.Header.ARCHITECTURES.ARM64: BASE_ELF,
lief.Header.ARCHITECTURES.PPC64: BASE_ELF,
lief.Header.ARCHITECTURES.RISCV: BASE_ELF,
lief.EXE_FORMATS.ELF: {
lief.ARCHITECTURES.X86: BASE_ELF + [('CONTROL_FLOW', check_ELF_CONTROL_FLOW), ('FORTIFY', check_ELF_FORTIFY)],
lief.ARCHITECTURES.ARM: BASE_ELF + [('FORTIFY', check_ELF_FORTIFY)],
lief.ARCHITECTURES.ARM64: BASE_ELF + [('FORTIFY', check_ELF_FORTIFY)],
lief.ARCHITECTURES.PPC: BASE_ELF + [('FORTIFY', check_ELF_FORTIFY)],
lief.ARCHITECTURES.RISCV: BASE_ELF, # Skip FORTIFY. See https://github.com/lief-project/LIEF/issues/1082.
},
lief.Binary.FORMATS.PE: {
lief.Header.ARCHITECTURES.X86_64: BASE_PE,
lief.EXE_FORMATS.PE: {
lief.ARCHITECTURES.X86: BASE_PE,
},
lief.Binary.FORMATS.MACHO: {
lief.Header.ARCHITECTURES.X86_64: BASE_MACHO + [('PIE', check_PIE),
lief.EXE_FORMATS.MACHO: {
lief.ARCHITECTURES.X86: BASE_MACHO + [('PIE', check_PIE),
('NX', check_NX),
('CONTROL_FLOW', check_MACHO_CONTROL_FLOW)],
lief.Header.ARCHITECTURES.ARM64: BASE_MACHO + [('BRANCH_PROTECTION', check_MACHO_BRANCH_PROTECTION)],
lief.ARCHITECTURES.ARM64: BASE_MACHO + [('BRANCH_PROTECTION', check_MACHO_BRANCH_PROTECTION)],
}
}
@@ -279,9 +269,9 @@ if __name__ == '__main__':
retval: int = 0
for filename in sys.argv[1:]:
binary = lief.parse(filename)
etype = binary.format
arch = binary.abstract.header.architecture
binary.concrete
failed: list[str] = []
for (name, func) in CHECKS[etype][arch]:

View File

@@ -8,7 +8,7 @@ and are only linked against allowed libraries.
Example usage:
find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/symbol-check.py
find ../path/to/binaries -type f -executable | xargs python3 contrib/devtools/symbol-check.py
'''
import sys
@@ -32,9 +32,9 @@ import lief
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
MAX_VERSIONS = {
'GCC': (7,0,0),
'GCC': (4,3,0),
'GLIBC': {
lief.ELF.ARCH.X86_64: (2,31),
lief.ELF.ARCH.x86_64: (2,31),
lief.ELF.ARCH.ARM: (2,31),
lief.ELF.ARCH.AARCH64:(2,31),
lief.ELF.ARCH.PPC64: (2,31),
@@ -52,41 +52,41 @@ IGNORE_EXPORTS = {
# Expected linker-loader names can be found here:
# https://sourceware.org/glibc/wiki/ABIList?action=recall&rev=16
ELF_INTERPRETER_NAMES: dict[lief.ELF.ARCH, dict[lief.Header.ENDIANNESS, str]] = {
lief.ELF.ARCH.X86_64: {
lief.Header.ENDIANNESS.LITTLE: "/lib64/ld-linux-x86-64.so.2",
ELF_INTERPRETER_NAMES: dict[lief.ELF.ARCH, dict[lief.ENDIANNESS, str]] = {
lief.ELF.ARCH.x86_64: {
lief.ENDIANNESS.LITTLE: "/lib64/ld-linux-x86-64.so.2",
},
lief.ELF.ARCH.ARM: {
lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3",
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3",
},
lief.ELF.ARCH.AARCH64: {
lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1",
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1",
},
lief.ELF.ARCH.PPC64: {
lief.Header.ENDIANNESS.BIG: "/lib64/ld64.so.1",
lief.Header.ENDIANNESS.LITTLE: "/lib64/ld64.so.2",
lief.ENDIANNESS.BIG: "/lib64/ld64.so.1",
lief.ENDIANNESS.LITTLE: "/lib64/ld64.so.2",
},
lief.ELF.ARCH.RISCV: {
lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1",
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1",
},
}
ELF_ABIS: dict[lief.ELF.ARCH, dict[lief.Header.ENDIANNESS, list[int]]] = {
lief.ELF.ARCH.X86_64: {
lief.Header.ENDIANNESS.LITTLE: [3,2,0],
ELF_ABIS: dict[lief.ELF.ARCH, dict[lief.ENDIANNESS, list[int]]] = {
lief.ELF.ARCH.x86_64: {
lief.ENDIANNESS.LITTLE: [3,2,0],
},
lief.ELF.ARCH.ARM: {
lief.Header.ENDIANNESS.LITTLE: [3,2,0],
lief.ENDIANNESS.LITTLE: [3,2,0],
},
lief.ELF.ARCH.AARCH64: {
lief.Header.ENDIANNESS.LITTLE: [3,7,0],
lief.ENDIANNESS.LITTLE: [3,7,0],
},
lief.ELF.ARCH.PPC64: {
lief.Header.ENDIANNESS.LITTLE: [3,10,0],
lief.Header.ENDIANNESS.BIG: [3,2,0],
lief.ENDIANNESS.LITTLE: [3,10,0],
lief.ENDIANNESS.BIG: [3,2,0],
},
lief.ELF.ARCH.RISCV: {
lief.Header.ENDIANNESS.LITTLE: [4,15,0],
lief.ENDIANNESS.LITTLE: [4,15,0],
},
}
@@ -112,7 +112,6 @@ ELF_ALLOWED_LIBRARIES = {
'libfontconfig.so.1', # font support
'libfreetype.so.6', # font parsing
'libdl.so.2', # programming interface to dynamic linker
'libxcb-cursor.so.0',
'libxcb-icccm.so.4',
'libxcb-image.so.0',
'libxcb-shm.so.0',
@@ -123,6 +122,7 @@ ELF_ALLOWED_LIBRARIES = {
'libxcb-shape.so.0',
'libxcb-sync.so.1',
'libxcb-xfixes.so.0',
'libxcb-xinerama.so.0',
'libxcb-xkb.so.1',
}
@@ -146,31 +146,19 @@ MACHO_ALLOWED_LIBRARIES = {
'IOSurface', # cross process image/drawing buffers
'libobjc.A.dylib', # Objective-C runtime library
'Metal', # 3D graphics
'QuartzCore', # animation
'Security', # access control and authentication
'UniformTypeIdentifiers', # collection of types that map to MIME and file types
'QuartzCore', # animation
}
PE_ALLOWED_LIBRARIES = {
'ADVAPI32.dll', # legacy security & registry
'bcrypt.dll', # newer security and identity API
'ADVAPI32.dll', # security & registry
'IPHLPAPI.DLL', # IP helper API
'KERNEL32.dll', # win32 base APIs
'msvcrt.dll', # C standard library for MSVC
'SHELL32.dll', # shell API
'WS2_32.dll', # sockets
# bitcoin-qt only
'api-ms-win-core-synch-l1-2-0.dll', # Synchronization Primitives API
'api-ms-win-core-winrt-l1-1-0.dll', # Windows Runtime API
'api-ms-win-core-winrt-string-l1-1-0.dll', # WinRT String API
'AUTHZ.dll', # Windows Authorization Framework
'comdlg32.dll', # Common Dialog Box Library
'd3d11.dll', # Direct3D 11 API
'd3d12.dll', # Direct3D 12 API
'd3d9.dll', # Direct3D 9 API
'dwmapi.dll', # desktop window manager
'DWrite.dll', # DirectX Typography Services
'dxgi.dll', # DirectX Graphics Infrastructure
'GDI32.dll', # graphics device interface
'IMM32.dll', # input method editor
'NETAPI32.dll', # network management
@@ -183,8 +171,6 @@ PE_ALLOWED_LIBRARIES = {
'VERSION.dll', # version checking
'WINMM.dll', # WinMM audio API
'WTSAPI32.dll', # Remote Desktop
'SETUPAPI.dll', # Windows Setup API
'SHCORE.dll', # Stream Handler Core
}
def check_version(max_versions, version, arch) -> bool:
@@ -222,13 +208,13 @@ def check_exported_symbols(binary) -> bool:
name = symbol.name
if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS:
continue
print(f'{filename}: export of symbol {name} not allowed!')
print(f'{binary.name}: export of symbol {name} not allowed!')
ok = False
return ok
def check_RUNPATH(binary) -> bool:
assert binary.get(lief.ELF.DynamicEntry.TAG.RUNPATH) is None
assert binary.get(lief.ELF.DynamicEntry.TAG.RPATH) is None
assert binary.get(lief.ELF.DYNAMIC_TAGS.RUNPATH) is None
assert binary.get(lief.ELF.DYNAMIC_TAGS.RPATH) is None
return True
def check_ELF_libraries(binary) -> bool:
@@ -278,14 +264,6 @@ def check_PE_subsystem_version(binary) -> bool:
return True
return False
def check_PE_application_manifest(binary) -> bool:
if not binary.has_resources:
# No resources at all.
return False
rm = binary.resources_manager
return rm.has_manifest
def check_ELF_interpreter(binary) -> bool:
expected_interpreter = ELF_INTERPRETER_NAMES[binary.header.machine_type][binary.abstract.header.endianness]
@@ -293,12 +271,12 @@ def check_ELF_interpreter(binary) -> bool:
def check_ELF_ABI(binary) -> bool:
expected_abi = ELF_ABIS[binary.header.machine_type][binary.abstract.header.endianness]
note = binary.concrete.get(lief.ELF.Note.TYPE.GNU_ABI_TAG)
assert note.abi == lief.ELF.NoteAbi.ABI.LINUX
return note.version == expected_abi
note = binary.concrete.get(lief.ELF.NOTE_TYPES.ABI_TAG)
assert note.details.abi == lief.ELF.NOTE_ABIS.LINUX
return note.details.version == expected_abi
CHECKS = {
lief.Binary.FORMATS.ELF: [
lief.EXE_FORMATS.ELF: [
('IMPORTED_SYMBOLS', check_imported_symbols),
('EXPORTED_SYMBOLS', check_exported_symbols),
('LIBRARY_DEPENDENCIES', check_ELF_libraries),
@@ -306,16 +284,15 @@ lief.Binary.FORMATS.ELF: [
('ABI', check_ELF_ABI),
('RUNPATH', check_RUNPATH),
],
lief.Binary.FORMATS.MACHO: [
lief.EXE_FORMATS.MACHO: [
('DYNAMIC_LIBRARIES', check_MACHO_libraries),
('MIN_OS', check_MACHO_min_os),
('SDK', check_MACHO_sdk),
('LLD', check_MACHO_lld),
],
lief.Binary.FORMATS.PE: [
lief.EXE_FORMATS.PE: [
('DYNAMIC_LIBRARIES', check_PE_libraries),
('SUBSYSTEM_VERSION', check_PE_subsystem_version),
('APPLICATION_MANIFEST', check_PE_application_manifest),
]
}
@@ -323,7 +300,6 @@ if __name__ == '__main__':
retval: int = 0
for filename in sys.argv[1:]:
binary = lief.parse(filename)
etype = binary.format
failed: list[str] = []

View File

@@ -0,0 +1,151 @@
#!/usr/bin/env bash
#
# Copyright (c) 2019-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test for deterministic coverage across unit test runs.
export LC_ALL=C
# Use GCOV_EXECUTABLE="gcov" if compiling with gcc.
# Use GCOV_EXECUTABLE="llvm-cov gcov" if compiling with clang.
GCOV_EXECUTABLE="gcov"
# Disable tests known to cause non-deterministic behaviour and document the source or point of non-determinism.
NON_DETERMINISTIC_TESTS=(
"blockfilter_index_tests/blockfilter_index_initial_sync" # src/checkqueue.h: In CCheckQueue::Loop(): while (queue.empty()) { ... }
"coinselector_tests/knapsack_solver_test" # coinselector_tests.cpp: if (equal_sets(setCoinsRet, setCoinsRet2))
"fs_tests/fsbridge_fstream" # deterministic test failure?
"miner_tests/CreateNewBlock_validity" # validation.cpp: if (signals.CallbacksPending() > 10)
"scheduler_tests/manythreads" # scheduler.cpp: CScheduler::serviceQueue()
"scheduler_tests/singlethreadedscheduler_ordered" # scheduler.cpp: CScheduler::serviceQueue()
"txvalidationcache_tests/checkinputs_test" # validation.cpp: if (signals.CallbacksPending() > 10)
"txvalidationcache_tests/tx_mempool_block_doublespend" # validation.cpp: if (signals.CallbacksPending() > 10)
"txindex_tests/txindex_initial_sync" # validation.cpp: if (signals.CallbacksPending() > 10)
"txvalidation_tests/tx_mempool_reject_coinbase" # validation.cpp: if (signals.CallbacksPending() > 10)
"validation_block_tests/processnewblock_signals_ordering" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/coin_mark_dirty_immature_credit" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/dummy_input_size_test" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/importmulti_rescan" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/importwallet_rescan" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/ListCoins" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/scan_for_wallet_transactions" # validation.cpp: if (signals.CallbacksPending() > 10)
"wallet_tests/wallet_disableprivkeys" # validation.cpp: if (signals.CallbacksPending() > 10)
)
TEST_BITCOIN_BINARY="src/test/test_bitcoin"
print_usage() {
echo "Usage: $0 [custom test filter (default: all but known non-deterministic tests)] [number of test runs (default: 2)]"
}
N_TEST_RUNS=2
BOOST_TEST_RUN_FILTERS=""
if [[ $# != 0 ]]; then
if [[ $1 == "--help" ]]; then
print_usage
exit
fi
PARSED_ARGUMENTS=0
if [[ $1 =~ [a-z] ]]; then
BOOST_TEST_RUN_FILTERS=$1
PARSED_ARGUMENTS=$((PARSED_ARGUMENTS + 1))
shift
fi
if [[ $1 =~ ^[0-9]+$ ]]; then
N_TEST_RUNS=$1
PARSED_ARGUMENTS=$((PARSED_ARGUMENTS + 1))
shift
fi
if [[ ${PARSED_ARGUMENTS} == 0 || $# -gt 2 || ${N_TEST_RUNS} -lt 2 ]]; then
print_usage
exit
fi
fi
if [[ ${BOOST_TEST_RUN_FILTERS} == "" ]]; then
BOOST_TEST_RUN_FILTERS="$(IFS=":"; echo "!${NON_DETERMINISTIC_TESTS[*]}" | sed 's/:/:!/g')"
else
echo "Using Boost test filter: ${BOOST_TEST_RUN_FILTERS}"
echo
fi
if ! command -v gcov > /dev/null; then
echo "Error: gcov not installed. Exiting."
exit 1
fi
if ! command -v gcovr > /dev/null; then
echo "Error: gcovr not installed. Exiting."
exit 1
fi
if [[ ! -e ${TEST_BITCOIN_BINARY} ]]; then
echo "Error: Executable ${TEST_BITCOIN_BINARY} not found. Run \"cmake -B build -DCMAKE_BUILD_TYPE=Coverage\" and compile."
exit 1
fi
get_file_suffix_count() {
find src/ -type f -name "*.$1" | wc -l
}
if [[ $(get_file_suffix_count gcno) == 0 ]]; then
echo "Error: Could not find any *.gcno files. The *.gcno files are generated by the compiler. Run \"cmake -B build -DCMAKE_BUILD_TYPE=Coverage\" and re-compile."
exit 1
fi
get_covr_filename() {
echo "gcovr.run-$1.txt"
}
TEST_RUN_ID=0
while [[ ${TEST_RUN_ID} -lt ${N_TEST_RUNS} ]]; do
TEST_RUN_ID=$((TEST_RUN_ID + 1))
echo "[$(date +"%Y-%m-%d %H:%M:%S")] Measuring coverage, run #${TEST_RUN_ID} of ${N_TEST_RUNS}"
find src/ -type f -name "*.gcda" -exec rm {} \;
if [[ $(get_file_suffix_count gcda) != 0 ]]; then
echo "Error: Stale *.gcda files found. Exiting."
exit 1
fi
TEST_OUTPUT_TEMPFILE=$(mktemp)
if ! BOOST_TEST_RUN_FILTERS="${BOOST_TEST_RUN_FILTERS}" ${TEST_BITCOIN_BINARY} > "${TEST_OUTPUT_TEMPFILE}" 2>&1; then
cat "${TEST_OUTPUT_TEMPFILE}"
rm "${TEST_OUTPUT_TEMPFILE}"
exit 1
fi
rm "${TEST_OUTPUT_TEMPFILE}"
if [[ $(get_file_suffix_count gcda) == 0 ]]; then
echo "Error: Running the test suite did not create any *.gcda files. The gcda files are generated when the instrumented test programs are executed. Run \"cmake -B build -DCMAKE_BUILD_TYPE=Coverage\" and re-compile."
exit 1
fi
GCOVR_TEMPFILE=$(mktemp)
if ! gcovr --gcov-executable "${GCOV_EXECUTABLE}" -r src/ > "${GCOVR_TEMPFILE}"; then
echo "Error: gcovr failed. Output written to ${GCOVR_TEMPFILE}. Exiting."
exit 1
fi
GCOVR_FILENAME=$(get_covr_filename ${TEST_RUN_ID})
mv "${GCOVR_TEMPFILE}" "${GCOVR_FILENAME}"
if grep -E "^TOTAL *0 *0 " "${GCOVR_FILENAME}"; then
echo "Error: Spurious gcovr output. Make sure the correct GCOV_EXECUTABLE variable is set in $0 (\"gcov\" for gcc, \"llvm-cov gcov\" for clang)."
exit 1
fi
if [[ ${TEST_RUN_ID} != 1 ]]; then
COVERAGE_DIFF=$(diff -u "$(get_covr_filename 1)" "${GCOVR_FILENAME}")
if [[ ${COVERAGE_DIFF} != "" ]]; then
echo
echo "The line coverage is non-deterministic between runs. Exiting."
echo
echo "The test suite must be deterministic in the sense that the set of lines executed at least"
echo "once must be identical between runs. This is a necessary condition for meaningful"
echo "coverage measuring."
echo
echo "${COVERAGE_DIFF}"
exit 1
fi
rm "${GCOVR_FILENAME}"
fi
done
echo
echo "Coverage test passed: Deterministic coverage across ${N_TEST_RUNS} runs."
exit

View File

@@ -18,10 +18,10 @@ Otherwise, you may choose from one of the following options to install Guix:
- Works on nearly all Linux distributions
- Installs any release
- Binary installation only, requires high level of trust
3. Using fanquake's **container image** [↗︎ external instructions][install-fanquake-container]
3. Using fanquake's **Docker image** [↗︎ external instructions][install-fanquake-docker]
- Maintained by fanquake
- Easy (automatically performs *some* setup)
- Works wherever container images work (Docker/Podman)
- Works wherever Docker images work
- Installs any release
- Binary installation only, requires high level of trust
4. Using a **distribution-maintained package** [⤓ skip to section][install-distro-pkg]
@@ -57,7 +57,7 @@ Regardless of which installation option you chose, the changes to
`/etc/profile.d` will not take effect until the next shell or desktop session,
so you should log out and log back in.
## Option 3: Using fanquake's container image
## Option 3: Using fanquake's Docker image
Please refer to fanquake's instructions
[here](https://github.com/fanquake/core-review/tree/master/guix).
@@ -415,7 +415,7 @@ make it "what Guix intended", then read the next few subsections.
This section definitely does not apply to you if you installed Guix using:
1. The shell installer script
2. fanquake's container image
2. fanquake's Docker image
3. Debian's `guix` package
#### Background
@@ -766,7 +766,7 @@ Please see the following links for more details:
[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
[install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
[install-fanquake-container]: #option-3-using-fanquakes-container-image
[install-fanquake-docker]: #option-3-using-fanquakes-docker-image
[install-distro-pkg]: #option-4-using-a-distribution-maintained-package
[install-source]: #option-5-building-from-source

View File

@@ -365,6 +365,12 @@ Where `<PREFIX>` is likely:
- `/usr/local` if you installed Guix from source and didn't supply any
prefix-modifying flags to Guix's `./configure`
For dongcarl's substitute server at https://guix.carldong.io, run as root:
```sh
wget -qO- 'https://guix.carldong.io/signing-key.pub' | guix archive --authorize
```
#### Removing authorized keys
To remove previously authorized keys, simply edit `/etc/guix/acl` and remove the
@@ -376,28 +382,28 @@ Once its key is authorized, the official Guix build farm at
https://ci.guix.gnu.org is automatically used unless the `--no-substitutes` flag
is supplied. This default list of substitute servers is overridable both on a
`guix-daemon` level and when you invoke `guix` commands. See examples below for
the various ways of adding a substitute server after having [authorized
its signing key](#step-1-authorize-the-signing-keys).
the various ways of adding dongcarl's substitute server after having [authorized
his signing key](#step-1-authorize-the-signing-keys).
Change the **default list** of substitute servers by starting `guix-daemon` with
the `--substitute-urls` option (you will likely need to edit your init script):
```sh
guix-daemon <cmd> --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
guix-daemon <cmd> --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
```
Override the default list of substitute servers by passing the
`--substitute-urls` option for invocations of `guix` commands:
```sh
guix <cmd> --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
guix <cmd> --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
```
For scripts under `./contrib/guix`, set the `SUBSTITUTE_URLS` environment
variable:
```sh
export SUBSTITUTE_URLS='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org'
```
## Option 2: Disabling substitutes on an ad-hoc basis

View File

@@ -69,12 +69,11 @@ unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
unset OBJCPLUS_INCLUDE_PATH
# Set native toolchain
build_CC="${NATIVE_GCC}/bin/gcc -isystem ${NATIVE_GCC}/include"
build_CXX="${NATIVE_GCC}/bin/g++ -isystem ${NATIVE_GCC}/include/c++ -isystem ${NATIVE_GCC}/include"
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
case "$HOST" in
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for native packages
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for qt/qmake
*mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
*)
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
@@ -137,7 +136,8 @@ export GUIX_LD_WRAPPER_DISABLE_RPATH=yes
# Make /usr/bin if it doesn't exist
[ -e /usr/bin ] || mkdir -p /usr/bin
# Symlink env to a conventional path
# Symlink file and env to a conventional path
[ -e /usr/bin/file ] || ln -s --no-dereference "$(command -v file)" /usr/bin/file
[ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env
# Determine the correct value for -Wl,--dynamic-linker for the current $HOST
@@ -171,8 +171,6 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
${SDK_PATH+SDK_PATH="$SDK_PATH"} \
${build_CC+build_CC="$build_CC"} \
${build_CXX+build_CXX="$build_CXX"} \
x86_64_linux_CC=x86_64-linux-gnu-gcc \
x86_64_linux_CXX=x86_64-linux-gnu-g++ \
x86_64_linux_AR=x86_64-linux-gnu-gcc-ar \
@@ -183,6 +181,8 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
case "$HOST" in
*darwin*)
# Unset now that Qt is built
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset LIBRARY_PATH
;;
esac
@@ -242,7 +242,6 @@ mkdir -p "$DISTSRC"
cmake -S . -B build \
--toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \
-DWITH_CCACHE=OFF \
-Werror=dev \
${CONFIGFLAGS}
# Build Bitcoin Core
@@ -290,7 +289,7 @@ mkdir -p "$DISTSRC"
*)
# Split binaries from their debug symbols
{
find "${DISTNAME}/bin" "${DISTNAME}/libexec" -type f -executable -print0
find "${DISTNAME}/bin" -type f -executable -print0
} | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/build/split-debug.sh" {} {} {}.dbg
;;
esac

View File

@@ -110,7 +110,7 @@ mkdir -p "$DISTSRC"
# Apply detached codesignatures (in-place)
signapple apply dist/Bitcoin-Qt.app codesignatures/osx/"${HOST}"/dist/Bitcoin-Qt.app
find "${DISTNAME}" \( -wholename "*/bin/*" -o -wholename "*/libexec/*" \) -type f | while read -r bin
find "${DISTNAME}" -wholename "*/bin/*" -type f | while read -r bin
do
signapple apply "${bin}" "codesignatures/osx/${HOST}/${bin}.${ARCH}sign"
done

View File

@@ -6,19 +6,17 @@
(gnu packages commencement)
(gnu packages compression)
(gnu packages cross-base)
(gnu packages file)
(gnu packages gawk)
(gnu packages gcc)
((gnu packages installers) #:select (nsis-x86_64))
((gnu packages linux) #:select (linux-libre-headers-6.1))
(gnu packages llvm)
(gnu packages mingw)
(gnu packages ninja)
(gnu packages pkg-config)
((gnu packages python) #:select (python-minimal))
((gnu packages python-build) #:select (python-poetry-core))
((gnu packages python-build) #:select (python-tomli python-poetry-core))
((gnu packages python-crypto) #:select (python-asn1crypto))
((gnu packages python-science) #:select (python-scikit-build-core))
((gnu packages python-xyz) #:select (python-pydantic-2 python-pydantic-core))
((gnu packages tls) #:select (openssl))
((gnu packages version-control) #:select (git-minimal))
(guix build-system cmake)
@@ -160,35 +158,37 @@ chain for " target " development."))
(define-public python-lief
(package
(name "python-lief")
(version "0.16.6")
(version "0.13.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/lief-project/LIEF")
(commit version)))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
'(begin
;; Configure build for Python bindings.
(substitute* "api/python/config-default.toml"
(("(ninja = )true" all m)
(string-append m "false"))
(("(parallel-jobs = )0" all m)
(string-append m (number->string (parallel-job-count)))))))
(sha256
(base32
"1pq9nagrnkl1x943bqnpiyxmkd9vk99znfxiwqp6vf012b50bz2a"))
(patches (search-our-patches "lief-scikit-0-9.patch"))))
(build-system pyproject-build-system)
(native-inputs (list cmake-minimal
ninja
python-scikit-build-core
python-pydantic-core
python-pydantic-2))
"0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll"))))
(build-system python-build-system)
(native-inputs (list cmake-minimal python-tomli))
(arguments
(list
#:tests? #f ;needs network
#:phases #~(modify-phases %standard-phases
(add-before 'build 'set-pythonpath
(add-before 'build 'change-directory
(lambda _
(setenv "PYTHONPATH"
(string-append (string-append (getcwd) "/api/python/backend")
":" (or (getenv "PYTHONPATH") "")))))
(add-after 'set-pythonpath 'change-directory
(chdir "api/python")))
(replace 'build
(lambda _
(chdir "api/python"))))))
(invoke "python" "setup.py" "build"))))))
(home-page "https://github.com/lief-project/LIEF")
(synopsis "Library to instrument executable formats")
(description
@@ -530,6 +530,7 @@ inspecting signatures in Mach-O binaries.")
which
coreutils-minimal
;; File(system) inspection
file
grep
diffutils
findutils
@@ -546,7 +547,6 @@ inspecting signatures in Mach-O binaries.")
gcc-toolchain-13
cmake-minimal
gnu-make
ninja
;; Scripting
python-minimal ;; (3.10)
;; Git

View File

@@ -1,21 +0,0 @@
Partially revert f23ced2f4ffc170d0a6f40ff4a1bee575e3447cf
Restore compat with python-scikit-build-core 0.9.x
Can be dropped when using python-scikit-build-core >= 0.10.x
--- a/api/python/backend/setup.py
+++ b/api/python/backend/setup.py
@@ -101,12 +101,12 @@ def _get_hooked_config(is_editable: bool) -> Optional[dict[str, Union[str, List[
config_settings = {
"logging.level": "DEBUG",
"build-dir": config.build_dir,
- "build.targets": config.build.targets,
"install.strip": config.strip,
"backport.find-python": "0",
"wheel.py-api": config.build.py_api,
"cmake.source-dir": SRC_DIR.as_posix(),
"cmake.build-type": config.build.build_type,
+ "cmake.targets": config.build.targets,
"cmake.args": [
*config.cmake_generator,
*config.get_cmake_args(is_editable),

View File

@@ -25,7 +25,8 @@ ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \
-shutdownnotify='systemd-notify --stopping'
# Make sure the config directory is readable by the service user
ExecStartPre=!/bin/chgrp bitcoin /etc/bitcoin
PermissionsStartOnly=true
ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
# Process management
####################
@@ -43,6 +44,7 @@ TimeoutStopSec=600
# Run as bitcoin:bitcoin
User=bitcoin
Group=bitcoin
# /run/bitcoind
RuntimeDirectory=bitcoind

View File

@@ -44,7 +44,7 @@ ${SIGNAPPLE} apply "${UNSIGNED_BUNDLE}" "${OUTROOT}/${BUNDLE_ROOT}/${BUNDLE_NAME
${SIGNAPPLE} notarize --detach "${OUTROOT}/${BUNDLE_ROOT}" --passphrase "${api_key_pass}" "$2" "$3" "${UNSIGNED_BUNDLE}"
# Sign each binary
find . -maxdepth 3 \( -wholename "*/bin/*" -o -wholename "*/libexec/*" \) -type f -exec realpath --relative-to=. {} \; | while read -r bin
find . -maxdepth 3 -wholename "*/bin/*" -type f -exec realpath --relative-to=. {} \; | while read -r bin
do
bin_dir=$(dirname "${bin}")
bin_name=$(basename "${bin}")

View File

@@ -54,7 +54,7 @@ def run():
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
"""Add all files in dir_to_add to tarfp, but prepend alt_base_dir to the files'
"""Add all files in dir_to_add to tarfp, but prepent alt_base_dir to the files'
names
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:

View File

@@ -157,19 +157,20 @@ class DeploymentInfo(object):
self.qtPath = None
self.pluginPath = None
self.deployedFrameworks = []
def detectQtPath(self, frameworkDirectory: str):
parentDir = os.path.dirname(frameworkDirectory)
if os.path.exists(os.path.join(parentDir, "share", "qt", "translations")):
if os.path.exists(os.path.join(parentDir, "translations")):
# Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x"
self.qtPath = parentDir
else:
self.qtPath = os.getenv("QTDIR", None)
if self.qtPath is not None:
pluginPath = os.path.join(self.qtPath, "share", "qt", "plugins")
pluginPath = os.path.join(self.qtPath, "plugins")
if os.path.exists(pluginPath):
self.pluginPath = pluginPath
def usesFramework(self, name: str) -> bool:
for framework in self.deployedFrameworks:
if framework.endswith(".framework"):
@@ -180,7 +181,7 @@ class DeploymentInfo(object):
return True
return False
def getFrameworks(binaryPath: str, verbose: int, rpath: str = '') -> list[FrameworkInfo]:
def getFrameworks(binaryPath: str, verbose: int) -> list[FrameworkInfo]:
objdump = os.getenv("OBJDUMP", "objdump")
if verbose:
print(f"Inspecting with {objdump}: {binaryPath}")
@@ -194,19 +195,17 @@ def getFrameworks(binaryPath: str, verbose: int, rpath: str = '') -> list[Framew
lines.pop(0) # First line is the inspected binary
if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
lines.pop(0) # Frameworks and dylibs list themselves as a dependency.
libraries = []
for line in lines:
line = line.replace("@loader_path", os.path.dirname(binaryPath))
if rpath:
line = line.replace("@rpath", rpath)
info = FrameworkInfo.fromLibraryLine(line.strip())
if info is not None:
if verbose:
print("Found framework:")
print(info)
libraries.append(info)
return libraries
def runInstallNameTool(action: str, *args):
@@ -319,7 +318,7 @@ def deployFrameworks(frameworks: list[FrameworkInfo], bundlePath: str, binaryPat
# install_name_tool it a new id.
changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose)
# Check for framework dependencies
dependencies = getFrameworks(deployedBinaryPath, verbose, rpath=framework.frameworkDirectory)
dependencies = getFrameworks(deployedBinaryPath, verbose)
for dependency in dependencies:
changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose)
@@ -466,18 +465,18 @@ if config.translations_dir:
sys.stderr.write(f"Error: Could not find translation dir \"{config.translations_dir[0]}\"\n")
sys.exit(1)
print("+ Adding Qt translations +")
print("+ Adding Qt translations +")
translations = Path(config.translations_dir[0])
translations = Path(config.translations_dir[0])
regex = re.compile('qt_[a-z]*(.qm|_[A-Z]*.qm)')
regex = re.compile('qt_[a-z]*(.qm|_[A-Z]*.qm)')
lang_files = [x for x in translations.iterdir() if regex.match(x.name)]
lang_files = [x for x in translations.iterdir() if regex.match(x.name)]
for file in lang_files:
if verbose:
print(file.as_posix(), "->", os.path.join(applicationBundle.resourcesPath, file.name))
shutil.copy2(file.as_posix(), os.path.join(applicationBundle.resourcesPath, file.name))
for file in lang_files:
if verbose:
print(file.as_posix(), "->", os.path.join(applicationBundle.resourcesPath, file.name))
shutil.copy2(file.as_posix(), os.path.join(applicationBundle.resourcesPath, file.name))
# ------------------------------------------------

View File

@@ -24,8 +24,8 @@ curl https://testnet.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_test.txt
curl https://testnet4.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_testnet4.txt
curl https://raw.githubusercontent.com/asmap/asmap-data/main/latest_asmap.dat > asmap-filled.dat
python3 makeseeds.py -a asmap-filled.dat -s seeds_main.txt > nodes_main.txt
python3 makeseeds.py -a asmap-filled.dat -s seeds_signet.txt -m 266000 > nodes_signet.txt
python3 makeseeds.py -a asmap-filled.dat -s seeds_test.txt -m 4650000 > nodes_test.txt
python3 makeseeds.py -a asmap-filled.dat -s seeds_testnet4.txt -m 100000 > nodes_testnet4.txt
python3 makeseeds.py -a asmap-filled.dat -s seeds_signet.txt -m 237800 > nodes_signet.txt
python3 makeseeds.py -a asmap-filled.dat -s seeds_test.txt > nodes_test.txt
python3 makeseeds.py -a asmap-filled.dat -s seeds_testnet4.txt -m 72600 > nodes_testnet4.txt
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
```

View File

@@ -26,7 +26,7 @@ MAX_SEEDS_PER_ASN = {
'ipv6': 10,
}
MIN_BLOCKS = 910000
MIN_BLOCKS = 868000
PATTERN_IPV4 = re.compile(r"^(([0-2]?\d{1,2})\.([0-2]?\d{1,2})\.([0-2]?\d{1,2})\.([0-2]?\d{1,2})):(\d{1,5})$")
PATTERN_IPV6 = re.compile(r"^\[([\da-f:]+)]:(\d{1,5})$", re.IGNORECASE)
@@ -48,8 +48,7 @@ PATTERN_AGENT = re.compile(
r"|25\.(0|1|2|99)\.0"
r"|26\.(0|1|2|99)\.0"
r"|27\.(0|1|2|99)\.0"
r"|28\.(0|1|2|99)\.0"
r"|29\.(0|99)\.0"
r"|28\.(0|1|99)\.0"
r")")
def parseline(line: str) -> Union[dict, None]:

File diff suppressed because it is too large Load Diff

View File

@@ -1,113 +1,130 @@
[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:38333
[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:38333
[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:38333
[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:38333
3cxteqanevzjd5iufktxxh3l5abj6fs6udqg3bomphzofqjl4aqa.b32.i2p:0
kmmq64ijxhaalfpatq7q6yyrf3rdfvjk3tsb5xc2rrmkgdqf3vwq.b32.i2p:0
nmmoytmmcwq4aclmtrxk3askrv7mgy6l27uw67ozvyolwca2dr6a.b32.i2p:0
qhlt7irano6s2pjfn2v4qrtynjj4peo7tfsnv2x6bm4e4vowptaq.b32.i2p:0
qn7uwi6nx6tuakxvzhjnjeuxwpcq6wcv4diecrv63ugain2tdopa.b32.i2p:0
regl2o33xgkhnuu5ywr7tw72dio46j6tylz7zpdl6pfaqsktboea.b32.i2p:0
18.142.242.1:38333 # AS16509
34.171.112.142:38333 # AS396982
35.217.13.118:38333 # AS15169
38.247.82.124:38333 # AS174
45.94.168.5:38333 # AS400810
51.210.144.135:38333 # AS16276
54.151.174.170:38333 # AS16509
66.254.43.122:38333 # AS1403
72.48.253.168:38333 # AS7459
81.17.97.236:38333 # AS51167
91.134.73.14:38333 # AS16276
95.141.35.117:38333 # AS31034
129.226.149.150:38333 # AS132203
rkf5lugxqdjrxva2n5wl43okxrqmm6prlf7arci4bgg4md55oo2a.b32.i2p:0
5.189.136.209:38333 # AS51167
15.235.55.158:38333 # AS16276
18.141.143.94:38333 # AS16509
18.216.1.71:38333 # AS8987
23.137.57.100:38333 # AS1002
23.226.164.192:38333 # AS3801
34.16.103.64:38333 # AS396982
35.217.29.66:38333 # AS15169
37.27.45.224:38333 # AS24940
38.88.125.238:38333 # AS394256
44.210.109.64:38333 # AS14618
45.32.127.199:38333 # AS20473
51.79.29.216:38333 # AS16276
54.255.186.152:38333 # AS16509
63.34.82.20:38333 # AS8987
65.109.54.101:38333 # AS24940
67.209.52.138:38333 # AS20326
85.190.242.80:38333 # AS51167
89.155.238.72:38333 # AS2860
103.16.128.63:38333 # AS133159
104.248.42.204:38333 # AS14061
116.163.20.113:38333 # AS4837
121.78.241.71:38333 # AS9286
124.156.198.249:38333 # AS132203
131.153.11.131:38333 # AS20454
135.180.99.74:38333 # AS1299
136.144.237.250:38333 # AS20857
143.42.65.56:38333 # AS63949
144.24.238.157:38333 # AS31898
144.24.241.206:38333 # AS31898
144.76.2.169:38333 # AS24940
147.182.229.68:38333 # AS14061
152.53.52.229:38333 # AS214996
148.51.196.40:38333 # AS12025
152.53.3.192:38333 # AS47147
153.126.143.201:38333 # AS7684
159.223.59.213:38333 # AS14061
170.75.172.6:38333 # AS174
159.203.133.144:38333 # AS14061
172.105.179.233:38333 # AS63949
174.50.212.60:38333 # AS22909
175.110.114.74:38333 # AS49981
178.250.189.42:38333 # AS203394
188.213.140.180:38333 # AS197922
194.163.134.64:38333 # AS51167
195.201.164.54:38333 # AS24940
202.61.205.162:38333 # AS197540
206.162.217.86:38333 # AS7871
178.250.189.42:38333 # AS214379
185.148.37.170:38333 # AS48347
202.182.105.108:38333 # AS20473
205.209.114.30:38333 # AS19318
208.68.4.71:38333 # AS397444
209.141.62.48:38333 # AS53667
213.22.195.68:38333 # AS2860
[2001:19f0:4400:63c7:5400:4ff:fecc:fc1e]:38333 # AS20473
[2001:19f0:7001:48b2:5400:4ff:fecf:6e5]:38333 # AS20473
[2001:41d0:304:400::d0a]:38333 # AS16276
[2001:41d0:306:4505::]:38333 # AS16276
[2001:41d0:347:e00::]:38333 # AS16276
[2001:41d0:403:4ecb::]:38333 # AS16276
[2001:41d0:800:330f::]:38333 # AS16276
[2001:5a8:4164:7a00::1f8]:38333 # AS1299
[2001:5a8:4164:7a00::506]:38333 # AS7065
[2400:8907::f03c:92ff:fe6f:ee2b]:38333 # AS63949
[2401:2500:102:3007:153:126:143:201]:38333 # AS7684
[2604:a880:4:1d0::352:6000]:38333 # AS14061
[2604:a880:800:14::3880:3000]:38333 # AS14061
[2605:3380:422e:1::50]:38333 # AS397444
[2607:5300:203:7467::]:38333 # AS16276
[2607:5300:203:a29e::]:38333 # AS16276
[2607:5300:205:300::1b0]:38333 # AS16276
[2607:fdc0:1c1:5:632:1ff:fe54:ba56]:38333 # AS20326
[2620:6e:a0a0:1::71]:38333 # AS397444
[2a01:4f8:121:4072::2]:38333 # AS24940
[2a01:4f8:13a:c56::2]:38333 # AS24940
[2a01:4f8:190:72a4::2]:38333 # AS24940
[2a01:4f8:2190:29b0::2]:38333 # AS24940
[2a01:4f8:2190:1692::2]:38333 # AS24940
[2a01:4f8:2220:1a70::2]:38333 # AS24940
[2a01:4f8:231:3d6f::2]:38333 # AS24940
[2a01:4f8:242:4246::2]:38333 # AS24940
[2a01:4f8:c17:bff8::1]:38333 # AS24940
[2a01:4f9:1a:aa95::2]:38333 # AS24940
[2a01:4f9:3080:3496::2]:38333 # AS24940
[2a01:4f9:3a:2496::2]:38333 # AS24940
[2a01:4f9:4b:470d::2]:38333 # AS24940
[2a01:4f9:6b:301a::2]:38333 # AS24940
[2a01:4f9:6b:47ce::2]:38333 # AS24940
[2a01:7c8:d008:e9::3]:38333 # AS20857
[2a02:29e0:1:420::64]:38333 # AS49367
[2a0c:b641:6f1:6::2]:38333 # AS214379
2ycyu2aba3xsqjr35beqporp5f64ntqs2sau2amn5ztq4j5q76amhqyd.onion:38333
3qeedpzgciv65tdy2tsdmjxswhyep4aj65jtboznf5nnwcyo2lbmiyqd.onion:38333
3xvum5nnvcchvfxwlbc2it7nbfxhml6ovt7xehjw2potempk2om4eoqd.onion:38333
43nk7wpojel47fmc2il4sunwkpj4d2sh5rpeconlymplvuf7mwvnidqd.onion:38333
4lrtpspzigxrso22dy4ux23ad5gxrs7z562azclspfhil5w55jxpnhyd.onion:38333
4n2rlrrnxcpnfrft4ivlsvsjiahk5ffxizcyfr5amjcqfwt4biitjpid.onion:38333
5ofovtlx424wnxyoohnsxqjktwqd4i2kiqawox3srsdttsp2pdrx6yyd.onion:38333
6fy45vxzgc6siecr7en4k6oft4k4ix47jvkxqyzopalzwyphqc3hv2ad.onion:38333
75ucqkuqndevjaqjnyfgyhzdfgcnknr6ki3skvkqjlxnrcfqc6wxqbad.onion:38333
6ivh4quupqu3w3glr2puyi5bitjapbbl6ehvbjsvleopyy2yzjgp4oqd.onion:38333
7mgfpo4urwysuafbo6sb3u6vh5f7pkvgddrqohcobhbkblqrrozhn7ad.onion:38333
a7mvea5xgpknsqaifyvfstdn2utjvph564i6ti3nbdr2cksby5jhykid.onion:38333
b3sbqhjstq34ae7lsrw3syhxcjdu2ssuf3f3kvbnyrvbp7cvuuopmbqd.onion:38333
b6lyxzxr2xmzmdy7543renqfe2btqopjptilw4wxgzoyftazzspwq5id.onion:38333
b6x3qw2ibiycnj67jww3sjvkokq4ssxdvj7vetq7s64fhet75zat5cad.onion:38333
ba3rwqombmuji3wxpmydrk7vcxfpq7pnn5bfw74wvvqyo6rrhwqrt6id.onion:38333
bxctkglm5qyt2ubhu4je35irvvcnjrjydl2p6ywfelo7fnjw2exoehyd.onion:38333
bodh6zsjtn6kvdk36ukx6fns5hqiiw3zhkqmcmj54nrtkz5tdtb6yayd.onion:38333
bux5jwkwzccba57zthctdgsuwp5mi3wocxndtuf6jg2qqab3vpnqnqqd.onion:38333
ckbugjazj2iotosxah7odbxfozxivuk6zu5npf3iwfphvoh5brdjfqad.onion:38333
cq3td34eu5xjymlxl7aq4rsskxjt4ag267i6mzhdqhdpfzcqctus6aid.onion:38333
d27tvdmi6wjjlffjyhm5mogwsw3433jxkaiwhti32eagvljdzseilqqd.onion:38333
dpzlvj7kmbifhbttfe7vwl6fgpy5os62iiznel6eocsaarssudtdzoyd.onion:38333
e6xhvtrt2ppjfxckbinu7a4jxmy7usjnvjx6st2cipmvlnnhxg7krbid.onion:38333
ecx2z3x4nwbzjh6dh6vyccljkhnxya2o2o2tz3pzvetxfjjmujxhctid.onion:38333
ehnxcigc6t34smlk5lftfyb7rntcsbwhlu3pe7ltft76gl6y262ekdqd.onion:38333
ejgeimjypsfuijpxzy5xpwmmjmkr4izwze6od5pw74csjglflib6nsid.onion:38333
eqhrqtvxkyjcggbkmzgocynaskblynl2bqeuel4lqs4w3f3rgpfpnkad.onion:38333
f7xfq5hijqptsdak6qjx3komxrff2hw3xa46d7cs3d7igvm5tylotbid.onion:38333
fo7cekwzd3ibyoxuo53mfqoxffgfaupg5ydxbl3rofvwxtzbvgy3ciqd.onion:38333
fqyzt7wikf6g6yxu6i2yar3lkqxbf6fu3c3pjnbg2oibt57usfmq42id.onion:38333
gd4gyokpcnnqqodklhltjimcrhhmqj7otwlzrolw76aag4leqsyolxad.onion:38333
hm7i5k5o37ffzytt5eym2muzlj7r3xw6sisafnb6s2lhvraqbma2azqd.onion:38333
hztyx76iaz4h3emavmzbuizqfg3q37ehfwr2k3afadtcmcepjsxhmeqd.onion:38333
immdwqfyz2hhcmxmyypstz7syq2cygaklr43mqjmqefnmtcyuspwkbad.onion:38333
jahtu4veqnvjldtbyxjiibdrltqiiighauai7hmvknwxhptsb4xat4qd.onion:38333
jgn75dy52o2lt5wr5qkf4z2cg7gupz4jc4z5az53srhxxyvkipqqqpid.onion:38333
jw6d7rlkcz252f6wv6cirzzrknzuu7xwxnzirab4c5x7wfzl2uzvezad.onion:38333
k4d6h4eyeqjn35b3x46f4s3g3eykn4bms52paxuxenkre6nmhfvy6bqd.onion:38333
k6z3aojwz2jngg5bumtf7qphcwvvve3idqol27s7slg2p3tp3yrbqsqd.onion:38333
kklfzzodnlinc3toltn7dlft4vzjf2ckmdw2n3dn4lx3pzw5di2womyd.onion:38333
lbfzxmkog5ntvcmo7ncsp7ye62onxprf3a42hdzxkjw4inulizd4ccid.onion:38333
litqgemqmpesu6gi2ctd4ubrpxdn4mcm2t6p7xhkfxnkk7lzpdx75vyd.onion:38333
lkgnafoa5nfd34pzyxpz5gnmpwkbdk5a5h6h7hk3rs53soh6nkb3snqd.onion:38333
lwiqghlmljzlarwn4gwdrvskd3nibtw63o5ok7ugx4nwuvh7b422ifad.onion:38333
lxied2447sbmnoi64xbrdtcekdfyneoo3xb3m6vscj452orvdi2cjsqd.onion:38333
n6tf5dfz25i4pprczevdkyo5bkpgfa3xigenn6skpjqqynbxpxzilfid.onion:38333
nhpn5jnzl64wuhke22bl3avgm7liycl2h2fqh5a5tjtejez6upze4tid.onion:38333
o2fumu43ugk6xayo2nvadn7ohqlxharakt4flqh3hjgxdbwzrwignmyd.onion:38333
oowqbk36g76cs37sk7myfoq62e7ly42etcfugol3p7haw6ewyn5qhiqd.onion:38333
ouohm2bcplkfvzgg4f5ltvtqt2obzyvaadb3jep7bb4gasdusqkkupad.onion:38333
oz5puzgtybzjisyw5kimddtmsnc32zwflkj5r43clfddawunk7wtsiad.onion:38333
pkpiv6cqqba3mb5cpccdvz5v5p3u5acrjv2zj2u4auzznceqculjrkid.onion:38333
pmjm644pzkp2khwixyis2c7mnfbte33bnmwxdx5lk6t6owvtmapdbhqd.onion:38333
q3z526imdoo2pdujkfp5vslshni2niewlbxfokejfkddkezxutagezyd.onion:38333
qbjhndk6zjpzxfetanqjud3u6kiuspnjfapinw2r5cou6o5ae5mxdzid.onion:38333
qpgnrxuwxc6474hvy3j5uk2hbm3ry4ikwrenoit6zjeqqqythsvjdvid.onion:38333
qzf5vm2exowrli5ksuowrhshtnef43exhtha76qdxz357hdqfq65zhid.onion:38333
r4y5pqyvdzq3bzg2fqu46ql4a32fadkftwejtxzckeyohd7wvqnnwtqd.onion:38333
sver4nn4i5i7klvvayqopjbk5eyu7lcrrhcchxmrouom224hrnarl6qd.onion:38333
tev7cdwka3av6ektydsjfpofmcam3r6qcw7sxbpkohckjvihtzp7hgyd.onion:38333
tgqpfwoxjidlwd5rgpj5zfuhctxrevsfueqndih4vx5hgxpmyg34jqyd.onion:38333
tsq7clffbfe636zfszymheqgy6tyzbsjogad2qet7qeijua5c53ye6ad.onion:38333
@@ -116,8 +133,8 @@ wevmujl2p6mckcwaxnmtusweros7bu3bxf2g3lzutnfdkjl5gwbu36yd.onion:38333
ww4jycomjwnf7jtrrrngeahokqkcl32iufmjzvvk272svieavabjyiqd.onion:38333
xbulvl2bb4wvnlafmq3j3fzrjhsmnfz7ubyvl6yy3syeded4tqiubkad.onion:38333
xm4kxluodmeolmaugmaxnexnefrg3vsxnqo2ezu7rqmdct7i7xevcxad.onion:38333
xtmr2yizi5zibbapqdqedeu5whn2oy5cpy2zz7ea5adpcdo2nz4qyzad.onion:38333
y5f4rtma4uneqrkzkoghoiec2sy3mee44xs466hhsi74w5roccqxlzqd.onion:38333
yjhagyj65xcxu6b5yktu6ntkwsyd5rhjlrsb7sexq5lzchatdqmoqnqd.onion:38333
ykeyrl6bidrfexbjicdzgnx6lh5efwhe4sj5inpgiufwa5cdhjpgugid.onion:38333
ypi6qgnmabcqlmjfkcnqzpjdjihwmebxkd32tjwt6mrhgm2strfml6ad.onion:38333
yrzulzu5xxcd2vio34ciyj5h7bpnevikslbunm6yb4tjkty62fxl7uid.onion:38333
zgkvv542e4ewviremw3qp4bi52f2sxt4g4mrjrbwonbnfb5oujd44lid.onion:38333

View File

@@ -1,179 +1,219 @@
[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:18333
[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:18333
[fc2b:f62e:6a76:cdb5:dceb:2fdd:a0f8:3d88]:18333
[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:18333
[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:18333
66lkz2cfzyrz3tde6gflrty63jqr4knyy6uv4dvldrsecpnfx4dq.b32.i2p:0
ica24vnstxip7gkr3c6dlmqgw4opmfrvv3dppjds7a3uddurpmxa.b32.i2p:0
hedmbfis4h4inqrwo2uzmku5xu6xaq74tg7sofnetqikdvndtvja.b32.i2p:0
i7vrfdmgolc6dqfmsak5fvwgmn46y4ghtan44uhn2aw66cbk5nfa.b32.i2p:0
nhla3xzibmhvav7meemluh2d2jxdrlwicq636a2sohwqhrfgqi4a.b32.i2p:0
o6j3b33bv26vthoqzjy3h7a3qsuqbtbe3ulajmjzsl43vaqyieyq.b32.i2p:0
ocqipbbxx4paopgkkbnj234ie7opzrtca5gtiwr6oda3h32rzgsa.b32.i2p:0
xgctj4seo3ofstiymoyeuzq74bvddrbr6jtia6erodlf5va3cz5a.b32.i2p:0
xy6ytjxel5ku4naqumj4f6hn4agrzh3w44gqcs6xkkzwm5s3jdgq.b32.i2p:0
zklt7hncdrl2hupfwnlbt3qaayhjayjhvwvj2m3fok3z36tlnxhq.b32.i2p:0
2.59.133.20:18333 # AS58212
3.126.103.252:18333 # AS16509
2.86.50.136:18333 # AS6799
4.246.195.240:18333 # AS8075
5.39.218.162:18333 # AS57043
5.255.97.91:18333 # AS60404
5.255.97.92:18333 # AS60404
5.255.99.130:18333 # AS60404
20.238.17.253:18333 # AS8075
8.217.160.32:18333 # AS45102
18.168.119.254:18333 # AS8987
18.209.9.240:18333 # AS8987
23.227.223.209:18333 # AS44486
34.57.91.248:18333 # AS396982
34.136.139.120:18333 # AS396982
35.89.140.96:18333 # AS16509
27.148.206.140:18333 # AS133774
34.65.45.157:18333 # AS396982
34.69.221.24:18333 # AS396982
34.254.97.244:18333 # AS16509
43.133.47.138:18333 # AS132203
43.247.184.50:18333 # AS23724
44.208.161.158:18333 # AS14618
45.77.25.14:18333 # AS20473
54.87.140.128:18333 # AS14618
57.129.97.56:18333 # AS16276
51.79.82.75:18333 # AS16276
52.193.79.181:18333 # AS16509
54.236.59.55:18333 # AS14618
59.186.7.131:18333 # AS3786
62.210.207.63:18333 # AS12876
65.21.205.60:18333 # AS24940
66.94.114.229:18333 # AS40021
67.4.82.9:18333 # AS209
69.61.32.242:18333 # AS141518
69.197.185.106:18333 # AS32097
72.48.253.168:18333 # AS7459
74.48.195.218:18333 # AS35916
70.114.196.140:18333 # AS11427
72.211.1.222:18333 # AS22773
73.22.9.231:18333 # AS33491
74.118.136.46:18333 # AS20326
75.119.158.18:18333 # AS51167
77.163.221.171:18333 # AS1136
82.121.197.91:18333 # AS3215
82.181.221.241:18333 # AS16086
85.203.53.149:18333 # AS39351
85.208.69.12:18333 # AS42275
85.208.69.13:18333 # AS42275
89.58.9.219:18333 # AS197540
89.169.131.69:18333 # AS200350
90.38.214.224:18333 # AS3215
89.155.238.72:18333 # AS2860
90.79.184.226:18333 # AS3215
91.109.204.214:18333 # AS199669
91.123.182.164:18333 # AS51648
92.115.99.159:18333 # AS8926
95.141.35.117:18333 # AS31034
104.243.38.96:18333 # AS23470
122.208.117.197:18333 # AS17506
124.236.16.91:18333 # AS134760
129.153.149.46:18333 # AS31898
129.213.114.91:18333 # AS31898
129.226.198.211:18333 # AS132203
132.145.129.60:18333 # AS31898
134.195.89.130:18333 # AS63473
135.180.99.74:18333 # AS1299
137.184.2.124:18333 # AS14061
142.234.33.228:18333 # AS7979
148.113.218.157:18333 # AS16276
152.67.82.60:18333 # AS31898
157.90.95.170:18333 # AS24940
160.80.11.66:18333 # AS137
169.155.170.211:18333 # AS44486
172.173.81.233:18333 # AS8075
173.231.40.170:18333 # AS18450
178.162.218.121:18333 # AS28753
141.98.219.199:18333 # AS20326
147.182.251.92:18333 # AS14061
148.51.196.40:18333 # AS12025
148.251.4.19:18333 # AS24940
149.202.79.199:18333 # AS16276
161.97.119.128:18333 # AS51167
162.55.243.11:18333 # AS24940
169.155.171.252:18333 # AS44486
176.108.193.97:18333 # AS47914
185.28.96.16:18333 # AS59845
185.44.206.111:18333 # AS44051
185.107.68.135:18333 # AS43350
185.130.224.146:18333 # AS57043
185.186.208.124:18333 # AS206428
185.210.125.33:18333 # AS205671
185.232.70.226:18333 # AS197540
186.154.207.228:18333 # AS19429
188.42.129.156:18333 # AS7979
188.72.109.51:18333 # AS208677
188.117.132.82:18333 # AS31242
188.213.90.149:18333 # AS206238
193.30.123.70:18333 # AS197540
194.9.6.11:18333 # AS58212
194.95.66.129:18333 # AS680
194.110.169.133:18333 # AS203576
194.145.201.243:18333 # AS29028
195.66.213.33:18333 # AS43641
195.154.241.13:18333 # AS12876
200.143.224.99:18333 # AS1916
203.132.94.196:18333 # AS38195
205.209.120.167:18333 # AS19318
206.204.104.7:18333 # AS212947
208.68.4.71:18333 # AS397444
208.91.104.61:18333 # AS20326
209.38.135.43:18333 # AS14061
213.199.42.73:18333 # AS51167
216.219.91.82:18333 # AS19318
219.117.221.162:18333 # AS2514
[2001:41d0:303:146e::]:18333 # AS16276
[2001:41d0:306:4505::]:18333 # AS16276
[2001:41d0:306:a3a::]:18333 # AS16276
[2001:41d0:340:c000::]:18333 # AS16276
[2001:41d0:72a:3100::]:18333 # AS16276
[2001:41d0:72a:3800::]:18333 # AS16276
[2001:41d0:700:544c::]:18333 # AS16276
[2001:41d0:800:1d55::]:18333 # AS16276
[2001:41d0:800:3e7f::]:18333 # AS16276
[2001:470:1f05:4e5::2020]:18333 # AS6939
[2001:5a8:4164:7a00::1f8]:18333 # AS1299
[2001:b07:6469:3491:56be:f7ff:fe26:21bb]:18333 # AS12874
[2001:5a8:4164:7a00::506]:18333 # AS7065
[2401:c080:1000:4cb2:3eec:efff:feb9:8604]:18333 # AS20473
[2401:d002:3902:700:8708:37c4:e231:d3d8]:18333 # AS38195
[2402:1f00:800a:1800::]:18333 # AS16276
[2402:1f00:800a:1c00::]:18333 # AS16276
[2402:1f00:8101:713::]:18333 # AS16276
[2604:1380:4531:1700::5]:18333 # AS54825
[2604:a00:50:58:216:3eff:fe2c:8371]:18333 # AS19318
[2605:3380:422e:1::50]:18333 # AS397444
[2605:4840:3:2c23::1]:18333 # AS63473
[2607:5300:216:a600::]:18333 # AS16276
[2607:5300:21b:9d00::]:18333 # AS16276
[2605:a141:2239:7674::1]:18333 # AS51167
[2607:5300:205:300::1b0]:18333 # AS16276
[2607:5300:60:85a9::]:18333 # AS16276
[2607:5300:60:8702::]:18333 # AS16276
[2620:6e:a000:1:43:43:43:43]:18333 # AS397444
[2620:6e:a0a0:1::71]:18333 # AS397444
[2804:431:e038:cd01:aaa1:59ff:fe0d:44b8]:18333 # AS27699
[2a01:4f8:121:4072::2]:18333 # AS24940
[2a01:4f8:160:1083::2]:18333 # AS24940
[2a01:4f8:173:1ed8::2]:18333 # AS24940
[2a01:4f8:173:230a::2]:18333 # AS24940
[2a01:4f8:190:4026::2]:18333 # AS24940
[2a01:4f8:201:508f::2]:18333 # AS24940
[2a01:4f9:2a:2510::2]:18333 # AS24940
[2a01:4f9:2a:309d::2]:18333 # AS24940
[2a01:4f9:3070:26e2::2]:18333 # AS24940
[2a01:4f9:6a:13c3::2]:18333 # AS24940
[2a01:4f9:6a:4891::2]:18333 # AS24940
[2a01:4f9:3071:2154::2]:18333 # AS24940
[2a01:4f9:3071:219d::2]:18333 # AS24940
[2a01:4f9:6b:2768::2]:18333 # AS24940
[2a01:e0a:98e:7450:be24:11ff:fe4a:7bc2]:18333 # AS12322
[2a02:29e0:1:420::64]:18333 # AS49367
[2a02:c206:2075:3352::1]:18333 # AS51167
[2a02:c202:2238:2255::1]:18333 # AS51167
[2a02:c206:2239:7671::1]:18333 # AS51167
[2a02:c206:2240:1506::1]:18333 # AS51167
[2a03:4000:2a:514::]:18333 # AS197540
[2a04:52c0:102:2219::1]:18333 # AS60404
[2a04:52c0:102:49af::1]:18333 # AS60404
[2a04:52c0:104:160c::1]:18333 # AS60404
2lsncqdflwk272dhydrxf7ikfy23ppnmm54dnynyxiym6lqf3wowrmqd.onion:18333
2mvycpm7ni6ix2pr4lkkfkqlivgo77mt4jx3s3dmhdlg3ogq46s6qbyd.onion:18333
36fwktckggarkclbpu2pumsdpck46ahe6cwpozd2gm6q7kgdqljclmad.onion:18333
3dt6kgfrilc3nwliwy5wbmc6oa2b5y3t33nkxlrxrkunr2hoaj56kgyd.onion:18333
3rfphqncnepbm7tvnaqjetkaqvauj566nw3ys27fert6zx3q75zetoid.onion:18333
3vnbi5o3hyzk4cm3hhnyo3h7tclr6pybmhmqwkbyclslfhqtg72pq2id.onion:18333
44sgcv5dvpplt32enlneddyl4gd4z3tbezl2scedwccndyzrrp6lcgyd.onion:18333
4w3f2mxe4ftodocermsazs3qlpo37igkdgne6ka2p6wnnrgwpzqw65yd.onion:18333
5axx4qyub7qtgssrvbbqudu6uqjbuknbvbld2wdscv5p6kh2hsfzjxqd.onion:18333
5qdgulsryjejkjinocpvknazwtnbqtuf4f4pui2at4jpedwwpg427qyd.onion:18333
67l6l2k7mqbl2btyvo5h5lki3kxcrgbunlk7brcloyaoaftbs5mnsuad.onion:18333
6bhop3n32rreiynu35epznhc2exxkhuleromdhnida2hgmu2bhczgmqd.onion:18333
6fdbuqf2kgeweeoeikmwfezauys657lzezzus4nxmekkumouptg5ezad.onion:18333
6yuphwecg6apx3nrf6kyabqohh544l25xodxxowa74yr2tg5ulkzeead.onion:18333
6rnqpqqcpllqhjoa4gwrtq5yi6fdch6uqzapdee2gq67gxgsl73v4uqd.onion:18333
7ph7mrc24te57mvppajfkfj4mk7zuz4teukymt3wgpdpw6vpndeivtyd.onion:18333
7poqajl6svz4vr3aqi7vdtar2t56crbrtj6yi75ydrt3ighyx7q6qvyd.onion:18333
7zlqrihb5do5ebbmjwgspxigqfdmkfslkqtg2ngdc6ypsunzb4iootqd.onion:18333
aesy6tfufadkut6flu2bsqgnw2422ur2ynjalguxlzuzuktg3zehttqd.onion:18333
axaaplqtf4z22xfj2j2xn6fhtj6ksv74bs7vae6rfw67qofdnqoacbid.onion:18333
ayx35r2mhwydczzoqu7b6dl3sup4oht74sgnlrjkxybzh2hmfnaix3qd.onion:18333
bizdwmm7naqq5pehkbfggznqtena5eodz3kprvsbj4nkkax4fvxx53id.onion:18333
bjqttlyt5kxcn7sitpiavf2cuhdf6rlwigericlh7um7gzkqyyefqnqd.onion:18333
bkzo7mpxuar7rhsbiwdaxqcymixarcbdmb3sdaqtv6yb2svqttz2s6ad.onion:18333
d63vf45ta4chrewnruyvypm7ybfxtut327crtq6qfyrvcwx434rli5qd.onion:18333
devwork6shguhs6miygeq7qpyszu2lizeyop33sbrey7hk53jw26hnad.onion:18333
bzn63lsmsuvzlg4uqadyylxaggdcrzkb56muw2b43ft5qkynvzfopbyd.onion:18333
c7zrq2yqt6rtn5dxkczp5bv62k2jncv3mscoo24c24rljbplr2dvhsid.onion:18333
dskf46hfkefyr6nio5gtqp7em7rh6aqwrugdegfooaoxcux5ym6bkuqd.onion:18333
e7sseh62snwmipkyuv4mrhdbc5ew7ysyzv34fhjjgxuc6rdvj57vgnid.onion:18333
euvmh5f637qwqgktjs5zwauvayybfdkiopnflnh5yjt7ouqat3427pqd.onion:18333
f472j4pynbgltb63mr2lhyvhecfqdjdcfmr2s2id4rreemyn32xtjuid.onion:18333
fbimesnyhzubbzqc3uaufzkbyfmnkxvypoxaveaub7rzpzh2foxrn2yd.onion:18333
gggan3nuzxpd655lafnsunqfxgy56bvsxuuzucgmaowyvq3d7a7o7jad.onion:18333
gsw6sn27quwf6u3swgra6o7lrp5qau6kt3ymuyoxgkth6wntzm2bjwyd.onion:18333
guudgx24aokistytvm3hj7u5cbvdkr2b643r5t33pa536ekfn2lfykid.onion:18333
gwtx5qluopwaxjhedlifnr6pptw2eihojzhq3stnv2gfbvqbgqdhi5qd.onion:18333
gy6nih4pmp5esyvvnhlj6qvk7zkbjuoswkxffyiip3dbkvsfxwz5zcqd.onion:18333
hj2txlxajdlh7jsfwqxtp3cltlptsr33ctjkbxhbzbyirkmcpfhsnyad.onion:18333
hjwzovgwou3py6ncemgmzpvcihay5cuzuxvqdn74axndmll25p4mwjqd.onion:18333
hqkdgpzzsv2qvafhdkdocszquj7o2ittxfmm5fc2arxqw7ikottozoid.onion:18333
htkiqaqoql7pjstenmw6v4blm6l57d6hl6mewxkmfi3qumozflx3gzyd.onion:18333
hvbmmzvqrpgps2x5u4ip4ksf3e5m2fneac754gtnhjn2rsevni6cz3ad.onion:18333
hvtxymvdb55u7lhdw6775akqy46inunl3uup27gnsxm2bqmv55wbacqd.onion:18333
i5fjp7ggx62zlfkibzn7s6glpjp3h2ypfom3lmqixig7qbdgej35wfyd.onion:18333
i5gphw2d224tniqkjebxdwz5ygbbo5gcushoyevv7x7o454b6qlrzeid.onion:18333
iysx2dl4tpojiclh32iyhel6z7h227c7o7buzk5wuqw6qhuytvsu66yd.onion:18333
j53y5paeb7xcrptntut7epccjglduquldjlzjlho4lj2msabnygrljqd.onion:18333
jqos4drrg27j553syd4dfunajednqgz3w7y3cq2morckhc6ht7jm7aad.onion:18333
jsc4frvvnl2d3bhzyofsc72xpztgm23nl4fnb4dwkzsxr6fhij2q5iyd.onion:18333
jtvqgaccxbtzshtulk5xlsb4wkoil3psmpn5avqyp2i5vm4hqh5cicyd.onion:18333
jun6gdmbgasr57bhr4zs3dfhc6pzpaw27nqb4dadbai7yrbq55zskeid.onion:18333
lh3wfz2n7xe2muwdjrz5vgnjwjx7lc6iifojhr2rh53ojkwo5dr66uyd.onion:18333
kamanho5clcpn5l3sc6ih3vb4skmfhgxw3h2mgs7e5idfezu5dw5oxyd.onion:18333
kwjxlauwjtecjfsiwopbl5pvn5n6z5rz76uk6osmlurd3uyuymcw7aid.onion:18333
lka74booetkbmat2q64haawcytbwx7mnctvo63ww4jgi4yuqnl6p3kad.onion:18333
lwfecq35ocqjfbdq4h2qmcwl3cfcyiyycxtvrz36ihdbuczehi3bmrad.onion:18333
n23anw4zb7f3paroac626oc2sqy3yn5kjfpcqvb3lvdyx7dzzpovd3id.onion:18333
n4e6fp6xoyo2glsafjwbaq3wirhldpjw4mskn5lzkm4o5lhh5n5k7uqd.onion:18333
nmazvezejolohnbza4rmqrwvjcprhi7w22fqvlbxp5sw3c25xy3dunqd.onion:18333
nyrekcbm2ici6wv2umogtmwg7o2ivu4vm7bpcge5fayos5l377zldlqd.onion:18333
o3zwhskjvuzbti3su3kfspgmvwoiq5iqw4drgo6jv6ehv2zfoyyy5nqd.onion:18333
o4fnldblck6fmycg55lh77owlw7wihb7qltjibantj45ijhow73otdad.onion:18333
o4zdqfdoe4jfvn35twqtjkzmptmk3bsg45sp46wuxanceg3euqtwdjqd.onion:18333
pcbipn5yyvhsedfjjywrcep4b5z43px7duemxvs7e6tvanxgw46ux7ad.onion:18333
pj2rxq2sfbwtsqqcbnfnwkg36d72yce56qmp2sjjmb7hvzpzai3ndead.onion:18333
ohqcfz5kk6ufouxmhtq7nxyo2lyui4vjlhr2kftvra2ewgzxu3hsrxad.onion:18333
oobwtn5csi4auevb2ns2b5rrjnxmhlzdmay4zxtzvkj7tayrgwfddiqd.onion:18333
ppe2pepzphox3swftj5lbyi7ckigspbih5qnyuhrb3r6bn3g7k7bp4qd.onion:18333
pqkhkpkvqmjcql5jccyxg5nahow6vixnjrvtsc6clnk7dab4weknvpqd.onion:18333
q5qox756id5nfdu6ht4dghc35jezls4bgjcdnrds3pwndvdx32zmwlad.onion:18333
qiep4hvuovedbbc36hl7nwslwi6ah6uw4nnseyjdtc73cc5rfdauvnad.onion:18333
qzx5f2ig2rk2ssrbopz2zlljq5mkeh3izhhx3t3cepse5qnhvpo2tzid.onion:18333
rfi2hdpjhhknalltbwdvyuhskh5yjs66rqzpy6ley7xtu4kvbeob6fqd.onion:18333
rw6reu6rdetz6rnpzoyn2hfy7sxpbja4v5ktmaicqqgszi2eata5lhqd.onion:18333
s3bxrurro4bmvsmntw74qf4vw3xl25xtnvqegayvlwj3b6t7d76kkwid.onion:18333
slpigm5ep4zan3a65bybne67phjiyesbuk5s3bodefuhnx2cfdtit6qd.onion:18333
sxm6kwrdp6f2ggaozhrl47xuy3es3sgm3ivppmh4xm3hfmetvwbyrcad.onion:18333
syzdz6dzc5grlcnhbsbhye27i7dllgozqm3ocpyr6g3ynfrcf4ngzdqd.onion:18333
t6hfkkujktjyzpepmphskoaivflu6fieyuxrshxfzwriwvoa2uccvvqd.onion:18333
ueyykmnyqk2bnmbgvmqrb4jfbjvpgeew6cuq4gaqe7v2oiyxaubkx4qd.onion:18333
urhagmjceyqbzhjitpa7j7mygivxw3wlwqzkibw6zezrxeantkikgcyd.onion:18333
vctlwaqgmu53eutz2hewuakcipfgtyljsd7czut4dd62xr3rp6fqezad.onion:18333
vi3z4khdvopuiljdjdhpetnxztuzsct2aacuzcm5ba27h4j3cfwsvjad.onion:18333
vqnkdmpmecc5kondj32jwbemmruhmd5gkmfngkscetibzozryp4elkad.onion:18333
wgc4wp25gtnb54vd7x5h2xtetzrdoiizeyyh6fv3vxzp3bbalejbd3ad.onion:18333
wpsahjbejxehpz772kzxonj777pejol2akcicduqov2r7ktm2b6l5pid.onion:18333
wqx56diehvnwca6mndqw3omsufbiem3o6lwivauiilxfx5iqsv7emfad.onion:18333
wui5m2y5b7cms36ai6shzyqsg6qteejwmxsf26nyms6vcykxbvmh4uad.onion:18333
xlx7k5qzawdld5xcfd5lhhasp5tiklc2z326lamcnkmoru56jv6os6ad.onion:18333
xafcyh6mxwebvcsgw4wcbuw7n4v7vbqhcznhwqcpqcu6dww2mjuw4nad.onion:18333
y5h652jz6sgmb4bkcfnfxnj24gnczqf7lhd5lqbvdhf5mpll4gye5kid.onion:18333
ya6s7ov7myixz3ql23u45hty7moxo3r4d26qainw55z656vtau676xid.onion:18333
yda7kwpii33j2qpq32ftf6lp22znknswipjwaccvsqj7l337jvfesnid.onion:18333
zcsn3j6aswnrf56xj2n5jn4tlwmyoq4benjn5ujcgz46co2y5tm642id.onion:18333
zefnna2a3ga4ez2nutvypma7my35prw3ycinbqwva7v4pf3aurqhjcyd.onion:18333
zhiju2obxifqpjbcm6xtlgjdbof7jhoctvw3x57vhiftstb5hi3gmsqd.onion:18333
zkqddzui5pkrqvjj2zwsf5kln7stlbmw5pmn6ut46fobvzyv2sn2ryid.onion:18333
zmvizz7fd5hdue6wt3lwqumd6qwt4ijymmmotfzh75curq3mzjm53hyd.onion:18333
zmxlrzoxg4fmso6l2xuq5tdxmlyakdqellzujh3a23iuzg4zlatnogqd.onion:18333
zsmxmusdzrcqusk5h6syfq6a3ph6lwx3wpiltun4dmkrt3pa2fp7qaid.onion:18333

View File

@@ -1,62 +1,59 @@
[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:48333
[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:48333
[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:48333
[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:48333
7rn2pojst5aurdaes2qcwiigis55ewzjjhxfbxnua5calwuigxdq.b32.i2p:0
a7jpzmbtvn5qgvnxez2zc4nvabso4xmllbrqmuoavxz537ttbdtq.b32.i2p:0
augssnqnvo2w66vbrfzctc5rnhaxe3io7wnkvr5xp6wwkxmrggra.b32.i2p:0
axxwcwzqlw42hjbpzupvffvdsjvniyt5apyt53sdxijqy6y6pdha.b32.i2p:0
czbg4pgsrf2ejx2mid6ena24llz5oroofjgn5u4a622msvjjz4ha.b32.i2p:0
indhyuh2tatbvv4zxs3qnyrs6vtf7ddh46y5iciu2ypqsvmwoioa.b32.i2p:0
twpez6qpht47bclczgwkumtjcxfaa35alqutrck36ajs6zwewgpq.b32.i2p:0
nl2qej33ywfqllz3exxce5jxmz35cnovhh6qobwvfc7igm2vdz2q.b32.i2p:0
q376dmbdqpt4qgwf6za2ai7c4fs3va5tdmtb3ag6awk6wnv4mqcq.b32.i2p:0
rdpe5wgl565yvgeialkhlf53akawdm7npy6bl7asl2ncntoyn7la.b32.i2p:0
2.59.134.244:48333 # AS58212
3.235.188.91:48333 # AS14618
3.250.145.197:48333 # AS16509
5.182.4.106:48333 # AS49505
18.189.156.102:48333 # AS16509
31.57.46.104:48333 # AS56971
35.201.167.154:48333 # AS396982
38.102.86.40:48333 # AS26832
38.111.111.224:48333 # AS399275
38.121.43.211:48333 # AS63023
45.41.204.15:48333 # AS32181
45.41.204.28:48333 # AS32181
18.175.220.215:48333 # AS8987
18.189.156.102:48333 # AS8987
34.232.31.111:48333 # AS14618
38.242.219.220:48333 # AS51167
45.94.168.5:48333 # AS400810
50.19.171.211:48333 # AS16509
51.158.61.33:48333 # AS12876
62.164.218.78:48333 # AS51167
69.26.129.172:48333 # AS23316
74.48.195.218:48333 # AS35916
74.133.9.162:48333 # AS10796
80.253.94.252:48333 # AS13030
45.142.17.140:48333 # AS206238
50.126.96.22:48333 # AS27017
51.79.29.216:48333 # AS16276
51.81.245.218:48333 # AS16276
54.78.90.72:48333 # AS16509
65.108.39.171:48333 # AS24940
66.94.123.141:48333 # AS40021
77.247.127.71:48333 # AS62240
78.24.181.215:48333 # AS49505
82.67.102.15:48333 # AS12322
89.166.29.73:48333 # AS16086
94.183.188.204:48333 # AS56971
95.141.35.117:48333 # AS31034
89.117.152.94:48333 # AS46475
103.99.168.207:48333 # AS54415
103.99.171.212:48333 # AS54415
103.165.192.207:48333 # AS142052
103.165.192.208:48333 # AS142052
103.232.248.31:48333 # AS9507
104.194.153.147:48333 # AS14956
104.237.131.138:48333 # AS63949
107.189.25.136:48333 # AS14956
108.171.193.104:48333 # AS18450
109.123.236.96:48333 # AS141995
103.99.168.211:48333 # AS54415
103.165.192.203:48333 # AS142052
103.165.192.206:48333 # AS142052
134.195.88.56:48333 # AS63473
135.180.99.74:48333 # AS1299
144.76.2.169:48333 # AS24940
138.197.188.212:48333 # AS14061
148.51.196.40:48333 # AS12025
158.220.90.103:48333 # AS51167
165.227.226.132:48333 # AS14061
168.119.11.220:48333 # AS24940
172.86.95.71:48333 # AS30823
172.93.167.68:48333 # AS32489
172.93.167.89:48333 # AS32489
181.174.164.74:48333 # AS52469
168.119.150.247:48333 # AS24940
172.234.197.251:48333 # AS63949
175.45.182.145:48333 # AS133159
185.232.70.226:48333 # AS197540
185.254.97.76:48333 # AS58212
192.145.44.30:48333 # AS197540
192.241.131.95:48333 # AS14061
193.107.109.220:48333 # AS214379
199.119.138.36:48333 # AS216382
199.195.248.11:48333 # AS53667
203.132.94.196:48333 # AS38195
208.68.4.71:48333 # AS397444
217.31.57.128:48333 # AS29134
222.66.94.2:48333 # AS4812
[2001:1ab0:7e1e:d150:be24:11ff:fe03:6b30]:48333 # AS29134
[2001:5a8:4164:7a00::1f8]:48333 # AS1299
[2001:bc8:1201:409:1618:77ff:fe5f:b12]:48333 # AS12876
209.146.51.202:48333 # AS174
209.146.51.203:48333 # AS174
[2001:41d0:a:555c::1]:48333 # AS16276
[2001:5a8:4164:7a00::506]:48333 # AS7065
[2001:df6:7280::92:202]:48333 # AS142052
[2001:df6:7280::92:203]:48333 # AS142052
[2001:df6:7280::92:204]:48333 # AS142052
@@ -67,98 +64,88 @@ twpez6qpht47bclczgwkumtjcxfaa35alqutrck36ajs6zwewgpq.b32.i2p:0
[2001:df6:7280::92:210]:48333 # AS142052
[2001:df6:7280::92:211]:48333 # AS142052
[2001:df6:7280::92:212]:48333 # AS142052
[2401:b140:2::92:207]:48333 # AS54415
[2401:b140:2::92:208]:48333 # AS54415
[2401:b140:2::92:211]:48333 # AS54415
[2401:b140:2::92:212]:48333 # AS54415
[2401:b140:4::92:203]:48333 # AS54415
[2401:b140:4::92:202]:48333 # AS54415
[2401:b140:4::92:204]:48333 # AS54415
[2401:b140:4::92:205]:48333 # AS54415
[2401:b140:4::92:206]:48333 # AS54415
[2401:b140:4::92:207]:48333 # AS54415
[2401:b140:4::92:208]:48333 # AS54415
[2401:b140:4::92:209]:48333 # AS54415
[2401:b140:4::92:210]:48333 # AS54415
[2401:b140:4::92:211]:48333 # AS54415
[2401:b140:4::92:212]:48333 # AS54415
[2401:b140::92:201]:48333 # AS54415
[2401:b140::92:204]:48333 # AS54415
[2401:d002:3902:700:a038:c772:884b:8a70]:48333 # AS38195
[2405:e480:2:1a::2]:48333 # AS9507
[2408:8214:a00:455:20c:29ff:fe72:37e1]:48333 # AS4837
[2405:1204:c235:9700:605f:5035:d51b:b05b]:48333 # AS9824
[2405:1204:c235:9700:9141:402c:de91:81c0]:48333 # AS9824
[2405:1204:c235:9700::6c]:48333 # AS9824
[2600:3c00::f03c:91ff:fe5b:4cf3]:48333 # AS63949
[2602:fa59:5:663::1]:48333 # AS14956
[2602:fa59:7:263::1]:48333 # AS14956
[2602:fa59:8:347::1]:48333 # AS14956
[2602:fea7:e0d:1004:8a7e:c3ed:b5eb:1]:48333 # AS32181
[2602:fea7:e0d:1004:ecee:b8fa:c275:1]:48333 # AS32181
[2606:6080:2001:1042::a]:48333 # AS32489
[2606:6080:2001:1052::a]:48333 # AS32489
[2607:f2d8:6065:1060::a]:48333 # AS18450
[2602:ffb6:4:8185:f816:3eff:fe4a:acbf]:48333 # AS174
[2602:ffb6:4:8185:f816:3eff:fe4d:6dae]:48333 # AS174
[2602:ffb6:4:8185:f816:3eff:fe50:b078]:48333 # AS174
[2602:ffb6:4:8185:f816:3eff:fe8a:3155]:48333 # AS174
[2604:2dc0:200:13da::]:48333 # AS16276
[2605:3380:422e:1::50]:48333 # AS397444
[2605:a141:2240:4224::1]:48333 # AS51167
[2607:5300:205:300::1b0]:48333 # AS16276
[2607:5300:60:7f72::1]:48333 # AS16276
[2620:6e:a0a0:1::71]:48333 # AS397444
[2a01:4f8:13a:684::2]:48333 # AS24940
[2a01:4f8:172:33c1::2]:48333 # AS24940
[2a01:4f8:190:72a4::2]:48333 # AS24940
[2a01:4f8:2190:1692::2]:48333 # AS24940
[2a01:4f8:242:4246::2]:48333 # AS24940
[2a01:4f8:262:139f::2]:48333 # AS24940
[2a01:4f9:3080:3496::2]:48333 # AS24940
[2a01:e0a:e6e:6bb0:2e0:4cff:fe68:232]:48333 # AS12322
[2a02:29e0:1:420::64]:48333 # AS49367
[2a02:c202:2234:7688::1]:48333 # AS51167
[2a13:7c00:5:28:f816:3eff:feea:ca56]:48333 # AS56971
[2a13:7c00:6:39:f816:3eff:fed7:c364]:48333 # AS56971
[2a13:7c00:7:1:f816:3eff:fe41:7b9a]:48333 # AS56971
2iud7iei7uzcp33dlchzmdtvpgmkhxtimshvg7hyzgzdkcxuakvutlyd.onion:48333
[2a03:4000:42:22f:816:bbff:fe4c:d4a1]:48333 # AS197540
[2a0a:8dc0:a000:40::2]:48333 # AS62240
[2a0a:8dc0:a041::a]:48333 # AS62240
[2a0c:b641:6f1:8c::2]:48333 # AS214379
2sltzrq7ts5t4il5nimp75og2jksbwdjmgbdykz5ljeoqrxemzlakeyd.onion:48333
33ffm6iijgivx7xyg75isr5cd2thsqsx7c5hwab5pu3u774uwuipsdqd.onion:48333
3y5hxpsoe5aywwhghzvim5xsmi7nfnd6ui3x4dzveeaci4xvlo4jdiid.onion:48333
4uzerod2wrqtjuaea6vr43uddq2sg3cgfuk4khqotqsqdsxpwdmcphqd.onion:48333
57k43lgf2ciorl7gfz6qu3yo27zdkojd7lbzrwzcbksq3uujts5h6uid.onion:48333
5fkz5ijh76cgfwvxz4pyl4br4hekqflijz7d467ldey3xme2trqrgjad.onion:48333
5p6eqvrins6vj7q3tpdljhtomu6nqameilbuz5sjnu2i333ve2zpnhqd.onion:48333
5rh3ln6ypycmn57qlmke3dliffg2id3ziz4dhsujng4tk34oklnbqtyd.onion:48333
5sdzs2qu3ygb44jwo45y2kmbnqc6ijzpndaqn43zgngsiwq7mx6b7yyd.onion:48333
5wpcussznj2dg5222zrtfdsx5ttco6xlv7447azzaaywu2t5xukqcaqd.onion:48333
6g6dwtby74ic2ggnzkbfqy7saslopho7or6z4uad737c2tq24fj3ltyd.onion:48333
6po3e27t4nxgls3mwnostpy47crhtc3ae6fcsn4yyfh5dfcaq3q3q3yd.onion:48333
7gcsfynynr26cya4uf2u74bx47jmzaidikh6lqo7nu5uwy7bra3roqyd.onion:48333
7jd422hqevrz334ax3fh77wzww7clnr4kpyos25oe64nifg623bjqfqd.onion:48333
7kwh7rg3a4e5lgjvybesixzhwzxvf6dqo3gc4h7k5vilwmdjvtzidtid.onion:48333
7m3tui2fffodjzc3ivgziwuj6d6eyhnufec5b7xat2ynom62i6slapid.onion:48333
a3aej552sklp5nhrosr5wv7qylgkmnu5u7zh7se56vtllvhgctzkbjqd.onion:48333
7slxjz7hmpu6rpybl62egedth5c4zo6mwzm4sdbvqtwc5zikvx4e53id.onion:48333
7xr2k6gg47calskl3emvqav42jf6l4dtgiwevy2vx7gej6d2osh4oiyd.onion:48333
a6yijgwn4vtmmhl7uybtbuyvtl7mtj7arld5f4csqsx4syeii4gt3vqd.onion:48333
aqabn424rm7qq5faw2ecckkzxfdw57oncivjrurrrn5wgjdqjqxvxjad.onion:48333
azccjliswzu5aycse7g7zu2bw3mqicd2mhszczitp332scjgltehrjqd.onion:48333
cldn5rnbnfzngcww4ugqihh5pwkd4c2iawlvi5jhkw6jx3c6zauolgqd.onion:48333
c2u7kz2pv7vyufovwndoureyqijbd7kwpy7anulf4fxt3d3buf2yk2yd.onion:48333
clqr2to2r6fn4jo6f7xy3dppxgn4ewvnmwbxsdrrhnesyacmw5noaeqd.onion:48333
d7ukdifqls72zy543axxf56nx3p7xhgisjquc2glfx45zvf6n7rprnid.onion:48333
dnshzxr6osjf2l5gjsbattjtoefgkzmd3p3fdyatr5ltz243zspsilyd.onion:48333
ebhtfcmjhilcqtuls437pxu65dznqkpt5qv3yeq6zipnqd7ichz5htyd.onion:48333
ek6idnf43vwzcjlsgd544cd6up3qqquoycd3itos2lgytkn5woqh62ad.onion:48333
ej4ozb3o5pzvvtvgaars5obzwvhrfs3chkmvb5pxmedykd4bgh6cpgyd.onion:48333
ezbq3ydfxmgvgbbn7mrx5jzyig6tz2zjkaqdtkx7avnijrt5riv4j5yd.onion:48333
fsijrllgzgeg4pa5ebq4qy3swmplxkzvuvji5swt36quy42dznq3t3ad.onion:48333
fvbppnodd4dlxulzlvhikg2ijtnxemcjjpfhcg2rropun45aqhp5noid.onion:48333
fwsrcrhnggi3qy5rsfiad3cwep3bf7uovcupgockbntjcfvoqxzr75id.onion:48333
gc66muikqqzxwj2tdvvap6gpcbitthjvscawgkclim4vgmajrccjtmqd.onion:48333
gujxforhwszry5falvnarfcyajjxxsuvqevx6gk6meou5ordrxw3mdad.onion:48333
havkohvjhg5tglbdecf4ufhz5es3f33ctj3b6loebj4pi6qrtjemfbyd.onion:48333
htqyij4cmtpxxmynxxarhvtt22zcj3xcmit6iop4inj267yh7nousyyd.onion:48333
hb44egze5hjbi3n2rc6w4pwahr6zltc4ilfzin3kkdi2rmozvxlo65qd.onion:48333
i22efh4itlcfthvaavcz2rvigu4x6jqvlwuksz44bukslhg76bsgrxqd.onion:48333
i63l2yfy5e4kvm5c6la67qxpq6zn4xbdx6cdm474milv4dameu3z35qd.onion:48333
irwyrdkcrcdgwtsltcrqexqylwc3ezjhhra7u4i3gkwktezcut36buqd.onion:48333
jfyjcgithmk6fmndgg5kljttu5ctlokcvqjvsrxrxvnevhwx57xhpsqd.onion:48333
jspxdo33gyrh3tewi55mn2fo5spczzgipq6ao7fa5qu6fj2ezr7bizid.onion:48333
kf6q2wza2ebo7cxln5ejcjjwvrew4vb2hf4vd5wo4nyzbnjv3yccduqd.onion:48333
ko55e2ityiaqeckthmnnbcv6bbwll7rtdiv527muoqdpg4hye2it2pyd.onion:48333
mavvwxts5f3axuz4cyjqpz75veijkdkdueavekb5hia67zk257eg7tqd.onion:48333
mdiwdijucocysdvx5dk2iyo5wsav3ehyiggegzfk3ezfcce6nstp4nid.onion:48333
nbq63hx63psrcqv26uadmcxkeap76un2xaombe4ivojkt3ysbgountid.onion:48333
ns56enpcbigc2dovrj3agdbgudebmwtg43d27wtpvm5nwomectn2kmad.onion:48333
ol5rcztxxugtup5mswhkt6hdf4pvcidimy3du6owufnja5lr3czk2zyd.onion:48333
prilx36yi6wiz4ll77tapskzwzh5onphrnn6w5d56zrzdat4kjo3q3yd.onion:48333
qhzfac4qvomln4ikp6xgfwgb2koxdgjsbeut3iplvsu5o33yf4ewf2ad.onion:48333
qmd5qvyhnanqj6wyf4klrvfqoypuz6xjajhx2n272vr5il7nlwyoosqd.onion:48333
qmw73e4zh2i6pvmlgx5642vwtynibghgvjdoox574hjxxv7fvd2oxyid.onion:48333
rb2ekvp77t4hhhipt7dfuriwges4efybffrb5qurk3xrokgo5or5z2yd.onion:48333
rah46hr3opyfbikrkub6g23idrml2ugmealjt4bcxlj6nonoxdqp4jqd.onion:48333
riyvgzynuzj2vx2az6a7kvca5bythmj6rgb4asrecdw6vfmvt33uxqid.onion:48333
rv7l5gtjqr5n5nlersakfuzwhfflyfizv5cmtiizlsn544qumvuekwqd.onion:48333
vfqxysj7olxstghkohezoembjnsyvpp2ph7kc4jaatvszyx2ajz627ad.onion:48333
vizb74h32bx3u6zksgsi6seq6hcqdhok5pd4z2x5yj3ll72tu7pcu7id.onion:48333
we5rsalvz6fhp3345jydracg6wytxw5smsxzgusljvgcojadyfv2bzyd.onion:48333
wkvaxtftpwmmvrptqavx6mwhrcwiecbodtshuenvot3cjgxsycuurcid.onion:48333
x66at4pel4ody42wujl4upr2tbulbpn54nzvrk7gomzv4dwkhazfjdqd.onion:48333
yiolb6ahgjry66g3vt4dtlnybhdgy4udakakbjxuekj33ligd57mdlqd.onion:48333
zdh7vrzykdv7474yioe5jiv3kgajky727t5phxsbt47lefjseo3ypaqd.onion:48333
zjttaesjhj7ail437ag4emdufr775h5rtgoohlbca5rwc4re6dr5k7ad.onion:48333
zmd4eq6svwn3qgm56dyodktagzi3xo4smxebgjdk2jbjkbmvn7gjm5qd.onion:48333
zu3gjmendiuoogirxm6udfpympmchh2lxl3aeifzu7ahyuas3pzkgzid.onion:48333

View File

@@ -80,4 +80,3 @@ These steps can instead be done explicitly:
This is intended to allow you to replace part of the pipeline for further experimentation (eg, to sign the block with a hardware wallet).
For custom signets with a trivial challenge such as `OP_TRUE` and `OP_2` the walletprocesspsbt step can be skipped.

View File

@@ -152,7 +152,7 @@ if res:
elif res.status_code == 404:
print('The specified faucet URL does not exist. Please check for any server issues/typo.')
elif res.status_code == 429:
print('The script does not allow for repeated transactions as the global faucet is rate-limited to 1 request/IP/day. You can access the faucet website to get more coins manually')
print('The script does not allow for repeated transactions as the global faucet is rate-limitied to 1 request/IP/day. You can access the faucet website to get more coins manually')
else:
print(f'Returned Error Code {res.status_code}\n{res.text}\n')
print('Please check the provided arguments for their validity and/or any possible typo.')

View File

@@ -9,7 +9,7 @@ import logging
import math
import os
import re
import shlex
import struct
import sys
import time
import subprocess
@@ -18,8 +18,8 @@ PATH_BASE_CONTRIB_SIGNET = os.path.abspath(os.path.dirname(os.path.realpath(__fi
PATH_BASE_TEST_FUNCTIONAL = os.path.abspath(os.path.join(PATH_BASE_CONTRIB_SIGNET, "..", "..", "test", "functional"))
sys.path.insert(0, PATH_BASE_TEST_FUNCTIONAL)
from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height, SIGNET_HEADER # noqa: E402
from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex, MAX_SEQUENCE_NONFINAL # noqa: E402
from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height # noqa: E402
from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex # noqa: E402
from test_framework.psbt import PSBT, PSBTMap, PSBT_GLOBAL_UNSIGNED_TX, PSBT_IN_FINAL_SCRIPTSIG, PSBT_IN_FINAL_SCRIPTWITNESS, PSBT_IN_NON_WITNESS_UTXO, PSBT_IN_SIGHASH_TYPE # noqa: E402
from test_framework.script import CScript, CScriptOp # noqa: E402
@@ -28,6 +28,7 @@ logging.basicConfig(
level=logging.INFO,
datefmt='%Y-%m-%d %H:%M:%S')
SIGNET_HEADER = b"\xec\xc7\xda\xa2"
PSBT_SIGNET_BLOCK = b"\xfc\x06signetb" # proprietary PSBT global field holding the block being signed
RE_MULTIMINER = re.compile(r"^(\d+)(-(\d+))?/(\d+)$")
@@ -40,7 +41,8 @@ def signet_txs(block, challenge):
txs[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER)
hashes = []
for tx in txs:
hashes.append(ser_uint256(tx.txid_int))
tx.rehash()
hashes.append(ser_uint256(tx.sha256))
mroot = block.get_merkle_root(hashes)
sd = b""
@@ -54,59 +56,56 @@ def signet_txs(block, challenge):
to_spend.nLockTime = 0
to_spend.vin = [CTxIn(COutPoint(0, 0xFFFFFFFF), b"\x00" + CScriptOp.encode_op_pushdata(sd), 0)]
to_spend.vout = [CTxOut(0, challenge)]
to_spend.rehash()
spend = CTransaction()
spend.version = 0
spend.nLockTime = 0
spend.vin = [CTxIn(COutPoint(to_spend.txid_int, 0), b"", 0)]
spend.vin = [CTxIn(COutPoint(to_spend.sha256, 0), b"", 0)]
spend.vout = [CTxOut(0, b"\x6a")]
return spend, to_spend
def decode_challenge_psbt(b64psbt):
def decode_psbt(b64psbt):
psbt = PSBT.from_base64(b64psbt)
assert len(psbt.tx.vin) == 1
assert len(psbt.tx.vout) == 1
assert PSBT_SIGNET_BLOCK in psbt.g.map
return psbt
def get_block_from_psbt(psbt):
return from_binary(CBlock, psbt.g.map[PSBT_SIGNET_BLOCK])
def get_solution_from_psbt(psbt, emptyok=False):
scriptSig = psbt.i[0].map.get(PSBT_IN_FINAL_SCRIPTSIG, b"")
scriptWitness = psbt.i[0].map.get(PSBT_IN_FINAL_SCRIPTWITNESS, b"\x00")
if emptyok and len(scriptSig) == 0 and scriptWitness == b"\x00":
return None
return ser_string(scriptSig) + scriptWitness
return from_binary(CBlock, psbt.g.map[PSBT_SIGNET_BLOCK]), ser_string(scriptSig) + scriptWitness
def finish_block(block, signet_solution, grind_cmd):
if signet_solution is None:
pass # Don't need to add a signet commitment if there's no signet signature needed
else:
block.vtx[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER + signet_solution)
block.hashMerkleRoot = block.calc_merkle_root()
block.vtx[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER + signet_solution)
block.vtx[0].rehash()
block.hashMerkleRoot = block.calc_merkle_root()
if grind_cmd is None:
block.solve()
else:
headhex = CBlockHeader.serialize(block).hex()
cmd = shlex.split(grind_cmd) + [headhex]
cmd = grind_cmd.split(" ") + [headhex]
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
newhead = from_hex(CBlockHeader(), newheadhex.decode('utf8'))
block.nNonce = newhead.nNonce
block.rehash()
return block
def new_block(tmpl, reward_spk, *, blocktime=None, poolid=None):
def generate_psbt(tmpl, reward_spk, *, blocktime=None, poolid=None):
signet_spk = tmpl["signet_challenge"]
signet_spk_bin = bytes.fromhex(signet_spk)
scriptSig = script_BIP34_coinbase_height(tmpl["height"])
if poolid is not None:
scriptSig = CScript(b"" + scriptSig + CScriptOp.encode_op_pushdata(poolid))
cbtx = CTransaction()
cbtx.nLockTime = tmpl["height"] - 1
cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), scriptSig, MAX_SEQUENCE_NONFINAL)]
cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), scriptSig, 0xffffffff)]
cbtx.vout = [CTxOut(tmpl["coinbasevalue"], reward_spk)]
cbtx.vin[0].nSequence = 2**32-2
cbtx.rehash()
block = CBlock()
block.nVersion = tmpl["version"]
@@ -125,13 +124,8 @@ def new_block(tmpl, reward_spk, *, blocktime=None, poolid=None):
block.vtx[0].wit.vtxinwit = [cbwit]
block.vtx[0].vout.append(CTxOut(0, bytes(get_witness_script(witroot, witnonce))))
block.hashMerkleRoot = block.calc_merkle_root()
return block
def generate_psbt(block, signet_spk):
signet_spk_bin = bytes.fromhex(signet_spk)
signme, spendme = signet_txs(block, signet_spk_bin)
psbt = PSBT()
psbt.g = PSBTMap( {PSBT_GLOBAL_UNSIGNED_TX: signme.serialize(),
PSBT_SIGNET_BLOCK: block.serialize()
@@ -180,16 +174,12 @@ def get_reward_addr_spk(args, height):
def do_genpsbt(args):
poolid = get_poolid(args)
tmpl = json.load(sys.stdin)
signet_spk = tmpl["signet_challenge"]
_, reward_spk = get_reward_addr_spk(args, tmpl["height"])
block = new_block(tmpl, reward_spk, poolid=poolid)
psbt = generate_psbt(block, signet_spk)
psbt = generate_psbt(tmpl, reward_spk, poolid=poolid)
print(psbt)
def do_solvepsbt(args):
psbt = decode_challenge_psbt(sys.stdin.read())
block = get_block_from_psbt(psbt)
signet_solution = get_solution_from_psbt(psbt, emptyok=True)
block, signet_solution = decode_psbt(sys.stdin.read())
block = finish_block(block, signet_solution, args.grind_cmd)
print(block.serialize().hex())
@@ -232,21 +222,6 @@ def seconds_to_hms(s):
out = "-" + out
return out
def trivial_challenge(spkhex):
"""
BIP325 allows omitting the signet commitment when scriptSig and
scriptWitness are both empty. This is the case for trivial
challenges such as OP_TRUE or a single data push.
"""
spk = bytes.fromhex(spkhex)
if len(spk) == 1 and 0x51 <= spk[0] <= 0x60:
# OP_TRUE/OP_1...OP_16
return True
elif 2 <= len(spk) <= 76 and spk[0] + 1 == len(spk):
# Single fixed push of 1-75 bytes
return True
return False
class Generate:
INTERVAL = 600.0*2016/2015 # 10 minutes, adjusted for the off-by-one bug
@@ -347,22 +322,14 @@ class Generate:
return tmpl
def mine(self, bcli, grind_cmd, tmpl, reward_spk):
block = new_block(tmpl, reward_spk, blocktime=self.mine_time, poolid=self.poolid)
signet_spk = tmpl["signet_challenge"]
if trivial_challenge(signet_spk):
signet_solution = None
else:
psbt = generate_psbt(block, signet_spk)
input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8')
psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream))
if not psbt_signed.get("complete",False):
logging.debug("Generated PSBT: %s" % (psbt,))
sys.stderr.write("PSBT signing failed\n")
return None
psbt = decode_challenge_psbt(psbt_signed["psbt"])
signet_solution = get_solution_from_psbt(psbt)
psbt = generate_psbt(tmpl, reward_spk, blocktime=self.mine_time, poolid=self.poolid)
input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8')
psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream))
if not psbt_signed.get("complete",False):
logging.debug("Generated PSBT: %s" % (psbt,))
sys.stderr.write("PSBT signing failed\n")
return None
block, signet_solution = decode_psbt(psbt_signed["psbt"])
return finish_block(block, signet_solution, grind_cmd)
def do_generate(args):
@@ -481,15 +448,15 @@ def do_generate(args):
# report
bstr = "block" if gen.is_mine else "backup block"
next_delta = gen.next_block_delta(block.nBits, block.hash_hex)
next_delta = gen.next_block_delta(block.nBits, block.hash)
next_delta += block.nTime - time.time()
next_is_mine = gen.next_block_is_mine(block.hash_hex)
next_is_mine = gen.next_block_is_mine(block.hash)
logging.debug("Block hash %s payout to %s", block.hash_hex, reward_addr)
logging.debug("Block hash %s payout to %s", block.hash, reward_addr)
logging.info("Mined %s at height %d; next in %s (%s)", bstr, tmpl["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup"))
if r != "":
logging.warning("submitblock returned %s for height %d hash %s", r, tmpl["height"], block.hash_hex)
lastheader = block.hash_hex
logging.warning("submitblock returned %s for height %d hash %s", r, tmpl["height"], block.hash)
lastheader = block.hash
def do_calibrate(args):
if args.nbits is not None and args.seconds is not None:
@@ -512,7 +479,7 @@ def do_calibrate(args):
header.nTime = i
header.nNonce = 0
headhex = header.serialize().hex()
cmd = shlex.split(args.grind_cmd) + [headhex]
cmd = args.grind_cmd.split(" ") + [headhex]
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
avg = (time.time() - start) * 1.0 / TRIALS
@@ -582,7 +549,7 @@ def main():
args = parser.parse_args(sys.argv[1:])
args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(shlex.split(args.cli), list(a), input=input, **kwargs)
args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(args.cli.split(" "), list(a), input=input, **kwargs)
if hasattr(args, "address") and hasattr(args, "descriptor"):
args.derived_addresses = {}

View File

@@ -17,9 +17,9 @@ from bcc import BPF, USDT
PROGRAM = """
# include <uapi/linux/ptrace.h>
// The longest rejection reason is 114 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by
// strprintf("block-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError()))
#define MAX_REJECT_REASON_LENGTH 114
// The longest rejection reason is 118 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by
// strprintf("mandatory-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError()))
#define MAX_REJECT_REASON_LENGTH 118
// The longest string returned by RemovalReasonToString() is 'sizelimit'
#define MAX_REMOVAL_REASON_LENGTH 9
#define HASH_LENGTH 32

View File

@@ -179,7 +179,7 @@ def loop(screen, bpf, peers):
info_panel = panel.new_panel(win)
info_panel.hide()
ROWS_AVAILABLE_FOR_LIST = curses.LINES - 5
ROWS_AVALIABLE_FOR_LIST = curses.LINES - 5
scroll = 0
while True:
@@ -191,7 +191,7 @@ def loop(screen, bpf, peers):
if (ch == curses.KEY_DOWN or ch == ord("j")) and cur_list_pos < len(
peers.keys()) -1 and info_panel.hidden():
cur_list_pos += 1
if cur_list_pos >= ROWS_AVAILABLE_FOR_LIST:
if cur_list_pos >= ROWS_AVALIABLE_FOR_LIST:
scroll += 1
if (ch == curses.KEY_UP or ch == ord("k")) and cur_list_pos > 0 and info_panel.hidden():
cur_list_pos -= 1
@@ -203,14 +203,14 @@ def loop(screen, bpf, peers):
else:
info_panel.hide()
screen.erase()
render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel)
render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel)
curses.panel.update_panels()
screen.refresh()
except KeyboardInterrupt:
exit()
def render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel):
def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel):
""" renders the list of peers and details panel
This code is unrelated to USDT, BCC and BPF.
@@ -223,7 +223,7 @@ def render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_pa
1, 0, (" Navigate with UP/DOWN or J/K and select a peer with ENTER or SPACE to see individual P2P messages"), curses.A_NORMAL)
screen.addstr(3, 0,
header_format % ("PEER", "OUTBOUND", "INBOUND", "TYPE", "ADDR"), curses.A_BOLD | curses.A_UNDERLINE)
peer_list = sorted(peers.keys())[scroll:ROWS_AVAILABLE_FOR_LIST+scroll]
peer_list = sorted(peers.keys())[scroll:ROWS_AVALIABLE_FOR_LIST+scroll]
for i, peer_id in enumerate(peer_list):
peer = peers[peer_id]
screen.addstr(i + 4, 0,

View File

@@ -12,14 +12,47 @@
# --error-limit=no build/bin/test_bitcoin
#
# Note that suppressions may depend on OS and/or library versions.
# Tested on aarch64 and x86_64 with Ubuntu Noble system libs, using clang-16
# and GCC, without gui.
# Tested on:
# * aarch64 (Ubuntu Noble system libs, clang, without gui)
# * x86_64 (Ubuntu Noble system libs, clang, without gui)
{
Suppress libdb warning - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662917
Memcheck:Cond
obj:*/libdb_cxx-*.so
fun:__log_put
}
{
Suppress libdb warning
Memcheck:Param
pwrite64(buf)
fun:pwrite
fun:__os_io
}
{
Suppress libdb warning
Memcheck:Cond
fun:__log_putr.isra.1
}
{
Suppress libdb warning
Memcheck:Param
pwrite64(buf)
...
obj:*/libdb_cxx-*.so
}
{
Suppress uninitialized bytes warning in compat code
Memcheck:Param
ioctl(TCSET{S,SW,SF})
fun:tcsetattr
}
{
Suppress libdb warning
Memcheck:Leak
fun:malloc
...
obj:*/libdb_cxx-*.so
}
{
Suppress leaks on shutdown
Memcheck:Leak

View File

@@ -7,7 +7,7 @@
ZMQ example using python3's asyncio
Bitcoin should be started with the command line arguments:
bitcoind -testnet4 -daemon \
bitcoind -testnet -daemon \
-zmqpubrawtx=tcp://127.0.0.1:28332 \
-zmqpubrawblock=tcp://127.0.0.1:28332 \
-zmqpubhashtx=tcp://127.0.0.1:28332 \

View File

@@ -36,12 +36,14 @@ NO_BOOST ?=
NO_LIBEVENT ?=
NO_QT ?=
NO_QR ?=
NO_BDB ?=
NO_SQLITE ?=
NO_WALLET ?=
NO_ZMQ ?=
NO_USDT ?=
# Default NO_IPC value is 1 on Windows
NO_IPC ?= $(if $(findstring mingw32,$(HOST)),1,)
MULTIPROCESS ?=
LTO ?=
NO_HARDEN ?=
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
C_STANDARD ?= c11
@@ -141,13 +143,13 @@ include packages/packages.mk
#
build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \
AR='$(build_AR)' NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' \
DEBUG='$(DEBUG)' \
DEBUG='$(DEBUG)' NO_HARDEN='$(NO_HARDEN)' \
./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \
CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' \
AR='$(host_AR)' NM='$(host_NM)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' \
DEBUG='$(DEBUG)' LTO='$(LTO)' \
DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' \
./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
boost_packages_$(NO_BOOST) = $(boost_packages)
@@ -157,23 +159,24 @@ libevent_packages_$(NO_LIBEVENT) = $(libevent_packages)
qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages)
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
qt_native_packages_$(NO_QT) = $(qt_native_packages)
wallet_packages_$(NO_WALLET) = $(sqlite_packages)
bdb_packages_$(NO_BDB) = $(bdb_packages)
sqlite_packages_$(NO_SQLITE) = $(sqlite_packages)
wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_)
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
ipc_packages_$(NO_IPC) = $(ipc_packages)
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
ifneq ($(zmq_packages_),)
packages += $(zmq_packages)
endif
ifneq ($(ipc_packages_),)
packages += $(ipc_packages)
ifeq ($(multiprocess_packages_),)
packages += $(multiprocess_packages)
native_packages += $(multiprocess_native_packages)
endif
@@ -231,8 +234,11 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
-e 's|@qrencode_packages@|$(qrencode_packages_)|' \
-e 's|@zmq_packages@|$(zmq_packages_)|' \
-e 's|@wallet_packages@|$(wallet_packages_)|' \
-e 's|@bdb_packages@|$(bdb_packages_)|' \
-e 's|@sqlite_packages@|$(sqlite_packages_)|' \
-e 's|@usdt_packages@|$(usdt_packages_)|' \
-e 's|@ipc_packages@|$(ipc_packages_)|' \
-e 's|@no_harden@|$(NO_HARDEN)|' \
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
$< > $@
touch $@

View File

@@ -1,115 +1,9 @@
# Depends build
This is a system of building and caching dependencies necessary for building
Bitcoin Core. It supports cross-compilation. For more details see [description.md](description.md),
as well as [packages.md](packages.md) for how to add packages.
## Usage
### Ubuntu & Debian
apt install cmake curl make patch
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
apt install bison g++ ninja-build pkgconf python3 xz-utils
### Usage
To build dependencies for the current arch+OS:
make
### macOS
Install Xcode Command Line Tools and Homebrew Package Manager,
see [build-osx.md](../doc/build-osx.md).
brew install cmake make ninja
To build dependencies for the current arch+OS:
gmake
### FreeBSD
pkg install bash cmake curl gmake
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
pkg install bison ninja pkgconf python3
To build dependencies for the current arch+OS:
gmake
### NetBSD
pkgin install bash cmake curl gmake perl
To build dependencies for the current arch+OS:
gmake
### OpenBSD
pkg_add bash cmake curl gmake gtar
To build dependencies for the current arch+OS:
gmake
### Alpine
apk add bash build-base cmake curl make patch
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
apk add bison linux-headers samurai pkgconf python3
To build dependencies for the current arch+OS:
make
## Configuring Bitcoin Core
**When configuring Bitcoin Core, CMake by default will ignore the depends output.** In
order for it to pick up libraries, tools, and settings from the depends build,
you must specify the toolchain file.
In the above example for Ubuntu, a file named `depends/x86_64-pc-linux-gnu/toolchain.cmake` will be
created. To use it during configuring Bitcoin Core:
cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake
## Dependency Options
The following can be set when running make: `make FOO=bar`
- `SOURCES_PATH`: Downloaded sources will be placed here
- `BASE_CACHE`: Built packages will be placed here
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++20`.
- `NO_BOOST`: Don't download/build/cache Boost
- `NO_LIBEVENT`: Don't download/build/cache Libevent
- `NO_QT`: Don't download/build/cache Qt and its dependencies
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite)
- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
- `NO_IPC`: Don't build Capn Proto and libmultiprocess packages. Default on Windows.
- `DEBUG`: Disable some optimizations and enable more runtime checking
- `HOST_ID_SALT`: Optional salt to use when generating host package ids
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
- `LOG`: Use file-based logging for individual packages. During a package build its log file
resides in the `depends` directory, and the log file is printed out automatically in case
of build error. After successful build log files are moved along with package archives
- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS.
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.
## Cross compilation
To build for another arch/OS:
make HOST=host-platform-triplet
@@ -118,6 +12,14 @@ For example:
make HOST=x86_64-w64-mingw32 -j4
**When configuring Bitcoin Core, CMake by default will ignore the depends output.** In
order for it to pick up libraries, tools, and settings from the depends build,
you must specify the toolchain file.
In the above example, a file named `depends/x86_64-w64-mingw32/toolchain.cmake` will be
created. To use it during configuring Bitcoin Core:
cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
Common `host-platform-triplet`s for cross compilation are:
- `i686-pc-linux-gnu` for Linux x86 32 bit
@@ -135,6 +37,18 @@ Common `host-platform-triplet`s for cross compilation are:
The paths are automatically configured and no other options are needed.
### Install the required dependencies: Ubuntu & Debian
#### Common
apt install cmake curl make patch
#### GUI
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
apt install bison g++ pkgconf python3 xz-utils
#### For macOS cross compilation
apt install clang lld llvm zip
@@ -174,9 +88,59 @@ For linux S390X cross compilation:
sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu
### Install the required dependencies: FreeBSD
pkg install bash cmake curl gmake
### Install the required dependencies: NetBSD
pkgin install bash cmake curl gmake perl
### Install the required dependencies: OpenBSD
pkg_add bash cmake curl gmake gtar
### Dependency Options
The following can be set when running make: `make FOO=bar`
- `SOURCES_PATH`: Downloaded sources will be placed here
- `BASE_CACHE`: Built packages will be placed here
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++20`.
- `NO_BOOST`: Don't download/build/cache Boost
- `NO_LIBEVENT`: Don't download/build/cache Libevent
- `NO_QT`: Don't download/build/cache Qt and its dependencies
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet
- `NO_BDB`: Don't download/build/cache BerkeleyDB
- `NO_SQLITE`: Don't download/build/cache SQLite
- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
- `MULTIPROCESS`: Build libmultiprocess (experimental)
- `DEBUG`: Disable some optimizations and enable more runtime checking
- `HOST_ID_SALT`: Optional salt to use when generating host package ids
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
- `LOG`: Use file-based logging for individual packages. During a package build its log file
resides in the `depends` directory, and the log file is printed out automatically in case
of build error. After successful build log files are moved along with package archives
- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS.
- `NO_HARDEN=1`: Don't use hardening options when building packages
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.
### Additional targets
download: run 'make download' to fetch all sources without building them
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
download-win: run 'make download-win' to fetch all sources needed for win builds
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
### Other documentation
- [description.md](description.md): General description of the depends system
- [packages.md](packages.md): Steps for adding packages

20
depends/config.guess vendored
View File

@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2024 Free Software Foundation, Inc.
# Copyright 1992-2023 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2024-07-27'
timestamp='2023-08-22'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2024 Free Software Foundation, Inc.
Copyright 1992-2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,7 +123,7 @@ set_cc_for_build() {
dummy=$tmp/dummy
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c"
for driver in cc gcc c17 c99 c89 ; do
for driver in cc gcc c89 c99 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD=$driver
break
@@ -165,8 +165,6 @@ Linux|GNU|GNU/*)
LIBC=dietlibc
#elif defined(__GLIBC__)
LIBC=gnu
#elif defined(__LLVM_LIBC__)
LIBC=llvm
#else
#include <stdarg.h>
/* First heuristic to detect musl libc. */
@@ -634,8 +632,7 @@ EOF
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
int
main ()
main()
{
if (!__power_pc())
exit(1);
@@ -719,8 +716,7 @@ EOF
#include <stdlib.h>
#include <unistd.h>
int
main ()
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
@@ -1597,9 +1593,6 @@ EOF
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
;;
*:Ironclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad
;;
esac
# Do we have a guess based on uname results?
@@ -1623,7 +1616,6 @@ cat > "$dummy.c" <<EOF
#endif
#endif
#endif
int
main ()
{
#if defined (sony)

752
depends/config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@@ -8,11 +8,9 @@ $(1)_ar=$$($$($(1)_type)_AR)
$(1)_ranlib=$$($$($(1)_type)_RANLIB)
$(1)_nm=$$($$($(1)_type)_NM)
$(1)_cflags=$$($$($(1)_type)_CFLAGS) \
$$($$($(1)_type)_$$(release_type)_CFLAGS) \
-pipe -std=$(C_STANDARD)
$$($$($(1)_type)_$$(release_type)_CFLAGS)
$(1)_cxxflags=$$($$($(1)_type)_CXXFLAGS) \
$$($$($(1)_type)_$$(release_type)_CXXFLAGS) \
-pipe -std=$(CXX_STANDARD)
$$($$($(1)_type)_$$(release_type)_CXXFLAGS)
$(1)_ldflags=$$($$($(1)_type)_LDFLAGS) \
$$($$($(1)_type)_$$(release_type)_LDFLAGS) \
-L$$($($(1)_type)_prefix)/lib
@@ -41,33 +39,8 @@ define fetch_file
$(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5))))
endef
# Shell script to create a source tarball in $(1)_source from local directory
# $(1)_local_dir instead of downloading remote sources. Tarball is recreated if
# any paths in the local directory have a newer mtime, and checksum of the
# tarball is saved to $(1)_fetched and returned as output.
define fetch_local_dir_sha256
if ! [ -f $($(1)_source) ] || [ -n "$$(find $($(1)_local_dir) -newer $($(1)_source) | head -n1)" ]; then \
mkdir -p $(dir $($(1)_source)) && \
$(build_TAR) -c -f $($(1)_source) -C $($(1)_local_dir) . && \
rm -f $($(1)_fetched); \
fi && \
if ! [ -f $($(1)_fetched) ] || [ -n "$$(find $($(1)_source) -newer $($(1)_fetched))" ]; then \
mkdir -p $(dir $($(1)_fetched)) && \
cd $($(1)_source_dir) && \
$(build_SHA256SUM) $($(1)_all_sources) > $($(1)_fetched); \
fi && \
cut -d" " -f1 $($(1)_fetched)
endef
define int_get_build_recipe_hash
$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
# If $(1)_local_dir is set, create a tarball of the local directory contents to
# use as the source of the package, and include a hash of the tarball in the
# package id, so if directory contents change, the package and packages
# depending on it will be rebuilt.
$(if $($(1)_local_dir),$(eval $(1)_sha256_hash:=$(shell $(call fetch_local_dir_sha256,$(1)))))
$(if $($(1)_local_dir),$(eval $(1)_all_file_checksums+=$($(1)_sha256_hash)))
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
endef
@@ -80,32 +53,20 @@ $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SU
final_build_id_long+=$($(package)_build_id_long)
#compute package-specific paths
$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
$(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
$(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
$(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
$(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash
$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
$(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log
endef
# Convert a string to a human-readable filename, replacing dot, slash, and space
# characters that could cause problems with dashes and collapsing them.
define int_friendly_file_name
$(subst $(null) $(null),-,$(strip $(subst ., ,$(subst /, ,$(1)))))
endef
define int_get_build_properties
$(1)_build_subdir?=.
$(1)_download_file?=$($(1)_file_name)
$(1)_source_dir:=$(SOURCES_PATH)
# If $(1)_file_name is empty and $(1)_local_dir is nonempty, set file name to a
# .tar file with a friendly filename named after the directory path.
$(if $($(1)_file_name),,$(if $($(1)_local_dir),$(eval $(1)_file_name:=$(call int_friendly_file_name,$($(1)_local_dir)).tar)))
$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
$(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
$(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version)
$(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
$(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash
$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
$(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log
$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources)
#stamps
@@ -259,7 +220,7 @@ $($(1)_extracted): | $($(1)_fetched)
$($(1)_preprocessed): | $($(1)_extracted)
echo Preprocessing $(1)...
mkdir -p $$(@D) $($(1)_patch_dir)
$(foreach patch,$($(1)_patches),cd $($(1)_patches_path); cp $(patch) $($(1)_patch_dir) ;)
$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
{ cd $$(@D); $($(1)_preprocess_cmds); } $$($(1)_logging)
touch $$@
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
@@ -327,9 +288,6 @@ $(foreach package,$(all_packages),$(eval $(call int_vars,$(package))))
$(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk))
$(foreach package,$(packages),$(eval include packages/$(package).mk))
#set build properties for included package files
$(foreach package,$(all_packages),$(eval $(call int_get_build_properties,$(package))))
#compute a hash of all files that comprise this package's build recipe
$(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package))))

View File

@@ -3,7 +3,7 @@
# Usage: env [ CC=... ] [ C_STANDARD=...] [ CXX=... ] [CXX_STANDARD=...] \
# [ CPPFLAGS=... ] [CFLAGS=...] [CXXFLAGS=...] [LDFLAGS=...] \
# [ AR=... ] [ NM=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \
# [ LTO=... ] ./gen_id [ID_SALT]...
# [ LTO=... ] [ NO_HARDEN=... ] ./gen_id [ID_SALT]...
#
# Prints to stdout a SHA256 hash representing the current toolset, used by
# depends/Makefile as a build id for caching purposes (detecting when the
@@ -93,6 +93,10 @@
echo "LTO=${LTO}"
echo "END LTO"
echo "BEGIN NO_HARDEN"
echo "NO_HARDEN=${NO_HARDEN}"
echo "END NO_HARDEN"
echo "END ALL"
) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then
# When debugging and `tee` is available, output the preimage to stderr

View File

@@ -60,8 +60,8 @@ darwin_CXX=$(clangxx_prog) --target=$(host) \
-iwithsysroot/usr/include/c++/v1 \
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
darwin_CFLAGS=-mmacos-version-min=$(OSX_MIN_VERSION)
darwin_CXXFLAGS=-mmacos-version-min=$(OSX_MIN_VERSION)
darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION)
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION)
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
ifneq ($(build_os),darwin)

Some files were not shown because too many files have changed in this diff Show More