Commit Graph

14847 Commits

Author SHA1 Message Date
Carl Dong cf70d2eb5c depends: boost: Remove unnecessary _archiver_
We already have $(package)_ar, so just use that instead
2021-01-15 17:31:10 +00:00
Carl Dong 80205dcad5 depends: boost: Cleanup toolset selection 2021-01-15 17:30:32 +00:00
Carl Dong 7f1598ad11 depends: boost: Cleanup architecture/address-model 2021-01-15 17:30:32 +00:00
Carl Dong 44f95d4043 depends: boost: Disable all compression 2021-01-15 17:30:30 +00:00
Carl Dong d5dfbe016d depends: boost: Split into non-/native packages 2021-01-15 17:29:37 +00:00
Carl Dong 63390e503c depends: boost: Refer to version in URL 2021-01-15 17:08:56 +00:00
Carl Dong 5c03db0983 depends: Propagate only specific CLI variables to sub-makes
We want to supply well-known vars to ./configure scripts to do with as
they please. However, we do _not_ want to override these well-known vars
at make-time as certain build systems expect a self-mangled version of
these well-known vars.

For example, freetype and bdb will prepend `libtool --mode=compile' to
CC and CXX, which, if we override CC on the command line at make-time,
will break the build.
2021-01-15 17:08:56 +00:00
Carl Dong 9e997afd84 depends: boost: Use clang toolset if clang in CXX 2021-01-15 17:08:56 +00:00
Carl Dong 96cf6da5b6 depends: boost: Split target-os from toolset
Previously, we specified the target-os in the toolset (and sometimes
used the wrong command line flags), now we have a clear separation,
which is favored by ./bootstrap.sh and ./b2.

This means that all supported OSes will specify the correct target-os=
and toolset= on the command line.
2021-01-15 17:08:56 +00:00
Carl Dong b3fe7d336e depends: boost: Specify toolset to bootstrap.sh
b2 will pickup our user-config.jam just fine, however, bootstrap.sh has
its own toolset autodetect mechanism, which doesn't GAF about our
user-config.jam

Zcash: This also reverts b6d0996cec which
fixes a PIE linking error, but likely breaks FreeBSD build support.
2021-01-15 17:07:01 +00:00
Carl Dong 2c1c82f59a depends: Propagate well-known vars into depends
For example, doing:

  make CC=clang CXX=clang++

Should now propagate these settings down to depends packages
2021-01-15 05:24:25 +00:00
Peter Bushnell 0226ea4647 depends: Consistent use of package variable
All other mk files use the package variable consistently except for the two instances here, which have always been here, since depends was introduced in 0.10.
2021-01-15 05:24:25 +00:00
Cory Fields d64205350d depends: fix boost mac cross build with clang 9+
The ancient "darwin-4.9.1" profile has long been used to match against
clang, which prior to version 9, reported 4.9.1 as its version when
invoking "clang++ -dumpversion". Presumably this was a historical
compatibility quirk related to Apple's switch from gcc to clang.

This was "fixed" in clang 9.0, so that -dumpversion reports the real
version. Unfortunately that had the side-effect of breaking the
(brittle) boost compiler detection.

Move to the seemingly more-correct "clang-darwin" profile, which passes
the checks and builds correctly.

Also switch to using ar rather than libtool for archiving, as it's what
the clang-darwin profile expects to be using.

Note that because this is using a different profile, some of the final
command-line arguments end up changing. The changes look sane at a
glance.
2021-01-15 05:24:25 +00:00
Carl Dong ee10eb77db build: Add variable printing target to Makefiles
I kept finding myself needing these to debug our build system, since
they are innocuous and are very helpful they probably belong in the
codebase.

Source: John Graham-Cumming
https://www.cmcrossroads.com/article/printing-value-makefile-variable
2021-01-15 05:24:25 +00:00
Homu 06d234d774 Auto merge of #4934 - oxarbitrage:issue4917, r=nuttycom
Split wallet.py

Split some of the tests from `wallet.py` into its own files to make it easier to debug.
Some of the tests moved where depending(specially in balance amounts) on previous code. As standalone, some of the hardcoded balances needed some changes. No further modifications to tests are done in this PR.

We can split more but i think is a good start.

If this is merged it will close https://github.com/zcash/zcash/issues/4917

-----------------------
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
2021-01-14 17:49:12 +00:00
Homu 4698523c38 Auto merge of #4936 - oxarbitrage:issue4932, r=nuttycom
Hide password in -stdin `walletpassphrase`

An approach for issue https://github.com/zcash/zcash/issues/4932

Code in this PR will hide the first line of input when we are in `-stdin` mode and only when the `walletpassphrase` command is used. This works for me but i understand it can be confusing, open to other options.

Without this PR:

```
$ ./src/zcash-cli -stdin walletpassphrase\n
mypass\n
120\n
<Ctrl+D>
$
```

With PR:

```
$ ./src/zcash-cli -stdin walletpassphrase\n
[here we type the password and enter but this is not shown]
120\n
<Ctrl+D>
$
```

Function `SetStdinEcho` is not mine(https://stackoverflow.com/a/1455007). It works in linux, it should work in windows, not sure about mac.

This PR also moves the `-stdin` option to the Options section of the cli help.

------------
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
2021-01-14 15:04:38 +00:00
Kris Nuttycombe ada04aa01d Fix pyflakes complaints 2021-01-14 07:34:40 -07:00
Homu 93d1aec9f4 Auto merge of #4935 - LarryRuane:4624-ibd-getheaders, r=nuttycom
#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).
2021-01-14 14:05:38 +00:00
Alfredo Garcia e034e2676a Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-01-12 17:09:20 +00:00
Alfredo Garcia ab55776189 hide password in -stdin `walletpassphrase` command 2021-01-12 17:09:20 +00:00
Homu e528caf7fb Auto merge of #4937 - centromere:freebsd, r=daira
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
2021-01-09 16:24:10 +00:00
Larry Ruane addf0b3318 #4624 improve IBD sync by eliminating getheaders requests 2021-01-08 14:20:33 -07:00
Homu 8c000ae281 Auto merge of #4944 - nuttycom:ibd_skip_tx_messages, r=str4d
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.
2021-01-06 21:47:29 +00:00
Alex Wied 2e36d4208c
Use parentheses for defined in windows-unused-variables.diff
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-01-05 22:16:20 -05:00
Homu feadf83de9 Auto merge of #4942 - str4d:rust-1.49, r=str4d
depends: Update Rust to 1.49.0

Also updates our `Cargo.lock`.
2021-01-06 00:09:41 +00:00
Alex Wied a0c1ba16db Set rust_target for all FreeBSD versions 2021-01-05 17:28:24 -05:00
Homu 5094a8b634 Auto merge of #4924 - daira:update-updatecheck, r=str4d
qa/zcash/updatecheck.py: remove dead code; print instructions to run `cargo outdated` and `cargo update`

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-01-05 19:58:34 +00:00
Kris Nuttycombe 0bc90167fc Skip "tx" messages during initial block download.
Fixes #4943
2021-01-05 10:36:18 -07:00
Homu cea97a7139 Auto merge of #4938 - sandakersmann:master, r=str4d
Update of copyright year to 2021

Update of copyright year to 2021
2021-01-05 11:47:07 +00:00
Homu 1614f1ebd0 Auto merge of #4913 - str4d:zcashconsensus-fixes, r=nuttycom
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.
2021-01-04 23:52:59 +00:00
Jack Grigg 674fc8eb63 depends: cargo update 2021-01-04 16:41:06 +00:00
Jack Grigg 79f531c485 rust: Use renamed broken_intra_doc_links lint 2021-01-04 16:40:18 +00:00
Jack Grigg 070d4720eb depends: Update Rust to 1.49.0 2021-01-04 16:31:11 +00:00
Marius Kjærstad ae4ad8fc4b
Update of copyright year to 2021 2021-01-01 04:14:18 +01:00
Marius Kjærstad 4660e85dde
Update COPYRIGHT_YEAR in clientversion.h to 2021 2021-01-01 04:11:02 +01:00
Marius Kjærstad 61955934be
Update _COPYRIGHT_YEAR in configure.ac to 2021 2021-01-01 04:07:45 +01:00
Alex Wied eadc3d48f2 Add support for FreeBSD 12 2020-12-30 19:50:25 -05:00
Alfredo Garcia 77db54764a split wallet.py tests 2020-12-29 14:42:46 -03:00
Homu c07007ffca Auto merge of #4931 - rex4539:discord-invite, r=daira
Discord invite instead of direct link

I posted the [direct link ](https://discordapp.com/channels/669694001464737815/671029188353851393/) to some folks and they said they couldn't join as it was a private channel.

So a user needs to first receive an invite before they can join.
2020-12-29 00:36:30 +00:00
Dimitris Apostolou 74bd17fb2e
Discord invite instead of direct link 2020-12-24 14:46:36 +02:00
Homu b812c3ad9d Auto merge of #4928 - nuttycom:release-v4.2.0, r=daira
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.
2020-12-21 20:08:33 +00:00
Kris Nuttycombe 993feb59f8 make-release.py: Updated release notes and changelog for 4.2.0. 2020-12-21 12:58:15 -07:00
Kris Nuttycombe a6eb9fc7d0 make-release.py: Updated manpages for 4.2.0. 2020-12-21 12:55:52 -07:00
Kris Nuttycombe c75e663c2a make-release.py: Versioning changes for 4.2.0. 2020-12-21 12:43:00 -07:00
Homu f63bfc5a2a Auto merge of #4927 - daira:mempool-limit-test-fix, r=daira
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>
2020-12-21 17:55:06 +00:00
Daira Hopwood 66fe7a3782 Revert changes in #4916 that assumed arguments represent fees, when they are actually number of confirmations.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-21 16:08:58 +00:00
Jack Grigg 2c17d1e274 Store inputs and outputs by reference in JSDescriptionInfo
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.
2020-12-21 02:18:35 +00:00
Jack Grigg 6c280abfac Remove init_and_check_sodium from crypto/common.h
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.
2020-12-20 22:42:22 +00:00
Jack Grigg c4ea423827 prevector: Terminate without logging on failed allocation
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.
2020-12-20 22:42:22 +00:00
Jack Grigg 79ad5984b1 Remove JSDescription::h_sig
This removes the zcash/JoinSplit.hpp dependency from
primitives/transaction.cpp, and thus from libzcashconsensus.
2020-12-20 22:42:22 +00:00