Kris Nuttycombe
88c5bf7217
Minor help message correction.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-06 15:41:28 -06:00
Kris Nuttycombe
f9b10b866e
Trivial comment correction.
2020-07-06 13:15:27 -06:00
Kris Nuttycombe
90fc879492
Move test-only code into test sources.
2020-07-06 13:09:49 -06:00
Kris Nuttycombe
0141aacc67
Add `RegtestDeactivateCanopy` calls to restore shared regtest params.
2020-07-06 12:47:12 -06:00
Kris Nuttycombe
8b363e9a70
Fix funding stream end-height-exclusion bugs
2020-07-06 10:52:41 -06:00
Sean Bowe
249de0808d
Remove outdated comment.
2020-07-03 10:24:35 -06:00
Sean Bowe
a9d80b0750
Hash "Zcash" to align tests with ZIP 215 test vectors.
2020-07-03 10:20:37 -06:00
Sean Bowe
c3b3e07160
Change LIBSODIUM_ERROR to -1.
...
We only relied on success being 0 and our code was otherwise agnostic to the
actual return code in the event of failed signature verification, but this
change keeps the API consistent.
2020-07-03 09:37:34 -06:00
Sean Bowe
394947de3a
Migrate ZIP 215 test vectors to gtest suite.
2020-07-03 09:36:34 -06:00
therealyingtong
c4821ddceb
Refactor bool is_zip_212 to enum Zip212Enabled
...
Co-authored by Kris Nuttycombe (@nuttycom)
2020-07-03 06:59:21 +08:00
therealyingtong
eeda663ff7
Remove plaintext check from GetFilteredNotes
...
Co-authored by Sean Bowe (ewillbefull@gmail.com )
2020-07-03 06:59:06 +08:00
therealyingtong
ee83424c6f
Remove plaintext check from AddSaplingSpend
...
Co-authored by Sean Bowe (ewillbefull@gmail.com )
2020-07-03 06:57:57 +08:00
Kris Nuttycombe
fccf37844b
Fix pyflakes.
2020-07-02 16:54:49 -06:00
Homu
602e88ddb9
Auto merge of #4489 - therealyingtong:4479-remove-sprout-shielding, r=str4d
...
[ZIP 211] Disabling Addition of New Value to the Sprout Value Pool
Disables Sprout outputs after NU4 by checking for nonzero `vpub_old` in transactions after NU4 activation height.
Adds gtests to check expected behaviour before and after NU4 activation height.
edit:
Also modifies `z_` methods in `rpcwallet`, and adds a matching RPC test.
Implements [ZIP 211](https://zips.z.cash/zip-0211 ), closes #4479
2020-07-02 21:53:51 +00:00
Larry Ruane
bf568273a7
fix pyflakes CI errors
2020-07-02 14:32:48 -06:00
Kris Nuttycombe
834911c0d7
Update HalvingHeight documentation.
2020-07-02 14:30:06 -06:00
Kris Nuttycombe
49ea02925e
Merge branch 'zip-207' of github.com:str4d/zcash into zip-207
2020-07-02 13:33:09 -06:00
Kris Nuttycombe
d9088ab050
Record-constructor syntax for funding stream initialization.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-02 13:32:23 -06:00
Kris Nuttycombe
4d223f9797
Merge remote-tracking branch 'upstream/master' into zip-207
2020-07-02 13:24:45 -06:00
Kris Nuttycombe
5f20ef3c9d
Minor naming change FundingStreamShare -> FundingStreamElement
2020-07-02 12:15:26 -06:00
Sean Bowe
14a09a5fd6
Remove unused imports from remove_sprout_shielding RPC test.
2020-07-02 11:09:22 -06:00
Alfredo Garcia
7db6e37b40
add log aporximation to metrics solution rates
2020-07-02 13:34:07 -03:00
Kris Nuttycombe
b17f263c20
Capitalization fixes from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-07-02 09:58:12 -06:00
therealyingtong
19d4c47b66
Pass pindex to AddToWalletIfInvolvingMe()
2020-07-02 15:37:37 +08:00
therealyingtong
2f4d7e35c9
Throw error in plaintext deserialization
2020-07-02 15:37:37 +08:00
therealyingtong
f24e706079
Replace leadByte in SaplingNote with is_zip_212
2020-07-02 15:37:32 +08:00
Kris Nuttycombe
aff38f75f3
Qualified imports of std:: types
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-07-01 16:06:27 -06:00
Kris Nuttycombe
bf381ad580
Replace BOOST_FOREACH with for..:
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-07-01 16:05:30 -06:00
Larry Ruane
5b7fed5bbf
self.sync_all(), not time.sleep(4)
2020-07-01 10:28:15 -06:00
Kris Nuttycombe
7dd1889944
Trivial copyright fix.
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-07-02 00:27:18 +08:00
therealyingtong
5e4d13b49d
Add RPC tests
...
Test that Sprout shielding is accepted before Canopy and rejected after Canopy activation
2020-07-02 00:27:14 +08:00
therealyingtong
1c59f06df0
Add checks to z_ methods in rpcwallet
...
Disallow Sprout shielding after Canopy in z_sendmany, z_shieldcoinbase, z_mergetoaddress, and zc_raw_joinsplit (deprecated)
2020-07-01 23:47:36 +08:00
therealyingtong
2a2fc2a16f
Add gtests
...
Should accept Sprout shielding before NU4 but reject it afterwards
2020-07-01 23:31:41 +08:00
therealyingtong
01cdea54ee
Add contextual check to main.cpp
...
Reject transactions with nonzero vpub_old after NU4
2020-07-01 23:31:36 +08:00
Homu
eed865052b
Auto merge of #4579 - rvagg:rvagg/joinSplitRPC, r=str4d
...
Add joinSplitPubKey and joinSplitSig to RPC
These two properties are required to fully reconstruct a Zcash transaction's binary form from the RPC data.
2020-06-30 23:02:47 +00:00
Rod Vagg
a106c15a19
Add joinSplitPubKey and joinSplitSig to RPC
...
These two properties are required to fully reconstruct a Zcash
transaction's binary form from the RPC data.
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-30 21:47:51 +10:00
Kris Nuttycombe
92cec200ee
Minor fixes for ZIP-207 review comments.
2020-06-29 16:13:08 -06:00
Kris Nuttycombe
074d054e84
Trivial error message fix.
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-29 15:54:07 -06:00
Kris Nuttycombe
665b8c647b
Use for..: rather than BOOST_FOREACH
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-29 15:53:41 -06:00
Kris Nuttycombe
1c00a0b541
Identify `-fundingstream` parameter as being regtest-only
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-06-29 15:42:45 -06:00
Sean Bowe
e9c065df5b
Cargo fmt
2020-06-29 09:40:35 -06:00
Sean Bowe
8918eca876
Add more exhaustive tests for ZIP 215 compatibility.
2020-06-29 09:40:34 -06:00
Sean Bowe
58250b4801
Turn return values for libsodium-like API into constants for clarity.
2020-06-29 09:36:54 -06:00
Jack Grigg
efd04b920b
Implement zip-207 and zip-214.
...
Add funding streams to consensus parameters.
Add funding stream payments to coinbase txns generated by the miner.
* Reduce valueBalance for shielded outputs to funding streams.
* Ensure we produce binding signatures in any case where shielded
outputs go to either a funding stream or the miner.
2020-06-25 16:15:50 -06:00
Larry Ruane
73fae6bf0a
review, cleanup: eliminate uninitialized variable
2020-06-25 09:32:36 -06:00
therealyingtong
7a1d119170
Add gtests for v2 plaintexts
2020-06-25 09:12:24 +08:00
therealyingtong
6402c589c6
Refactor SaplingNotePlaintext::decrypt
...
Break up plaintext decryption into height-dependent and non-height-dependent parts.
2020-06-25 09:12:24 +08:00
therealyingtong
3c8e970358
Check epk vs esk whenever caller has esk
2020-06-25 09:12:24 +08:00
therealyingtong
e060d59890
Reject v1 plaintexts after grace period
...
SaplingNotePlaintext::decrypt() now has to be aware of consensus params and blockheight. Its callers in wallet, rpcwallet, and tests are updated accordingly.
TransactionBuilder is also modified to reject invalid leadBytes.
Co-authored by Daira Hopwood (daira@jacaranda.org )
2020-06-25 09:12:21 +08:00
Sean Bowe
56d4ef8333
Make transaction builder take the next block height into account for use of v2 note plaintexts.
2020-06-25 09:11:43 +08:00