Commit Graph

343 Commits

Author SHA1 Message Date
jl777
9a59f56135 https://github.com/zcash/zcash/pull/3670/files 2018-12-04 23:56:04 -11:00
miketout
99aeab28f9 Integrate latest Zcash fixes and update for non-latin user names 2018-10-27 20:29:03 -07:00
Jack Grigg
ee3fa7020e Pass parameter paths as native strings to librustzcash 2018-10-27 19:19:02 +13:00
miketout
5f63373eb9 Selectively reject Sapling transactions while synced below activation height. Add separate control of staking. 2018-10-08 21:15:21 -07:00
miketout
8682e17a7d Sapling support for z_shieldcoinbase and more 2018-10-08 16:17:24 -07:00
Homu
aede10d3c2 Auto merge of #3559 - str4d:3552-testnet-min-difficulty-blocks, r=bitcartel
Allow minimum-difficulty blocks on testnet

This is a consensus rule change on testnet that will result in a chain split (leaving the stuck chain, as desired).

Reverts #2766 and part of #1338.
Closes #3552.
2018-10-05 12:24:42 -07:00
miketout
3bfa5e2264 Latest Zcash updates and more CC for N@S 2018-10-05 00:26:06 -07:00
Jack Grigg
2b47b0de7d Position PoW.MinDifficultyRules test after rule activates 2018-10-05 00:10:17 +01:00
Homu
325ba00336 Auto merge of #3542 - Eirik0:3511-update-address-mapping, r=bitcartel
Add newly discovered sapling addresses to the wallet when decrypting

Closes #3511
2018-10-03 21:49:32 -07:00
Jack Grigg
1702a86455 Allow minimum-difficulty blocks on testnet and regtest
A block may be mined with nBits set to the minimum difficulty if its
nTime is set more than six block intervals (15 minutes) after its parent
block.

This is a consensus rule change on testnet that will result in a chain
split (as desired).
2018-10-03 17:50:17 +01:00
Jack Grigg
639e46b4d7 Revert "Remove testnet-only difficulty rules"
This reverts commit 333ea3c426.
2018-10-03 16:15:03 +01:00
miketout
4b729ec577 Changes for most chain power rule 2018-09-28 01:38:14 -07:00
Eirik Ogilvie-Wigley
83c4e360da Address need not be optional when adding sapling keys 2018-09-27 15:44:04 -06:00
Jack Grigg
34e222c18e Revert "Disable Sapling features on mainnet"
This reverts commit 554e00e8f9.
2018-09-21 23:43:31 +01:00
miketout
644c7445ec Latest Zcash updates 2018-09-20 13:32:57 -07:00
Homu
75c1dbc5eb Auto merge of #3452 - LarryRuane:3399-peer-ban-test, r=bitcartel
Test peer banning logic in both pre- and post-initial block download states

The DoS ban scores are different for each, and it's nice to test both.

Follow-on from #3410.
2018-09-19 10:25:23 -07:00
Homu
4fc1066b6f Auto merge of #3516 - str4d:3506-sendmany-sapling-t-ovk, r=ebfull
Generate an ovk to encrypt outCiphertext for t-addr senders

Closes #3506.
2018-09-18 18:10:52 -07:00
Jack Grigg
bd3c860cb4 Use ovk directly in the TransactionBuilder API instead of fvk 2018-09-18 23:26:31 +01:00
miketout
9feb4b9e08 Major updates integration from all upstreams 2018-09-18 14:33:53 -07:00
Larry Ruane
6206d86237 Test peer banning logic in both pre- and post-initial block download states 2018-09-12 13:30:01 -06:00
Jack Grigg
07d3f947ec Extract a helper method for finding the next epoch 2018-09-12 10:07:44 +01:00
Homu
396bdaf00f Auto merge of #3307 - gtank:3187-refactor-checkblock, r=bitcartel
Refactor ContextualCheckBlock tests

This cleans up and condenses our quadratically-scaling transaction format / consensus rule tests. They still technically scale quadratically, but should be much more readable and manageable now - all that remains in the individual test cases is the specific version flag tweaking we're trying to test.

Closes #3187.
2018-09-11 14:53:59 -07:00
Simon
17b6a9d376 Update comment for test ContextualCheckBlockTest.BlockSproutRulesRejectOtherTx 2018-09-11 14:49:47 -07:00
Jack Grigg
b33a7ec46e wallet: Don't allow an HDSeed to be overwritten
We can maybe relax this restriction later once we have worked out the UX
implications.
2018-09-03 10:45:37 +01:00
Jack Grigg
70b4ad2dcd wallet: Switch from SaplingSpendingKey to SaplingExtendedSpendingKey
The wallet now only stores Sapling extended spending keys, and thus can
only be used with keys generated from an HDSeed via ZIP 32.

Note that not all Sapling keys in the wallet will correspond to the
wallet's HDSeed, as a standalone Sapling xsk can be imported via
z_importkey. However, it must have been generated from a seed itself,
and thus is more likely to be backed up elsewhere.
2018-09-03 10:45:37 +01:00
Jack Grigg
ec653523ad Store HDSeed in CCryptoKeyStore 2018-09-03 10:45:33 +01:00
Jack Grigg
70c8c25e4b Store HDSeed in CBasicKeyStore 2018-09-03 10:27:52 +01:00
Jack Grigg
7614198f9d ZIP 32 Sapling structs 2018-09-03 10:27:52 +01:00
Homu
12c1156f31 Auto merge of #3172 - str4d:mingw32, r=str4d
Windows cross-compile support

Usage on Debian / Ubuntu:

> $ sudo apt install mingw-w64
> $ sudo update-alternatives --config x86_64-w64-mingw32-gcc
> (configure to use POSIX variant)
> $ sudo update-alternatives --config x86_64-w64-mingw32-g++
> (configure to use POSIX variant)
> $ HOST=x86_64-w64-mingw32 ./zcutil/build.sh

Closes #489.
2018-08-30 14:51:24 -07:00
Jack Grigg
2962a72e35 Rename GetFirstBlockTransaction() to GetFirstBlockCoinbaseTx() 2018-08-30 14:58:19 +01:00
Jack Grigg
d7bcbfaee4 Fix test after refactor to check bacd-cb-height rule on a genesis block 2018-08-30 14:50:57 +01:00
Jack Grigg
fb22b3bbd8 Revert NU activation heights in reverse order
Ensures that global state remains consistent.
2018-08-30 14:44:50 +01:00
Jack Grigg
d70d103ee0 Ensure SCOPED_TRACE falls out of scope when necessary 2018-08-30 14:41:56 +01:00
George Tankersley
e601446adc Refactor ContextualCheckBlock tests
Combines some of the needlessly separate tests. Each formerly separate
test is tagged with a SCOPED_TRACE to make sure logs are still useful.
2018-08-30 14:39:07 +01:00
George Tankersley
ec7466b62f Refactor ContextualCheckBlock tests (#3187)
Initial cleanup. Reduces duplication of code, especially around
constructing transactions, resetting the activation heights, and setting
up the EXPECT calls for accepting and rejecting tests.

Also adds a bunch of comments explaining the test plan and what
particular parts of the test are doing.
2018-08-30 14:37:19 +01:00
Homu
20f87bc226 Auto merge of #3422 - bitcartel:3061_track_notes_based_on_3062, r=str4d
Track Sapling notes and nullifiers in the wallet (in-memory only, no persistence to disk)

Part of #3061.  Add in-memory tracking of Sapling notes and nullifiers to the wallet.
2018-08-17 14:42:52 -07:00
David Mercer
32d3a3352e libsnark: convert long long and unsigned long to C++11 fixed-width types
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2018-08-17 18:53:59 +01:00
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
Simon
d4d0ec7e95 Update test to pass in required cm to SaplingNotePlaintext::decrypt(). 2018-08-08 12:03:09 -07:00
Sean Bowe
69c4391b0f Check commitment validity within the decryption API for Sapling note plaintexts. 2018-08-08 12:03:09 -07: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