Commit Graph

649 Commits

Author SHA1 Message Date
Simon 067b6f9373 For ZEC-013. Update qa tests broken by expiring soon threshold. 2018-11-17 09:02:10 -08:00
Simon 4484c76202 For ZEC-013. RPC createrawtransaction returns error if tx expiring soon. 2018-11-17 09:02:10 -08:00
Simon cc1ab2db55 For ZEC-013. Don't propagate txs which are expiring soon in p2p messages.
When responding to "mempool" message, do not include the txid of an
expiring soon transaction in the "inv" message reply.
When responding to "getdata" message, do not reply with a "tx" message
for a transaction which is expiring soon.
2018-11-17 09:02:00 -08:00
Simon f8cd79c2de For ZEC-013. Mitigate potential tx expiry height related DoS vector.
Don't accept transactions which are about to expire (next 3 blocks).
Don't set a ban score if a peer does propragate these transactions.
See ZEC-013 for more detail.
2018-11-17 09:01:49 -08:00
Simon 43040e9384 Add support for "notfound" message to mininode. 2018-11-17 08:27:41 -08:00
Homu a47e1fda73 Auto merge of #3684 - str4d:load-sapling-chain-value, r=bitcartel
Load sapling chain value into memory

`CBlockIndex::nSaplingValue` has been correctly set and written to disk since before Sapling activated, meaning that all nodes now are correctly tracking the Sapling shielded pool value on-disk. However, on restart the per-block values are not being read into memory, and so the in-memory pool value appears to be zero on every restart. Setting `nSaplingValue` in-memory during block index loading fixes the problem.
2018-11-16 21:07:46 -08:00
Eirik Ogilvie-Wigley e0b89f59f9 Adjust z_mergetoaddress assertions in Sapling rpc test 2018-11-16 18:14:58 -07:00
Eirik Ogilvie-Wigley 0adb77d32e Add locking for Sapling notes 2018-11-16 18:14:58 -07:00
Eirik Ogilvie-Wigley 487c9020bd Add Sapling support to z_mergetoaddress 2018-11-16 18:14:58 -07:00
Eirik Ogilvie-Wigley e0c491c073 Extend Sprout mergetoaddress rpc test to also work for Sapling 2018-11-16 18:14:57 -07:00
Eirik Ogilvie-Wigley fe393e8a2f Add fail method to rpc test utils 2018-11-16 18:00:05 -07:00
Simon 12a1267a4a Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
Jack Grigg 4e117579c5
Test Sapling value pool accounting 2018-11-16 16:14:52 +00:00
Homu 97fccdbac5 Auto merge of #3605 - LarryRuane:3604-memo-zeros, r=daira
3604 fix sapling default memo - 0xF6 plus zeros

Closes #3604. For Sapling outputs, set the default memo to `no_memo` instead of all zeros. (See section 5.5 of the Sapling protocol specification.)
2018-10-28 03:15:07 -07:00
Eirik Ogilvie-Wigley 882a4f577f Fix potentially misleading test failures 2018-10-24 13:53:25 -06:00
Larry Ruane 245db9c8a6 update bug in wallet_listreceived.py, now it highlights the fix 2018-10-24 08:13:56 -06:00
Homu d810703431 Auto merge of #3588 - bitcartel:hash_final_sapling_root_verification, r=bitcartel
Add test to verify final sapling root in block header is updated.
2018-10-18 17:52:11 -07:00
Simon 61caa46619 For #3359. Return error if Sapling addresses passed to RPC z_mergetoaddress.
RPC z_mergetoaddress does not support Sapling yet but the existing error
reporting was not clear to users.
2018-10-13 08:10:10 -07:00
Simon de1b86a429 For #3359. RPCs transferring funds return error if Sapling addresses are used before Sapling activation. 2018-10-12 23:14:06 -07:00
Homu 527b7feef5 Auto merge of #3592 - Eirik0:z-sendmany-better-error, r=bitcartel
Better error message when sending to both sprout and sapling

When trying to send to both Sprout and Sapling (not currently supported with z_sendmany) we were getting the following error in our operation result: `general exception: boost::bad_get: failed value get using boost::get`.

This PR changes this to fail with a better error message before the async operation begins:
```
error code: -8
error message:
Cannot send to both Sprout and Sapling addresses using z_sendmany
```
2018-10-12 15:30:34 -07:00
Eirik Ogilvie-Wigley 0917c84d9a Better error message when sending to both sprout and sapling
Co-authored-by mdr0id <marshall@z.cash>
2018-10-12 14:12:21 -06:00
Simon 01918e8742 Update test to verify Sapling nullifiers and witnesses persist correctly. 2018-10-11 21:52:56 -07:00
arielgabizon eb0bf23751 add test for sapling spend with transparent recipient 2018-10-11 15:22:20 +02:00
Simon 56765e24cb Add test to verify final sapling root in block header is updated. 2018-10-10 17:30:58 -07:00
Eirik Ogilvie-Wigley 3f824a908b Fix HDSeed comment 2018-10-10 16:00:59 -06:00
Homu 732e167043 Auto merge of #3450 - leto:rpctest-readme, r=str4d
Fix some typos in rpc-tests readme
2018-10-09 13:18:07 -07:00
Homu c2bb0ec67f Auto merge of #3517 - mdr0id:3388_persist_wallet, r=str4d
Sapling support for persisting wallet to disk

Closes #3388. Closes #3061.
2018-10-08 09:53:34 -07:00
Simon 01282e4fa6 Update wallet_persistence test to verify spending notes after restart. 2018-10-07 16:22:33 -07:00
Simon 08f1baaaca Update wallet_persistence test to verify wallet txs are persisted across restarts. 2018-10-06 22:53:24 -07:00
Simon 5537bf5cdb Fix file permissions of QA test wallet_persistence.py 2018-10-06 21:05:30 -07:00
mdr0id 2fcf06077f
Persist Sapling key material in the wallet to disk 2018-10-06 00:01:14 +01:00
mdr0id 87ae893d75
Revert "wallet: Comment out HDSeed and CHDChain persistence to disk"
This reverts commit b7f9a7ae02.
2018-10-05 17:46:43 +01:00
Homu 625797a037 Auto merge of #3518 - str4d:3216-z_shieldcoinbase, r=str4d
Add Sapling support to z_shieldcoinbase

Part of #3216.
2018-10-05 03:33:16 -07:00
Jack Grigg 089ec92e7b
Fix pyflakes warnings 2018-10-05 11:32:22 +01:00
Homu 967bbbc486 Auto merge of #3561 - bitcartel:3560_update_sapling_note_data, r=bitcartel
Closes #3560. Update Sapling note data correctly when importing a key.
2018-10-04 15:37:34 -07:00
Jack Grigg f09aae037c
Update wallet_listreceived test for now-correct empty Sapling memos 2018-10-04 22:46:15 +01:00
Homu 4ba35551d4 Auto merge of #3510 - arcalinea:3378_z_listunspent, r=bitcartel
Sapling support for z_listunspent

Closes #3378.
2018-10-04 11:39:14 -07:00
Simon f0dcfceb81 Closes #3560. Update Sapling note data correctly when importing a key. 2018-10-03 15:40:50 -07:00
Jack Grigg 5f91a95641
Add Sapling support to z_shieldcoinbase
Part of #3216.
2018-10-03 12:16:18 +01:00
Homu bcdb4344f0 Auto merge of #3548 - Eirik0:3546-sapling-coin-priority, r=bitcartel
Use max priority for all shielded transactions

Addresses https://github.com/zcash/zcash/issues/3546#issuecomment-425184034
2018-10-01 10:13:15 -07:00
Simon b7549f2aec Add test that Sapling shielded transactions have MAX_PRIORITY 2018-09-30 17:23:53 -07:00
Simon 5f57babd08 Cleanup to address review comments. 2018-09-28 22:11:05 -07:00
Larry Ruane d7d6480ce3 z_listunspent rpc unit test: add testing for Sapling 2018-09-28 15:23:24 -07:00
Jay Graber 011f9a02ef Add rpc test for sprout txs z_listunspent 2018-09-28 15:19:10 -07:00
Larry Ruane e4f0d6a8de Sapling support for z_listreceivedbyaddress 2018-09-27 16:59:29 -06:00
Simon 4c4e1718b1 Update qa test as offline regtest nodes need branch id passed in. 2018-09-21 17:16:44 -07:00
Simon 18f8abb62d Closes #3534. Do not use APPROX_RELEASE_HEIGHT to get consensus branch
id when in regtest mode.

Co-authored-by: Larry Ruane <larryruane@gmail.com>
2018-09-21 11:10:15 -07:00
Homu 36243f41f1 Auto merge of #3520 - Eirik0:3327-sign-offline, r=bitcartel
Fix signing raw transactions with unsynced offline nodes

This PR address the issue in two different ways:

- In `signrawtransaction` we determine the consensus branch ID (which we then later use to construct the transaction) using the chain height. We now also consider the `APPROX_RELEASE_HEIGHT` as this is a better estimation than 0 for the height of the chain if we are unsynced. (This in and of itself solves the Overwinter signing issue).
- We have added an additional parameter to `signrawtransaction` to allow manually overriding the consensus branch ID that zcashd determines we are on. This allows users to work around corner cases where the first strategy is still insufficient.

Closes #3327.
2018-09-19 15:02:52 -07:00
Eirik Ogilvie-Wigley c10249f3de Remove unused import 2018-09-19 14:41:02 -06:00
Homu 25c3f903c1 Auto merge of #3491 - Eirik0:3218-sapling-import-export-wallet, r=str4d
Add Sapling support to z_importwallet and z_exportwallet

Includes code adapted from upstream PR https://github.com/bitcoin/bitcoin/pull/8323

Closes #3218.
2018-09-19 12:15:48 -07:00