Commit Graph

13026 Commits

Author SHA1 Message Date
Homu a2d719b9ff Auto merge of #4324 - zancas:4323_replace_boost_fn_w_std_fn, r=str4d
Replace boost::function with std::function

Fixes: #4323

This logic is cherry-picked from the relevant commit, as referenced here:

https://github.com/bitcoin/bitcoin/pull/10395
2020-02-07 20:49:18 +00:00
Homu ba20384845 Auto merge of #4218 - Eirik0:4158-fix-recursive-memusage, r=str4d
Include shielded transaction data in RecursiveDynamicUsage calculation

Fixes #4158
2020-02-07 14:19:31 +00:00
Homu e93586a0c4 Auto merge of #4331 - zcash:hotfix-v2.1.1-1, r=ebfull
Hotfix v2.1.1-1

The commits in this PR have been reviewed internally by our team.
2020-02-07 04:50:43 +00:00
ebfull 5cb77119e4
Merge pull request #50 from zcash/release-v2.1.1-1
Release v2.1.1-1
2020-02-06 17:01:39 -07:00
Sean Bowe 5361ce1e8c
Mark release v2.1.1-1 as critical. 2020-02-06 16:53:31 -07:00
Sean Bowe 7095fa9307
Changes to release notes. 2020-02-06 16:53:25 -07:00
Sean Bowe 7d21fdb582
make-release.py: Updated release notes and changelog for 2.1.1-1. 2020-02-06 16:53:19 -07:00
Sean Bowe b10c90de34
make-release.py: Updated manpages for 2.1.1-1. 2020-02-06 16:53:18 -07:00
Sean Bowe afc553c448
make-release.py: Versioning changes for 2.1.1-1. 2020-02-06 16:51:15 -07:00
ebfull afdb0207a5
Merge pull request #49 from zcash/fix-static-asserts
Add a second string argument to each `static_assert`, in order to be compatible with C++11
2020-02-06 16:50:08 -07:00
Daira Hopwood ca8d32070a Add string argument to static_asserts to satisfy C++11.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-06 23:35:56 +00:00
ebfull afe7c672d7
Merge pull request #47 from zcash/fix-contextualcheckblock-tests
Fix ContextualCheckBlock tests
2020-02-06 14:13:01 -07:00
Daira Hopwood e9e9bda329 Fix ContextualCheckBlock test (the ban score should be 100 since these are mined transactions).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-06 21:09:29 +00:00
ebfull e899837613
Merge pull request #44 from zcash/4283-contextualcheckblock-ban-policy
Apply a consistent ban policy within ContextualCheckTransaction
2020-02-06 11:11:13 -07:00
Jack Grigg 7bbd846f0f Apply a consistent ban policy within ContextualCheckTransaction 2020-02-06 14:30:37 +00:00
Sean Bowe 3d8af86c2c Release notes for vulnerability and -maxtimeadjustment option.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-05 17:00:09 +00:00
Daira Hopwood eb5e328073 Add -maxtimeadjustment with default of 0 instead of the 4200 seconds used in Bitcoin Core.
Based on 40061b05dc

Co-authored-by: mruddy <mruddy@users.noreply.github.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-05 17:00:09 +00:00
zancas 8b6d9e55ba
Remove remaining instances of boost::function
These were not addressed by @practicalswift's upstream fix.
2020-02-04 20:08:25 -07:00
practicalswift b841318ce8
Replace boost::function with std::function (C++11) 2020-02-04 19:54:25 -07:00
Daira Hopwood 3010c9277c Cosmetic: brace style in ContextualCheckBlockHeader.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 23:40:04 +00:00
Daira Hopwood 4ab896c69d Enable future timestamp soft fork at varying heights according to network.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 23:40:04 +00:00
Jack Grigg 5199ecdf41 test: Update RPC test cache generation to handle new consensus rule
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 23:12:36 +00:00
Daira Hopwood bdb985a627 Adjust the miner to satisfy consensus regarding future timestamps relative to median-time-past.
Co-authored-by: Jack Grigg <jack@z.cash>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 23:12:36 +00:00
Daira Hopwood 7704ab4846 Soft fork: restrict block timestamps to be no more than 90 minutes after the MTP of the previous block.
Note that the MTP of a block is the median timestamp of the preceding 11 blocks, i.e. it is
typically (with no or only moderate timestamp manipulation) expected to be 6 block intervals
behind that block's timestamp, which *on average* is 450 seconds behind (after Blossom activation).
So the effective limit on future dating of timestamps is ~82.5 minutes. This makes it
exceptionally unlikely --even taking into account feasible timestamp manipulation of this
and previous blocks-- that the chain will stall because no block is found before the limit.
(This may rely on assumptions that do not hold for testnet.)

If an adversary were to have a sufficient fraction of mining power to engineer this situation
then there would be something seriously wrong, and arguably the chain should stall in that
case, pending manual intervention.

Co-authored-by: Jack Grigg <jack@z.cash>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 21:34:05 +00:00
Daira Hopwood a3bb1966eb Add constant for how far a block timestamp can be ahead of adjusted time.
Loosely based on e57a1fd899

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 19:46:48 +00:00
Daira Hopwood 3a001196b6 Improve messages for timestamp rules.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 19:45:03 +00:00
Daira Hopwood df6b4639d2 Move check for block times that are too far ahead of adjusted time, to ContextualCheckBlock.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 19:40:52 +00:00
Homu 7f02ade06b Auto merge of #4320 - zancas:4319_spurious_virtual, r=daira
Remove spurious "virtual" and add "override" in leaf subclasses

Fixes: #4319

The use of virtual on these lines was unnecessary.

I ran:

"rm -f ./src/zcash-gtest && rm -f ./src/gtest/*.o && rm -f ./src/gtest/*.Po && make && ./src/zcash-gtest"

before and after making the change.   In both cases:

206 test ran from 32 cases and 1 test was DISABLED
2020-02-02 13:49:09 +00:00
zancas 9f4c93a16c
replace "virtual" with "override" in subclasses
The use of virtual on these lines is obsolete.

I ran:

"rm -f ./src/zcash-gtest && rm -f ./src/gtest/*.o && make && ./src/zcash-gtest"

before an after making the change.   In both cases:

206 test ran
from
32 cases
and
1 test was DISABLED
2020-02-01 15:58:21 -07:00
Homu 529f102cac Auto merge of #4318 - str4d:configure-and-build-updates, r=str4d
More updates to the build system

Part of #58 and #4317.
2020-01-31 15:00:08 +00:00
Jack Grigg 795e1f40c5 Add build system changes to release notes 2020-01-31 14:58:52 +00:00
Jack Grigg 2e9028f1f1 Move default -g flag into configure.ac behind --enable-debug=no
This ensures that if --enable-debug is set, we correctly use -g3 if it
is available, instead of overriding it.

Part of #4317.
2020-01-31 13:39:38 +00:00
Jack Grigg 999b3a3235 Make -fwrapv conditional on --enable-debug=no
-fwrapv and -ftrapv conflict, and whichever is last takes precedence
(for gcc). This meant that -ftrapv was being ignored when --enable-debug
was set. This commit correctly sets only one of them based on whether
--enable-debug is set.

Part of #4317.
2020-01-31 13:22:07 +00:00
Jack Grigg d458cf627a zcutil/build.sh: Turn off verbosity by default
Users who want verbose output (like CI) can call ./zcutil/build.sh V=1
2020-01-31 12:12:07 +00:00
Jack Grigg 42a58f1e23 configure: Change default Proton to match build.sh 2020-01-31 12:12:07 +00:00
Jack Grigg 2ed62edfd6 zcutil/build.sh: Remove lcov and mining flags
These flags can be directly moved into CONFIGURE_FLAGS.
2020-01-31 12:12:07 +00:00
Homu ca55eb4794 Auto merge of #3870 - defuse:update-check-script, r=str4d
Add Python script for checking if dependencies have updates.
2020-01-30 18:27:56 +00:00
Taylor Hornby 1ecf2bae48 Make updatecheck.py compatible with python2 2020-01-30 11:11:37 -07:00
Homu 8e8a9350c3 Auto merge of #4222 - str4d:configure-updates, r=str4d
./configure updates

Includes code cherry-picked from the following upstream Bitcoin Core PRs:

- bitcoin/bitcoin#6748
- bitcoin/bitcoin#12373
- bitcoin/bitcoin#12692
- bitcoin/bitcoin#12901
- bitcoin/bitcoin#13005
- bitcoin/bitcoin#13445
- bitcoin/bitcoin#12686
- bitcoin/bitcoin#16435

Part of #2074.
2020-01-30 16:01:48 +00:00
Homu cafc8c7730 Auto merge of #4314 - oxarbitrage:patch-2, r=str4d
Remove travis

As per https://github.com/zcash/zcash/pull/4222#issuecomment-579717367 deleting travis file.
2020-01-29 16:20:19 +00:00
Alfredo Garcia 848526c170
Delete travis file 2020-01-29 12:11:46 -03:00
Taylor Hornby 5274f322b6 Cache releases to reduce network usage and improve performance 2020-01-28 14:53:36 -07:00
Taylor Hornby 992de545f9 Wrap long lines 2020-01-28 14:45:13 -07:00
Homu 37435aa2c2 Auto merge of #4220 - oxarbitrage:issue3748, r=str4d
Return address and type of imported key in z_importkey

Fixes #3748.
2020-01-25 00:45:00 +00:00
Homu 74ff73abab Auto merge of #3858 - str4d:microbench-1, r=str4d
Micro-benchmarking framework part 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6733
- bitcoin/bitcoin#6770
- bitcoin/bitcoin#6892
  - Excluding changes to `src/policy/policy.h` which we don't have yet.
- bitcoin/bitcoin#7934
  - Just the benchmark, not the performance improvements.
- bitcoin/bitcoin#8039
- bitcoin/bitcoin#8107
- bitcoin/bitcoin#8115
- bitcoin/bitcoin#8914
  - Required resolving several merge conflicts in code that had been refactored upstream. The changes were simple enough that I decided it was okay to impose merge conflicts on pulling in those refactors later.
- bitcoin/bitcoin#9200
- bitcoin/bitcoin#9202
  - Adds support for measuring CPU cycles, which is later removed in an upstream PR after the refactor. I am including it to reduce future merge conflicts.
- bitcoin/bitcoin#9281
  - Only changes to `src/bench/bench.cpp`
- bitcoin/bitcoin#9498
- bitcoin/bitcoin#9712
- bitcoin/bitcoin#9547
- bitcoin/bitcoin#9505
  - Just the benchmark, not the performance improvements.
- bitcoin/bitcoin#9792
  - Just the benchmark, not the performance improvements.
- bitcoin/bitcoin#10272
- bitcoin/bitcoin#10395
  - Only changes to `src/bench/`
- bitcoin/bitcoin#10735
  - Only changes to `src/bench/base58.cpp`
- bitcoin/bitcoin#10963
- bitcoin/bitcoin#11303
  - Only the benchmark backend change.
- bitcoin/bitcoin#11562
- bitcoin/bitcoin#11646
- bitcoin/bitcoin#11654

This pulls in all changes to the micro-benchmark framework prior to December 2017, when it was rewritten. The rewrite depends on other upstream PRs we have not pulled in yet.

This does not pull in all benchmarks prior to December 2017. It leaves out benchmarks that either test code we do not have yet (except for the `FastRandomContext` refactor, which I decided to pull in), or would require rewrites to work with our changes to the codebase.
2020-01-24 23:39:50 +00:00
Homu fbfa9df22a Auto merge of #3829 - MarkLTZ:master, r=str4d
Update gen_base58_test_vectors.py to work with multi-byte address and key prefixes

This PR closes https://github.com/zcash/zcash/issues/3772
2020-01-24 22:33:51 +00:00
Homu 599ebb9686 Auto merge of #3742 - defuse:pow-security-improvements, r=str4d
Equihash Macro and Testing Improvements
2020-01-24 20:52:30 +00:00
LitecoinZ 7604a3bfae Fix issue #3772
Co-authored-by: Jack Grigg <jack@z.cash>
2020-01-24 20:16:45 +00:00
Homu c3e6c06812 Auto merge of #4308 - zancas:4307_update_comment, r=daira
update comment, to correctly specify number of methods injected

ADD_SERIALIZE_METHODS was incorrectly documented as adding three methods, it now adds two, and the associated documentation correctly asserts this.
2020-01-24 16:02:40 +00:00
zancas d2c24e47ba
update comment, to correctly specify number of methods injected 2020-01-23 19:26:17 -07:00