Commit Graph

6471 Commits

Author SHA1 Message Date
Simon
82bd9ee81b Fix comment and formatting per review 2016-09-29 22:07:38 -07:00
Simon
2aa9c0253a Update to use new API in CCryptoKeyStore and store a viewing key in walletdb. 2016-09-29 20:17:30 -07:00
Simon
73699ceaf6 Add support for spending keys to the encrypted wallet. 2016-09-29 20:17:30 -07:00
zkbot
07e425ac1c Auto merge of #1372 - str4d:1199-spending-key-wallet-encryption, r=str4d
Encrypt spending keys in the wallet

This is a continuation of #1210.
2016-09-29 19:42:30 -04:00
zkbot
42941c9fd4 Auto merge of #1445 - bitcartel:master_fix_filtered_notes, r=str4d
Fix casting error in GetFilteredNotes

Use int for minDepth like upstream instead of size_t which can lead to casting problems if a wallet tx has a depth of -1.
Also don't use FindMyNotes as mapNoteData has already been set on wallet tx.

@str4d As dicussed. This should be merged before other PRs related to wallet.
2016-09-29 05:33:11 -04:00
Jack Grigg
ef3a6a97ae Use correct lock for spending keys 2016-09-29 11:35:18 +13:00
Jack Grigg
ad041fceec Cache note decryptors in encrypted keystore 2016-09-29 11:34:59 +13:00
Simon
eaccc007c9 Update test to filter and find notes. 2016-09-27 22:43:13 -07:00
zkbot
587f848482 Auto merge of #1384 - str4d:1378-atomic-witness-storage, r=ebfull
Write note witness cache atomically to disk to avoid corruption

Closes #1378
2016-09-27 21:27:11 -04:00
Jack Grigg
6bffc46a87 Implement CSecureDataStream for streaming CKeyingMaterial 2016-09-28 13:44:53 +13:00
Jack Grigg
3bbf2c1422 Test that invalid keys fail to unlock the keystore 2016-09-28 12:52:53 +13:00
Jack Grigg
56fb1bb8e4 Write note witness cache atomically to disk to avoid corruption
Closes #1378
2016-09-28 11:51:42 +13: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
Kevin Gallagher
9fc324a139 Updates dns.testnet.z.cash -> dnsseed.testnet.z.cash
People seem to agree that dnsseed.* is a more intuitive address.
The original address was committed to beta1 as a result of a misunderstanding.
The DNS seeder service will be updated to coincide with at beta2 release.
2016-09-26 14:34:26 -07:00
zkbot
c470cdf70b Auto merge of #1376 - str4d:1191-improve-multithreaded-benchmark, r=daira
Measure multithreaded solveequihash time per-thread

Continuation of #1213
Closes #1191
2016-09-23 15:01:04 -04:00
zkbot
976479f824 Auto merge of #1411 - bitcartel:master_bitcoin_7106, r=daira
Upstream patch: Fix and improve relay from whitelisted peers

https://github.com/bitcoin/bitcoin/pull/7106
a9f3d3db5c0c8d1697998ed9b3e192ddbf9a31f4

An extra commit modifies the log message string, otherwise there are are a number of commits that need be to backported to add methods e.g. GetDebugMessage.  These commits modify the interface in consensus/validation.h so there are conflicts to be resolved. e.g.
9003c7c
a9ac95c
5f12263
fbf44e6
2016-09-20 19:41:00 -04:00
zkbot
5ef7fecf14 Auto merge of #1407 - bitcartel:master_bitcoin_7079, r=daira
Upstream patch: Prevent peer flooding inv request queue

https://github.com/bitcoin/bitcoin/pull/7079
5029698186445bf3cd69d0e720f019c472661bff
ebb25f4c23adbcb55796c402bafd6064a136f16f
2016-09-20 19:11:28 -04:00
Simon
e63d14fd4d Replace %i format specifier with more commonly used %d. 2016-09-19 09:36:26 -07:00
de3dd8a015 Modify message string so we don't need to backport commits which implement FormatStateMessage and GetDebugMessage and involve changes to consensus/validation.h 2016-09-16 17:51:46 -07:00
Pieter Wuille
60aed95400 Fix and improve relay from whitelisted peers
This makes sure that retransmits by a whitelisted peer also actually
result in a retransmit.

Further, this changes the logic to never relay in case we would assign
a DoS score, as we expect to get DoS banned ourselves as a result.
2016-09-16 09:28:12 -07:00
Gregory Maxwell
e2190f8017 Limit setAskFor and retire requested entries only when a getdata returns.
The setAskFor duplicate elimination was too eager and removed entries
 when we still had no getdata response, allowing the peer to keep
 INVing and not responding.
2016-09-15 23:41:29 -07:00
kazcw
56f165bdc1 prevent peer flooding request queue for an inv
mapAlreadyAskedFor does not keep track of which peer has a request queued for a
particular tx. As a result, a peer can blind a node to a tx indefinitely by
sending many invs for the same tx, and then never replying to getdatas for it.
Each inv received will be placed 2 minutes farther back in mapAlreadyAskedFor,
so a short message containing 10 invs would render that tx unavailable for 20
minutes.

This is fixed by disallowing a peer from having more than one entry for a
particular inv in mapAlreadyAskedFor at a time.
2016-09-15 23:17:34 -07:00
Jack Grigg
9e52ca3205 Measure multithreaded solveequihash time per-thread 2016-09-13 16:12:07 +12:00
Jack Grigg
3a15b1637e Move serialized Zcash address length constants into zcash/Address.hpp 2016-09-13 14:21:49 +12:00
Jack Grigg
6ae516f10b Check we haven't trashed the first key entry with the second 2016-09-13 14:21:49 +12:00
Jack Grigg
16d140f4a2 Add support for encrypting spending keys 2016-09-13 14:21:49 +12:00
0163f8faa2 Closes #1371 by updating signed message 2016-09-12 11:01:28 -07:00
Sean Bowe
88188dc2a3 Update pchMessageStart and add testnet DNS boostrapper. 2016-09-09 00:37:49 -06:00
Sean Bowe
f11099e2f0 Change version to 1.0.0. This is just a beta. 2016-09-09 00:33:20 -06:00
Jack Grigg
48bb727d8a Remove .z# suffix from version 2016-09-09 00:22:18 -06:00
Simon
b11bb0e26a Replace GetTxid() with GetHash() 2016-09-08 21:54:34 -07:00
Simon
6114cfe767 Improve check that user supplied memo field is too long. 2016-09-08 21:46:15 -07:00
Simon
e79ded8a47 Remove line of commented out code we don't need 2016-09-08 21:46:15 -07:00
Simon
dfc0080d06 Update comment with ticket issue number 2016-09-08 21:46:15 -07:00
Simon
1eb8789789 Add assert 2016-09-08 21:46:15 -07:00
Simon
ed42053a6c Fix formatting 2016-09-08 21:46:15 -07:00
Simon
2ad0b7bfe2 Use zcash constants 2016-09-08 21:46:15 -07:00
Simon
b99d4f9b17 Improve error reporting when attempting to spend coinbase utxos. 2016-09-08 21:46:15 -07:00
Simon
9fb18458e8 Add assert for two mutually exclusive member variables. 2016-09-08 21:46:15 -07:00
Simon
cc59ac12a9 Add ticket number to issues raised in comment. 2016-09-08 21:46:15 -07:00
Simon
00edda4ac6 Remove unused varible. 2016-09-08 21:46:15 -07:00
Simon
e2574666f6 Add lock for member variables.
Clean up and clarify that id_ and creation_time_ are never to be mutated anywhere.
Fix incomplete copy/assignment constructors.
2016-09-08 21:46:15 -07:00
Simon
da5e7e5185 Formatting and updated test per review. 2016-09-08 21:46:15 -07:00
Simon
03812fefe4 Fix incorrect default value for argument of GetFilteredNotes. 2016-09-08 21:46:15 -07:00
Simon
a101ef7979 Update log statement to include fee. 2016-09-08 21:46:15 -07:00
Simon
9bdad43462 Fix formatting 2016-09-08 21:46:15 -07:00
Simon
e883ffef91 Add test for calling RPC z_getbalance, z_gettotalbalance, z_listreceivedbyaddress with invalid parameters. 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
5e363861e0 Replace unique_lock with lock_guard, where appropriate, for consistency 2016-09-08 21:46:15 -07:00
Simon
a50fd5fdb7 Add lock guard to getNumberOfWorkers() 2016-09-08 21:46:15 -07:00