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
Jack Grigg
dd591585d3
Simulate worst-case block verification
2020-01-30 19:14:20 +00:00
Jack Grigg
1eca94b0b1
Benchmark Zcash verification operations
2020-01-30 19:14:20 +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
Jack Grigg
877707798c
test: Check z_viewtransaction output in wallet_listreceived RPC test
2020-01-29 16:05:44 +00:00
Jack Grigg
347de0aae2
RPC: Use OutgoingViewingKeys to recover non-wallet Sapling outputs
2020-01-29 16:05:44 +00:00
Jack Grigg
f77915c587
RPC: Display valid UTF-8 memos in z_viewtransaction
2020-01-29 15:59:52 +00:00
Jack Grigg
97ab74a887
depends: Add utfcpp to dependencies
2020-01-29 15:59:52 +00:00
Jack Grigg
32ade1edb1
RPC: z_viewtransaction
2020-01-29 15:59:52 +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
Cory Fields
204384c016
build: Split hardening/fPIE options out
...
This allows for fPIE to be used selectively.
Zcash: Second half of upstream commit 17c4d9d1647bbac4b0557136b1c3d98c951feb79
First half was pulled in as c459de2f03
2020-01-22 21:41:28 +00:00
practicalswift
9f94f493f5
Initialize recently introduced non-static class member lastCycles to zero in constructor
...
lastCycles was introduced in 35328187463a7078b4206e394c21d5515929c7de which was merged into master yesterday.
Also initialize beginCycles to zero for consistency and completeness.
2020-01-22 21:41:28 +00:00
Matt Corallo
3182cde049
Require a steady clock for bench with at least micro precision
2020-01-22 21:41:28 +00:00
Cory Fields
671432ca2a
bench: prefer a steady clock if the resolution is no worse
2020-01-22 21:41:28 +00:00
Cory Fields
101cab5ce3
bench: switch to std::chrono for time measurements
...
std::chrono removes portability issues.
Rather than storing doubles, store the untouched time_points. Then
convert to nanoseconds for display. This allows for maximum precision, while
keeping results comparable between differing hardware/operating systems.
Also, display full nanosecond counts rather than sub-second floats.
2020-01-22 21:41:28 +00:00
Matt Corallo
3954f0cdc0
Remove countMaskInv caching in bench framework
...
We were saving a div by caching the inverse as a float, but this
ended up requiring a int -> float -> int conversion, which takes
almost as much time as the difference between float mul and div.
There are lots of other more pressing issues with the bench
framework which probably require simply removing the adaptive
iteration count stuff anyway.
2020-01-22 21:41:28 +00:00