Commit Graph

510 Commits

Author SHA1 Message Date
Eirik Ogilvie-Wigley
29523dc778 Remove extra indentation 2018-07-25 20:47:41 -07:00
Eirik Ogilvie-Wigley
8e8279e728 Rename sprout specific methods 2018-07-25 20:47:41 -07:00
Eirik Ogilvie-Wigley
45de2eda07 Increment sapling note witnesses 2018-07-25 20:47:41 -07:00
Eirik Ogilvie-Wigley
f86ee1c252 Pass sapling merkle tree when incrementing witnesses 2018-07-25 20:47:41 -07:00
Eirik Ogilvie-Wigley
4a0bc6047e Extract method for incrementing witness heights 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
f6d0d5ec43 Extract methods for incrementing witnesses 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
b538024806 Extract method for copying previous witnesses 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
403b9b4e4d Clear sapling witness cache 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
9d804cc619 Decrement sapling note witnesses 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
3c868d2b03 Consolidate for loops 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
49695a97b5 Remove redundant curly braces 2018-07-25 20:47:40 -07:00
Eirik Ogilvie-Wigley
005f3ad1dd Rename note data to include sprout 2018-07-25 20:47:40 -07:00
Michael Toutonghi
d7e6718dc8 More nonce and new PoS reporting improvements 2018-07-20 22:59:33 -07:00
Michael Toutonghi
17d0160a17 Cleanup nonce changes 2018-07-20 19:57:46 -07:00
Michael Toutonghi
c5325a3256 PoS improvements 2018-07-18 17:42:15 -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
jl777
3872e9cb59 Fix 2018-07-17 05:29:01 -11:00
jl777
7000ef1af3 Possible workaround for crash 2018-07-17 05:26:34 -11:00
Eirik Ogilvie-Wigley
0646f749f9 Add change indicator for notes 2018-07-16 14:49:29 -06:00
jl777
8613127572 LastTip() and tweak deprecation heights 2018-07-15 22:47:16 -11:00
jl777
3cbc956e04 Test fix for crash 2018-07-14 03:08:05 -11:00
jl777
72953c8342 Syntax 2018-07-11 03:00:38 -11:00
jl777
1cdb961ba2 Fix PoW mining in mixed PoS/PoW, fix orphaned stake tx 2018-07-11 02:51:42 -11:00
Jay Graber
8e91ebf76c Change default_address to return SaplingPaymentAddr and not boost::optional 2018-07-05 14:52:51 -07:00
Jay Graber
f82a864dc1 Add StoreAndRetrieveSaplingSpendingKey test 2018-07-05 14:52:51 -07:00
Jay Graber
f4207d0c0e Add SaplingIncomingViewingKeys map, SaplingFullViewingKey methods 2018-07-05 14:52:46 -07:00
Jay Graber
efb7662d4a Add Sapling Add/Have/Get to keystore 2018-07-05 14:37:33 -07:00
jl777
719aa8b19e Test 2018-06-28 23:42:32 -11:00
jl777
817ad14d08 Fix 2018-06-28 23:39:32 -11:00
jl777
85df50842b syntax 2018-06-28 23:33:52 -11:00
jl777
76471d5658 CTxOut 2018-06-28 23:32:14 -11:00
jl777
a55973aeea :: 2018-06-28 23:31:32 -11:00
jl777
1bc74c28cf -donation option to donate 5% rewards to a pubkey 2018-06-28 21:58:03 -11:00
Michael Toutonghi
1a0fc30896 Fix importaddress with rescan error that prevented picking up UTXOs 2018-06-23 15:03:44 -07:00
Michael Toutonghi
20ab1c9174 mining performance boost 2018-06-10 00:12:28 -07:00
Michael Toutonghi
31bbe2343f fix staking UTXO value 2018-05-17 22:20:57 -07:00
Michael Toutonghi
1fae37f6bf Working proof of stake with new algorithm 2018-05-15 00:54:18 -07:00
Michael Toutonghi
1f722359c1 Verus Proof of Stake Compete with Additional ant-fork protection on block 1 2018-05-13 18:59:06 -07:00
Jack Grigg
e5eab182b5 Use boost::variant to represent shielded addresses and keys
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.

A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.

All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
2018-05-11 17:14:49 -04:00
Homu
1942f7a42b Auto merge of #3242 - str4d:3058-key-encoding-refactor, r=str4d
Key encoding refactor

Includes code cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#11372
  - Only the first three commits (the fourth commit depends on #2390)

Part of #3058.
2018-05-11 12:21:29 -07:00
jl777
a5b7fef44b Test 2018-05-10 12:56:52 +03:00
jl777
bd070d8bce Prevent relaying expired tx 2018-05-10 12:55:14 +03:00
Jack Grigg
97b46f00cc Add valueBalance to value balances, and enforce its consensus rules 2018-05-09 11:34:41 +01:00
miketout
c2f6623fdf Add blocks to maturity in transaction JSON for listtransactions RPC API 2018-05-09 02:06:55 -07:00
miketout
204cf3fcba Enable seamless spending of timelocked coinbases through z_shieldcoinbase 2018-05-09 00:49:09 -07:00
Pieter Wuille
3d31e09cbb Split key_io (address/key encodings) off from base58 2018-05-08 21:39:56 +01:00
Jack Grigg
80ed13d545 Introduce wrappers around CZCPaymentAddress
This patch removes the need for the intermediary Base58 type
CZCPaymentAddress, by providing {Encode,Decode}PaymentAddress
functions that directly operate on the conversion between strings
and libzcash::PaymentAddress.
2018-05-08 21:39:55 +01:00
miketout
ea340a1443 Recognizing CLTV transactions more broadly 2018-05-08 13:33:14 -07:00
Homu
0a98b97524 Auto merge of #3236 - str4d:3192-jsoutpoint-constructor, r=str4d
Change JSOutPoint constructor to have js argument be uint64_t

Closes #3192.
2018-05-08 02:50:04 -07:00
Homu
333b9a0d0b Auto merge of #3170 - ebfull:sapling-merkle-tree, r=ebfull
Sapling merkle tree implementation

Closes #3056.

Please also review https://github.com/zcash/librustzcash/pull/8

This PR:

1. Introduces ZCSaplingIncrementalMerkleTree using Pedersen hashes.
2. Adds support for Sapling anchors into consensus rules. (Adds commitments, checks anchors are correct, handles block (dis)connects, etc.)
3. Handles mempool eviction for obsolete anchors.
4. Enforces correctness of block's Sapling root field
5. Changes miner to correctly apply the Sapling root to the block header
6. Handles mempool consistency checks for anchors
2018-05-07 20:37:46 -07:00