Commit Graph

11291 Commits

Author SHA1 Message Date
Homu 2a48fa62bf Auto merge of #2780 - str4d:1272-secp256k1, r=daira
Merge current secp256k1 subtree

Part of #1272.
2017-12-15 12:35:13 -08:00
Homu c720d15c45 Auto merge of #2700 - kozyilmaz:emptyspaces, r=str4d
PATH variable containing spaces cause build failure

Spaces in PATH variable is creating build issues (observed on macOS). For example "VMware Fusion" adds itself to PATH like `/Applications/VMware Fusion.app/Contents/Public`.
2017-12-15 11:35:05 -08:00
Jack Grigg 9d0c70e9e7
Clarify operator precedence in serialization of nSproutValue 2017-12-15 18:36:05 +00:00
Homu f44a4cea42 Auto merge of #2790 - bitcartel:2746_payment_disclosure_prefix, r=str4d
Closes #2746. Payment disclosure blobs now use 'zpd:' prefix.
2017-12-15 10:31:58 -08:00
Jay Graber 73b220cb0f Add rpc test that exercises z_importkey 2017-12-15 10:15:50 -08:00
Homu b9c7d84990 Auto merge of #2800 - str4d:2788-libsnark-test-hardening, r=str4d
Fix buffer overflow in libsnark

Applies `-fstack-protector-all` to libsnark, and fixes an underlying bug. This bug was not triggerable in `zcashd` because the function in question was being inlined by the compiler.

Closes #2788.
2017-12-15 07:32:41 -08:00
Homu 83af270002 Auto merge of #2786 - str4d:2074-build, r=str4d
Build system improvements

Includes commits cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6978
  - Only the first commit (second is for QT)
- bitcoin/bitcoin#7059
- bitcoin/bitcoin#7603
  - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT)
- bitcoin/bitcoin#7954
- bitcoin/bitcoin#8314
  - Only the second commit (first is for QT)
- bitcoin/bitcoin#8504
  - Only the first commit (second was undoing something we didn't have)
- bitcoin/bitcoin#8520
- bitcoin/bitcoin#8563
- bitcoin/bitcoin#8249
- bitcoin/bitcoin#9156
- bitcoin/bitcoin#9831
- bitcoin/bitcoin#9789
- bitcoin/bitcoin#10766

Part of #2074.
2017-12-15 05:04:44 -08:00
Jack Grigg 0100c79405
Add Rust and Proton to configure options printout 2017-12-15 13:03:33 +00:00
syd 4a617475ec
Fix libsnark test failure.
The shorten() method was copying too much into the destination
buffer, overflowing it and affecting neighboring data.
2017-12-15 10:37:07 +00:00
Jack Grigg d66bf190cb
Apply -fstack-protector-all to libsnark 2017-12-15 10:02:54 +00:00
Jack Grigg e319633435
Add Sprout value pool to getblock and getblockchaininfo 2017-12-14 22:06:15 +00:00
Jack Grigg ad6a36ad02
Track net value entering and exiting the Sprout circuit
Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.
2017-12-14 22:06:11 +00:00
Simon 61345ae703 Closes #2746. Payment disclosure blobs now use 'zpd:' prefix. 2017-12-07 10:11:43 -08:00
Homu 019c4bddc8 Auto merge of #2741 - bitcartel:stop_dumpwallet_overwriting, r=str4d
Prevent RPC calls dumpwallet and z_exportwallet from overwriting an existing file

Closes #2740
2017-12-04 09:41:52 -08:00
Jack Grigg 13933e4c13
Factor out common logic from CZCPaymentAddress and CZCSpendingKey 2017-12-04 17:17:18 +00:00
Jack Grigg aa666c9673
Implement viewing key storage in the keystore 2017-12-04 17:17:18 +00:00
Jack Grigg 642a1caf93
ViewingKey -> ReceivingKey per zcash/zips#117 2017-12-04 17:17:18 +00:00
Homu 28e0159707 Auto merge of #2724 - arcalinea:1020-add-examples-for-zrpc, r=str4d
Add examples for z_rpc calls

Adds missing cli and json-rpc examples for `z_` rpc calls

Closes #2723
(Accidentally named the branch being merged in with wrong issue number)
2017-12-04 08:39:20 -08:00
Homu 89aaa67e9e Auto merge of #2769 - syd0:rename-bitcoin-bash-completion, r=str4d
Rename bitcoin bash completion files so that they refer to zcash and not bitcoin.

This closes #2167
2017-12-04 04:58:19 -08:00
Jack Grigg 704337b2b8
Move Zcash flags into configure.ac 2017-12-01 14:10:18 +00:00
Jack Grigg c1fcdd01dd
Change --enable-werror to apply to all warnings, use it in build.sh 2017-12-01 14:10:18 +00:00
René Nyffenegger bc9fff1130
Use AC_ARG_VAR to set ARFLAGS.
The user can set ARFLAGS in the ./configure step with
  ./configure ARFLAGS=...
If he chooses not to do so, ARFLAGS will be set to cr.
2017-12-01 14:10:17 +00:00
Cory Fields 5dd887fdf7
build: add --enable-werror option
This turns some compiler warnings into errors. Useful for c-i.
2017-12-01 14:10:17 +00:00
Cory Fields d35ebc7b55
build: warn about variable length arrays 2017-12-01 14:10:17 +00:00
Cory Fields 943f19fec7
build: force a c++ standard to be specified
Newer compilers may switch to newer standards by default. For example, gcc6
uses std=gnu++14 by default.
2017-12-01 14:10:17 +00:00
Jonas Schnelli 0bcd85bee8
Add compile and link options echo to configure 2017-12-01 14:10:17 +00:00
Wladimir J. van der Laan 8a932154c5
build: supply `-Wl,--high-entropy-va`
This should enable high-entropy ASLR on 64-bit targets, for better
mitigation of exploits.
2017-12-01 14:10:17 +00:00
Wladimir J. van der Laan 41b28420d2
devtools: Check for high-entropy ASLR in 64-bit PE executables
check_PE_PIE only checked for DYNAMIC_BASE, this is not enough
for (secure) ASLR on 64-bit.
2017-12-01 14:10:17 +00:00
Anthony Towns d812d95a8f
Add configure check for -latomic 2017-12-01 14:10:16 +00:00
Wladimir J. van der Laan 15472b7d84
build: Remove check for `openssl/ec.h`
We don't use any elliptic curves from OpenSSL anymore, nor include this
header anywhere but optionally in the tests of secp256k1 (which has
its own autoconf setup).

Reported by sinetek on IRC.
2017-12-01 14:10:16 +00:00
Wladimir J. van der Laan 57ab896ba4
test: Remove java comparison tool 2017-12-01 14:10:16 +00:00
Cory Fields d70027148d
build: fix Windows builds without pkg-config
- guard PKG_PROG_PKG_CONFIG with an m4_ifdef. If not building for windows,
  require it
- add nops as necessary in case the ifdef reduces the if/then to nothing
- AC_SUBST some missing _LIBS. These were split out over time, but not all were
  properly substituted. They continued to work if pkg-config is installed
  because it does the AC_SUBST itself
2017-12-01 14:10:16 +00:00
Cory Fields 341ab74532
build: quiet annoying warnings without adding new ones
Disabling warnings can be tricky, because doing so can cause a different
compiler to create new warnings about unsupported disable flags. Also, some
warnings don't surface until they're paired with another warning (gcc). For
example, adding "-Wno-foo" won't cause any trouble, but if there's a legitimate
warning emitted, the "unknown option -Wno-foo" will show up as well.

Work around this in 2 ways:

1. When checking to see if -Wno-foo is supported, check for "-Wfoo" instead.
2. Enable -Werror while checking 1.

If "-Werror -Wfoo" compiles, "-Wno-foo" is almost guaranteed to be supported.

-Werror itself is also checked. If that fails to compile by itself, it likely
means that the user added a flag that adds a warning. In that case, -Werror
won't be used while checking, and the build may be extra noisy. The user would
need to fix the bad input flag.

Also, silence 2 more additional warnings that can show up post-c++11.
2017-12-01 14:10:16 +00:00
Cory Fields c5d645e22f
build: define base filenames for use elsewhere in the buildsystem
Unfortunately, the target namees defined at the Makefile.am level can't be used
for *.in substitution. So these new defines will have to stay synced up with
those targets.

Using the new variables for the deploy targets in the main Makefile.am will
ensure that they stay in sync, otherwise build tests will fail.
2017-12-01 14:10:16 +00:00
daniel 0b2a64f484
add powerpc build support for openssl lib 2017-12-01 14:10:15 +00:00
Jack Grigg ad96d74afe
build: Split hardening/fPIE options out in Zcash-specific binaries 2017-12-01 14:10:11 +00:00
Cory Fields c459de2f03
build: Split hardening/fPIE options out
This allows for fPIE to be used selectively.
2017-11-30 15:17:37 +00:00
Homu 02c4467cb5 Auto merge of #2697 - str4d:darwin-build, r=str4d
Darwin build fixes

Includes fixes cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7136
  - Only the third commit (to avoid a merge conflict)
- bitcoin/bitcoin#7302
  - Excluding the first commit, which is unnecessary (we use Boost 1.62)
- bitcoin/bitcoin#7487
- bitcoin/bitcoin#7606
- bitcoin/bitcoin#7711
- bitcoin/bitcoin#7165
- bitcoin/bitcoin#8002
- bitcoin/bitcoin#8210
  - Only the second commit
- bitcoin/bitcoin#9114
2017-11-30 05:49:07 -08:00
Jack Grigg c6b39fbbd6
Include endian-ness compatibility layer in Equihash implementation 2017-11-29 17:28:44 +00:00
Jack Grigg d3096198c8
[libsnark] Use POSIX-compliant ar arguments 2017-11-29 17:28:44 +00:00
Jack Grigg daad2c2736
Check if OpenMP is available before using it 2017-11-29 17:28:44 +00:00
Jack Grigg 9635679cba
Replace "install -D" with "mkdir -p && install" 2017-11-29 17:26:47 +00:00
Jack Grigg c16188cc6d
Remove manual -std=c++11 flag
This is handled by autoconf now.
2017-11-29 17:24:59 +00:00
fanquake e2e7ca3054
[depends] Set OSX_MIN_VERSION to 10.8 2017-11-29 17:24:59 +00:00
Cory Fields 68ce87eddc
depends: bump OSX toolchain
clang: 3.7.1
cctools: 877.8
ld64: 253.9
2017-11-29 17:24:59 +00:00
fanquake 377092a152
[depends] Add -stdlib=libc++ to darwin CXX flags 2017-11-29 17:24:59 +00:00
Wladimir J. van der Laan a65be83041
build: update ax_cxx_compile_stdcxx to serial 4 2017-11-29 17:24:59 +00:00
Cory Fields 038a858d2f
depends: use c++11 2017-11-29 17:24:59 +00:00
Wladimir J. van der Laan 4ba172369d
build: Enable C++11 build, require C++11 compiler
Implements #6211.
2017-11-29 17:24:59 +00:00
fanquake b08a1f7836
[build-aux] Update Boost & check macros to latest serials 2017-11-29 17:24:59 +00:00