Commit Graph

609 Commits

Author SHA1 Message Date
Jack Grigg
089ec92e7b Fix pyflakes warnings 2018-10-05 11:32:22 +01:00
Jack Grigg
f09aae037c Update wallet_listreceived test for now-correct empty Sapling memos 2018-10-04 22:46:15 +01: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
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
Homu
379c7439a0 Auto merge of #3479 - Eirik0:rpc-test-cleanup, r=bitcartel
Rpc test cleanup

The main purpose of this PR was to inline the method 'wait_for_async_operation_id' from util.py in tests where we were doing this manually. To make it work in all cases, I had to change the method to return the result in the case where the call failed. I also did a bit of general clean up (removing semicolons) in the files which I changed.
2018-09-18 20:05:39 -07:00
Homu
e95bdeabbf Auto merge of #3521 - bitcartel:sapling_json_data, r=str4d
Add Sapling fields to JSON RPC output using TxToJSON.

Related to #3063 to add Sapling support to wallet RPCs.
2018-09-18 12:13:14 -07:00
Simon
3501519bc8 Update qa test to check for Sapling related JSON fields. 2018-09-17 10:01:50 -07:00
Eirik Ogilvie-Wigley
40b9527301 Incorporate APPROX_RELEASE_HEIGHT when determining what consensus branch to sign with 2018-09-17 10:27:39 -06:00
Eirik Ogilvie-Wigley
19697025c6 Add test for signing raw transactions offline 2018-09-17 10:27:37 -06:00
Eirik Ogilvie-Wigley
5602e1f1a6 Allow passing timeout parameter to wait_and_assert_operationid_status 2018-09-14 18:41:14 -06:00
Eirik Ogilvie-Wigley
e39f0e16c2 Remove unused imports 2018-09-14 18:41:14 -06:00
Eirik Ogilvie-Wigley
4d89d020a6 Remove unneeded semicolons 2018-09-14 18:41:14 -06:00
Eirik Ogilvie-Wigley
f081d9cb02 Use utility method to wait for async operations 2018-09-14 18:41:14 -06:00
Eirik Ogilvie-Wigley
611f93244b Allow more information to be returned when an async rpc fails 2018-09-14 18:41:14 -06:00
Eirik Ogilvie-Wigley
b37dc4e22f Don't export empty zip32 metadata 2018-09-14 18:36:24 -06:00
Eirik Ogilvie-Wigley
2fe39561ec Export zip32 metadata with sapling keys 2018-09-14 17:27:20 -06:00
Eirik Ogilvie-Wigley
ae807af413 Export comment on HDSeed and fingerprint with wallet 2018-09-14 17:26:02 -06:00
Eirik Ogilvie-Wigley
9bcf90e2de Add sapling support to z_importwallet 2018-09-14 16:16:03 -06:00
Eirik Ogilvie-Wigley
5e360fb29f Add sapling spending keys to z_exportwallet 2018-09-14 15:07:15 -06:00
Jack Grigg
8e057ad9ee qa: Test both Overwinter and Sapling peer management 2018-09-12 12:15:37 +01:00
Jack Grigg
b7f9a7ae02 wallet: Comment out HDSeed and CHDChain persistence to disk
Sapling keys generated from the seed are not yet persisted, so we don't
want to persist the seed or chain state either, otherwise the wallet
could end up in an inconsistent state.

Some tests are temporarily disabled because commenting out HDSeed
persistence breaks invariants inside CCryptoKeyStore.

Revert this commit during the PR for #3388.
2018-09-03 10:45:37 +01:00
Jack Grigg
af04224522 Fix file permissions of wallet_sapling RPC test 2018-09-03 08:27:33 +01:00
Jack Grigg
0f436a0a26 Fix RPC test that checks exact wording of cleaned-up error message 2018-09-03 08:23:09 +01:00
Jack Grigg
e54c4d2ca1 rpcwallet: Add Sapling support to z_sendmany 2018-08-27 11:36:14 +01:00
Homu
622751da12 Auto merge of #3444 - LarryRuane:2982-mininode-version, r=str4d
generalize mininode.py protocol versioning

Fixes #2982 -- replace `overwintered` boolean argument to NodeConn constructor with a protocol version integer, so that adding Sapling (and beyond) will be easier.
2018-08-20 09:48:51 -07:00
Eirik Ogilvie-Wigley
4e1e91512d Fix assertion and comment 2018-08-06 09:58:40 -06:00
Eirik Ogilvie-Wigley
7929851626 Only include the change field if we have a spending key 2018-08-06 09:58:40 -06:00
Larry Ruane
c0aa34a4b2 generalize mininode.py protocol versioning 2018-08-02 20:30:20 -06:00
Homu
066cc9c6c7 Auto merge of #3429 - str4d:3217-sapling-address-creation, r=str4d
Add Sapling support to z_getnewaddress and z_listaddresses

Closes #3217.
2018-08-01 12:01:39 -07:00
Jack Grigg
4aabeebc1f test: Fix permissions of wallet_addresses 2018-08-01 19:56:01 +01:00
Jack Grigg
d75e69da5a test: Deduplicate logic in wallet_addresses RPC test 2018-08-01 09:44:31 +01:00
Simon
f01c11bd0f Add tests for expiryheight parameter of RPC createrawtransaction. 2018-07-30 10:24:10 -07:00
Jack Grigg
eec85c4388 Add Sapling support to z_getnewaddress and z_listaddresses 2018-07-30 16:24:20 +01:00
Larry Ruane
cb3a815b29 Add call to sync_all() after (z_sendmany, wait) 2018-07-20 12:00:41 -06:00
Daniel Cousens
4b184205e3 rpc: update inline comments to refer to new file paths 2018-07-18 11:07:17 -06:00
Homu
b9bd5ab42c Auto merge of #3354 - leto:absurd_fee_bug, r=bitcartel
Fix absurd fee bug reported in #3281, with tests

This was ported from the Hush `absurd_fee_bug` PR: https://github.com/MyHush/hush/pull/136

Tests executed with `./qa/pull-tester/rpc-tests.sh wallet` and pass on Ubuntu 16.04. Some tests were added for previously untested behavior as well.

Closes #3281.
2018-07-17 15:03:08 -07:00
Simon
0b6eeac330 Update and fix per review comments, the test for absurd fee. 2018-07-17 13:00:42 -07:00
Homu
13b41a6760 Auto merge of #3156 - Eirik0:2935-change-indicator, r=bitcartel
Add change indicator

This adds to the json returned when calling z_listreceivedbyaddress and z_listuspent an additional field entitiled 'change' which will be either true or false depending on whether or not the note was change from another transaction.
2018-07-17 11:41:03 -07:00
Eirik Ogilvie-Wigley
62d707d1fd Fix test broken by change indicator 2018-07-16 14:50:06 -06:00
Eirik Ogilvie-Wigley
0646f749f9 Add change indicator for notes 2018-07-16 14:49:29 -06:00
Homu
f649bb36c5 Auto merge of #3303 - LarryRuane:2807-rpc-test-round-fees, r=bitcartel
(rpc-test) accurately account for fee without rounding error

Fix for #2807, this test compares balances after doing key exports and imports, and expects these balances to be equal. But they are not exactly equal due to transaction fees, so the test makes them "equal" by rounding a value that has had fees taken out up to the nearest hundredth of a unit (which is much more than the default fee). This obviously is somewhat sloppy. It also converts a balance to float, which really should never be used due to loss of precision (use Decimal instead).

This change makes the test accurately account for the fee using precise comparisons, and removes the use of float. This test doesn't depend on the default fee (0.0001) but instead sets the fee (to that value). This way, if the default fee changes in the future, this test will continue to run. While testing these changes, I set the fee to various values (up to the max, 0.0190), and the test still passes.
2018-06-22 14:01:48 -07:00
Simon
a4ff089b2a Fix pyflakes error in test zkey_import_export. 2018-06-22 11:34:21 -07:00
Duke Leto
e5aa9f617b Fix absurd fee bug reported in #3281, with tests 2018-06-22 05:20:45 +00:00