Duke Leto
022860159d
Backport importpubkey RPC from CHIPS (BTC 0.15.x)
6 years ago
Duke Leto
4d8750b1ab
Update CWalletTx internals
6 years ago
Duke Leto
cdeb2c79ae
Define vpwallets global
6 years ago
Brad Miller
6d3cd3a2f9
Implement note locking for z_mergetoaddress
Co-authored-by: Eirik Ogilvie-Wigley <eirik@z.cash>
6 years ago
Jonathan "Duke" Leto
64ebabc661
WIP Port z_listunspent from Zcash
https://github.com/zcash/zcash/pull/2913
6 years ago
FireMartZ
76d5f15158
Merge (what should be) the remaining source files.
6 years ago
FireMartZ
387c9c4b83
Changes to compile on mac.
6 years ago
Philip Kaufmann
db954a65ac
use const references where appropriate
9 years ago
Matt Corallo
aa30f65502
Add FundTransaction method to wallet
Some code stolen from Jonas Schnelli <jonas.schnelli@include7.ch>
9 years ago
Jack Grigg
8e8b6d701b
Switch miner to P2PKH, add -mineraddress option
Closes #945 and #1955 .
8 years ago
Jack Grigg
d85758f5cc
Document behaviour of CWallet::SetBestChain
8 years ago
Jack Grigg
03f83b9b0d
Write witness caches when writing the best block
For steady-state operation, this reduces the average time between wallet disk
writes from once per block to once per hour.
On -rescan, witness caches are only written out at the end along with the best
block, increasing speed while ensuring that on-disk state is kept consistent.
Witness caches are now never recreated during a -reindex, on the assumption that
the blocks themselves are not changing (the chain is just being reconstructed),
and so the witnesses will remain valid.
Part of #1749 .
8 years ago
Jack Grigg
ccfd8aae1d
Add code comments about CNoteData::witnessHeight
8 years ago
Jack Grigg
40ef121e6a
Correctly set CNoteData::witnessHeight when decrementing witness caches
Closes #1715
8 years ago
Jack Grigg
b6961fc112
Increment witnesses for new transactions on rescan
Closes #1400
8 years ago
Simon
2b1cda3b6a
Return improved error message when trying to spend Coinbase coins ( #1373 ).
Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.
Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
8 years ago
Jack Grigg
6e263a5fd3
Address review comments
8 years ago
Jack Grigg
ddea44a27e
Update comments
8 years ago
Jack Grigg
1a62587e9a
Delay caching of nullifiers when wallet is locked
Closes #1502
8 years ago
Simon
cb0d208f6b
Document CWallet::GetFilteredNotes and fix return type which should be
void.
8 years ago
Jack Grigg
82c2d97c60
Add unit tests for WriteWitnessCache
Requires moving implementation into header
8 years ago
Simon
2aa9c0253a
Update to use new API in CCryptoKeyStore and store a viewing key in walletdb.
8 years ago
Simon
73699ceaf6
Add support for spending keys to the encrypted wallet.
8 years ago
Jack Grigg
56fb1bb8e4
Write note witness cache atomically to disk to avoid corruption
Closes #1378
8 years ago
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.
8 years ago
Jack Grigg
76b226586e
Add wallet method to clear the note witness cache
8 years ago
Simon
03812fefe4
Fix incorrect default value for argument of GetFilteredNotes.
8 years ago
Simon
1b141933e5
Rename GetUnspentNotes to GetFilteredNotes
Added parameter to ignore spent notes, which is true by default.
8 years ago
Simon
a5ac2e25a0
Add GetUnspentNotes to wallet.
8 years ago
Jack Grigg
ac1c94350d
Refactor wallet note code for testing
8 years ago
Jack Grigg
f7d78fdde1
Fix failing test
8 years ago
Jack Grigg
5abaca1af6
Fix the failing test!
8 years ago
Jack Grigg
32a103aab7
Changes after review
8 years ago
Jack Grigg
1551db870a
Add transactions to wallet if we spend notes in them
8 years ago
Jack Grigg
38a6e7a74d
Set witness cache size equal to coinbase maturity duration
Both constants have the same implicit assumption: that the blockchain will very
rarely undergo a reorganisation of that size.
8 years ago
Jack Grigg
ad20f2149a
mapNullifiers -> mapNullifiersToNotes for clarity
8 years ago
Jack Grigg
4086e5ce98
Replace vAnchorCache with a cache size counter
The anchor is obtained from the returned witnesses; since all witnesses are to
the same point (the latest blockchain tip), they all have the same root.
8 years ago
Jack Grigg
de42390f90
Pass ZCIncrementalMerkleTree to wallet to prevent race conditions
8 years ago
Jack Grigg
769e031c1a
Update cached incremental witnesses when the active block chain tip changes
8 years ago
Jack Grigg
be74c80deb
Add caching of incremental witnesses for spendable notes
8 years ago
Jack Grigg
8db7e25c3f
Create mapping from nullifiers to received notes
This is used in the same way as CTxIn.prevout (e.g. to mark transactions dirty).
8 years ago
Jack Grigg
0f1060478f
Keep track of spent notes, and detect and report conflicts
8 years ago
Jack Grigg
c3a7307a69
Store mapping between notes and PaymentAddresses in CWalletTx
8 years ago
Jack Grigg
02e674555e
Add wallet method for finding spendable notes in a CTransaction
8 years ago
Simon
c1c4594371
Implemented RPC calls z_importkey, z_exportkey, z_getnewaddress.
Modified RPC calls dumpwallet and importwallet to include spending keys.
8 years ago
Daira Hopwood
4bc00dc141
Bucket -> note.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
8 years ago
Sean Bowe
2dc3599271
Transplant of libzcash.
8 years ago
Sean Bowe
1760b3cd88
Deprecate the old tree and remove old tree tests from the test suite.
8 years ago
Sean Bowe
a8ac403db0
Added mapAnchors consensus rules, finished zcrawpour/zcrawreceive.
Some specifics on consensus changes:
* Transactions must be anchored to a real anchor in the chain.
* Anchors are pushed and popped during ConnectBlock/DisconnectBlock as appropriate.
* DisconnectTip triggers evictions, under some circumstances, of transactions in the
mempool which are anchored to roots that are no longer valid.
* Commitments append to the tree at the current best root during ConnectBlock.
9 years ago
Alex Morcos
2457dc43ac
Change default nTxConfirmTarget to 2
9 years ago