Commit Graph

292 Commits

Author SHA1 Message Date
Jack Grigg
c5b26acad8 Use boost::filesystem::path::string() instead of path::native()
This fixes a mingw32 conversion error during cross-compilation.
2018-08-17 16:46:18 +01:00
Jack Grigg
554e00e8f9 Disable Sapling features on mainnet
Also places them behind an experimental features flag on testnet
2018-08-13 14:18:18 +01:00
Jack Grigg
e7ca4eb3c3 test: gtest for Sapling encoding and decoding 2018-08-13 13:20:07 +01:00
Sean Bowe
198dfd3c36 Switch to use the official Sapling parameters. 2018-08-04 16:28:39 -06:00
Homu
aa32786576 Auto merge of #3396 - arcalinea:3389_sapling_crypter, r=str4d
Update CCryptoKeyStore with Sapling support

Sapling crypter overrides for various `CCryptoKeyStore` functions such as:
- `HaveSaplingSpendingKey()`
- `GetSaplingSpendingKey()`

Also includes some changes to prepare for diversified addresses and ZIP 32.

Closes #3389
2018-08-03 09:48:22 -07:00
Jack Grigg
25d5e80cbe Rename *SpendingKey -> *SproutSpendingKey
Also GetPaymentAddresses -> GetSproutPaymentAddresses
2018-08-03 10:10:26 +01:00
Jack Grigg
4c77517772 Rename *ViewingKey* -> *SproutViewingKey* 2018-08-03 02:23:38 +01:00
Jack Grigg
5175a7f07b Pass SaplingPaymentAddress to store through the CKeyStore 2018-08-03 01:01:45 +01:00
Sean Bowe
d9ef8f622e Check the hash of the (Sapling+) zk-SNARK parameters during initialization. 2018-08-02 12:18:13 -06:00
Homu
871e1726c6 Auto merge of #3340 - Eirik0:rename-merkle-typedefs, r=str4d
Rename merkle tree typedefs to include Sprout

This is to be consistent with the naming convention we have been using to distinguish Sprout/Sapling.
2018-08-01 20:48:17 -07:00
Sean Bowe
80bd573dc2 Make changes to gtest ECC behavior suggested by @str4d. 2018-08-01 16:53:27 -06:00
Sean Bowe
262d21bcbb Don't call ECC_Start/ECC_Stop outside the test harness. 2018-08-01 16:45:12 -06:00
Eirik Ogilvie-Wigley
7d379f18c5 Rename test objects to include sprout or sapling 2018-08-01 10:52:58 -06:00
Eirik Ogilvie-Wigley
8ea8ef9850 Rename Witnesses to include sprout or sapling 2018-08-01 10:41:36 -06:00
Eirik Ogilvie-Wigley
4fc309f0f5 Rename Merkle Trees to include sprout or sapling 2018-08-01 10:31:09 -06:00
Homu
d84f14ec4a Auto merge of #3417 - str4d:sapling-tx-builder, r=ebfull
TransactionBuilder for Sapling and transparent transactions

This PR includes zcash/librustzcash#24, and will create a testnet chain split once merged into master (and once a Sapling transaction is mined).
2018-07-31 23:44:29 -07:00
Sean Bowe
a310f6c5fa Relocate ECC_Start() to avoid test failures. 2018-08-01 00:42:02 -06:00
Sean Bowe
3d75e8b3e7 Move extern params to beginning of test_checktransaction. 2018-07-31 08:33:33 -06:00
Sean Bowe
291895fac7 Ensure sum of valueBalance and all vpub_new's does not exceed MAX_MONEY inside of CheckTransactionWithoutProofVerification. 2018-07-30 22:35:31 -06:00
Jack Grigg
54a868cf0a Rename xsk to expsk
xsk will be used for ZIP 32 extended spending keys, so renaming here to
reduce confusion.
2018-07-30 14:26:29 +01:00
Jack Grigg
a8dd4b0cf1 TransactionBuilder: Make fee configurable 2018-07-30 12:52:48 +01:00
Jack Grigg
45c0d1ec84 TransactionBuilder: Add change output to transaction 2018-07-30 12:46:18 +01:00
Jack Grigg
3466b4677e TransactionBuilder: Add support for transparent inputs and outputs 2018-07-30 11:03:29 +01:00
Jack Grigg
3fd0a269e1 test: Move ECC_Start() call into src/gtest/main.cpp 2018-07-27 17:18:49 +02:00
Jack Grigg
25bb05de23 Formatting 2018-07-27 12:17:14 +02:00
Jack Grigg
e5dc5228ea TransactionBuilder: Check that all anchors in a transaction are identical
This reduces the amount of information that is leaked by the choice of anchor.
In future we will make a protocol change to enforce that all inputs use the
same anchor.
2018-07-27 09:46:38 +02:00
Larry Ruane
772f87aaeb don't ban peers when loading pre-overwinter blocks 2018-07-26 12:29:04 -06:00
Jack Grigg
e691e21f40 TransactionBuilder with support for creating Sapling-only transactions 2018-07-25 11:35:10 +02:00
Jack Grigg
66a519f55d Alter SaplingNote::nullifier() to take a SaplingFullViewingKey
This means the API will work if you only have a SaplingExtendedSpendingKey,
as will be the case with ZIP 32.
2018-07-24 14:54:01 +02:00
Homu
a7a62b724b Auto merge of #3391 - bitcartel:3061_sapling_note_encryption, r=ebfull
Sapling note plaintext (encryption and decryption)

Add encryption and decryption of SaplingNotePlaintext and SaplingOutgoingPlaintext classes.

This is part of #3061 to add Sapling note functionality.
2018-07-24 03:27:28 -07:00
Simon
e739ca2ef2 Rename AttemptSaplingEncDecryptionUsingFullViewingKey and use function overloading. 2018-07-23 10:48:26 -07:00
Simon
7b913c3e5e Implement Sapling note decryption using full viewing key. 2018-07-20 16:31:48 -07:00
Daniel Cousens
4519a766b6 move rpc* to rpc/ 2018-07-18 11:07:16 -06:00
Simon
687bd96cbd Minor update to address nits in review. 2018-07-17 14:26:38 -07:00
Sean Bowe
f23e783600 Decryption and tests of note/outgoing encryption. 2018-07-16 18:34:14 -06:00
Homu
b7d058cef3 Auto merge of #3334 - arielgabizon:add_groth_tests, r=bitcartel
Extend JoinSplit tests to Groth

As we now have both PGHR and Groth proofs for Sprout - make the joinsplit tests check the Groth proofs as well.
See https://github.com/zcash/zcash/issues/3266
2018-07-16 12:11:12 -07:00
Ariel Gabizon
589479fd33 Extend Joinsplit tests to Groth 2018-07-13 13:01:34 +02:00
Homu
f55bcd1c10 Auto merge of #3374 - rex4539:fix-typos, r=str4d
Fix typos
2018-07-12 14:25:15 -07:00
Homu
d86f60f382 Auto merge of #3324 - ebfull:sapling-note-encryption, r=ebfull
Sapling note encryption implementation

Closes #3055

Implemented along with @gtank and @Eirik0

DH key exchange was implemented in https://github.com/zcash/librustzcash/pull/18
2018-07-11 14:51:57 -07:00
Sean Bowe
7478876271 Minor edits 2018-07-11 15:48:41 -06:00
Dimitris Apostolou
ccf9106501 Fix typos 2018-07-06 14:33:24 +03:00
Jay Graber
8e91ebf76c Change default_address to return SaplingPaymentAddr and not boost::optional 2018-07-05 14:52:51 -07:00
Jay Graber
f82a864dc1 Add StoreAndRetrieveSaplingSpendingKey test 2018-07-05 14:52:51 -07:00
Sean Bowe
4e1f2daa0d Add get_esk() function to Sapling note encryption. 2018-06-18 13:14:43 -06:00
Sean Bowe
c03e22612d Prevent nonce reuse in Sapling note encryption API. 2018-06-14 12:21:28 -06:00
Sean Bowe
9e1c2c4049 Implementation of Sapling in-band secret distribution. 2018-06-14 11:58:45 -06:00
Jay Graber
052d640cb0 Add json test vectors for Sapling key components. 2018-06-13 10:38:32 -07:00
Homu
4f18c693c3 Auto merge of #3272 - bitcartel:3061_sapling_add_notes, r=bitcartel
Add SaplingNote class

Part of #3061, adding SaplingNote class.
2018-06-12 16:58:38 -07:00
Simon
268e5dfa50 Return optional for Sapling commitments and nullifiers.
Unlike Sprout, they are not always computable in Sapling.
2018-06-12 14:40:17 -07:00
Simon
d17f8d1cc7 Refactor and replace factory method random() with constructor. 2018-06-12 14:37:15 -07:00