2201 changed files with 593308 additions and 7 deletions
@ -0,0 +1,63 @@
|
||||
version: '{branch}.{build}' |
||||
skip_tags: true |
||||
image: Visual Studio 2019 |
||||
configuration: Release |
||||
platform: x64 |
||||
clone_depth: 5 |
||||
environment: |
||||
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%' |
||||
PYTHONUTF8: 1 |
||||
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt51211x64_static_vs2019_16101/Qt5.12.11_x64_static_vs2019_16101.zip' |
||||
QT_DOWNLOAD_HASH: 'cf1b58107fadbf0d9a957d14dab16cde6b6eb6936a1908472da1f967dda34a3a' |
||||
QT_LOCAL_PATH: 'C:\Qt5.12.11_x64_static_vs2019_16101' |
||||
VCPKG_TAG: '75522bb1f2e7d863078bcd06322348f053a9e33f' |
||||
install: |
||||
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes. |
||||
# - cmd: pip install zmq |
||||
# The powershell block below is to set up vcpkg to install the c++ dependencies. The pseudo code is: |
||||
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary, |
||||
# b. Append a setting to the vcpkg cmake config file to only do release builds of dependencies (skipping deubg builds saves ~5 mins). |
||||
# Note originally this block also installed the dependencies using 'vcpkg install'. Dependencies are now installed |
||||
# as part of the msbuild command using vcpkg mainfests. |
||||
- ps: | |
||||
cd c:\tools\vcpkg |
||||
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead. |
||||
git -c advice.detachedHead=false checkout $env:VCPKG_TAG |
||||
.\bootstrap-vcpkg.bat > $null |
||||
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" |
||||
cd "$env:APPVEYOR_BUILD_FOLDER" |
||||
before_build: |
||||
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is: |
||||
# a. Download the zip file with the prebuilt Qt static libraries. |
||||
# b. Check that the downloaded file matches the expected hash. |
||||
# c. Extract the zip file to the specific destination path expected by the msbuild projects. |
||||
- ps: | |
||||
Write-Host "Downloading Qt binaries."; |
||||
Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip; |
||||
Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH..."; |
||||
if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) { |
||||
Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH; |
||||
Write-Host "Qt binary download matched the expected hash."; |
||||
} |
||||
else { |
||||
Write-Host "ERROR: Qt binary download did not match the expected hash."; |
||||
Exit-AppveyorBuild; |
||||
} |
||||
- cmd: python build_msvc\msvc-autogen.py |
||||
build_script: |
||||
- cmd: msbuild /p:TrackFileAccess=false build_msvc\bitcoin.sln /m /v:q /nologo |
||||
after_build: |
||||
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe |
||||
test_script: |
||||
- cmd: src\test_bitcoin.exe -l test_suite |
||||
- cmd: src\bench_bitcoin.exe > NUL |
||||
- ps: python test\util\bitcoin-util-test.py |
||||
- cmd: python test\util\rpcauth-test.py |
||||
# Fee estimation test failing on appveyor with: WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted. |
||||
# functional tests disabled for now. See |
||||
# https://github.com/bitcoin/bitcoin/pull/18626#issuecomment-613396202 |
||||
# https://github.com/bitcoin/bitcoin/issues/18623 |
||||
# - cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation |
||||
artifacts: |
||||
#- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip |
||||
deploy: off |
@ -0,0 +1,222 @@
|
||||
### Global defaults |
||||
|
||||
env: |
||||
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y" |
||||
MAKEJOBS: "-j4" |
||||
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache |
||||
CCACHE_SIZE: "200M" |
||||
CCACHE_DIR: "/tmp/ccache_dir" |
||||
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine |
||||
|
||||
cirrus_ephemeral_worker_template_env: &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system |
||||
|
||||
persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV |
||||
RESTART_CI_DOCKER_BEFORE_RUN: "1" |
||||
|
||||
persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE |
||||
persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/ |
||||
|
||||
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks |
||||
base_template: &BASE_TEMPLATE |
||||
skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution |
||||
merge_base_script: |
||||
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi |
||||
- bash -c "$PACKAGE_MANAGER_INSTALL git" |
||||
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH |
||||
- git config --global user.email "ci@ci.ci" |
||||
- git config --global user.name "ci" |
||||
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts |
||||
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks |
||||
|
||||
global_task_template: &GLOBAL_TASK_TEMPLATE |
||||
<< : *BASE_TEMPLATE |
||||
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out |
||||
container: |
||||
# https://cirrus-ci.org/faq/#are-there-any-limits |
||||
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel |
||||
cpu: 2 |
||||
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers |
||||
ccache_cache: |
||||
folder: "/tmp/ccache_dir" |
||||
depends_built_cache: |
||||
folder: "depends/built" |
||||
ci_script: |
||||
- ./ci/test_run_all.sh |
||||
|
||||
depends_sdk_cache_template: &DEPENDS_SDK_CACHE_TEMPLATE |
||||
depends_sdk_cache: |
||||
folder: "depends/sdk-sources" |
||||
|
||||
compute_credits_template: &CREDITS_TEMPLATE |
||||
# https://cirrus-ci.org/pricing/#compute-credits |
||||
# Only use credits for pull requests to the main repo |
||||
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != "" |
||||
|
||||
#task: |
||||
# name: "Windows" |
||||
# windows_container: |
||||
# image: cirrusci/windowsservercore:2019 |
||||
# env: |
||||
# CIRRUS_SHELL: powershell |
||||
# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%' |
||||
# PYTHONUTF8: 1 |
||||
# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip' |
||||
# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21' |
||||
# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' |
||||
# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed' |
||||
# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74' |
||||
# install_script: |
||||
# - choco install python --version=3.7.7 -y |
||||
|
||||
task: |
||||
name: 'lint [bionic]' |
||||
<< : *BASE_TEMPLATE |
||||
container: |
||||
image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md |
||||
cpu: 1 |
||||
memory: 1G |
||||
# For faster CI feedback, immediately schedule the linters |
||||
<< : *CREDITS_TEMPLATE |
||||
lint_script: |
||||
- ./ci/lint_run_all.sh |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
|
||||
task: |
||||
name: 'ARM [unit tests, no functional tests] [buster]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: debian:buster |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh" |
||||
|
||||
task: |
||||
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:focal |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_win64.sh" |
||||
|
||||
task: |
||||
name: '32-bit + dash [gui] [CentOS 8]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: centos:8 |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
PACKAGE_MANAGER_INSTALL: "yum install -y" |
||||
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh" |
||||
|
||||
task: |
||||
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]' |
||||
previous_releases_cache: |
||||
folder: "releases" |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
<< : *PERSISTENT_WORKER_TEMPLATE |
||||
env: |
||||
<< : *PERSISTENT_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh" |
||||
|
||||
task: |
||||
name: '[depends, sanitizers: thread (TSan), no gui] [hirsute]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:hirsute |
||||
cpu: 6 # Increase CPU and Memory to avoid timeout |
||||
memory: 24G |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
MAKEJOBS: "-j8" |
||||
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh" |
||||
|
||||
task: |
||||
name: '[depends, sanitizers: memory (MSan)] [focal]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:focal |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh" |
||||
|
||||
task: |
||||
name: '[no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [hirsute]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:hirsute |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" |
||||
|
||||
task: |
||||
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [focal]' |
||||
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:focal |
||||
cpu: 4 # Increase CPU and memory to avoid timeout |
||||
memory: 16G |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
MAKEJOBS: "-j8" |
||||
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" |
||||
|
||||
task: |
||||
name: '[multiprocess, DEBUG] [focal]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:focal |
||||
cpu: 4 |
||||
memory: 16G # The default memory is sometimes just a bit too small, so double everything |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
MAKEJOBS: "-j8" |
||||
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh" |
||||
|
||||
task: |
||||
name: '[no wallet] [bionic]' |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:bionic |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh" |
||||
|
||||
task: |
||||
name: 'macOS 10.14 [gui, no tests] [focal]' |
||||
<< : *DEPENDS_SDK_CACHE_TEMPLATE |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:focal |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_mac.sh" |
||||
|
||||
task: |
||||
name: 'macOS 11 native [gui] [no depends]' |
||||
brew_install_script: |
||||
- brew install boost libevent berkeley-db4 qt@5 miniupnpc libnatpmp ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
osx_instance: |
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks) |
||||
image: big-sur-xcode-12.5 # https://cirrus-ci.org/guide/macOS |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
CI_USE_APT_INSTALL: "no" |
||||
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do |
||||
FILE_ENV: "./ci/test/00_setup_env_mac_host.sh" |
||||
|
||||
task: |
||||
name: 'ARM64 Android APK [focal]' |
||||
<< : *DEPENDS_SDK_CACHE_TEMPLATE |
||||
depends_sources_cache: |
||||
folder: "depends/sources" |
||||
<< : *GLOBAL_TASK_TEMPLATE |
||||
container: |
||||
image: ubuntu:focal |
||||
env: |
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV |
||||
FILE_ENV: "./ci/test/00_setup_env_android.sh" |
@ -0,0 +1,26 @@
|
||||
# This is the top-most EditorConfig file. |
||||
root = true |
||||
|
||||
# For all files. |
||||
[*] |
||||
charset = utf-8 |
||||
end_of_line = lf |
||||
indent_style = space |
||||
insert_final_newline = true |
||||
trim_trailing_whitespace = true |
||||
|
||||
# Source code files |
||||
[*.{h,cpp,py,sh}] |
||||
indent_size = 4 |
||||
|
||||
# .cirrus.yml, .appveyor.yml, .fuzzbuzz.yml, etc. |
||||
[*.yml] |
||||
indent_size = 2 |
||||
|
||||
# Makefiles |
||||
[{*.am,Makefile.*.include}] |
||||
indent_style = tab |
||||
|
||||
# Autoconf scripts |
||||
[configure.ac] |
||||
indent_size = 2 |
@ -0,0 +1 @@
|
||||
src/clientversion.cpp export-subst |
@ -0,0 +1,27 @@
|
||||
<!-- This issue tracker is only for technical issues related to Bitcoin Core. |
||||
|
||||
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. |
||||
|
||||
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. |
||||
|
||||
If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! |
||||
|
||||
Any report, issue or feature request related to the GUI should be reported at |
||||
https://github.com/bitcoin-core/gui/issues/ |
||||
--> |
||||
|
||||
<!-- Describe the issue --> |
||||
<!--- What behavior did you expect? --> |
||||
|
||||
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? --> |
||||
|
||||
<!--- How reliably can you reproduce the issue, what are the steps to do so? --> |
||||
|
||||
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? --> |
||||
|
||||
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? --> |
||||
|
||||
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? --> |
||||
|
||||
<!-- Any extra information that might be useful in the debugging process. --> |
||||
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. --> |
@ -0,0 +1,41 @@
|
||||
--- |
||||
name: Bug report |
||||
about: Create a report to help us improve (use this for suspected bugs only, if not sure, open a regular issue below) |
||||
title: '' |
||||
labels: Bug |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
<!-- This issue tracker is only for technical issues related to Bitcoin Core. |
||||
|
||||
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. |
||||
|
||||
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. |
||||
|
||||
If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! --> |
||||
|
||||
<!-- Describe the issue --> |
||||
|
||||
**Expected behavior** |
||||
|
||||
<!--- What behavior did you expect? --> |
||||
|
||||
**Actual behavior** |
||||
|
||||
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? --> |
||||
|
||||
**To reproduce** |
||||
|
||||
<!--- How reliably can you reproduce the issue, what are the steps to do so? --> |
||||
|
||||
**System information** |
||||
|
||||
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? --> |
||||
|
||||
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? --> |
||||
|
||||
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? --> |
||||
|
||||
<!-- Any extra information that might be useful in the debugging process. --> |
||||
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. --> |
@ -0,0 +1,20 @@
|
||||
--- |
||||
name: Feature request |
||||
about: Suggest an idea for this project |
||||
title: '' |
||||
labels: Feature |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
**Is your feature request related to a problem? Please describe.** |
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> |
||||
|
||||
**Describe the solution you'd like** |
||||
<!-- A clear and concise description of what you want to happen. --> |
||||
|
||||
**Describe alternatives you've considered** |
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> |
||||
|
||||
**Additional context** |
||||
<!-- Add any other context or screenshots about the feature request here. --> |
@ -0,0 +1,22 @@
|
||||
--- |
||||
name: Good first issue |
||||
about: '(Regular devs only): Suggest a new good first issue' |
||||
title: '' |
||||
labels: '' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
<!-- Needs the label "good first issue" assigned manually before or after opening --> |
||||
|
||||
<!-- A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution --> |
||||
|
||||
<!-- Motivate the issue and explain the solution briefly --> |
||||
|
||||
#### Useful skills: |
||||
|
||||
<!-- (For example, โC++11 std::threadโ, โQt5 GUI and async GUI designโ or โbasic understanding of Bitcoin mining and the Bitcoin Core RPC interfaceโ.) --> |
||||
|
||||
#### Want to work on this issue? |
||||
|
||||
For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request. |
@ -0,0 +1,11 @@
|
||||
--- |
||||
name: An issue or feature request related to the GUI |
||||
about: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/ |
||||
title: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/ |
||||
labels: GUI |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
Any report, issue or feature request related to the GUI should be reported at |
||||
https://github.com/bitcoin-core/gui/issues/ |
@ -0,0 +1,43 @@
|
||||
<!-- |
||||
*** Please remove the following help text before submitting: *** |
||||
|
||||
Pull requests without a rationale and clear improvement may be closed |
||||
immediately. |
||||
|
||||
GUI-related pull requests should be opened against |
||||
https://github.com/bitcoin-core/gui |
||||
first. See CONTRIBUTING.md |
||||
--> |
||||
|
||||
<!-- |
||||
Please provide clear motivation for your patch and explain how it improves |
||||
Bitcoin Core user experience or Bitcoin Core developer experience |
||||
significantly: |
||||
|
||||
* Any test improvements or new tests that improve coverage are always welcome. |
||||
* All other changes should have accompanying unit tests (see `src/test/`) or |
||||
functional tests (see `test/`). Contributors should note which tests cover |
||||
modified code. If no tests exist for a region of modified code, new tests |
||||
should accompany the change. |
||||
* Bug fixes are most welcome when they come with steps to reproduce or an |
||||
explanation of the potential issue as well as reasoning for the way the bug |
||||
was fixed. |
||||
* Features are welcome, but might be rejected due to design or scope issues. |
||||
If a feature is based on a lot of dependencies, contributors should first |
||||
consider building the system outside of Bitcoin Core, if possible. |
||||
* Refactoring changes are only accepted if they are required for a feature or |
||||
bug fix or otherwise improve developer experience significantly. For example, |
||||
most "code style" refactoring changes require a thorough explanation why they |
||||
are useful, what downsides they have and why they *significantly* improve |
||||
developer experience or avoid serious programming bugs. Note that code style |
||||
is often a subjective matter. Unless they are explicitly mentioned to be |
||||
preferred in the [developer notes](/doc/developer-notes.md), stylistic code |
||||
changes are usually rejected. |
||||
--> |
||||
|
||||
<!-- |
||||
Bitcoin Core has a thorough review process and even the most trivial change |
||||
needs to pass a lot of eyes and requires non-zero or even substantial time |
||||
effort to review. There is a huge lack of active reviewers on the project, so |
||||
patches often sit for a long time. |
||||
--> |
@ -0,0 +1,153 @@
|
||||
*.tar.gz |
||||
|
||||
*.exe |
||||
*.pdb |
||||
src/bitcoin |
||||
src/bitcoind |
||||
src/bitcoin-cli |
||||
src/bitcoin-gui |
||||
src/bitcoin-node |
||||
src/bitcoin-tx |
||||
src/bitcoin-util |
||||
src/bitcoin-wallet |
||||
src/test/fuzz/fuzz |
||||
src/test/test_bitcoin |
||||
src/qt/test/test_bitcoin-qt |
||||
|
||||
# autoreconf |
||||
Makefile.in |
||||
aclocal.m4 |
||||
autom4te.cache/ |
||||
build-aux/config.guess |
||||
build-aux/config.sub |
||||
build-aux/depcomp |
||||
build-aux/install-sh |
||||
build-aux/ltmain.sh |
||||
build-aux/m4/libtool.m4 |
||||
build-aux/m4/lt~obsolete.m4 |
||||
build-aux/m4/ltoptions.m4 |
||||
build-aux/m4/ltsugar.m4 |
||||
build-aux/m4/ltversion.m4 |
||||
build-aux/missing |
||||
build-aux/compile |
||||
build-aux/test-driver |
||||
config.cache |
||||
config.log |
||||
config.status |
||||
configure |
||||
libtool |
||||
src/config/bitcoin-config.h |
||||
src/config/bitcoin-config.h.in |
||||
src/config/stamp-h1 |
||||
src/obj |
||||
share/setup.nsi |
||||
share/qt/Info.plist |
||||
|
||||
src/univalue/gen |
||||
|
||||
src/qt/*.moc |
||||
src/qt/moc_*.cpp |
||||
src/qt/forms/ui_*.h |
||||
|
||||
src/qt/test/moc*.cpp |
||||
|
||||
src/qt/bitcoin-qt.config |
||||
src/qt/bitcoin-qt.creator |
||||
src/qt/bitcoin-qt.creator.user |
||||
src/qt/bitcoin-qt.files |
||||
src/qt/bitcoin-qt.includes |
||||
|
||||
.deps |
||||
.dirstamp |
||||
.libs |
||||
.*.swp |
||||
*~ |
||||
*.bak |
||||
*.rej |
||||
*.orig |
||||
*.pyc |
||||
*.o |
||||
*.o-* |
||||
*.a |
||||
*.pb.cc |
||||
*.pb.h |
||||
*.dat |
||||
|
||||
*.log |
||||
*.trs |
||||
*.dmg |
||||
*.iso |
||||
|
||||
*.json.h |
||||
*.raw.h |
||||
|
||||
# Only ignore unexpected patches |
||||
*.patch |
||||
!depends/patches/**/*.patch |
||||
|
||||
#libtool object files |
||||
*.lo |
||||
*.la |
||||
|
||||
# Compilation and Qt preprocessor part |
||||
*.qm |
||||
Makefile |
||||
!depends/Makefile |
||||
src/qt/bitcoin-qt |
||||
Bitcoin-Qt.app |
||||
background.tiff* |
||||
|
||||
# Qt Creator |
||||
Makefile.am.user |
||||
|
||||
# Unit-tests |
||||
Makefile.test |
||||
bitcoin-qt_test |
||||
|
||||
# Resources cpp |
||||
qrc_*.cpp |
||||
|
||||
# Mac specific |
||||
.DS_Store |
||||
build |
||||
|
||||
# Previous releases |
||||
releases |
||||
|
||||
#lcov |
||||
*.gcno |
||||
*.gcda |
||||
/*.info |
||||
test_bitcoin.coverage/ |
||||
total.coverage/ |
||||
fuzz.coverage/ |
||||
coverage_percent.txt |
||||
/cov_tool_wrapper.sh |
||||
qa-assets/ |
||||
|
||||
#build tests |
||||
linux-coverage-build |
||||
linux-build |
||||
win32-build |
||||
test/config.ini |
||||
test/cache/* |
||||
test/.mypy_cache/ |
||||
|
||||
!src/leveldb*/Makefile |
||||
|
||||
/doc/doxygen/ |
||||
|
||||
libbitcoinconsensus.pc |
||||
contrib/devtools/split-debug.sh |
||||
|
||||
# Output from running db4 installation |
||||
db4/ |
||||
|
||||
# clang-check |
||||
*.plist |
||||
|
||||
osx_volname |
||||
dist/ |
||||
*.background.tiff |
||||
|
||||
/guix-build-* |
@ -0,0 +1,261 @@
|
||||
[style] |
||||
# Align closing bracket with visual indentation. |
||||
align_closing_bracket_with_visual_indent=True |
||||
|
||||
# Allow dictionary keys to exist on multiple lines. For example: |
||||
# |
||||
# x = { |
||||
# ('this is the first element of a tuple', |
||||
# 'this is the second element of a tuple'): |
||||
# value, |
||||
# } |
||||
allow_multiline_dictionary_keys=False |
||||
|
||||
# Allow lambdas to be formatted on more than one line. |
||||
allow_multiline_lambdas=False |
||||
|
||||
# Allow splits before the dictionary value. |
||||
allow_split_before_dict_value=True |
||||
|
||||
# Number of blank lines surrounding top-level function and class |
||||
# definitions. |
||||
blank_lines_around_top_level_definition=2 |
||||
|
||||
# Insert a blank line before a class-level docstring. |
||||
blank_line_before_class_docstring=False |
||||
|
||||
# Insert a blank line before a module docstring. |
||||
blank_line_before_module_docstring=False |
||||
|
||||
# Insert a blank line before a 'def' or 'class' immediately nested |
||||
# within another 'def' or 'class'. For example: |
||||
# |
||||
# class Foo: |
||||
# # <------ this blank line |
||||
# def method(): |
||||
# ... |
||||
blank_line_before_nested_class_or_def=False |
||||
|
||||
# Do not split consecutive brackets. Only relevant when |
||||
# dedent_closing_brackets is set. For example: |
||||
# |
||||
# call_func_that_takes_a_dict( |
||||
# { |
||||
# 'key1': 'value1', |
||||
# 'key2': 'value2', |
||||
# } |
||||
# ) |
||||
# |
||||
# would reformat to: |
||||
# |
||||
# call_func_that_takes_a_dict({ |
||||
# 'key1': 'value1', |
||||
# 'key2': 'value2', |
||||
# }) |
||||
coalesce_brackets=False |
||||
|
||||
# The column limit. |
||||
column_limit=160 |
||||
|
||||
# The style for continuation alignment. Possible values are: |
||||
# |
||||
# - SPACE: Use spaces for continuation alignment. This is default behavior. |
||||
# - FIXED: Use fixed number (CONTINUATION_INDENT_WIDTH) of columns |
||||
# (ie: CONTINUATION_INDENT_WIDTH/INDENT_WIDTH tabs) for continuation |
||||
# alignment. |
||||
# - LESS: Slightly left if cannot vertically align continuation lines with |
||||
# indent characters. |
||||
# - VALIGN-RIGHT: Vertically align continuation lines with indent |
||||
# characters. Slightly right (one more indent character) if cannot |
||||
# vertically align continuation lines with indent characters. |
||||
# |
||||
# For options FIXED, and VALIGN-RIGHT are only available when USE_TABS is |
||||
# enabled. |
||||
continuation_align_style=SPACE |
||||
|
||||
# Indent width used for line continuations. |
||||
continuation_indent_width=4 |
||||
|
||||
# Put closing brackets on a separate line, dedented, if the bracketed |
||||
# expression can't fit in a single line. Applies to all kinds of brackets, |
||||
# including function definitions and calls. For example: |
||||
# |
||||
# config = { |
||||
# 'key1': 'value1', |
||||
# 'key2': 'value2', |
||||
# } # <--- this bracket is dedented and on a separate line |
||||
# |
||||
# time_series = self.remote_client.query_entity_counters( |
||||
# entity='dev3246.region1', |
||||
# key='dns.query_latency_tcp', |
||||
# transform=Transformation.AVERAGE(window=timedelta(seconds=60)), |
||||
# start_ts=now()-timedelta(days=3), |
||||
# end_ts=now(), |
||||
# ) # <--- this bracket is dedented and on a separate line |
||||
dedent_closing_brackets=False |
||||
|
||||
# Disable the heuristic which places each list element on a separate line |
||||
# if the list is comma-terminated. |
||||
disable_ending_comma_heuristic=False |
||||
|
||||
# Place each dictionary entry onto its own line. |
||||
each_dict_entry_on_separate_line=True |
||||
|
||||
# The regex for an i18n comment. The presence of this comment stops |
||||
# reformatting of that line, because the comments are required to be |
||||
# next to the string they translate. |
||||
i18n_comment= |
||||
|
||||
# The i18n function call names. The presence of this function stops |
||||
# reformattting on that line, because the string it has cannot be moved |
||||
# away from the i18n comment. |
||||
i18n_function_call= |
||||
|
||||
# Indent the dictionary value if it cannot fit on the same line as the |
||||
# dictionary key. For example: |
||||
# |
||||
# config = { |
||||
# 'key1': |
||||
# 'value1', |
||||
# 'key2': value1 + |
||||
# value2, |
||||
# } |
||||
indent_dictionary_value=False |
||||
|
||||
# The number of columns to use for indentation. |
||||
indent_width=4 |
||||
|
||||
# Join short lines into one line. E.g., single line 'if' statements. |
||||
join_multiple_lines=True |
||||
|
||||
# Do not include spaces around selected binary operators. For example: |
||||
# |
||||
# 1 + 2 * 3 - 4 / 5 |
||||
# |
||||
# will be formatted as follows when configured with "*,/": |
||||
# |
||||
# 1 + 2*3 - 4/5 |
||||
# |
||||
no_spaces_around_selected_binary_operators= |
||||
|
||||
# Use spaces around default or named assigns. |
||||
spaces_around_default_or_named_assign=False |
||||
|
||||
# Use spaces around the power operator. |
||||
spaces_around_power_operator=False |
||||
|
||||
# The number of spaces required before a trailing comment. |
||||
spaces_before_comment=2 |
||||
|
||||
# Insert a space between the ending comma and closing bracket of a list, |
||||
# etc. |
||||
space_between_ending_comma_and_closing_bracket=True |
||||
|
||||
# Split before arguments |
||||
split_all_comma_separated_values=False |
||||
|
||||
# Split before arguments if the argument list is terminated by a |
||||
# comma. |
||||
split_arguments_when_comma_terminated=False |
||||
|
||||
# Set to True to prefer splitting before '&', '|' or '^' rather than |
||||
# after. |
||||
split_before_bitwise_operator=True |
||||
|
||||
# Split before the closing bracket if a list or dict literal doesn't fit on |
||||
# a single line. |
||||
split_before_closing_bracket=True |
||||
|
||||
# Split before a dictionary or set generator (comp_for). For example, note |
||||
# the split before the 'for': |
||||
# |
||||
# foo = { |
||||
# variable: 'Hello world, have a nice day!' |
||||
# for variable in bar if variable != 42 |
||||
# } |
||||
split_before_dict_set_generator=True |
||||
|
||||
# Split before the '.' if we need to split a longer expression: |
||||
# |
||||
# foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d)) |
||||
# |
||||
# would reformat to something like: |
||||
# |
||||
# foo = ('This is a really long string: {}, {}, {}, {}' |
||||
# .format(a, b, c, d)) |
||||
split_before_dot=False |
||||
|
||||
# Split after the opening paren which surrounds an expression if it doesn't |
||||
# fit on a single line. |
||||
split_before_expression_after_opening_paren=False |
||||
|
||||
# If an argument / parameter list is going to be split, then split before |
||||
# the first argument. |
||||
split_before_first_argument=False |
||||
|
||||
# Set to True to prefer splitting before 'and' or 'or' rather than |
||||
# after. |
||||
split_before_logical_operator=True |
||||
|
||||
# Split named assignments onto individual lines. |
||||
split_before_named_assigns=True |
||||
|
||||
# Set to True to split list comprehensions and generators that have |
||||
# non-trivial expressions and multiple clauses before each of these |
||||
# clauses. For example: |
||||
# |
||||
# result = [ |
||||
# a_long_var + 100 for a_long_var in xrange(1000) |
||||
# if a_long_var % 10] |
||||
# |
||||
# would reformat to something like: |
||||
# |
||||
# result = [ |
||||
# a_long_var + 100 |
||||
# for a_long_var in xrange(1000) |
||||
# if a_long_var % 10] |
||||
split_complex_comprehension=False |
||||
|
||||
# The penalty for splitting right after the opening bracket. |
||||
split_penalty_after_opening_bracket=30 |
||||
|
||||
# The penalty for splitting the line after a unary operator. |
||||
split_penalty_after_unary_operator=10000 |
||||
|
||||
# The penalty for splitting right before an if expression. |
||||
split_penalty_before_if_expr=0 |
||||
|
||||
# The penalty of splitting the line around the '&', '|', and '^' |
||||
# operators. |
||||
split_penalty_bitwise_operator=300 |
||||
|
||||
# The penalty for splitting a list comprehension or generator |
||||
# expression. |
||||
split_penalty_comprehension=80 |
||||
|
||||
# The penalty for characters over the column limit. |
||||
split_penalty_excess_character=7000 |
||||
|
||||
# The penalty incurred by adding a line split to the unwrapped line. The |
||||
# more line splits added the higher the penalty. |
||||
split_penalty_for_added_line_split=30 |
||||
|
||||
# The penalty of splitting a list of "import as" names. For example: |
||||
# |
||||
# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1, |
||||
# long_argument_2, |
||||
# long_argument_3) |
||||
# |
||||
# would reformat to something like: |
||||
# |
||||
# from a_very_long_or_indented_module_name_yada_yad import ( |
||||
# long_argument_1, long_argument_2, long_argument_3) |
||||
split_penalty_import_names=0 |
||||
|
||||
# The penalty of splitting the line around the 'and' and 'or' |
||||
# operators. |
||||
split_penalty_logical_operator=300 |
||||
|
||||
# Use the Tab character for indentation. |
||||
use_tabs=False |
||||
|
@ -0,0 +1,7 @@
|
||||
[main] |
||||
host = https://www.transifex.com |
||||
|
||||
[bitcoin.qt-translation-022x] |
||||
file_filter = src/qt/locale/bitcoin_<lang>.xlf |
||||
source_file = src/qt/locale/bitcoin_en.xlf |
||||
source_lang = en |
@ -0,0 +1,436 @@
|
||||
Contributing to Bitcoin Core |
||||
============================ |
||||
|
||||
The Bitcoin Core project operates an open contributor model where anyone is |
||||
welcome to contribute towards development in the form of peer review, testing |
||||
and patches. This document explains the practical process and guidelines for |
||||
contributing. |
||||
|
||||
First, in terms of structure, there is no particular concept of "Bitcoin Core |
||||
developers" in the sense of privileged people. Open source often naturally |
||||
revolves around a meritocracy where contributors earn trust from the developer |
||||
community over time. Nevertheless, some hierarchy is necessary for practical |
||||
purposes. As such, there are repository "maintainers" who are responsible for |
||||
merging pull requests, as well as a "lead maintainer" who is responsible for the |
||||
release cycle as well as overall merging, moderation and appointment of |
||||
maintainers. |
||||
|
||||
Getting Started |
||||
--------------- |
||||
|
||||
New contributors are very welcome and needed. |
||||
|
||||
Reviewing and testing is highly valued and the most effective way you can contribute |
||||
as a new contributor. It also will teach you much more about the code and |
||||
process than opening pull requests. Please refer to the [peer review](#peer-review) |
||||
section below. |
||||
|
||||
Before you start contributing, familiarize yourself with the Bitcoin Core build |
||||
system and tests. Refer to the documentation in the repository on how to build |
||||
Bitcoin Core and how to run the unit tests, functional tests, and fuzz tests. |
||||
|
||||
There are many open issues of varying difficulty waiting to be fixed. |
||||
If you're looking for somewhere to start contributing, check out the |
||||
[good first issue](https://github.com/bitcoin/bitcoin/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) |
||||
list or changes that are |
||||
[up for grabs](https://github.com/bitcoin/bitcoin/issues?utf8=%E2%9C%93&q=label%3A%22Up+for+grabs%22). |
||||
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. |
||||
|
||||
### Good First Issue Label |
||||
|
||||
The purpose of the `good first issue` label is to highlight which issues are |
||||
suitable for a new contributor without a deep understanding of the codebase. |
||||
|
||||
However, good first issues can be solved by anyone. If they remain unsolved |
||||
for a longer time, a frequent contributor might address them. |
||||
|
||||
You do not need to request permission to start working on an issue. However, |
||||
you are encouraged to leave a comment if you are planning to work on it. This |
||||
will help other contributors monitor which issues are actively being addressed |
||||
and is also an effective way to request assistance if and when you need it. |
||||
|
||||
Communication Channels |
||||
---------------------- |
||||
|
||||
Most communication about Bitcoin Core development happens on IRC, in the |
||||
`#bitcoin-core-dev` channel on Libera Chat. The easiest way to participate on IRC is |
||||
with the web client, [web.libera.chat](https://web.libera.chat/#bitcoin-core-dev). Chat |
||||
history logs can be found |
||||
on [http://www.erisian.com.au/bitcoin-core-dev/](http://www.erisian.com.au/bitcoin-core-dev/) |
||||
and [http://gnusha.org/bitcoin-core-dev/](http://gnusha.org/bitcoin-core-dev/). |
||||
|
||||
Discussion about codebase improvements happens in GitHub issues and pull |
||||
requests. |
||||
|
||||
The developer |
||||
[mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev) |
||||
should be used to discuss complicated or controversial consensus or P2P protocol changes before working on |
||||
a patch set. |
||||
|
||||
|
||||
Contributor Workflow |
||||
-------------------- |
||||
|
||||
The codebase is maintained using the "contributor workflow" where everyone |
||||
without exception contributes patch proposals using "pull requests" (PRs). This |
||||
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://help.github.com/en/articles/fork-a-repo)) |
||||
1. Create topic branch |
||||
1. Commit patches |
||||
|
||||
For GUI-related issues or pull requests, the https://github.com/bitcoin-core/gui repository should be used. |
||||
For all other issues and pull requests, the https://github.com/bitcoin/bitcoin node repository should be used. |
||||
|
||||
The master branch for all monotree repositories is identical. |
||||
|
||||
As a rule of thumb, everything that only modifies `src/qt` is a GUI-only pull |
||||
request. However: |
||||
|
||||
* For global refactoring or other transversal changes the node repository |
||||
should be used. |
||||
* For GUI-related build system changes, the node repository should be used |
||||
because the change needs review by the build systems reviewers. |
||||
* Changes in `src/interfaces` need to go to the node repository because they |
||||
might affect other components like the wallet. |
||||
|
||||
For large GUI changes that include build system and interface changes, it is |
||||
recommended to first open a pull request against the GUI repository. When there |
||||
is agreement to proceed with the changes, a pull request with the build system |
||||
and interfaces changes can be submitted to the node repository. |
||||
|
||||
The project coding conventions in the [developer notes](doc/developer-notes.md) |
||||
must be followed. |
||||
|
||||
### Committing Patches |
||||
|
||||
In general, [commits should be atomic](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) |
||||
and diffs should be easy to read. For this reason, do not mix any formatting |
||||
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. |
||||
|
||||
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 "Corrected 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://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 |
||||
will cause the corresponding issue to be closed when the pull request is merged. |
||||
|
||||
Commit messages should never contain any `@` mentions (usernames prefixed with "@"). |
||||
|
||||
Please refer to the [Git manual](https://git-scm.com/doc) for more information |
||||
about Git. |
||||
|
||||
- Push changes to your fork |
||||
- Create pull request |
||||
|
||||
### Creating the Pull Request |
||||
|
||||
The title of the pull request should be prefixed by the component or area that |
||||
the pull request affects. Valid areas as: |
||||
|
||||
- `consensus` for changes to consensus critical code |
||||
- `doc` for changes to the documentation |
||||
- `qt` or `gui` for changes to bitcoin-qt |
||||
- `log` for changes to log messages |
||||
- `mining` for changes to the mining code |
||||
- `net` or `p2p` for changes to the peer-to-peer network code |
||||
- `refactor` for structural changes that do not change behavior |
||||
- `rpc`, `rest` or `zmq` for changes to the RPC, REST or ZMQ APIs |
||||
- `script` for changes to the scripts and tools |
||||
- `test`, `qa` or `ci` for changes to the unit tests, QA tests or CI code |
||||
- `util` or `lib` for changes to the utils or libraries |
||||
- `wallet` for changes to the wallet code |
||||
- `build` for changes to the GNU Autotools or reproducible builds |
||||
|
||||
Examples: |
||||
|
||||
consensus: Add new opcode for BIP-XXXX OP_CHECKAWESOMESIG |
||||
net: Automatically create onion service, listen on Tor |
||||
qt: Add feed bump button |
||||
log: Fix typo in log message |
||||
|
||||
The body of the pull request should contain sufficient description of *what* the |
||||
patch does, and even more importantly, *why*, with justification and reasoning. |
||||
You should include references to any discussions (for example, other issues or |
||||
mailing list discussions). |
||||
|
||||
The description for a new pull request should not contain any `@` mentions. The |
||||
PR description will be included in the commit message when the PR is merged and |
||||
any users mentioned in the description will be annoyingly notified each time a |
||||
fork of Bitcoin Core copies the merge. Instead, make any username mentions in a |
||||
subsequent comment to the PR. |
||||
|
||||
### Translation changes |
||||
|
||||
Note that translations should not be submitted as pull requests. Please see |
||||
[Translation Process](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md) |
||||
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://help.github.com/articles/basic-writing-and-formatting-syntax/#task-lists) |
||||
in the body of the pull request to indicate tasks are pending. |
||||
|
||||
### Address Feedback |
||||
|
||||
At this stage, one should expect comments and review from other contributors. You |
||||
can add more commits to your pull request by committing them locally and pushing |
||||
to your fork until you have satisfied all feedback. |
||||
|
||||
Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NACK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes. |
||||
|
||||
### Squashing Commits |
||||
|
||||
If your pull request contains fixup commits (commits that change the same line of code repeatedly) or too fine-grained |
||||
commits, you may be asked to [squash](https://git-scm.com/docs/git-rebase#_interactive_mode) your commits |
||||
before it will be reviewed. The basic squashing workflow is shown below. |
||||
|
||||
git checkout your_branch_name |
||||
git rebase -i HEAD~n |
||||
# n is normally the number of commits in the pull request. |
||||
# Set commits (except the one in the first line) from 'pick' to 'squash', save and quit. |
||||
# On the next screen, edit/refine commit messages. |
||||
# Save and quit. |
||||
git push -f # (force push to GitHub) |
||||
|
||||
Please update the resulting commit message, if needed. It should read as a |
||||
coherent message. In most cases, this means not just listing the interim |
||||
commits. |
||||
|
||||
If you have problems with squashing or other git workflows, you can enable |
||||
"Allow edits from maintainers" in the right-hand sidebar of the GitHub web |
||||
interface and ask for help in the pull request. |
||||
|
||||
Please refrain from creating several pull requests for the same change. |
||||
Use the pull request that is already open (or was created earlier) to amend |
||||
changes. This preserves the discussion and review that happened earlier for |
||||
the respective change set. |
||||
|
||||
The length of time required for peer review is unpredictable and will vary from |
||||
pull request to pull request. |
||||
|
||||
### Rebasing Changes |
||||
|
||||
When a pull request conflicts with the target branch, you may be asked to rebase it on top of the current target branch. |
||||
The `git rebase` command will take care of rebuilding your commits on top of the new base. |
||||
|
||||
This project aims to have a clean git history, where code changes are only made in non-merge commits. This simplifies |
||||
auditability because merge commits can be assumed to not contain arbitrary code changes. Merge commits should be signed, |
||||
and the resulting git tree hash must be deterministic and reproducible. The script in |
||||
[/contrib/verify-commits](/contrib/verify-commits) checks that. |
||||
|
||||
After a rebase, reviewers are encouraged to sign off on the force push. This should be relatively straightforward with |
||||
the `git range-diff` tool explained in the [productivity |
||||
notes](/doc/productivity.md#diff-the-diffs-with-git-range-diff). To avoid needless review churn, maintainers will |
||||
generally merge pull requests that received the most review attention first. |
||||
|
||||
Pull Request Philosophy |
||||
----------------------- |
||||
|
||||
Patchsets should always be focused. For example, a pull request could add a |
||||
feature, fix a bug, or refactor code; but not a mixture. Please also avoid super |
||||
pull requests which attempt to do too much, are overly large, or overly complex |
||||
as this makes review difficult. |
||||
|
||||
|
||||
### Features |
||||
|
||||
When adding a new feature, thought must be given to the long term technical debt |
||||
and maintenance that feature may require after inclusion. Before proposing a new |
||||
feature that will require maintenance, please consider if you are willing to |
||||
maintain it (including bug fixing). If features get orphaned with no maintainer |
||||
in the future, they may be removed by the Repository Maintainer. |
||||
|
||||
|
||||
### Refactoring |
||||
|
||||
Refactoring is a necessary part of any software project's evolution. The |
||||
following guidelines cover refactoring pull requests for the project. |
||||
|
||||
There are three categories of refactoring: code-only moves, code style fixes, and |
||||
code refactoring. In general, refactoring pull requests should not mix these |
||||
three kinds of activities in order to make refactoring pull requests easy to |
||||
review and uncontroversial. In all cases, refactoring PRs must not change the |
||||
behaviour of code within the pull request (bugs must be preserved as is). |
||||
|
||||
Project maintainers aim for a quick turnaround on refactoring pull requests, so |
||||
where possible keep them short, uncomplex and easy to verify. |
||||
|
||||
Pull requests that refactor the code should not be made by new contributors. It |
||||
requires a certain level of experience to know where the code belongs to and to |
||||
understand the full ramification (including rebase effort of open pull requests). |
||||
|
||||
Trivial pull requests or pull requests that refactor the code with no clear |
||||
benefits may be immediately closed by the maintainers to reduce unnecessary |
||||
workload on reviewing. |
||||
|
||||
|
||||
"Decision Making" Process |
||||
------------------------- |
||||
|
||||
The following applies to code changes to the Bitcoin Core project (and related |
||||
projects such as libsecp256k1), and is not to be confused with overall Bitcoin |
||||
Network Protocol consensus changes. |
||||
|
||||
Whether a pull request is merged into Bitcoin Core rests with the project merge |
||||
maintainers and ultimately the project lead. |
||||
|
||||
Maintainers will take into consideration if a patch is in line with the general |
||||
principles of the project; meets the minimum standards for inclusion; and will |
||||
judge the general consensus of contributors. |
||||
|
||||
In general, all pull requests must: |
||||
|
||||
- Have a clear use case, fix a demonstrable bug or serve the greater good of |
||||
the project (for example refactoring for modularisation); |
||||
- Be well peer-reviewed; |
||||
- Have unit tests, functional tests, and fuzz tests, where appropriate; |
||||
- Follow code style guidelines ([C++](doc/developer-notes.md), [functional tests](test/functional/README.md)); |
||||
- Not break the existing test suite; |
||||
- Where bugs are fixed, where possible, there should be unit tests |
||||
demonstrating the bug and also proving the fix. This helps prevent regression. |
||||
- Change relevant comments and documentation when behaviour of code changes. |
||||
|
||||
Patches that change Bitcoin consensus rules are considerably more involved than |
||||
normal because they affect the entire ecosystem and so must be preceded by |
||||
extensive mailing list discussions and have a numbered BIP. While each case will |
||||
be different, one should be prepared to expend more time and effort than for |
||||
other kinds of patches because of increased peer review and consensus building |
||||
requirements. |
||||
|
||||
|
||||
### Peer Review |
||||
|
||||
Anyone may participate in peer review which is expressed by comments in the pull |
||||
request. Typically reviewers will review the code for obvious errors, as well as |
||||
test out the patch set and opine on the technical merits of the patch. Project |
||||
maintainers take into account the peer review when determining if there is |
||||
consensus to merge a pull request (remember that discussions may have been |
||||
spread out over GitHub, mailing list and IRC discussions). |
||||
|
||||
#### Conceptual Review |
||||
|
||||
A review can be a conceptual review, where the reviewer leaves a comment |
||||
* `Concept (N)ACK`, meaning "I do (not) agree with the general goal of this pull |
||||
request", |
||||
* `Approach (N)ACK`, meaning `Concept ACK`, but "I do (not) agree with the |
||||
approach of this change". |
||||
|
||||
A `NACK` needs to include a rationale why the change is not worthwhile. |
||||
NACKs without accompanying reasoning may be disregarded. |
||||
|
||||
#### Code Review |
||||
|
||||
After conceptual agreement on the change, code review can be provided. A review |
||||
begins with `ACK BRANCH_COMMIT`, where `BRANCH_COMMIT` is the top of the PR |
||||
branch, followed by a description of how the reviewer did the review. The |
||||
following language is used within pull request comments: |
||||
|
||||
- "I have tested the code", involving change-specific manual testing in |
||||
addition to running the unit, functional, or fuzz tests, and in case it is |
||||
not obvious how the manual testing was done, it should be described; |
||||
- "I have not tested the code, but I have reviewed it and it looks |
||||
OK, I agree it can be merged"; |
||||
- A "nit" refers to a trivial, often non-blocking issue. |
||||
|
||||
Project maintainers reserve the right to weigh the opinions of peer reviewers |
||||
using common sense judgement and may also weigh based on merit. Reviewers that |
||||
have demonstrated a deeper commitment and understanding of the project over time |
||||
or who have clear domain expertise may naturally have more weight, as one would |
||||
expect in all walks of life. |
||||
|
||||
Where a patch set affects consensus-critical code, the bar will be much |
||||
higher in terms of discussion and peer review requirements, keeping in mind that |
||||
mistakes could be very costly to the wider community. This includes refactoring |
||||
of consensus-critical code. |
||||
|
||||
Where a patch set proposes to change the Bitcoin consensus, it must have been |
||||
discussed extensively on the mailing list and IRC, be accompanied by a widely |
||||
discussed BIP and have a generally widely perceived technical consensus of being |
||||
a worthwhile change based on the judgement of the maintainers. |
||||
|
||||
### Finding Reviewers |
||||
|
||||
As most reviewers are themselves developers with their own projects, the review |
||||
process can be quite lengthy, and some amount of patience is required. If you find |
||||
that you've been waiting for a pull request to be given attention for several |
||||
months, there may be a number of reasons for this, some of which you can do something |
||||
about: |
||||
|
||||
- It may be because of a feature freeze due to an upcoming release. During this time, |
||||
only bug fixes are taken into consideration. If your pull request is a new feature, |
||||
it will not be prioritized until after the release. Wait for the release. |
||||
- It may be because the changes you are suggesting do not appeal to people. Rather than |
||||
nits and critique, which require effort and means they care enough to spend time on your |
||||
contribution, thundering silence is a good sign of widespread (mild) dislike of a given change |
||||
(because people don't assume *others* won't actually like the proposal). Don't take |
||||
that personally, though! Instead, take another critical look at what you are suggesting |
||||
and see if it: changes too much, is too broad, doesn't adhere to the |
||||
[developer notes](doc/developer-notes.md), is dangerous or insecure, is messily written, etc. |
||||
Identify and address any of the issues you find. Then ask e.g. on IRC if someone could give |
||||
their opinion on the concept itself. |
||||
- 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://help.github.com/articles/tracing-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 |
||||
a look. If you think you've been waiting for an unreasonably long time (say, |
||||
more than a month) for no particular reason (a few lines changed, etc.), |
||||
this is totally fine. Try to return the favor when someone else is asking |
||||
for feedback on their code, and the universe balances out. |
||||
- Remember that the best thing you can do while waiting is give review to others! |
||||
|
||||
|
||||
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 |
||||
when needed (the original author does not need to worry about it). |
||||
|
||||
A backport should contain the following metadata in the commit body: |
||||
|
||||
``` |
||||
Github-Pull: #<PR number> |
||||
Rebased-From: <commit hash of the original commit> |
||||
``` |
||||
|
||||
Have a look at [an example backport PR]( |
||||
https://github.com/bitcoin/bitcoin/pull/16189). |
||||
|
||||
Also see the [backport.py script]( |
||||
https://github.com/bitcoin-core/bitcoin-maintainer-tools#backport). |
||||
|
||||
Release Policy |
||||
-------------- |
||||
|
||||
The project leader is the release manager for each Bitcoin Core release. |
||||
|
||||
Copyright |
||||
--------- |
||||
|
||||
By contributing to this repository, you agree to license your work under the |
||||
MIT license unless specified otherwise in `contrib/debian/copyright` or at |
||||
the top of the file itself. Any work contributed where you are not the original |
||||
author must contain its license header with the original author(s) and source. |
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT) |
||||
|
||||
Copyright (c) 2009-2021 The Bitcoin Core developers |
||||
Copyright (c) 2009-2021 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 |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
@ -0,0 +1,5 @@
|
||||
Building Bitcoin |
||||
================ |
||||
|
||||
See doc/build-*.md for instructions on building the various |
||||
elements of the Bitcoin Core reference implementation of Bitcoin. |
@ -0,0 +1,380 @@
|
||||
# Copyright (c) 2013-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.
|
||||
|
||||
# Pattern rule to print variables, e.g. make print-top_srcdir
|
||||
print-%: FORCE |
||||
@echo '$*'='$($*)'
|
||||
|
||||
ACLOCAL_AMFLAGS = -I build-aux/m4
|
||||
SUBDIRS = src
|
||||
if ENABLE_MAN |
||||
SUBDIRS += doc/man
|
||||
endif |
||||
.PHONY: deploy FORCE |
||||
.INTERMEDIATE: $(OSX_TEMP_ISO) $(COVERAGE_INFO) |
||||
|
||||
export PYTHONPATH |
||||
|
||||
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_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT)
|
||||
BITCOIN_TX_BIN=$(top_builddir)/src/$(BITCOIN_TX_NAME)$(EXEEXT)
|
||||
BITCOIN_UTIL_BIN=$(top_builddir)/src/$(BITCOIN_UTIL_NAME)$(EXEEXT)
|
||||
BITCOIN_WALLET_BIN=$(top_builddir)/src/$(BITCOIN_WALLET_TOOL_NAME)$(EXEEXT)
|
||||
BITCOIN_NODE_BIN=$(top_builddir)/src/$(BITCOIN_MP_NODE_NAME)$(EXEEXT)
|
||||
BITCOIN_GUI_BIN=$(top_builddir)/src/$(BITCOIN_MP_GUI_NAME)$(EXEEXT)
|
||||
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win64-setup$(EXEEXT)
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
OSX_APP=Bitcoin-Qt.app
|
||||
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
|
||||
OSX_DMG = $(OSX_VOLNAME).dmg
|
||||
OSX_TEMP_ISO = $(OSX_DMG:.dmg=).temp.iso
|
||||
OSX_BACKGROUND_SVG=background.svg
|
||||
OSX_BACKGROUND_IMAGE=background.tiff
|
||||
OSX_BACKGROUND_IMAGE_DPIS=36 72
|
||||
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
|
||||
|
||||
DIST_CONTRIB = \
|
||||
$(top_srcdir)/test/sanitizer_suppressions/lsan \
|
||||
$(top_srcdir)/test/sanitizer_suppressions/tsan \
|
||||
$(top_srcdir)/test/sanitizer_suppressions/ubsan \
|
||||
$(top_srcdir)/contrib/linearize/linearize-data.py \
|
||||
$(top_srcdir)/contrib/linearize/linearize-hashes.py
|
||||
|
||||
DIST_SHARE = \
|
||||
$(top_srcdir)/share/genbuild.sh \
|
||||
$(top_srcdir)/share/rpcauth
|
||||
|
||||
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
|
||||
$(top_srcdir)/contrib/devtools/security-check.py \
|
||||
$(top_srcdir)/contrib/devtools/utils.py \
|
||||
$(top_srcdir)/contrib/devtools/pixie.py
|
||||
|
||||
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
|
||||
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
|
||||
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
|
||||
$(top_srcdir)/doc/README_windows.txt
|
||||
|
||||
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \
|
||||
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
|
||||
|
||||
COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \
|
||||
test_bitcoin_filtered.info total_coverage.info \
|
||||
baseline_filtered.info functional_test.info functional_test_filtered.info \
|
||||
test_bitcoin_coverage.info test_bitcoin.info fuzz.info fuzz_filtered.info fuzz_coverage.info
|
||||
|
||||
dist-hook: |
||||
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
||||
|
||||
if TARGET_WINDOWS |
||||
$(BITCOIN_WIN_INSTALLER): all-recursive |
||||
$(MKDIR_P) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_TX_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_WALLET_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_UTIL_BIN) $(top_builddir)/release
|
||||
@test -f $(MAKENSIS) && echo 'OutFile "$@"' | cat $(top_builddir)/share/setup.nsi - | $(MAKENSIS) -V2 - || \
|
||||
echo error: could not build $@
|
||||
@echo built $@
|
||||
|
||||
deploy: $(BITCOIN_WIN_INSTALLER) |
||||
endif |
||||
|
||||
if TARGET_DARWIN |
||||
$(OSX_APP)/Contents/PkgInfo: |
||||
$(MKDIR_P) $(@D)
|
||||
@echo "APPL????" > $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/empty.lproj: |
||||
$(MKDIR_P) $(@D)
|
||||
@touch $@
|
||||
|
||||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) |
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) |
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: all-recursive |
||||
$(MKDIR_P) $(@D)
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $@
|
||||