Commit Graph

86 Commits

Author SHA1 Message Date
Jack Grigg 0fbab55b1b
Add benchmark for attempting decryption of notes 2016-11-17 19:09:45 +13:00
ayleph 48f9c65b55 Correct spelling error in z_sendmany error output
Change "alllowed" -> "allowed."
2016-11-08 13:13:48 -08:00
Simon 3920292b43 Add transaction size and zaddr output limit checks to z_sendmany. 2016-11-07 09:29:56 -08:00
Sean Bowe 58c4c0bba3 Change some Bitcoin strings to Zcash strings. 2016-10-26 13:29:05 -06:00
Simon db026807b8 Add z_sendmany rule that when sending coinbase utxos to a zaddr
they must be consumed entirely, without any change, since there
is currently no way to specify a change address in z_sendmany.
2016-10-24 21:34:16 -07:00
zkbot 71043784dd Auto merge of #1586 - bitcartel:z_sendmany_amount_too_strict, r=daira
Fix issue where z_sendmany amount parameter is too strict

Upstream treats an amount parameter of `1` the same as `1.0`.  Third-party would like this fixed.
2016-10-21 22:10:41 -04:00
Simon 75407c6872 Fix issue where z_sendmany is too strict and does not allow integer based amount e.g. 1 which is the same as 1.0 2016-10-20 17:03:57 -07:00
Jack Grigg 1532cb75f3
Throw an error when encryptwallet is disabled 2016-10-20 12:58:20 -05:00
Jack Grigg 62c0aa9e58
Disable wallet encryption
Closes #1552
2016-10-18 17:47:17 -05:00
Jack Grigg 6e263a5fd3
Address review comments 2016-10-16 16:26:51 -05:00
Jack Grigg 1a62587e9a
Delay caching of nullifiers when wallet is locked
Closes #1502
2016-10-14 17:16:09 -05:00
Simon 49e591eb89 Fix incorrect check of number of parameters for z_getnewaddress. 2016-10-12 10:14:32 -07:00
zkbot 7dc49cbc6a Auto merge of #1490 - str4d:1454-deprecate-accounts, r=bitcartel
Throw an RPC error for all accounts except the default

Closes #1454
2016-10-10 23:55:02 -04:00
Jack Grigg 715e5bbefd
Correct docstring 2016-10-10 10:47:38 -05:00
Jack Grigg 7b3351ff0e
Deprecated -> Unsupported in RPC error 2016-10-10 10:47:36 -05:00
Simon f7cfb52d3c Add vjoinsplit to JSON output of RPC call gettransaction 2016-10-06 19:53:46 -07:00
Jack Grigg 3c31eb24d3
Throw an RPC error for all accounts except the default 2016-10-05 15:16:47 -05:00
Simon 73699ceaf6 Add support for spending keys to the encrypted wallet. 2016-09-29 20:17:30 -07:00
Simon dec49d1f82 Fix GetFilteredNotes to use int for minDepth like upstream and avoid casting problems. Don't use FindMyNotes as mapNoteData has already been set on wallet tx. 2016-09-27 11:14:49 -07:00
Jack Grigg 9e52ca3205 Measure multithreaded solveequihash time per-thread 2016-09-13 16:12:07 +12:00
Simon 6114cfe767 Improve check that user supplied memo field is too long. 2016-09-08 21:46:15 -07:00
Simon 12448b6457 Add extra RPC parameter checks for minconf<0 and zaddr not belonging to wallet. 2016-09-08 21:46:15 -07:00
Simon ca0ec80b4c Add 'DEPRECATED' to help message of zcraw* commands 2016-09-08 21:46:15 -07:00
Simon 6c41028f7c Add z_listreceivedbyaddress RPC call 2016-09-08 21:46:15 -07:00
Simon 1b141933e5 Rename GetUnspentNotes to GetFilteredNotes
Added parameter to ignore spent notes, which is true by default.
2016-09-08 21:46:15 -07:00
Simon a9743bc8bf Refactor async sendmany and getbalance calls to use GetUnspentNotes(). 2016-09-08 21:46:14 -07:00
Simon a0a3334c4d Add z_getbalance and z_gettotalbalance RPC calls to close #1201. 2016-09-08 21:46:14 -07:00
Simon 14af21e9f7 Add chaining of JoinSplits within a transaction. 2016-09-08 21:46:13 -07:00
Simon c1eae2806c Closes #1293 by adding z_getoperationresult and making z_getoperationstatus idempotent. 2016-09-08 21:46:13 -07:00
Simon 34f0001ccc Implement RPC call z_listoperationids and update z_getoperationstatus to take a list parameter. 2016-09-08 21:46:13 -07:00
Simon b7d7b2ad9d z_sendmany from a taddr now routes change to a new address instead of back to the sender's taddr, 2016-09-08 21:46:13 -07:00
Simon dafb81614b Implement z_sendmany RPC call.
Simple implementation does not try to optimize coin or note selection.
Caller can send from a taddr or zaddr to multiple recipients.
Currently only one of the recipients can be a zaddr.
2016-09-08 21:46:13 -07:00
Simon fc72c078be Add async RPC queue and operation classes.
Add z_getoperationstatus RPC command.
Add z_sendmany RPC command (dummy implementation, does not send actual
coins).
2016-09-08 21:46:13 -07:00
Simon 805344dcf4 Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
Simon e709997ff2 Implemented z_listaddresses to return all the zaddr in the wallet. 2016-08-24 11:19:33 -07:00
Simon c1c4594371 Implemented RPC calls z_importkey, z_exportkey, z_getnewaddress.
Modified RPC calls dumpwallet and importwallet to include spending keys.
2016-08-24 11:19:33 -07:00
zkbot 95277e0311 Auto merge of #1144 - bitcartel:zc.v0.11.2.z7_tx_malleability_gettxid, r=bitcartel
A fix for transaction malleability

This PR fixes transaction malleability by not including the sigscript of transaction inputs and joinsplit sigs when hashing the txid.

This PR supercedes PR #1101 which was a minimal solution based on a new serialization flag.

This PR introduces GetTxid() to distinguish between getting a transaction id and the double sha256 hash.

The key changes are:
- Adding GetTxid() method to CTransaction which makes a copy of the transaction, clearing out the sigscript and joinsplitsig fields, before hashing.
- Verifying that every call to GetHash() actually wants a txid, and replacing with GetTxid().
- Renaming GetHash() to GetSerializeHash()
  - Rationale: In future, upstream code we want to merge will use GetHash() but we don't know the intent.  We should check to see if the intent is to receive a txid (most likely) in which case we replace with GetTxid(), or if upstream actually wants a double hash of the transaction we can use GetSerializeHash().
- Updated genesis data in chainparams.cpp

Note that coinbase transactions are excluded as they need the sigscript hashed to help avoid duplicate txids per BIP34:
  - This modification is related to a question from @ebfull on PR #1101 - "Can we think of a way this change allows us to construct two transactions with the same txid which can simultaneously appear in the blockchain? My guess is it would be possible to construct a coinbase transaction of such a form... this surely breaks invariants."

This PR Passes all tests in test_bitcoin (test data was updated in bloom_tests, miner_tests and script_tests).
2016-08-05 19:31:52 +00:00
Jack Grigg f7478de67f Add thread parameter to solveequihash benchmark
Closes #1147
2016-08-05 15:05:38 +12:00
Simon eae3794152 Update deprecation message for zcraw api. 2016-07-27 21:40:26 -07:00
Simon 10d2c57c0d Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Simon a24a2e1144 Inform user that zcraw... rpc calls are being deprecated. 2016-07-24 10:05:20 -07:00
zkbot b83061544f Auto merge of #1116 - ebfull:performance-check-valid-pour-fix, r=ebfull
Introduce `zcsamplejoinsplit` for creating a raw joinsplit description

We need this to generate joinsplits for use in the performance measurements. The current measurements for *memory usage* of verification are wrong now that we're computing the joinsplit before verifying: https://speed.z.cash/timeline/?exe=1&base=1%2B9&ben=memory+verifyjoinsplit&env=1&revs=50&equid=off&quarts=on&extr=on

This PR fixes that.
2016-07-20 00:03:46 +00:00
Taylor Hornby 67f0243533 Remove in-band error signalling from SignatureHash, fixing the SIGHASH_SINGLE bug. 2016-07-19 16:36:35 -06:00
Sean Bowe 1737627c4e Introduce `zcsamplejoinsplit` for creating a raw joinsplit description, and use it to construct the joinsplit for the performance tests that verify joinsplits. 2016-07-19 15:49:11 -06:00
Sean Bowe 22de160219 Fixes for indentation and local variable names. 2016-07-18 10:07:29 -06:00
Daira Hopwood 4bc00dc141 Bucket -> note.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-18 10:06:18 -06:00
Sean Bowe b7e4abd6f7 Rename some usage of 'pour'. 2016-07-18 10:06:18 -06:00
Sean Bowe 8675d94b63 Rename vpour to vjoinsplit. 2016-07-18 10:06:18 -06:00
Sean Bowe a8c68ffe99 Rename CPourTx to JSDescription. 2016-07-18 10:06:18 -06:00
Sean Bowe 35f82c35fe Rename samplepour to samplejoinsplit 2016-07-11 11:33:14 -06:00