Commit Graph

7355 Commits

Author SHA1 Message Date
Jack Grigg
2091cf23ae make-release.py: Versioning changes for 1.0.14. 2018-01-03 23:44:51 +01:00
Jack Grigg
275f21ad4b make-release.py: Versioning changes for 1.0.14-rc1. 2017-12-22 09:59:01 +00:00
Homu
1683c2d5bf Auto merge of #2143 - str4d:1997-viewing-keys, r=str4d
Implement incoming viewing keys

Closes #1997.
2017-12-20 14:11:05 -08:00
Jack Grigg
2bbfe6c4e8 Add cautions to z_getbalance and z_gettotalbalance help text about viewing keys 2017-12-20 11:24:51 +00:00
Jack Grigg
bec2235148 Cleanup: Add braces for clarity 2017-12-20 11:18:59 +00:00
Jack Grigg
7b8d4f87ec Modify zcrawkeygen RPC method to set "zcviewingkey" to the viewing key
The "zcviewingkey" field has never been documented before, and the method itself
is deprecated; this just ensures it is consistent with the rest of the RPC.
2017-12-20 00:46:41 +00:00
Jack Grigg
44e37656bf Add watch-only support to Zcash RPC methods
Balance totals do not include spends linked to viewing key addresses, as
nullifiers cannot be calculated and therefore spends cannot be detected.
2017-12-20 00:46:37 +00:00
Jack Grigg
9a2b8ae57f Update wallet logic to account for viewing keys
The wallet code previously assumed that an unlocked wallet would always
have a spending key associated with a note decryptor. Viewing keys break
this assumption.
2017-12-20 00:46:37 +00:00
Jack Grigg
e85b33a52e Add RPC methods for exporting/importing viewing keys 2017-12-20 00:46:37 +00:00
Jack Grigg
167cd33374 Implement viewing key storage in the wallet 2017-12-20 00:46:37 +00:00
Jack Grigg
49cf707d2c Add Base58 encoding of viewing keys 2017-12-20 00:46:33 +00:00
Homu
7888624f74 Auto merge of #2795 - str4d:2351-sprout-circuit-value, r=str4d
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.

Part of #2351.
2017-12-16 02:09:40 -08:00
Jack Grigg
e365ca1c53 Remove nSproutValue TODO from CDiskBlockIndex
Block indices are flushed to disk when they are marked as dirty, and this
happens via enough distinct pathways that it would be sufficiently complex to
update nSproutValue via all of them. Thus it is necessary to be able to
serialize "no value" for writes by upgraded clients.
2017-12-16 10:01:26 +00:00
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
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
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
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
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
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
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
Cory Fields
4bfe8a744b c++11: CAccountingEntry must be defined before use in a list
c++11ism. This fixes builds against libc++.
2017-11-29 17:24:59 +00:00
Cory Fields
4165af1b73 c++11: don't throw from the reverselock destructor
noexcept is default for destructors as of c++11. By throwing in reverselock's
destructor if it's lock has been tampered with, the likely result is
std::terminate being called. Indeed that happened before this change.

Once reverselock has taken another lock (its ctor didn't throw), it makes no
sense to try to grab or lock the parent lock. That is be broken/undefined
behavior depending on the parent lock's implementation, but it shouldn't cause
the reverselock to fail to re-lock when destroyed.

To avoid those problems, simply swap the parent lock's contents with a dummy
for the duration of the lock. That will ensure that any undefined behavior is
caught at the call-site rather than the reverse lock's destruction.

Barring a failed mutex unlock which would be indicative of a larger problem,
the destructor should now never throw.
2017-11-29 17:24:59 +00:00
Homu
37ffef4628 Auto merge of #2767 - syd0:cleanup-reserved-include-guards, r=str4d
Get rid of underscore prefixes for include guards.

This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-29 06:52:52 -08:00
Homu
213ac8d1fe Auto merge of #2764 - syd0:remove-old-boost-defines, r=str4d
Remove Boost conditional compilation.

Boost is currently at version 106200 in the depends subsystem
so it is safe to remove code the refers to earlier versions.

This closes #2445
2017-11-28 12:19:27 -08:00
syd
4e4aa5b6ec Get rid of underscore prefixes for include guards.
This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-28 14:57:58 -05:00
Jack Grigg
7a448d3fa5 Bump secp256k1 subtree 2017-11-28 16:43:13 +00:00
Jack Grigg
cde23ac085 Squashed 'src/secp256k1/' changes from 84973d3..6ad5cdb
6ad5cdb Merge #479: Get rid of reserved _t in type names
d1dc9df Get rid of reserved _t in type names
0b70241 Merge #474: Fix header guards using reserved identifiers
ab1f89f Merge #478: Fixed multiple typos
8c7ea22 Fixed multiple typos
abe2d3e Fix header guards using reserved identifiers
f532bdc Merge #459: Add pubkey prefix constants to include/secp256k1.h
cac7c55 Merge #470: Fix wnaf_const documentation
768514b Fix wnaf_const documentation with respect to return value and number of words set
b8c26a3 Merge #458: Fix typo in API documentation
817fb20 Merge #440: Fix typos
12230f9 Merge #468: Remove redundant conditional expression
2e1ccdc Remove redundant conditional expression
bc61b91 add pubkey prefix constants to include/secp256k1.h
b0452e6 Fix typo in API documentation
4c0f32e Fix typo: "Agressive" → "Aggressive"
73aca83 Fix typo: "exectured" → "executed"

git-subtree-dir: src/secp256k1
git-subtree-split: 6ad5cdb42a1a8257289a0423d644dcbdeab0f83c
2017-11-28 16:42:12 +00:00
Homu
2ff8ab7dfb Auto merge of #2751 - syd0:upgrade-googletest-1.8.0, r=str4d
Upgrade googletest to 1.8.0

Closes #1432.
2017-11-28 07:37:20 -08:00
Jay Graber
9eb8089e98 Fix cli help result for z_shieldcoinbase 2017-11-27 20:06:36 -08:00
syd
d52dcf5d0c InitGoogleMock instead of InitGoogleTest per CR 2017-11-27 11:08:34 -05:00
Homu
9ce4859459 Auto merge of #2766 - syd0:remove-fPowAllowMinDifficultyBlocks, r=str4d
Get rid of consensus.fPowAllowMinDifficultyBlocks.

This closes #1380
2017-11-27 04:06:27 -08:00
syd
5163fd9d07 Get rid of fp3 from libsnark, it is not used.
This is for #1544
2017-11-25 15:08:01 -05:00
syd
a10c2f46a5 Add gtests to .gitignore 2017-11-25 11:05:01 -05:00
syd
7c591c6d2f Don't compile libgtest.a when building libsnark.
Previously libsnark would try to build libgtest if /usr/src/gtest
exists on the build machine. This caused issues because the
version of libgtest in /usr/src isn't necessarily the same as
the one that the rest of zcash's gtests were built with.
2017-11-25 10:58:37 -05:00
syd
dffc025d38 Get rid of consensus.fPowAllowMinDifficultyBlocks.
This closes #1380
2017-11-23 12:20:50 -05:00
syd
6df5f51b7c Update to address @daira comments wrt fixing configure.ac
Since we're enforcing Boost >= 1.62, we no longer need HAVE_WORKING_BOOST_SLEEP_FOR.
2017-11-23 11:58:25 -05:00