Skip to content

Commit

Permalink
Merge v27 changes from 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlopp committed May 5, 2024
2 parents e6d141a + eb0bdbd commit 1c84dcb
Show file tree
Hide file tree
Showing 920 changed files with 61,689 additions and 25,780 deletions.
12 changes: 6 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env: # Global defaults
# - The ./ci/ depedencies (with cirrus-cli) should be installed:
#
# ```
# apt update && apt install screen python3 bash podman-docker curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
# apt update && apt install git screen python3 bash podman-docker curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
# ```
#
# - There are no strict requirements on the hardware, because having less CPUs
Expand Down Expand Up @@ -55,7 +55,7 @@ base_template: &BASE_TEMPLATE
<< : *FILTER_TEMPLATE
merge_base_script:
# Unconditionally install git (used in fingerprint_script).
- bash -c "$PACKAGE_MANAGER_INSTALL git"
- git --version || bash -c "$PACKAGE_MANAGER_INSTALL git"
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
Expand Down Expand Up @@ -132,13 +132,13 @@ task:
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"

task:
name: 'previous releases, qt5 dev package and depends packages, DEBUG'
name: 'previous releases, depends DEBUG'
<< : *GLOBAL_TASK_TEMPLATE
persistent_worker:
labels:
type: small
env:
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
FILE_ENV: "./ci/test/00_setup_env_native_previous_releases.sh"

task:
name: 'TSan, depends, gui'
Expand Down Expand Up @@ -200,10 +200,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"

task:
name: 'macOS-cross 11.0, gui, no tests'
name: 'macOS-cross, gui, no tests'
<< : *GLOBAL_TASK_TEMPLATE
persistent_worker:
labels:
type: small
env:
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
FILE_ENV: "./ci/test/00_setup_env_mac_cross.sh"
61 changes: 40 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV"
- run: |
sudo apt-get update
sudo apt-get install clang-15 ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
sudo apt-get install clang-15 ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-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
Expand All @@ -89,17 +89,24 @@ jobs:
uses: actions/checkout@v4

- name: Clang version
run: clang --version
run: |
sudo xcode-select --switch /Applications/Xcode_15.0.app
clang --version
- name: Install Homebrew packages
run: brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
# A workaround for "The `brew link` step did not complete successfully" error.
brew install python@3 || brew link --overwrite python@3
brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
- name: Set Ccache directory
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"

- name: Restore Ccache cache
id: ccache-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
Expand All @@ -109,7 +116,7 @@ jobs:
run: ./ci/test_run_all.sh

- name: Save Ccache cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.CCACHE_DIR }}
Expand Down Expand Up @@ -144,18 +151,20 @@ jobs:
with:
arch: x64

- name: Check MSBuild and Qt
- name: Get tool information
run: |
msbuild -version | Out-File -FilePath "$env:GITHUB_WORKSPACE\msbuild_version"
Get-Content -Path "$env:GITHUB_WORKSPACE\msbuild_version"
$env:VCToolsVersion | Out-File -FilePath "$env:GITHUB_WORKSPACE\toolset_version"
Get-Content -Path "$env:GITHUB_WORKSPACE\toolset_version"
Write-Host "VCToolsVersion $(Get-Content -Path "$env:GITHUB_WORKSPACE\toolset_version")"
$env:CI_QT_URL | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_url"
$env:CI_QT_CONF | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_conf"
py -3 --version
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
- name: Restore static Qt cache
id: static-qt-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\Qt_static
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
Expand Down Expand Up @@ -198,14 +207,14 @@ jobs:

- name: Save static Qt cache
if: steps.static-qt-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: C:\Qt_static
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}

- name: Ccache installation cache
id: ccache-installation-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
C:\ProgramData\chocolatey\lib\ccache
Expand All @@ -222,7 +231,7 @@ jobs:
- name: Restore Ccache cache
id: ccache-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ~/AppData/Local/ccache
key: ${{ github.job }}-ccache-${{ github.run_id }}
Expand All @@ -238,13 +247,13 @@ jobs:
Get-Content -Path "$env:GITHUB_WORKSPACE\vcpkg_commit"
- name: vcpkg tools cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:/vcpkg/downloads/tools
key: ${{ github.job }}-vcpkg-tools

- name: vcpkg binary cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/AppData/Local/vcpkg/archives
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'toolset_version', 'build_msvc/vcpkg.json') }}
Expand All @@ -262,7 +271,7 @@ jobs:
run: ccache --show-stats

- name: Save Ccache cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
with:
path: ~/AppData/Local/ccache
Expand All @@ -282,10 +291,20 @@ jobs:
run: py -3 test\util\rpcauth-test.py

- name: Run functional tests
# Don't run functional tests for pull requests.
# The test suit regularly fails to complete in windows native github
# actions as a child process stops making progress. The root cause has
# not yet been determined.
# Discussed in https://github.com/bitcoin/bitcoin/pull/28509
if: github.event_name != 'pull_request'
run: py -3 test\functional\test_runner.py --jobs $env:NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix=$env:RUNNER_TEMP --combinedlogslen=99999999 --timeout-factor=$env:TEST_RUNNER_TIMEOUT_FACTOR --extended
env:
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
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 fuzz corpus
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 binaries
env:
BITCOINFUZZ: "${{ github.workspace}}\\src\\fuzz.exe"
shell: cmd
run: py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_seed_corpus
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ win32-build
test/config.ini
test/cache/*
test/.mypy_cache/
test/lint/test_runner/target/

!src/leveldb*/Makefile

/doc/doxygen/

libbitcoinconsensus.pc
contrib/devtools/split-debug.sh

# Output from running db4 installation
Expand All @@ -144,7 +144,6 @@ db4/
# clang-check
*.plist

osx_volname
dist/

/guix-build-*
Expand Down
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[o:bitcoin:p:bitcoin:r:qt-translation-026x]
[o:bitcoin:p:bitcoin:r:qt-translation-027x]
file_filter = src/qt/locale/bitcoin_<lang>.xlf
source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ Discussion about codebase improvements happens in GitHub issues and pull
requests.

The developer
[mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev)
[mailing list](https://groups.google.com/g/bitcoindev)
should be used to discuss complicated or controversial consensus or P2P protocol changes before working on
a patch set.
Archives can be found on [https://gnusha.org/pi/bitcoindev/](https://gnusha.org/pi/bitcoindev/).


Contributor Workflow
Expand Down Expand Up @@ -417,11 +418,8 @@ Backporting

Security and bug fixes can be backported from `master` to release
branches.
If the backport is non-trivial, it may be appropriate to open an
additional PR to backport the change, but only after the original PR
has been merged.
Otherwise, backports will be done in batches and
the maintainers will use the proper `Needs backport (...)` labels
Maintainers will do backports in batches and
use the proper `Needs backport (...)` labels
when needed (the original author does not need to worry about it).

A backport should contain the following metadata in the commit body:
Expand Down
4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2009-2023 The Bitcoin Core developers
Copyright (c) 2009-2023 Bitcoin Developers
Copyright (c) 2009-2024 The Bitcoin Core developers
Copyright (c) 2009-2024 Bitcoin Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 6 additions & 10 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ endif
.PHONY: deploy FORCE
.INTERMEDIATE: $(COVERAGE_INFO)

if BUILD_BITCOIN_LIBS
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libbitcoinconsensus.pc
endif

BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT)
BITCOIN_TEST_BIN=$(top_builddir)/src/test/$(BITCOIN_TEST_NAME)$(EXEEXT)
Expand Down Expand Up @@ -118,9 +113,6 @@ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lp
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings

osx_volname:
echo $(OSX_VOLNAME) >$@

if BUILD_DARWIN
$(OSX_ZIP): $(OSX_APP_BUILT) $(OSX_PACKAGING)
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -zip
Expand All @@ -134,7 +126,7 @@ $(OSX_ZIP): deploydir
cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
OTOOL=$(OTOOL) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)

deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
endif !BUILD_DARWIN
Expand Down Expand Up @@ -310,6 +302,10 @@ EXTRA_DIST += \
test/util/data/txcreatesignv1.hex \
test/util/data/txcreatesignv1.json \
test/util/data/txcreatesignv2.hex \
test/util/data/txreplace1.hex \
test/util/data/txreplacenoinputs.hex \
test/util/data/txreplaceomittedn.hex \
test/util/data/txreplacesingleinput.hex \
test/util/rpcauth-test.py

CLEANFILES = $(OSX_ZIP) $(BITCOIN_WIN_INSTALLER)
Expand All @@ -334,7 +330,7 @@ clean-docs:
clean-local: clean-docs
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP)
rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
rm -rf osx_volname dist/
rm -rf dist/ test/lint/test_runner/target/ test/lint/__pycache__

test-security-check:
if TARGET_DARWIN
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ The following keys may be used to communicate sensitive information to developer
|------|-------------|
| Pieter Wuille | 133E AC17 9436 F14A 5CF1 B794 860F EB80 4E66 9320 |
| Michael Ford | E777 299F C265 DD04 7930 70EB 944D 35F9 AC3D B76A |
| Andrew Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 |
| Ava Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 |

You can import a key by running the following command with that individual’s fingerprint: `gpg --keyserver hkps://keys.openpgp.org --recv-keys "<fingerprint>"` Ensure that you put quotes around fingerprints containing spaces.
42 changes: 0 additions & 42 deletions build-aux/m4/bitcoin_runtime_lib.m4

This file was deleted.

11 changes: 8 additions & 3 deletions build-aux/m4/l_atomic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ dnl permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved. This file is offered as-is, without any
dnl warranty.

# Clang prior to version 15, when building for 32-bit,
# Clang, when building for 32-bit,
# and linking against libstdc++, requires linking with
# -latomic if using the C++ atomic library.
# Can be tested with: clang++ test.cpp -m32
# Can be tested with: clang++ -std=c++20 test.cpp -m32
#
# Sourced from http://bugs.debian.org/797228

Expand All @@ -24,9 +24,14 @@ m4_define([_CHECK_ATOMIC_testbody], [[
std::atomic<std::chrono::seconds> t{0s};
t.store(2s);
auto t1 = t.load();
t.compare_exchange_strong(t1, 3s);
std::atomic<int64_t> a{};
std::atomic<double> d{};
d.store(3.14);
auto d1 = d.load();
std::atomic<int64_t> a{};
int64_t v = 5;
int64_t r = a.fetch_add(v);
return static_cast<int>(r);
Expand Down
Loading

0 comments on commit 1c84dcb

Please sign in to comment.