Skip to content

Commit

Permalink
Squashed 'libbitcoinkernel-sys/bitcoin/' changes from 403c20980ec..60…
Browse files Browse the repository at this point in the history
…90df267df

6090df267df kernel: Add pure kernel bitcoin-chainstate
29e3b874303 kernel: Add functions to get the block hash from a block
97d83063cb6 kernel: Add block index utility functions to C header
76ead0878a3 kernel: Add function to read block undo data from disk to C header
94c215c4212 kernel: Add functions to read block from disk to C header
aff05fcbe62 kernel: Add function for copying  block data to C header
a379fbe15eb kernel: Add functions for the block validation state to C header
81db1665213 kernel: Add validation interface to C header
0ee7a5f58a6 kernel: Add interrupt function to C header
f68b3dbf919 kernel: Add import blocks function to C header
503aae9afc5 kernel: Add chainstate load options for in-memory dbs in C header
fa1335fd809 kernel: Add options for reindexing in C header
0eb020f9c82 kernel: Add block validation to C header
5f471729674 Kernel: Add chainstate loading to kernel C header
90949cbb09d kernel: Add chainstate manager option for setting worker threads
a2021b517c6 kernel: Add chainstate manager object to C header
428ea46909b kernel: Add notifications context option to C header
b1f5d450323 kerenl: Add chain params context option to C header
7bb4b412db0 kernel: Add kernel library context object
e4b63d7f5d9 kernel: Add logging to kernel library C header
47bb56b243e kernel: Introduce initial kernel C header API
ff873a20a7f Merge bitcoin/bitcoin#31313: refactor: Clamp worker threads in ChainstateManager constructor
c9a7418a8df Merge bitcoin/bitcoin#31096: Package validation: accept packages of size 1
6f24662eb96 Merge bitcoin/bitcoin#31175: rpc: Remove submitblock pre-checks
3867d2421ae Merge bitcoin/bitcoin#31112: Improve parallel script validation error debug logging
8e02b480591 Merge bitcoin/bitcoin#31284: ci: Skip broken Wine64 tests by default
492e1f09943 [validation] merge all ConnectBlock debug logging code paths
b49df703f03 [validation] include all logged information in BlockValidationState
7b267c034fd [validation] Add detailed txin/txout information for script error messages
146a3d54268 [validation] Make script error messages uniform for parallel/single validation
1ac1c33f3f1 [checkqueue] support user-defined return type through std::optional
ebe4cac38bf Merge bitcoin/bitcoin#30991: test: enable running independent functional test sub-tests
19276741007 Merge bitcoin/bitcoin#31387: doc: Use more precise anchor link to codesigning docs
e043618d44d Merge bitcoin/bitcoin#31396: test: simple reordering to reduce run time
a25b892ab1f Merge bitcoin/bitcoin#31386: doc: Use more precise anchor links to Xcode SDK extraction
eb646111cdc Merge bitcoin/bitcoin#31383: test: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py
6cd95de2e02 Merge bitcoin/bitcoin#31395: build: Set shared linker flags in toolchain file
abeebccc480 Merge bitcoin/bitcoin#31357: cmake: Improve build script correctness
4c9b13841c4 Merge bitcoin/bitcoin#31402: doc: correct libfuzzer-nosan preset flag
da4f4fac8df Merge bitcoin/bitcoin#31361: cmake, qt: Use absolute paths for includes in MOC-generated files
16b140f225a doc: correct libfuzzer-nosan preset flag
097c66f6148 Merge bitcoin/bitcoin#30039: dbwrapper: Bump LevelDB max file size to 32 MiB to avoid system slowdown from high disk cache flush rate
68daaea0e48 Merge bitcoin/bitcoin#31390: Remove `src/config` directory
14f162dc5c8 Merge bitcoin/bitcoin#31399: ci, macos: Install `pkgconf` Homebrew's package
e2f2698395c ci, macos: Install `pkgconf` Homebrew's package
b73d3319377 dbwrapper: Bump max file size to 32 MiB
62f6d9e1a48 test: simple ordering optimization to reduce runtime
a8e04704f93 build: Set shared linker flags in toolchain file
dbc8ba12f3b Merge bitcoin/bitcoin#31371: doc, test: more ephemeral dust follow-ups
935973b315f Remove `src/config` directory
19f49c7489d doc: Use more precise anchor link to codesigning docs
8bf1b3039cb doc: Use more precise anchor links to Xcode SDK extraction
7590e93bc73 Merge bitcoin/bitcoin#30986: contrib: skip missing binaries in gen-manpages
b2af068825c Merge bitcoin/bitcoin#30708: rpc: add getdescriptoractivity
144f98db85e Merge bitcoin/bitcoin#31337: build: Fix coverage builds
faa16ed4b9e test: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py
efdb49afb9e Merge bitcoin/bitcoin#31323: guix: swap `moreutils` for just `sponge`
37a5c5d8366 doc: update descriptors.md for getdescriptoractivity
ee3ce6a4f4d test: rpc: add no address case for getdescriptoractivity
811f76f3a51 rpc: add getdescriptoractivity
ee6185372fc gen-manpages: Prompt error if no binaries are found
70e20ea024c Merge bitcoin/bitcoin#31172: build: increase minimum supported Windows to 10.0
733317ba943 Merge bitcoin/bitcoin#31364: refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors
5a4bc5c0366 Merge bitcoin/bitcoin#31305: refactor: Fix remaining clang-tidy performance-inefficient-vector errors
28fd0bc7316 Merge bitcoin/bitcoin#31365: interpreter: Use the same type for SignatureHash in the definition
72ab35a6d09 Merge bitcoin/bitcoin#31221: ci: Split out native fuzz jobs for macOS and windows (take 2)
160799d9135 test: refactor: introduce `create_ephemeral_dust_package` helper
61e18dec306 doc: ephemeral policy: add missing closing double quote
32fc59796f7 rpc: Allow single transaction through submitpackage
3305972f7bf refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors
11f3bc229cc refactor: Reserve vectors in fuzz tests
152fefe7a22 refactor: Preallocate PrevectorFillVector(In)Direct without vector resize
a774c7a339c refactor: Fix remaining clang-tidy performance-inefficient-vector errors
f7144b24be0 Merge bitcoin/bitcoin#31279: policy: ephemeral dust followups
c288c790cd9 interpreter: Use the same type for SignatureHash in the definition
b031b7910d6 [ci] Split out native fuzz jobs for macOS and windows
6f4128e3a83 cmake, qt: Use absolute paths for includes in MOC-generated files
ab5c63edcce cmake: Build `secp256k1` only when required
76a3a540a4c cmake: Ensure script correctness when no targets are specified
e8f50c5debe guix: swap moreutils for just sponge
01a7298818d build: Avoid using the `-ffile-prefix-map` compiler option
2638fdb4f93 Merge bitcoin/bitcoin#31338: test: Deduplicate assert_mempool_contents()
73db95c65c1 kernel: Make bitcoin-chainstate's block validation mirror submitblock's
bb53ce9bdae tests: Add functional test for submitting a previously pruned block
1f7fc738255 rpc: Remove submitblock duplicate pre-check
e62a8abd7df rpc: Remove submitblock invalid-duplicate precheck
36dbebafb9b rpc: Remove submitblock coinbase pre-check
17834bd1976 Merge bitcoin/bitcoin#31333: fuzz: Implement G_TEST_GET_FULL_NAME
cf577227888 Merge bitcoin/bitcoin#31335: macOS: swap docs & CI from pkg-config to pkgconf
fe3457ccfff ci: note that we should install pkgconf in future
a0eafc10f94 functional test: Deduplicate assert_mempool_contents()
8d203480b33 doc: migrate from pkg-config to pkgconf in macOS build docs
466e4df3fb8 assert_mempool_contents: assert not duplicates expected
ea5db2f2692 functional: only generate required blocks for test
d033acb6083 fuzz: package_eval: let fuzzer run out input in main tx creation loop
ba35a570c5d CheckEphemeralSpends: return boolean, and set child state and txid outparams
cf0cee1617c func: add note about lack of 1P1C propagation in tree submitpackage
84242903043 unit test: ephemeral_tests is using a dust relay rate, not minrelay
d9cfa5fc4eb CheckEphemeralSpends: no need to iterate inputs if no parent dust
87b26e3dc07 func: rename test_free_relay to test_no_minrelay_fee
e5709a4a41e func: slight elaboration on submitpackage restriction
08e969bd107 RPC: only enforce dust rules on priority when standardness active
ca050d12e76 unit test: adapt to changing MAX_DUST_OUTPUTS_PER_TX
7c3490169c9 fuzz: package_eval: move last_tx inside txn ctor
445eaed182a fuzz: use optional status instead of should_rbf_eph_spend
4dfdf615b9d fuzz: remove unused TransactionsDelta validation interface
09ce926e4a1 func: cleanup reorg test comment
768a0c1889e func: cleanup test_dustrelay comments
bedca1cb663 fuzz: Directly place transactions in vector
c041ad6eccb fuzz: explain package eval coin tracking better
bc0d98ea612 fuzz: remove dangling reference to GetEntry
15b6cbf07f5 unit test: make dust index less magical
5fbcfd12b8f unit test: assert txid returned on CheckEphemeralSpends failures
ef94d84b4e4 bench: remove unnecessary CMTxn constructors
c5c10fd317c ephemeral policy doxygen cleanup
dd9044b8d46 ephemeral policy: IWYU
c6859ce2de7 Move+rename GetDustIndexes -> GetDust
22ef95dbe3e Merge bitcoin/bitcoin#31288: Add destroy to BlockTemplate schema
92d3d691f09 fuzz: Implement G_TEST_GET_FULL_NAME
f34fe0806a0 Merge bitcoin/bitcoin#31122: cluster mempool: Implement changeset interface for mempool
b2d952c0f5b Merge bitcoin/bitcoin#31331: doc: add copyright header to p2p_headers_presync
7d3703dec3d doc: add copyright header to p2p_headers_presync
116b8c55736 Merge bitcoin/bitcoin#31213: fuzz: Fix difficulty target generation in `p2p_headers_presync`
15c1f47a005 Merge bitcoin/bitcoin#31327: doc: Correct PR Review Club frequency from weekly to monthly
1209a1082c8 Merge bitcoin/bitcoin#31315: build: Enable -Wbidi-chars=any
ab22726def9 Merge bitcoin/bitcoin#31276: guix: scope pkg-config to Linux only
637f437a164 doc: remove PR Review Club frequency
e1223099584 Merge bitcoin/bitcoin#31317: test: Revert to random path element
2666d83da59 Merge bitcoin/bitcoin#30893: test: Introduce ensure_for helper
faaaf59f71e test: Make g_rng_temp_path rand, not dependent on SeedRandomForTest
746f93b4f0f Merge bitcoin/bitcoin#31307: build: Temporarily disable compiling `fuzz/utxo_snapshot.cpp` with MSVC
25fe087de59 rpc: move-only: move ScriptPubKeyDoc to utils
fa80b08fef0 test: Revert to random path element
8f85d36d68a refactor: Clamp worker threads in ChainstateManager constructor
fa7857ccda5 build: Enable -Wbidi-chars=any
b2d53610028 build: Temporarily disable compiling `fuzz/utxo_snapshot.cpp` with MSVC
9aa50152c1c Add destroy to BlockTemplate schema
ccc2d3abcd3 Merge bitcoin/bitcoin#31287: refactor: Avoid std::string format strings
62016b32300 Use std::ranges for ephemeral policy checks
3ed930a1f41 Have HasDust and PreCheckValidEphemeralTx take CTransaction
04a614bf9a7 Rename CheckValidEphemeralTx to PreCheckEphemeralTx
85bcfeea235 Merge bitcoin/bitcoin#30666: validation: fix m_best_header tracking and BLOCK_FAILED_CHILD assignment
2257c6d68fa Merge bitcoin/bitcoin#30487: ci: skip Github CI on branch pushes for forks
380e1f44e8e Merge bitcoin/bitcoin#30349: benchmark: Improve SipHash_32b accuracy to avoid potential optimization issues
1a8f51e7453 Merge bitcoin/bitcoin#28843: [refactor] Cleanup BlockAssembler mempool usage
2d944e982c4 Merge bitcoin/bitcoin#31285: guix: remove `util-linux`
bcd82b13f46 Remove pkgconfig from toolchain file
319a4e82614 depends: drop sqlite pkgconfig file
fa1177e3d7c refactor: Avoid std::string format strings
a8fe1fd38bf depends: better cleanup after fontconfig
17e79c92607 depends: fully remove libtool archives from Qt build
8ca85651c83 guix: move pkg-config to Linux builds
e3e648cf410 depends: drop pkg-config option from Qt build
0d185bd99f9 doc: update depends doc to prefer .cmake outputs
e546b4e1a0c Merge bitcoin/bitcoin#31225: doc: Fix grammatical errors in multisig-tutorial.md
f44e39c9d0d Merge bitcoin/bitcoin#31174: tinyformat: Add compile-time checking for literal format strings
299e2220e95 gen-manpages: implement --skip-missing-binaries
5736d1ddacc tracing: pass if replaced by tx/pkg to tracepoint
a4ec07f1944 doc: add comments for CTxMemPool::ChangeSet
83f814b1d11 Remove m_all_conflicts from SubPackageState
d3c8e7dfb63 Ensure that we don't add duplicate transactions in rbf fuzz tests
d7dc9fd2f7b Move CalculateChunksForRBF() to the mempool changeset
284a1d33f1d Move prioritisation into changeset
446b08b599b Don't distinguish between direct conflicts and all conflicts when doing cluster-size-2-rbf checks
b53041021ab Duplicate transactions are not permitted within a changeset
b447416fddc Public mempool removal methods Assume() no changeset is outstanding
2b30f4d36c8 Make RemoveStaged() private
18829194ca6 Enforce that there is only one changeset at a time
7fb62f7db60 Apply mempool changeset transactions directly into the mempool
34b6c5833d1 Clean up FinalizeSubpackage to avoid workspace-specific information
57983b8add7 Move LimitMempoolSize to take place outside FinalizeSubpackage
01e145b9758 Move changeset from workspace to subpackage
802214c0832 Introduce mempool changesets
87d92fa3401 test: Add unit test coverage of package rbf + prioritisetransaction
15d982f91e6 Add package hash to package-rbf log message
fa5e7064597 ci: Skip broken Wine64 tests by default
4d668549825 ci: remove util-linux from centos CI
cdf34be7c94 guix: remove util-linux
cbf1a47d606 CheckEphemeralSpends: only compute txid of tx when needed
111465d72dd test: Remove unused attempts parameter from wait_until
5468a23eb9a test: Add check_interval parameter to wait_until
16c87d91fd4 test: Introduce ensure_for helper
a6ca8f32439 fuzz: Fix difficulty target generation in p2p_headers_presync
8610bcef9d0 ci: skip Github CI on branch pushes for forks
409d0d62937 test: enable running individual independent functional test methods
ee1128ead84 doc: update stack-clash-protection comment re mingw-w64
bf47448f152 test: drop check for Windows < 10
35b898c47f8 release: target Windows 10 or later
398754e70bc depends: target Windows 10 when building for mingw-w64
ac286e0d1bd doc: Fix grammatical errors in multisig-tutorial.md
fa327c77e34 util: Add ConsumeArithUInt256InRange fuzzing helper
42066f45ff5 Refactor SipHash_32b benchmark to improve accuracy and avoid optimization issues
fe39acf88ff tinyformat: Add compile-time checking for literal format strings
184f34f2d0f util: Support dynamic width & precision in ConstevalFormatString
192dac1d337 [refactor] Cleanup BlockAssembler mempool usage
0bd53d913c1 test: add test for getchaintips behavior with invalid chains
ccd98ea4c88 test: cleanup rpc_getchaintips.py
f5149ddb9b7 validation: mark blocks building on an invalid block as BLOCK_FAILED_CHILD
783cb7337f7 validation: call RecalculateBestHeader in InvalidChainFound
9275e9689a4 rpc: call RecalculateBestHeader as part of reconsiderblock
a51e91783aa validation: add RecalculateBestHeader() function
REVERT: 403c20980ec kernel: Add pure kernel bitcoin-chainstate
REVERT: 2e1b262eff6 kernel: Add functions to get the block hash from a block
REVERT: f0b56a6052a kernel: Add block index utility functions to C header
REVERT: 9393cf98179 kernel: Add function to read block undo data from disk to C header
REVERT: e2ccfba0e3e kernel: Add functions to read block from disk to C header
REVERT: 0559575861c kernel: Add function for copying  block data to C header
REVERT: 7b02e52237e kernel: Add functions for the block validation state to C header
REVERT: fdebacca7ad kernel: Add validation interface to C header
REVERT: f4ea5f49c6d kernel: Add interrupt function to C header
REVERT: 5f4b436aad9 kernel: Add import blocks function to C header
REVERT: c95a28fd80c kernel: Add chainstate load options for in-memory dbs in C header
REVERT: d6360557ef6 kernel: Add options for reindexing in C header
REVERT: a125867b9fe kernel: Add block validation to C header
REVERT: b2b75a0ef73 Kernel: Add chainstate loading to kernel C header
REVERT: d233003ff2a kernel: Add chainstate manager option for setting worker threads
REVERT: 3610be3b138 kernel: Add chainstate manager object to C header
REVERT: c194bea41f6 kernel: Add notifications context option to C header
REVERT: 691d89d846b kerenl: Add chain params context option to C header
REVERT: 407ca750cda kernel: Add kernel library context object
REVERT: ee3c4ea92cd kernel: Add logging to kernel library C header
REVERT: e6c610a7e03 kernel: Introduce initial kernel C header API

git-subtree-dir: libbitcoinkernel-sys/bitcoin
git-subtree-split: 6090df267dfece6192b567fed6582445aa811e7f
  • Loading branch information
TheCharlatan committed Dec 4, 2024
1 parent cfb18bf commit 15319cf
Show file tree
Hide file tree
Showing 139 changed files with 2,401 additions and 1,144 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ task:
FILE_ENV: "./ci/test/00_setup_env_arm.sh"

task:
name: 'Win64, unit tests, no gui tests, no functional tests'
name: 'Win64-cross'
<< : *GLOBAL_TASK_TEMPLATE
persistent_worker:
labels:
Expand Down
76 changes: 61 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,34 @@ jobs:
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 ))" ${{ env.TEST_BASE }}
macos-native-arm64:
name: 'macOS 14 native, arm64, no depends, sqlite only, gui'
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: macos-14

# No need to run on the read-only mirror, unless it is a PR.
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
# When a contributor maintains a fork of the repo, any pull request they make
# to their own fork, or to the main repository, will trigger two CI runs:
# one for the branch push and one for the pull request.
# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
# in Github repository settings.
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}

timeout-minutes: 120

strategy:
fail-fast: false
matrix:
job-type: [standard, fuzz]
include:
- job-type: standard
file-env: './ci/test/00_setup_env_mac_native.sh'
job-name: 'macOS 14 native, arm64, no depends, sqlite only, gui'
- job-type: fuzz
file-env: './ci/test/00_setup_env_mac_native_fuzz.sh'
job-name: 'macOS 14 native, arm64, fuzz'

env:
DANGER_RUN_CI_ON_HOST: 1
FILE_ENV: './ci/test/00_setup_env_mac_native.sh'
BASE_ROOT_DIR: ${{ github.workspace }}

steps:
Expand All @@ -105,7 +120,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 pkg-config gnu-getopt ccache boost libevent zeromq qt@5 qrencode
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"
Expand All @@ -115,33 +130,46 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-${{ matrix.job-type }}-ccache-

- name: CI script
run: ./ci/test_run_all.sh
env:
FILE_ENV: ${{ matrix.file-env }}

- name: Save Ccache cache
uses: actions/cache/save@v4
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.CCACHE_DIR }}
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: ${{ github.job }}-ccache-${{ github.run_id }}
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}

win64-native:
name: 'Win64 native, VS 2022'
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

# No need to run on the read-only mirror, unless it is a PR.
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}

env:
PYTHONUTF8: 1
TEST_RUNNER_TIMEOUT_FACTOR: 40

strategy:
fail-fast: false
matrix:
job-type: [standard, fuzz]
include:
- job-type: standard
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="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
job-name: 'Win64 native fuzz, VS 2022'

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -182,11 +210,11 @@ jobs:

- name: Generate build system
run: |
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
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
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true'
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard'
with:
path: ~/AppData/Local/vcpkg/archives
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
Expand All @@ -197,11 +225,13 @@ jobs:
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
- name: Run test suite
if: matrix.job-type == 'standard'
working-directory: build
run: |
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:
BITCOIND: '${{ github.workspace }}\build\src\Release\bitcoind.exe'
Expand All @@ -212,11 +242,27 @@ jobs:
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 "$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
if: matrix.job-type == 'fuzz'
working-directory: build
env:
BITCOINFUZZ: '${{ github.workspace }}\build\src\test\fuzz\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
asan-lsan-ubsan-integer-no-depends-usdt:
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
# No need to run on the read-only mirror, unless it is a PR.
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
timeout-minutes: 120
env:
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
Expand Down
26 changes: 18 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ if(WIN32)
]=]

target_compile_definitions(core_interface INTERFACE
_WIN32_WINNT=0x0601
_WIN32_IE=0x0501
_WIN32_WINNT=0x0A00
_WIN32_IE=0x0A00
WIN32_LEAN_AND_MEAN
NOMINMAX
)
Expand Down Expand Up @@ -294,9 +294,11 @@ if(WIN32)
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK)
try_append_linker_flag("-static" TARGET core_interface)
# We require Windows 7 (NT 6.1) or later.
# We support Windows 10+, however it's not possible to set these values accordingly,
# due to a bug in mingw-w64. See https://sourceforge.net/p/mingw-w64/bugs/968/.
# As a best effort, target Windows 8.
try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface)
try_append_linker_flag("-Wl,--minor-subsystem-version,1" TARGET core_interface)
try_append_linker_flag("-Wl,--minor-subsystem-version,2" TARGET core_interface)
endif()
endif()

Expand Down Expand Up @@ -419,6 +421,7 @@ else()
try_append_cxx_flags("-Wunreachable-code" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wdocumentation" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wself-assign" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wbidi-chars=any" TARGET warn_interface SKIP_LINK)
try_append_cxx_flags("-Wundef" TARGET warn_interface SKIP_LINK)

# Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
Expand All @@ -437,8 +440,16 @@ configure_file(contrib/filter-lcov.py filter-lcov.py USE_SOURCE_PERMISSIONS COPY
# Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
try_append_cxx_flags("-fno-extended-identifiers" TARGET core_interface SKIP_LINK)

try_append_cxx_flags("-ffile-prefix-map=A=B" TARGET core_interface SKIP_LINK
IF_CHECK_PASSED "-ffile-prefix-map=${PROJECT_SOURCE_DIR}/src=."
# Avoiding the `-ffile-prefix-map` compiler option because it implies
# `-fcoverage-prefix-map` on Clang or `-fprofile-prefix-map` on GCC,
# which can cause issues with coverage builds, particularly when using
# Clang in the OSS-Fuzz environment due to its use of other options
# and a third party script, or with GCC.
try_append_cxx_flags("-fdebug-prefix-map=A=B" TARGET core_interface SKIP_LINK
IF_CHECK_PASSED "-fdebug-prefix-map=${PROJECT_SOURCE_DIR}/src=."
)
try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK
IF_CHECK_PASSED "-fmacro-prefix-map=${PROJECT_SOURCE_DIR}/src=."
)

# Currently all versions of gcc are subject to a class of bugs, see the
Expand Down Expand Up @@ -479,8 +490,7 @@ if(ENABLE_HARDENING)
try_append_cxx_flags("-fcf-protection=full" TARGET hardening_interface)

if(MINGW)
# stack-clash-protection doesn't compile with GCC 10 and earlier.
# In any case, it is a no-op for Windows.
# 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)
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ list or changes that are
Some of them might no longer be applicable. So if you are interested, but
unsure, you might want to leave a comment on the issue first.

You may also participate in the weekly
[Bitcoin Core PR Review Club](https://bitcoincore.reviews/) meeting.
You may also participate in the [Bitcoin Core PR Review Club](https://bitcoincore.reviews/).

### Good First Issue Label

Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_i686_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_centos
export CI_IMAGE_NAME_TAG="quay.io/centos/amd64:stream9"
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux e2fsprogs cmake"
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison e2fsprogs cmake"
export PIP_PACKAGES="pyzmq"
export GOAL="install"
export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
Expand Down
16 changes: 16 additions & 0 deletions ci/test/00_setup_env_mac_native_fuzz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
#
# Copyright (c) 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

export CMAKE_GENERATOR="Ninja"
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=true
3 changes: 3 additions & 0 deletions ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export CI_IMAGE_NAME_TAG="docker.io/amd64/debian:bookworm" # Check that https:/
export HOST=x86_64-w64-mingw32
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"
# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when
Expand Down
25 changes: 23 additions & 2 deletions contrib/devtools/gen-manpages.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import subprocess
import sys
import tempfile
import argparse

BINARIES = [
'src/bitcoind',
Expand All @@ -16,6 +17,18 @@
'src/qt/bitcoin-qt',
]

parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument(
"-s",
"--skip-missing-binaries",
action="store_true",
default=False,
help="skip generation for binaries that are not found in the build path",
)
args = parser.parse_args()

# Paths to external utilities.
git = os.getenv('GIT', 'git')
help2man = os.getenv('HELP2MAN', 'help2man')
Expand All @@ -38,8 +51,12 @@
try:
r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, text=True)
except IOError:
print(f'{abspath} not found or not an executable', file=sys.stderr)
sys.exit(1)
if(args.skip_missing_binaries):
print(f'{abspath} not found or not an executable. Skipping...', file=sys.stderr)
continue
else:
print(f'{abspath} not found or not an executable', file=sys.stderr)
sys.exit(1)
# take first line (which must contain version)
verstr = r.stdout.splitlines()[0]
# last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
Expand All @@ -51,6 +68,10 @@

versions.append((abspath, verstr, copyright))

if not versions:
print(f'No binaries found in {builddir}. Please ensure the binaries are present in {builddir}, or set another build path using the BUILDDIR env variable.')
sys.exit(1)

if any(verstr.endswith('-dirty') for (_, verstr, _) in versions):
print("WARNING: Binaries were built from a dirty tree.")
print('man pages generated from dirty binaries should NOT be committed.')
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def check_PE_libraries(binary) -> bool:
def check_PE_subsystem_version(binary) -> bool:
major: int = binary.optional_header.major_subsystem_version
minor: int = binary.optional_header.minor_subsystem_version
if major == 6 and minor == 1:
if major == 6 and minor == 2:
return True
return False

Expand Down
4 changes: 2 additions & 2 deletions contrib/devtools/test-symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_PE(self):
}
''')

self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
(1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' +
executable + ': failed DYNAMIC_LIBRARIES'))

Expand Down Expand Up @@ -166,7 +166,7 @@ def test_PE(self):
}
''')

self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
(0, ''))


Expand Down
4 changes: 2 additions & 2 deletions contrib/guix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ section](#choosing-your-security-model) before proceeding to perform a build.

In order to perform a build for macOS (which is included in the default set of
platform triples to build), you'll need to extract the macOS SDK tarball using
tools found in the [`macdeploy` directory](../macdeploy/README.md).
tools found in the [`macdeploy` directory](../macdeploy/README.md#sdk-extraction).

You can then either point to the SDK using the `SDK_PATH` environment variable:

Expand Down Expand Up @@ -68,7 +68,7 @@ following from the top of a clean repository:

The `guix-codesign` command attaches codesignatures (produced by codesigners) to
existing non-codesigned outputs. Please see the [release process
documentation](/doc/release-process.md) for more context.
documentation](/doc/release-process.md#codesigning) for more context.

It respects many of the same environment variable flags as `guix-build`, with 2
crucial differences:
Expand Down
Loading

0 comments on commit 15319cf

Please sign in to comment.