Commit Graph

675 Commits

Author SHA1 Message Date
Daira Hopwood e7529049fb Test the expiry height of migration transactions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-05-10 13:48:43 +01:00
Eirik0 7cf4749d0d Correctly account for migration transactions in the mempool
Co-authored-by: LarryRuane <larry@z.cash>
2019-05-05 12:59:43 -06:00
Eirik0 345177cfc1 Do not look at vin/vout when determining migration txs and other cleanup 2019-04-30 09:52:53 -06:00
Eirik0 e9530f40f2 use -valueBalance rather than vpub_new to calculate migrated amount 2019-04-29 17:00:26 -06:00
Eirik0 108e587c14 Fix typos and update documentation 2019-04-29 15:29:29 -06:00
Eirik0 2276133bb3 Test migration using both the parameter and the default Sapling address 2019-04-29 15:29:29 -06:00
Eirik0 6e82d72852 Add rpc to get Sprout to Sapling migration status 2019-04-29 15:28:35 -06:00
Eirik0 6acb37bcee Check for full failure message in test case 2019-04-26 19:01:23 -06:00
Eirik0 5519d16997 Set min depth when selecting notes to migrate 2019-04-25 13:43:23 -06:00
Eirik0 d2a584e35a Refactor wait_and_assert_operationid_status to allow returning the result 2019-04-24 11:31:14 -06:00
Eirik0 699288b4b4 Documentation cleanup 2019-04-24 11:31:14 -06:00
Eirik0 81a45d6984 Add rpc to enable and disable Sprout to Sapling migration 2019-04-24 11:31:14 -06:00
Simon d6b47948bf Add qa test for experimental feature: -developersetpoolsizezero 2019-04-23 15:05:15 -07:00
Jack Grigg 3cb20f26a1
test: Make expected_utxos optional in get_coinbase_address() 2019-03-06 09:03:55 +13:00
Jack Grigg b0f1d643aa
test: Fetch coinbase address from coinbase UTXOs
After upstream PR bitcoin/bitcoin#5994, the first call to getnewaddress after
startup does not return the address being used by the miner.
2019-03-06 09:03:51 +13:00
Homu 48b7dea5a8 Auto merge of #3639 - leto:size_on_disk, r=bitcartel
Port getblockchaininfo.size_on_disk from BTC master

Closes #3630.
2019-02-25 10:08:44 -08:00
Jack Grigg ecde950bac
Add Sapling benchmarks to benchmark runner 2019-02-16 18:44:16 +00:00
Eirik Ogilvie-Wigley a482e4c9fa Strategically sync to prevent intermittent failures 2019-01-17 15:00:57 -07:00
Eirik Ogilvie-Wigley 32212cbad7 Extract helper methods 2019-01-17 15:00:57 -07:00
Eirik Ogilvie-Wigley 5e654035a6 fail test if pong is not received 2019-01-17 15:00:57 -07:00
Eirik Ogilvie-Wigley 3dab742638 Check entire contents of mempool 2019-01-17 15:00:52 -07:00
Eirik Ogilvie-Wigley 57dcc9e6bf Make variables local 2019-01-17 14:58:50 -07:00
Eirik Ogilvie-Wigley 73859fd218 Move common code to helper 2019-01-17 14:58:46 -07:00
Eirik Ogilvie-Wigley 23b329d912 flake8 cleanup 2019-01-14 14:00:24 -07:00
mdr0id 4ca5def62f Make pythonisms consistent 2018-12-18 12:16:23 -08:00
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
Jonathan "Duke" Leto 6c1bf4e7ed Add size_on_disk test
Co-authored-by: Simon <simon@bitcartel.com>
2018-11-14 15:04:05 -08: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