#4624 improve IBD sync by eliminating getheaders requests
Closes#4624. Don't issue redundant `getheaders` P2P requests.
It's not certain that this is a safe change or the best way to solve the problem, but it does dramatically decrease IBD time and network (read) usage. The corresponding upstream code has become quite different, so it's not clear how this problem is solved there. (In my testing, the problem did not occur there; the node seemed to download the minimum amount of data from the network.)
There's no behavior change after IBD completes, so perhaps the only problem with this change (the only way it might be unsafe) is if IBD stalls completely (due to `getheaders` not being sent when necessary). That hasn't happened in my testing so far (I'll continue testing).
Add support for FreeBSD 12
The pre-built binaries for clang 8 on FreeBSD do not ship with `libc++api`, so `libcxxrt` from the base system is used instead.
Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release
As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
Skip "tx" messages during initial block download.
We avoid requesting these messages by not request non-block inventory during IBD.
This is equivalent to https://github.com/bitcoin/bitcoin/pull/7164, but we also
ignore unsolicited `tx` messages (which `zcashd` nodes will never send).
Fixes#4943.
qa/zcash/updatecheck.py: remove dead code; print instructions to run `cargo outdated` and `cargo update`
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Reduce the dependencies of libzcashconsensus
This is the first of two PRs that rework the `libzcashconsensus` library
into `libzcash_script`, and enable it to be wrapped by the `zcash_script`
crate:
https://github.com/ZcashFoundation/zcash_script
Includes code cherry-picked from bitcoin/bitcoin#12998.
Release v4.2.0
Notable changes
===============
Switch to ed25519-zebra for consensus signature checks
------------------------------------------------------
This removes the zcashd dependency upon libsodium for ed25519
signature checks and instead uses the Rust implementation in
ed25519-zebra, which has been active for signature verification
since the Canopy upgrade. For more information on the conditions
that led to this change see https://hdevalence.ca/blog/2020-10-04-its-25519am
Update default fees according to ZIP-313
----------------------------------------
Reduce default fees to 0.00001 ZEC as specified in ZIP-313 and
ensure that transactions paying at least the new minimum fee meet
the transaction relay threshold irrespective of transaction size.
Improve getblocktemplate rpc performance when using shielded coinbase
---------------------------------------------------------------------
This change precomputes future block templates to permit miners to
begin working atop newly arrived blocks as quickly as possible, rather
than waiting for a new template to be generated after a block has arrived.
It also reduces the initial the wait time for incorporating new mempool
transactions into a block from 1 minute to 10 seconds; the previous value
was inherited from the upstream bitcoin codebase but is inappropriate for
our block timing.
Migrate from rpc-tests.sh to rpc-tests.py
-----------------------------------------
This unifies and simplifies the RPC testing framework, as has
been done in the upstream Bitcoin codebase.
gtest/test_mempoollimit: the test failed to properly ensure that the "low fee penalty" threshold matches the new ZIP 313 fee
The test passed, and the code under test was correct; nevertheless the test was not testing the right thing. refs #4916
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
When creating randomized JoinSplits, the caller passes in references to
arrays in which the mapping from original to randomised position is
stored. However, in the old JSDescription constructors, the caller also
passed the inputs and outputs themselves by reference, and those arrays
were also randomised. The JSDescriptionInfo constructor was instead
taking these by value, meaning that its internal copies were being
randomised, but not the caller's arrays. This caused the Sprout payment
disclosure logic to (with 1/2 probability) store the incorrect output
in a payment disclosure key.
This commit restores the previous behaviour, by storing references to
the input and output arrays in JSDescriptionInfo instead of copying them.
This removes the last implicit dependency on libsodium from
libzcashconsensus.
As of zcash/zcash#4893 we no longer depend on libsodium for Ed25519
signature verification.
This reverts aeb089ecc7, which introduced
logging, adding a dependency on libbitcoin_util.a to libzcashconsensus.a.
Also adds missing #includes that were being indirectly included via
prevector.h including util.h.
This matches the existing transaction builder structs:
- SpendDescriptionInfo
- OutputDescriptionInfo
- TransparentInputInfo
It also removes the dependency of the transaction format on the proving
system.
While this isn't a supported build configuration, some build
systems need to build without going through our autotools steps,
so defaulting to something sane may make it easier to build.
Specifically, this fixes the inability to build
rust-bitcoinconsensus on some non-x86 platforms. It needs to build
without our autotools/configure steps to ensure correct compile
args are passed from the rust build system to gcc. Converting the
args from the rust build system to gcc would be a lot of
unmaintainable work.
Release v4.2.0 rc1
Notable changes
===============
Switch to ed25519-zebra for consensus signature checks
------------------------------------------------------
This removes the zcashd dependency upon libsodium for ed25519
signature checks and instead uses the Rust implementation in
ed25519-zebra, which has been active for signature verification
since the Canopy upgrade. For more information on the conditions
that led to this change see https://hdevalence.ca/blog/2020-10-04-its-25519am
Update default fees according to ZIP-313
----------------------------------------
Reduce default fees to 0.00001 ZEC as specified in ZIP-313 and
ensure that transactions paying at least the new minimum fee meet
the transaction relay threshold irrespective of transaction size.
Improve getblocktemplate rpc performance when using shielded coinbase
---------------------------------------------------------------------
This change precomputes future block templates to permit miners to
begin working atop newly arrived blocks as quickly as possible, rather
than waiting for a new template to be generated after a block has arrived.
It also reduces the initial the wait time for incorporating new mempool
transactions into a block from 1 minute to 10 seconds; the previous value
was inherited from the upstream bitcoin codebase but is inappropriate for
our block timing.
Migrate from rpc-tests.sh to rpc-tests.py
-----------------------------------------
This unifies and simplifies the RPC testing framework, as has
been done in the upstream Bitcoin codebase.
Reduce default fee to 1000 zatoshis
Per ZIP 313. This also ensures that transactions that pay the default fee will always be relayed, and not rate-limited.
In other words, make sure that the "minimum relay fee" is no greater than DEFAULT_FEE.
The intention is that this will allow setting the fee to DEFAULT_FEE for *all* transactions
(including transparent ones) in a future release, and be more compatible with other wallets
that already do so, per ZIP 313. refs #2942
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This removes the paches iostreams-106.patch and signals2-noise.patch
which have been incorporated into boost 1.75. Also, this further
postpones updates to native_clank, libcxx and native_ccache.