Commit Graph

8621 Commits

Author SHA1 Message Date
Homu 173d6a7c18 Auto merge of #4165 - oxarbitrage:issue4029, r=mdr0id
Remove CheckProofOfWork errors from logs

To fix https://github.com/zcash/zcash/issues/4029 bitcoin patch(https://github.com/bitcoin/bitcoin/pull/7459) was ported.
2019-12-03 14:56:52 +00:00
str4d 6d57fcff13
Apply suggestions from code review
Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2019-12-02 21:10:35 +00:00
Dimitris Apostolou cec2bd93cf
Remove stale comment 2019-11-29 16:37:38 +02:00
Alfredo Garcia afbf1a7082 remove dead code in init 2019-11-28 14:55:32 -03:00
Jack Grigg 9c93079e28
Add Heartwood to upgrade list 2019-11-25 14:15:19 +00:00
Dagur Valberg Johannsson fe1ff82a7d Remove option mempooltxinputlimit
This option is no longer used after Overwinter. Fixes #4209.
2019-11-19 10:35:39 +01:00
Matt Corallo 4f3f8899b3
SQUASH "Implement watchonly support in fundrawtransaction" 2019-11-14 15:52:26 +00:00
Matt Corallo f70fdf4efe
SQUASH "Add have-pubkey distinction to ISMINE flags" 2019-11-14 15:52:23 +00:00
Matt Corallo 60dc0a9e8e
Implement watchonly support in fundrawtransaction
Some code and test cases stolen from
Bryan Bishop <bryan@ledgerx.com> (pull #5524).
2019-11-14 15:46:07 +00:00
Matt Corallo e61f62923b
Add logic to track pubkeys as watch-only, not just scripts 2019-11-14 15:46:06 +00:00
Matt Corallo bd9987829a
Add have-pubkey distinction to ISMINE flags
This indicates that, eg, we have a public key for a key which may
be used as a pay-to-pubkey-hash. It generally means that we can
create a valid scriptSig except for missing private key(s) with
which to create signatures.
2019-11-14 15:46:02 +00:00
Matt Corallo a2f31aa50b
Update importaddress help to push its use to script-only 2019-11-14 15:10:52 +00:00
Matt Corallo 24df8c66dc
Add importpubkey method to import a watch-only pubkey 2019-11-14 15:10:33 +00:00
Matt Corallo a0d211537c
Add p2sh option to importaddress to import redeemScripts 2019-11-14 14:48:21 +00:00
Matt Corallo 14d1666bd3
Split up importaddress into helper functions 2019-11-14 14:40:11 +00:00
Matt Corallo 4ffc8e27e1
Also remove pay-2-pubkey from watch when adding a priv key 2019-11-14 13:56:20 +00:00
Jonas Schnelli ea4ee8a222
[squashme] improve/corrects prune mode detection test for required wallet rescans 2019-11-14 13:56:19 +00:00
Jonas Schnelli c4447e3df1
[RPC] disable import functions in pruned mode
import functions could lead to a rescan beyond prune level
2019-11-14 13:56:18 +00:00
Jonas Schnelli d510fb4aa4
[autoprune] allow wallet in pruned mode 2019-11-14 13:56:17 +00:00
Homu f859ae0067 Auto merge of #4216 - str4d:4214-windows-fix, r=mdr0id
Cast uint8* in InterruptibleRecv to char* for recv

Fixes a Windows-specific compile bug introduced in #4212.
Closes #4214.
2019-11-11 10:52:47 -08:00
Homu 019507a8ef Auto merge of #4179 - defuse:fuzz-addrman, r=str4d
Add More Fuzzing Targets
2019-11-11 03:14:26 -08:00
Homu fd8444d0b7 Auto merge of #4178 - oxarbitrage:issue3731, r=str4d
Remove z_mergetoaddress from experimental state

Closes #3731.
2019-11-11 01:57:21 -08:00
Jack Grigg 8f170cf033
Cast uint8* in InterruptibleRecv to char* for recv
Fixes a Windows-specific compile bug introduced in #4212.
Closes #4214.
2019-11-11 09:47:38 +00:00
Homu 98b70f1264 Auto merge of #4215 - zcash:hotfix-2.1.0-1, r=str4d
Hotfix v2.1.0-1
2019-11-09 08:05:33 -08:00
Jack Grigg e07604a132
make-release.py: Versioning changes for 2.1.0-1. 2019-11-08 18:34:15 +00:00
Sean Bowe 812d0ac44b
Fix of CVE-2017-18350
Adapted from bitcoin/bitcoin#11397 by Wladimir J. van der Laan.

Co-Authored-By: Jack Grigg <jack@electriccoin.co>
Co-Authored-By: Daira Hopwood <daira@electriccoin.co>
2019-11-08 09:26:17 -07:00
Homu 18df8e67e1 Auto merge of #4181 - oxarbitrage:issue4084, r=Eirik0
Display "next upgrade" info on metrics screen

Closes #4084.
2019-11-07 11:41:54 -08:00
Alfredo Garcia 8aac988a82 get UPGRADE_TESTDUMMY back to default at the end of the test 2019-11-07 14:28:14 -03:00
Homu 0d7b08d1f0 Auto merge of #4160 - str4d:upgrade-librustzcash, r=str4d
Upgrade librustzcash to 0.2.0

This is backed by the 0.1.0 versions of our Zcash Rust crates.
2019-11-06 13:39:04 -08:00
Taylor Hornby f8a2e1865a Add fuzzing stub for CheckBlock 2019-11-06 10:45:32 -07:00
Taylor Hornby 6ad165a6ab Add fuzzing stub for ReadFeeEstimates 2019-11-06 10:45:32 -07:00
Taylor Hornby 0fdff745ee Add fuzzing stub for AddrMan deserialization 2019-11-06 10:45:32 -07:00
Homu 5ec69e8c2c Auto merge of #4171 - defuse:fuzzer-packaging, r=str4d
Add AFL in zcutil (with all-in-one script)

Supersedes #4156 and #4167.

Fuzzing targets and input sets are defined by the contents of directories in `./src/fuzzing/`. Inside the directory, there's a `fuzz.cpp` and `fuzz.h` with a `main()` function that will replace `zcashd`'s actual `main()` as well as an `input` subdirectory containing the inputs, one per file. To just run a fuzzer, you can, for example...

```
make clean # if you've previously build zcashd without AFL instrumentation
./zcutil/afl/afl-getbuildrun.sh DecodeHexTx
```

Alternatively you can...

```
./zcutil/afl/afl-get.sh /tmp/afl   # (or wherever you want to build AFL)
./zcutil/afl/afl-build.sh /tmp/afl DecodeHexTx -j$(nproc)
./zcutil/afl/afl-run.sh /tmp/afl DecodeHexTx
```

Run `make clean` whenever you switch between a normal build and an AFL-instrumented build.
2019-11-06 03:33:05 -08:00
Jack Grigg 4d13eb71ab
Remove invalid address comparison from gtest
Addresses cannot be computed from a "null" extended spending key,
because the resulting ak is not of prime order.
2019-11-06 10:47:58 +00:00
Homu 3bc8c07563 Auto merge of #3932 - LarryRuane:3823-deadlock-simple, r=daira
simplify locking, merge cs_SpendingKeyStore into cs_KeyStore

Closes #3823.
2019-11-05 14:10:18 -08:00
Homu cb0a94cd21 Auto merge of #4161 - oxarbitrage:issue3621, r=Eirik0
remove duplicated prefix in errors and warnings

Fixes #3621
2019-11-05 09:55:54 -08:00
Alfredo Garcia 8649f65608 remove redundant line from test 2019-11-04 13:38:10 -03:00
Alfredo Garcia 9582e258ba reverse conditional, replace get_value_or(0) calls 2019-11-04 13:31:00 -03:00
Larry Ruane e33ebdb8bb revert CCryptoKeyStore::SetCrypted() return value 2019-11-04 08:02:51 -07:00
Larry Ruane d9fcc2b558 eliminate races: hold cs_KeyStore lock while reading fUseCrypto 2019-11-03 19:53:28 -07:00
Larry Ruane 5a5094bbb5 simplify locking, merge cs_SpendingKeyStore into cs_KeyStore 2019-11-03 19:53:28 -07:00
Alfredo Garcia 5bea8b76ab change var and function names for clarity, refactor function 2019-11-03 08:35:10 -03:00
Alfredo Garcia 49dca2aa0b add after blossom test 2019-11-02 20:43:46 -03:00
Alfredo Garcia cfaa2f3ecf fix spacing 2019-11-02 20:18:52 -03:00
Alfredo Garcia 383066b28e add NextUpgrade test case 2019-11-02 18:38:39 -03:00
Alfredo Garcia 94798b6b56 create and use SecondsLeftToHeight to display next upgrade info 2019-11-02 18:37:45 -03:00
Eirik Ogilvie-Wigley 5be8d1ecd1 make-release.py: Versioning changes for 2.1.0. 2019-11-02 10:53:13 -06:00
Eirik Ogilvie-Wigley 5371e0cffb fix comment 2019-11-01 14:46:15 -06:00
Eirik Ogilvie-Wigley 0950c94c13 Fix getblocksubsidy tests 2019-11-01 12:10:15 -06:00
Alfredo Garcia 2d13be55c4
change target spacing to up to upgrade height
suggested change by review.

Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2019-11-01 15:06:56 -03:00
Sean Bowe 4180589f02
Set mainnet activation of Blossom 2019-11-01 09:31:55 -06:00
Alfredo Garcia 6650aed46b add next upgrade info to metrics console 2019-10-30 15:19:22 -03:00
Alfredo Garcia 12dd81614c add version to thank you string 2019-10-29 14:44:27 -03:00
Taylor Hornby bfa8da3852 Have make clean delete fuzz.cpp 2019-10-28 11:54:19 -06:00
Taylor Hornby b25a14f433 Separate AFL build, run fuzz stages, and add afl argument pass-through 2019-10-28 11:54:13 -06:00
Alfredo Garcia cbf1a85013 remove z_mergetoaddress from experimental 2019-10-26 12:52:36 -03:00
Larry Ruane 07f2edc91c #4175 z_sendmany coinbase to zaddr with change: report error status 2019-10-24 22:47:31 -06:00
Alfredo Garcia b3594b5273 limit blockchain progress to a max of 1.000000 2019-10-24 15:51:00 -03:00
Taylor Hornby f968506039 Add all-in-one script for starting AFL fuzzing 2019-10-23 11:15:09 -06:00
Eirik Ogilvie-Wigley bdfed7e178 make-release.py: Versioning changes for 2.1.0-rc1. 2019-10-22 14:35:07 -06:00
Alfredo Garcia a913574b0e change some wallet functions from bool to void 2019-10-22 17:23:53 -03:00
Eirik Ogilvie-Wigley 8307a5db5a Use same type when calling max 2019-10-22 11:29:55 -06:00
Alfredo Garcia 0eec096843 Consensus: Decouple pow.cpp from util.h 2019-10-22 14:16:53 -03:00
Homu fffd5da201 Auto merge of #4145 - Eirik0:limit-mempool, r=Eirik0
DoS protection: Weighted random drop of txs if mempool full
2019-10-21 12:40:50 -07:00
Alfredo Garcia f4106c65a5 remove duplicated prefix in errors and warnings 2019-10-21 13:13:59 -03:00
Eirik Ogilvie-Wigley 40a7156026 Remove dots and underscores from parameter names 2019-10-21 09:20:17 -06:00
Jack Grigg f270979acb
Migrate to librustzcash 0.2.0 API 2019-10-20 19:11:02 +13:00
Eirik Ogilvie-Wigley e744cece52 Fix test cases: default mempool limiters 2019-10-18 13:36:12 -06:00
Eirik Ogilvie-Wigley 64fc25ed6e Update parameter names to match ZIP 2019-10-17 16:39:32 -06:00
Eirik Ogilvie-Wigley e7aed48e7a Wording and grammatical fixes 2019-10-17 15:16:51 -06:00
Eirik Ogilvie-Wigley 78592da52a Add explanatory comments 2019-10-17 14:18:20 -06:00
Eirik Ogilvie-Wigley 1edeba61ac Add test 2019-10-17 12:32:33 -06:00
zebambam 7e8b18e480 Added basic fuzzing to the monolith, see ticket #4155 2019-10-15 00:00:21 +00:00
Larry Ruane ffb8e6747b access array element using at() 2019-10-12 19:06:51 -06:00
Larry Ruane a3eb2b8708 update unit tests to compute empty roots 2019-10-12 18:03:36 -06:00
Larry Ruane 7ec8c5d309 precompute empty merkle roots 2019-10-12 18:03:36 -06:00
Eirik Ogilvie-Wigley c4931a9a44 Rename files 2019-10-09 15:22:49 -06:00
Eirik Ogilvie-Wigley b4c4134956 Represent recently evicted list as a deque 2019-10-09 15:12:32 -06:00
Eirik Ogilvie-Wigley ca883c8517 Log rather than return error if a transaction is recently evicted 2019-10-09 14:43:35 -06:00
Eirik Ogilvie-Wigley 9b2a04bd95 Use tx cost rather than evictionWeight when checking mempool capacity 2019-10-09 13:42:46 -06:00
Eirik Ogilvie-Wigley 2d9becbeb8 Rename variables for consistency 2019-10-09 13:36:20 -06:00
Eirik Ogilvie-Wigley 1556ec6722 Fix comments 2019-10-09 13:19:09 -06:00
Eirik Ogilvie-Wigley bf044cc0c3 Represent tx costs as signed integers 2019-10-09 13:14:35 -06:00
Eirik Ogilvie-Wigley 61b7dfb6f0 Move duplicate macro to reusable location 2019-10-09 12:25:56 -06:00
Eirik Ogilvie-Wigley 69a5ffe5d4 Prevent adding duplicate transactions 2019-10-09 12:13:01 -06:00
Eirik Ogilvie-Wigley 2365ba7b97 Put size increment and decrement on their own lines 2019-10-09 12:06:03 -06:00
Eirik Ogilvie-Wigley 30be750644 Fix recently evicted list size 2019-10-09 11:59:14 -06:00
Homu 4eaad3f77b Auto merge of #4154 - zebambam:remove_stale_seeder, r=Eirik0
Removed stale seeder, fixing #4153

Removed old seeder.
2019-10-07 15:06:20 -07:00
Eirik Ogilvie-Wigley 9e97833952 Fix naming conventions 2019-10-07 14:23:42 -06:00
Eirik Ogilvie-Wigley 1a06727c0c Performance: Store weighted transactions in a tree 2019-10-07 14:23:42 -06:00
Eirik Ogilvie-Wigley 6fdd8f5298 Help message cleanup and add lock 2019-10-07 14:23:41 -06:00
Eirik Ogilvie-Wigley 1407fd10a1 Remove transactions when ensuring size limit 2019-10-07 14:23:41 -06:00
Eirik Ogilvie-Wigley 0b2c5cfcc2 Grammatical fixes
Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2019-10-07 14:23:41 -06:00
Eirik Ogilvie-Wigley a48b1ba7e2 Rebuild weighted list on removal and fix size calculation 2019-10-07 14:23:41 -06:00
Eirik Ogilvie-Wigley ae9ecf09e8 DoS protection: Weighted random drop of txs if mempool full 2019-10-07 14:23:41 -06:00
zebambam 3b9237b883 Removed stale seeder, fixing #4153 2019-10-07 13:17:21 -07:00
Homu fafc479fcf Auto merge of #3765 - jeff-liang:addnetworkindicator, r=daira
Display which network the node is running on. Resolves #3760.

Resolves #3760
2019-10-02 08:41:32 -07:00
Daira Hopwood 3e37152bf5 Fix setting an expiry height of 0. fixes #4132
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-09-26 20:43:52 +01:00
Homu 961c0d58ec Auto merge of #4060 - str4d:remove-libsnark, r=daira
Remove libsnark

Closes #167. Closes #416. Closes #418. Closes #437.
Closes #521. Closes #743. Closes #750. Closes #894.
Closes #903. Closes #1125. Closes #1136. Closes #1240.
Closes #1264. Closes #1516. Closes #1517. Closes #1651.
Closes #2064. Closes #2158. Closes #3478. Closes #3652.
Closes #3744.
2019-09-26 11:21:40 -07:00
Homu 62dc5f0821 Auto merge of #4144 - zcash:hotfix-v2.0.7-3, r=str4d
Release v2.0.7-3
2019-09-24 16:02:35 -07:00