Skip to content

Commit af1233c

Browse files
authored
Merge pull request dashpay#1804 from codablock/pr_backport_bitcoin_0.13-4
Backport missing PRs from Bitcoin 0.13 - Part 4
2 parents 3110f7e + 34b7fdd commit af1233c

File tree

139 files changed

+2170
-1379
lines changed

Some content is hidden

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

139 files changed

+2170
-1379
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ env:
4949
# No wallet
5050
- HOST=x86_64-unknown-linux-gnu PPA="ppa:bitcoin/bitcoin" PACKAGES="python3" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
5151
# Cross-Mac
52-
- HOST=x86_64-apple-darwin11 PPA="ppa:bitcoin/bitcoin" PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy"
52+
- HOST=x86_64-apple-darwin11 PPA="ppa:bitcoin/bitcoin" PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy"
5353

5454
before_install:
5555
- git clone https://github.com/dashpay/dash_hash
56-
- travis_retry sudo apt-get install python-dev
56+
- travis_retry sudo apt-get install python3-pip python3-dev
5757
- travis_retry sudo add-apt-repository ppa:ubuntu-wine/ppa -y
5858
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
5959
install:
60-
- if [ "$PYZMQ" = "true" ]; then pip install pyzmq --user ; fi
60+
- if [ "$PYZMQ" = "true" ]; then pip3 install pyzmq --user ; fi
6161
- if [ -n "$PPA" ]; then travis_retry sudo add-apt-repository "$PPA" -y; fi
6262
- if [ -n "$DPKG_ADD_ARCH" ]; then sudo dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi
6363
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
6464
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
65-
- cd dash_hash && python setup.py install --user && cd ..
65+
- cd dash_hash && python3 setup.py install --user && cd ..
6666
before_script:
6767
- unset CC; unset CXX
6868
- unset DISPLAY

CONTRIBUTING.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ To contribute a patch, the workflow is as follows:
1717
- Create topic branch
1818
- Commit patches
1919

20-
The project coding conventions in [doc/developer-notes.md](doc/developer-notes.md) must be adhered to.
20+
The project coding conventions in the [developer notes](doc/developer-notes.md) must be adhered to.
2121

2222
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.
2323

2424
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 main.cpp") then 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](http://chris.beams.io/posts/git-commit/).
2525

26-
If a particular commit references another issue, please add the reference, for example "refs #1234", or "fixes #4321". Using "fixes or closes" keywords will cause the corresponding issue to be closed when the pull request is merged.
26+
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.
2727

2828
Please refer to the [Git manual](https://git-scm.com/doc) for more information about Git.
2929

@@ -35,13 +35,27 @@ The title of the pull request should be prefixed by the component or area that t
3535
Consensus: Add new opcode for BIP-XXXX OP_CHECKAWESOMESIG
3636
Net: Automatically create hidden service, listen on Tor
3737
Qt: Add feed bump button
38-
Trivial: fix typo
38+
Trivial: Fix typo in main.cpp
3939

40-
If a pull request is specifically not to be considered for merging (yet) please prefix the title with [WIP] or use [Tasks Lists](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments) in the body of the pull request to indicate tasks are pending.
40+
If a pull request is specifically 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.
4141

4242
The body of the pull request should contain enough description about what the patch does together with any justification/reasoning. You should include references to any discussions (for example other tickets or mailing list discussions).
4343

44-
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. If your pull request is accepted for merging, you may be asked by a maintainer to squash and or rebase your commits before it will be merged. The length of time required for peer review is unpredictable and will vary from patch to patch.
44+
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.
45+
46+
Squashing Commits
47+
---------------------------
48+
If your pull request is accepted for merging, you may be asked by a maintainer to squash and or [rebase](https://git-scm.com/docs/git-rebase) your commits before it will be merged. The basic squashing workflow is shown below.
49+
50+
git checkout your_branch_name
51+
git rebase -i HEAD~n
52+
# n is normally the number of commits in the pull
53+
# set commits from 'pick' to 'squash', save and quit
54+
# on the next screen, edit/refine commit messages
55+
# save and quit
56+
git push -f # (force push to GitHub)
57+
58+
The length of time required for peer review is unpredictable and will vary from pull request to pull request.
4559

4660

4761
Pull Request Philosophy
@@ -61,7 +75,7 @@ Refactoring is a necessary part of any software project's evolution. The followi
6175

6276
There are three categories of refactoring, code only moves, code style fixes, code refactoring. In general refactoring pull requests should not mix these three kinds of activity 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).
6377

64-
Project maintainers aim for a quick turnaround on refactoring pull requests, so where possible keep them short, uncomplex and easy to verify.
78+
Project maintainers aim for a quick turnaround on refactoring pull requests, so where possible keep them short, uncomplex and easy to verify.
6579

6680

6781
"Decision Making" Process

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ There are also [regression and integration tests](/qa) of the RPC interface, wri
5252
in Python, that are run automatically on the build server.
5353
These tests can be run (if the [test dependencies](/qa) are installed) with: `qa/pull-tester/rpc-tests.py`
5454

55-
The Travis CI system makes sure that every pull request is built for Windows
56-
and Linux, OS X, and that unit and sanity tests are automatically run.
55+
The Travis CI system makes sure that every pull request is built for Windows, Linux, and OS X, and that unit/sanity tests are run automatically.
5756

5857
### Manual Quality Assurance (QA) Testing
5958

doc/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ The Dash Core repo's [root README](/README.md) contains relevant information on
5555
- [Shared Libraries](shared-libraries.md)
5656
- [BIPS](bips.md)
5757
- [Dnsseed Policy](dnsseed-policy.md)
58+
- [Benchmarking](benchmarking.md)
5859

5960
### Resources
6061
* Discuss on the [DashTalk](https://dashtalk.org/) forums, in the Development & Technical Discussion board.

doc/benchmarking.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Benchmarking
2+
============
3+
4+
Dash Core has an internal benchmarking framework, with benchmarks
5+
for cryptographic algorithms such as SHA1, SHA256, SHA512 and RIPEMD160. As well as the rolling bloom filter.
6+
7+
After compiling dash-core, the benchmarks can be run with:
8+
`src/bench/bench_dash`
9+
10+
The output will look similar to:
11+
```
12+
#Benchmark,count,min,max,average
13+
RIPEMD160,448,0.001245033173334,0.002638196945190,0.002461894814457
14+
RollingBloom-refresh,1,0.000635000000000,0.000635000000000,0.000635000000000
15+
RollingBloom-refresh,1,0.000108000000000,0.000108000000000,0.000108000000000
16+
RollingBloom-refresh,1,0.000107000000000,0.000107000000000,0.000107000000000
17+
RollingBloom-refresh,1,0.000204000000000,0.000204000000000,0.000204000000000
18+
SHA1,640,0.000909024336207,0.001938136418660,0.001843086257577
19+
SHA256,256,0.002209486499909,0.008500099182129,0.004300644621253
20+
SHA512,384,0.001319904176016,0.002813005447388,0.002615700786312
21+
Sleep100ms,10,0.205592155456543,0.210056066513062,0.104166316986084
22+
Trig,67108864,0.000000014997003,0.000000015448112,0.000000015188842
23+
```
24+
25+
More benchmarks are needed for, in no particular order:
26+
- Script Validation
27+
- CCoinDBView caching
28+
- Coins database
29+
- Memory pool
30+
- Wallet coin selection

doc/build-unix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ Dependency Build Instructions: Fedora
128128
-------------------------------------
129129
Build requirements:
130130

131-
sudo dnf install libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel
131+
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel
132132

133133
Optional:
134134

135135
sudo dnf install miniupnpc-devel
136136

137137
To build with Qt 5 (recommended) you need the following:
138138

139-
sudo dnf install qt5-qttools-devel qtr5-qtbase-devel protobuf-devel
139+
sudo dnf install qt5-qttools-devel qt5-qtbase-devel protobuf-devel
140140

141141
libqrencode (optional) can be installed with:
142142

doc/developer-notes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Various coding styles have been used during the history of the codebase,
55
and the result is not very consistent. However, we're now trying to converge to
66
a single style, so please use it in new code. Old code will be converted
77
gradually.
8-
- Basic rules specified in src/.clang-format. Use a recent clang-format-3.5 to format automatically.
8+
- Basic rules specified in [src/.clang-format](/src/.clang-format).
9+
Use a recent clang-format to format automatically using one of the [dev scripts]
10+
(/contrib/devtools/README.md#clang-formatpy).
911
- Braces on new lines for namespaces, classes, functions, methods.
1012
- Braces on the same line for everything else.
1113
- 4 space indentation (no tabs) for every block except namespaces.

doc/gitian-building.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ Then when building, override the remote URLs that gbuild would otherwise pull fr
452452
cd /some/root/path/
453453
git clone https://github.com/dashpay/dash-detached-sigs.git
454454
455-
BTCPATH=/some/root/path/dash.git
456-
SIGPATH=/some/root/path/dash-detached-sigs.git
455+
BTCPATH=/some/root/path/dash
456+
SIGPATH=/some/root/path/dash-detached-sigs
457457
458458
./bin/gbuild --url dash=${BTCPATH},signature=${SIGPATH} ../dash/contrib/gitian-descriptors/gitian-win-signer.yml
459459
```

doc/zmq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ newer. Typically, it is packaged by distributions as something like
3838
*libzmq3-dev*. The C++ wrapper for ZeroMQ is *not* needed.
3939

4040
In order to run the example Python client scripts in contrib/ one must
41-
also install *python-zmq*, though this is not necessary for daemon
41+
also install *python3-zmq*, though this is not necessary for daemon
4242
operation.
4343

4444
## Enabling

qa/README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,36 @@ Before running the tests, the following must be installed.
1111

1212
Unix
1313
----
14-
The python-zmq library is required. On Ubuntu or Debian it can be installed via:
14+
The python3-zmq library is required. On Ubuntu or Debian it can be installed via:
1515
```
16-
sudo apt-get install python-zmq
16+
sudo apt-get install python3-zmq
1717
```
1818

1919
Running tests
2020
=============
2121

22-
You can run any single test by calling `qa/pull-tester/rpc-tests.py <testname>`.
22+
You can run any single test by calling
2323

24-
Or you can run any combination of tests by calling `qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...`
24+
qa/pull-tester/rpc-tests.py <testname>
2525

26-
Run the regression test suite with `qa/pull-tester/rpc-tests.py`
26+
Or you can run any combination of tests by calling
2727

28-
Run all possible tests with `qa/pull-tester/rpc-tests.py -extended`
28+
qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...
2929

30-
Possible options:
30+
Run the regression test suite with
31+
32+
qa/pull-tester/rpc-tests.py
33+
34+
Run all possible tests with
35+
36+
qa/pull-tester/rpc-tests.py -extended
37+
38+
By default, tests will be run in parallel if you want to specify how many
39+
tests should be run in parallel, append `-paralell=n` (default n=4).
40+
41+
If you want to create a basic coverage report for the rpc test suite, append `--coverage`.
42+
43+
Possible options, which apply to each individual test run:
3144

3245
```
3346
-h, --help show this help message and exit

0 commit comments

Comments
 (0)