Skip to content

Commit f304bcb

Browse files
committed
Merge #51: Move to using git subtree with --squash
aeabad8 Cut over to using the bitcoin core subtree (Tobin C. Harding) f751613 Squashed 'depend/bitcoin/' content from commit 204cc0f (Tobin C. Harding) d67852c Move bitcoin submodule to tmp/bitcoin (Tobin C. Harding) Pull request description: Same as #49 but uses `--squash`. Done to see if its better, obviously we do not want to merge both, one should be closed in favour of the other. Add a git subtree, I could not get the git subtree add command to use a commit hash so I used a tag - this led me to using v0.19.2 instead of the commit hash we are currently on (six commits after tag v0.19.0). Includes docs in the README and a version bump so this can be merged and release directly if so desired. Top commit has no ACKs. Tree-SHA512: f93caf6a13cd50c528c4d34371b79ef0706358c2fd479ffbbcd1a9bcd62bcf12e9abb956d22d3578c145be18da99398528be7b4d2ae07e97a482a9bf5482735a
2 parents b00bd50 + aeabad8 commit f304bcb

File tree

1,766 files changed

+490034
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,766 files changed

+490034
-21
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bitcoinconsensus"
33
# The first part is the Bitcoin Core version, the second part is the version of this lib.
4-
version = "0.19.0-0.4.0"
4+
version = "0.19.2-0.4.1"
55
authors = ["Tamas Blummer <tamas.blummer@gmail.com>"]
66
license = "Apache-2.0"
77
homepage = "https://github.com/rust-bitcoin/rust-bitcoinconsensus/"

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,18 @@ The project [rust-secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) off
1818
This introduces a risk, since a difference between the two secp256k1 sources could break consensus with Bitcoin.
1919

2020

21-
## Build
22-
23-
This project has a submodule (the Bitcoin Core sources), you have to clone it using:
24-
25-
`
26-
git clone --recurse-submodules git@github.com:rust-bitcoin/rust-bitcoinconsensus.git
27-
`
28-
29-
then build it simple with:
30-
31-
`
32-
cargo build
33-
`
34-
35-
I verified the build for Linux and OSX. Aleksey Sidorov contributed the windows build. PRs are welcome to extend support for other platforms.
21+
## Bitcoin Core subtree
22+
23+
We use a git subtree to vendor the Bitcoin Core code. This can be seen from the following commits that were created using `git subtree add --prefix='depend/bitcoin' git@github.com:bitcoin/bitcoin.git v0.19.2 --squash`.
24+
```
25+
f751613e62 Squashed 'depend/bitcoin/' content from commit 204cc0f575
26+
264282188a Merge commit 'f751613e6203770fa94143b9aba1d116512f0ce7' as 'depend/bitcoin'
27+
```
28+
29+
To use a later version of Bitcoin Core, for example, v0.20.2
30+
```
31+
git subtree pull --prefix='depend/bitcoin' git@github.com:bitcoin/bitcoin.git v0.20.2 --squash
32+
```
3633

3734

3835
## MSRV

depend/bitcoin

Lines changed: 0 additions & 1 deletion
This file was deleted.

depend/bitcoin/.appveyor.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
version: '{branch}.{build}'
2+
skip_tags: true
3+
image: Visual Studio 2019
4+
configuration: Release
5+
platform: x64
6+
clone_depth: 5
7+
environment:
8+
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
9+
PYTHONUTF8: 1
10+
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
11+
QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
12+
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
13+
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
14+
VCPKG_COMMIT_ID: '40230b8e3f6368dcb398d649331be878ca1e9007'
15+
install:
16+
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
17+
# - cmd: pip install zmq
18+
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
19+
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
20+
# b. Install the missing packages.
21+
- ps: |
22+
$env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt
23+
Write-Host "vcpkg installing packages: $env:PACKAGES"
24+
cd c:\tools\vcpkg
25+
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
26+
git pull origin master > $null
27+
git checkout $env:VCPKG_COMMIT_ID
28+
git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
29+
.\bootstrap-vcpkg.bat > $null
30+
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
31+
.\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
32+
Write-Host "vcpkg packages installed successfully."
33+
.\vcpkg integrate install
34+
cd "$env:APPVEYOR_BUILD_FOLDER"
35+
before_build:
36+
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:
37+
# a. Download the zip file with the prebuilt Qt static libraries.
38+
# b. Check that the downloaded file matches the expected hash.
39+
# c. Extract the zip file to the specific destination path expected by the msbuild projects.
40+
- ps: |
41+
Write-Host "Downloading Qt binaries.";
42+
Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
43+
Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
44+
if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
45+
Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
46+
Write-Host "Qt binary download matched the expected hash.";
47+
}
48+
else {
49+
Write-Host "ERROR: Qt binary download did not match the expected hash.";
50+
Exit-AppveyorBuild;
51+
}
52+
- cmd: python build_msvc\msvc-autogen.py
53+
build_script:
54+
- cmd: msbuild /p:TrackFileAccess=false build_msvc\bitcoin.sln /m /v:q /nologo
55+
after_build:
56+
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
57+
test_script:
58+
- cmd: src\test_bitcoin.exe -k stdout -e stdout 2> NUL
59+
- cmd: src\bench_bitcoin.exe -evals=1 -scaling=0 > NUL
60+
- ps: python test\util\bitcoin-util-test.py
61+
- cmd: python test\util\rpcauth-test.py
62+
# Fee estimation test failing on appveyor with: WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted.
63+
- cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation
64+
artifacts:
65+
#- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip
66+
deploy: off

depend/bitcoin/.cirrus.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
task:
2+
name: "x86_64 Linux [GOAL: install] [bionic] [Using ./ci/ system]"
3+
container:
4+
image: ubuntu:18.04
5+
cpu: 8
6+
memory: 8G
7+
timeout_in: 60m
8+
env:
9+
MAKEJOBS: "-j9"
10+
RUN_CI_ON_HOST: "1"
11+
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
12+
CCACHE_SIZE: "200M"
13+
CCACHE_DIR: "/tmp/ccache_dir"
14+
ccache_cache:
15+
folder: "/tmp/ccache_dir"
16+
depends_built_cache:
17+
folder: "/tmp/cirrus-ci-build/depends/built"
18+
depends_sdk_cache:
19+
folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
20+
install_script:
21+
- apt-get update
22+
- apt-get -y install git bash ccache
23+
- ccache --max-size=${CCACHE_SIZE}
24+
ci_script:
25+
- ./ci/test_run_all.sh

depend/bitcoin/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/clientversion.cpp export-subst
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- This issue tracker is only for technical issues related to Bitcoin Core.
2+
3+
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.
4+
5+
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
6+
7+
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! -->
8+
9+
<!-- Describe the issue -->
10+
<!--- What behavior did you expect? -->
11+
12+
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
13+
14+
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
15+
16+
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
17+
18+
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
19+
20+
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
21+
22+
<!-- Any extra information that might be useful in the debugging process. -->
23+
<!--- 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. -->
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: Bug
6+
assignees: ''
7+
8+
---
9+
10+
<!-- This issue tracker is only for technical issues related to Bitcoin Core.
11+
12+
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.
13+
14+
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
15+
16+
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! -->
17+
18+
<!-- Describe the issue -->
19+
20+
**Expected behavior**
21+
22+
<!--- What behavior did you expect? -->
23+
24+
**Actual behavior**
25+
26+
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
27+
28+
**To reproduce**
29+
30+
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
31+
32+
**System information**
33+
34+
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
35+
36+
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
37+
38+
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
39+
40+
<!-- Any extra information that might be useful in the debugging process. -->
41+
<!--- 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. -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: Feature
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
12+
13+
**Describe the solution you'd like**
14+
<!-- A clear and concise description of what you want to happen. -->
15+
16+
**Describe alternatives you've considered**
17+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
18+
19+
**Additional context**
20+
<!-- Add any other context or screenshots about the feature request here. -->

0 commit comments

Comments
 (0)