Commit Graph

7766 Commits

Author SHA1 Message Date
Jack Grigg
f59093935c Add examples of ConvertBits transformation 2018-06-12 16:51:59 +12:00
Jack Grigg
dd7417c8d0 Add comment about size calculations for converted serialized keys 2018-06-12 15:47:56 +12:00
Jack Grigg
bec3e62bc1 Implement encoding and decoding of Sapling keys and addresses 2018-06-07 17:28:50 +12:00
Jack Grigg
c8511dfc07 Fix bech32::Encode() error handling
Previously, an input with invalid characters would result in out-of-bounds
reads, potentially exposing up to 224 bytes of memory following the location of
the CHARSET constant. This commit fixes the function to return an empty string,
which is what was originally documented as happening.
2018-06-07 17:19:44 +12:00
Pieter Wuille
6a2cc8ddc0 Simplify Base32 and Base64 conversions 2018-06-07 17:19:43 +12:00
Pieter Wuille
ac70f76c5d Generalize ConvertBits 2018-06-07 17:19:34 +12:00
Jack Grigg
6b759fb092 ConvertBits() - convert from one power-of-2 number base to another.
Function extracted from upstream:
  PR bitcoin/bitcoin#11167
  Commit c091b99379b97cb314c9fa123beabdbc324cf7a4
2018-06-07 16:42:01 +12:00
Jack Grigg
7e45636707 chainparams: Add Sapling Bech32 HRPs 2018-06-07 16:41:59 +12:00
Homu
80338c07e5 Auto merge of #3237 - str4d:std-array, r=str4d
Replace boost::array with std::array
2018-06-06 19:36:57 -07:00
Jack Grigg
4fb3d05ce9 Whitespace cleanup 2018-06-07 14:35:56 +12:00
Homu
ffba08b0e0 Auto merge of #3318 - Eirik0:3298-fix-getnetworksolps-params, r=bitcartel
Fix parsing parameters in getnetworksolps

This fixes https://github.com/zcash/zcash/issues/3298. The parameters were not correctly being converted.
2018-06-06 10:00:21 -07:00
Homu
d18212b1d6 Auto merge of #3299 - Eirik0:3248-update-getblocktemplate, r=str4d
Add hashFinalSaplingRoot to getblocktemplate

Closes #3248
2018-06-06 05:00:58 -07:00
Eirik Ogilvie-Wigley
c61ed9acfb Fix parsing parameters in getnetworksolps 2018-06-04 16:45:12 -06:00
Jay Graber
87c9994cb2 Make diversifier functions return option 2018-06-04 07:47:46 -07:00
Jay Graber
0da9aac63e s/SaplingInViewingKey/SaplingIncomingViewingKey 2018-06-04 04:59:07 -07:00
Eirik Ogilvie-Wigley
25c13ef702 Add hashFinalSaplingRoot to getblocktemplate 2018-06-01 15:47:30 -06:00
Jay Graber
dd099401a3 Fix default_address() 2018-06-01 04:03:27 -07:00
Jay Graber
521a6f1fc0 Minimal sapling key test 2018-06-01 02:32:17 -07:00
Jay Graber
52d81ff794 Update librustzcash dependency, address comments 2018-06-01 01:48:28 -07:00
Jay Graber
84e3a2212f Change librustzcash dependency hash to work for new Sapling classes 2018-06-01 00:04:13 -07:00
Jay Graber
11acfe6e9f Add Sapling key classes to wallet, with new librustzcash APIs 2018-06-01 00:04:13 -07:00
Homu
73fea25404 Auto merge of #3300 - bitcartel:3277_add_comment_deprecated_txdb_prefixes, r=str4d
Part of #3277. Add comment about deprecated txdb prefixes.
2018-05-25 18:42:05 -07:00
Jack Grigg
a6bbb26e08 Replace boost::array with std::array 2018-05-26 00:12:57 +12:00
Simon
c290f8f263 Update release height to block 332000. 2018-05-24 23:09:02 -07:00
Jack Grigg
d670db7164 Sapling testnet activation height 2018-05-25 16:05:25 +12:00
Jack Grigg
40c33db2f4 make-release.py: Versioning changes for 1.1.1. 2018-05-25 15:38:43 +12:00
Simon
47db75426f Closes #3301. Non-void function should not have empty definition. 2018-05-23 21:04:51 -07:00
Simon
f9840089db Part of #3277. Add comment about deprecated txdb prefixes. 2018-05-23 20:37:34 -07:00
Simon
d3ff27c0a6 make-release.py: Versioning changes for 1.1.1-rc2. 2018-05-23 09:27:59 -07:00
Jack Grigg
8bf890abac make-release.py: Versioning changes for 1.1.1-rc1. 2018-05-19 09:50:15 +12:00
Sean Bowe
3577de83aa Change txdb prefixes for sapling and avoid writing unnecessary information. 2018-05-18 13:26:39 -06:00
Sean Bowe
8f5429a13a Update merkle tree and pedersen hash tests to account for new encoding 2018-05-18 13:26:39 -06:00
Homu
f62fff80d5 Auto merge of #3255 - str4d:sapling-value-pool, r=ebfull
Track net value entering and exiting the Sapling circuit
2018-05-16 10:46:32 -07:00
Jack Grigg
f55029e7d1 Correctly serialize Groth16 JSDescription for verifyjoinsplit benchmark 2018-05-14 16:29:02 -06:00
Sean Bowe
34f6ea95dc Adjust tests and benchmarks 2018-05-14 16:29:02 -06:00
Sean Bowe
b7a6c32178 Integrate Groth16 verification and proving. 2018-05-14 16:26:23 -06:00
Jack Grigg
e5eab182b5 Use boost::variant to represent shielded addresses and keys
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.

A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.

All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
2018-05-11 17:14:49 -04:00
Homu
1942f7a42b Auto merge of #3242 - str4d:3058-key-encoding-refactor, r=str4d
Key encoding refactor

Includes code cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#11372
  - Only the first three commits (the fourth commit depends on #2390)

Part of #3058.
2018-05-11 12:21:29 -07:00
Homu
ae6c2587d3 Auto merge of #3232 - ebfull:3207-sapling-validation, r=str4d
Sapling validation

**Also review https://github.com/zcash/librustzcash/pull/7**

This is an attempt to tackle much of https://github.com/zcash/zcash/issues/3065
2018-05-10 10:21:15 -07:00
Homu
73f5cb1213 Auto merge of #3257 - bitcartel:3250_fix_segfault_memo, r=ebfull
Closes #3250. Memo getter should return by reference, not by value.
2018-05-10 08:47:06 -07:00
Homu
677b5b3b8b Auto merge of #3247 - str4d:3207-valuebalance, r=str4d
Add valueBalance to value balances

Part of #3065 and #3207.
2018-05-10 07:12:00 -07:00
Jack Grigg
0fe0ca7948 Add contextual comment for GetValueOut() and GetShieldedValueIn() 2018-05-10 09:34:19 -04:00
Simon
67f3577239 Closes #3250. Memo getter should return by reference, not by value. 2018-05-09 21:52:33 -07:00
Homu
08f74ed026 Auto merge of #3240 - str4d:remove-obsolete-binaries, r=str4d
Remove obsolete CreateJoinSplit and GenerateParams binaries
2018-05-09 13:50:25 -07:00
Jack Grigg
ae97177c86 Track net value entering and exiting the Sapling circuit 2018-05-09 16:02:23 -04:00
Jack Grigg
97b46f00cc Add valueBalance to value balances, and enforce its consensus rules 2018-05-09 11:34:41 +01:00
Homu
f0daf3915f Auto merge of #3233 - str4d:3164-sapling-sighash, r=str4d
ZIP 243: Sapling SignatureHash

Closes #3164.
2018-05-08 16:59:33 -07:00
Jack Grigg
93bd00a0d5 Add key_io includes to Zcash-specific code 2018-05-08 21:39:56 +01:00
Pieter Wuille
3d31e09cbb Split key_io (address/key encodings) off from base58 2018-05-08 21:39:56 +01:00
Pieter Wuille
3e60c9fabd Stop using CBase58Data for ext keys 2018-05-08 21:39:55 +01:00