This commit is intended to resolve#4312.
It includes:
* a link reference to zip-0200
* EXPECTED_BLOCKS_PER_HOUR: names the value and makes explicit
probabilistic nature
* ACTIVATION_TO_DEPRECATION_BLOCKS: name an intermediate value for
readability
* enforce correct value for EXPECTED_BLOCK_PER_HOUR
Application of reviewer comments
* move #include below #ifndef/#define macro guard
https://en.wikipedia.org/wiki/Include_guard
* remove code obfuscating // 48
* update zip URL
* remove code obfuscating // 14 days
test: Update ZIP 215 test cases from ed25519-zebra
This includes the changes and additions to the test cases following this ed25519-zebra commit:
65ba7f36cc
By the time we reach any of these rules, we have already rejected
transactions without fOverwintered set, so we can assume that it is set.
We replace the vague "overwinter is active" message with a more specific
"overwintered flag must be set" from one of the removed rules.
This replaces `if (!saplingActive && overwinterActive)` with the
logically-equivalent `if (overwinterActive && !saplingActive)`, but
means that the Overwinter-introduced rules are now clustered together.
Replace most libsodium usage with Rust crates
We currently use four components of libsodium:
- Random byte generation
- BLAKE2b
- Ed25519
- ChaCha20Poly1305
This PR replaces the first three with equivalent logic from Rust crates:
- `rand_core::OsRng`
- `blake2b_simd`
- `ed25519-zebra`
- `libsodium` is still used for Ed25519 verification in the consensus rules until Canopy activation.
crypto_sign_verify_detached is still used within the consensus rules
until Canopy activation. ed25519-zebra generates signatures that are
valid under both pre- and post-Canopy rules (for our honest usage),
so we can use it to generate transaction signatures now. Then once
Canopy activates, we can remove the remaining usages of crypto_sign.
We only use the output of GetActiveFundingStreamElements and
GetActiveFundingStreams within Canopy contexts, but this makes it
explicit that funding streams are disabled before Canopy activation.
Remove 'jessie' (debian 8) from suites list in linux gitian descriptors
Debian 8 "jessie" support reached its end-of-life on June 30, 2020
https://www.debian.org/News/2020/20200709
Add support for logging fields in spans and events
Field values must be pointers to C strings, which in practice means that they
cannot be formatted inline (as the pointer must remain valid across the FFI).
This might be improved by future iterations of the macros.
`LogPrint()` is also moved to the DEBUG level, leaving `LogPrintf()` at INFO.
The X11 license specifically mentions the X Consortium as the party that the no-advertising clause applies to.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Improvements to tracing initialization
The refactor makes it easier to implement further tracing customisations.
We also now have spans for `zcashd` initialization and shutdown.
Update checksec.sh to slimm609/checksec.sh version 2.3.0
To verify against the upstream signature:
```
git clone https://github.com/slimm609/checksec.sh
cd checksec.sh
git checkout a6df608ac077689b2160e521db6601abc7b9e26e
openssl dgst -sha256 -verify checksec.pub -signature checksec.sig ${ZCASH_SRC}/qa/zcash/checksec.sh
```
This version has more thorough Fortify checking (using `--extended --fortify-file=`) and checks specific to Clang-compiled executables.
Give a better error message for transaction expiry
As mentioned in https://github.com/zcash/zcash/issues/3393, user gets an error when sending a tx while wallet not caught up. Here we give the user a better explanation of the possible error.