Commit Graph

13230 Commits

Author SHA1 Message Date
Patrick Strateman 82e641f3cc Acquire lock to check for genesis block. 2020-03-10 17:57:52 +00:00
Homu 2a6be9fd19 Auto merge of #4384 - str4d:issue-templates, r=str4d
Migrate to new GitHub issue template workflow

New templates are added for feature requests and UX reports.
2020-03-10 04:49:03 +00:00
Homu dcd3614de4 Auto merge of #4359 - str4d:2872-upgrade-libsodium, r=str4d
Upgrade libsodium to 1.0.18

Includes patches that maintain consensus compatibility with libsodium 1.0.15 for Ed25519 pubkey and signature validation.

Replaces #4239. Closes #2872.
2020-03-10 03:10:01 +00:00
Homu ccd10d54b3 Auto merge of #4388 - oxarbitrage:minor_spacing, r=mdr0id
Minor spacing fix in test

Output will look a bit better.
2020-03-09 23:45:50 +00:00
Homu ca668cf666 Auto merge of #4374 - daira:rewrite-addtimedata, r=daira
Remove time adjustment; instead warn if peer clocks are too different

The policy is: warn if we have seen at least 8 (TIMEDATA_WARNING_SAMPLES) peer times, in the version messages of the first 20 (TIMEDATA_MAX_SAMPLES) unique (by IP address) peers that connect, that are more than 10 minutes (TIMEDATA_WARNING_THRESHOLD seconds) but less than 10 days (TIMEDATA_IGNORE_THRESHOLD seconds) away from local time.

fixes #4338
2020-03-09 21:15:34 +00:00
Homu 8c48786d7d Auto merge of #4387 - gladcow:issue3813_backport_upstream_11107, r=daira
Fix races in AppInitMain and others with lock and atomic bools (Bitcoin backport)

Backport bitcoin https://github.com/bitcoin/bitcoin/pull/11107 (excluding the last commit,  it was fixed in Zcash before).

This functionality is required for https://github.com/zcash/zcash/pull/4368 (details https://github.com/zcash/zcash/pull/4368#issuecomment-595284681) as part of the issue https://github.com/zcash/zcash/issues/3813 resolution.
2020-03-09 19:52:20 +00:00
Alfredo Garcia 9f71fbecca remove space after new line 2020-03-07 09:26:25 -03:00
MeshCollider d7c62cdd4f Consistent parameter names in txdb.h 2020-03-07 10:21:59 +03:00
MeshCollider e4b66f565a Make fReindex atomic to avoid race 2020-03-07 10:21:59 +03:00
MeshCollider cb8de0395f Fix race for mapBlockIndex in AppInitMain 2020-03-07 10:21:59 +03:00
Homu 35bff6ac7c Auto merge of #4256 - str4d:zip-213-shielded-coinbase, r=daira
[NU3 Heartwood] Shielded Coinbase

Implements [ZIP 213](https://github.com/zcash/zips/pull/217).
2020-03-06 10:19:13 +00:00
Jack Grigg 0cca79a2d8 depends: Remove comments from libsodium signature validation patch
Some of the comments in the 1.0.15 code were incorrect.
2020-03-06 16:19:23 +13:00
Jack Grigg 972917ee7b Add GitHub issue templates for feature requests and UX reports 2020-03-06 16:12:28 +13:00
Jack Grigg 3ff8f0b4a3 Migrate GitHub issue template to new format 2020-03-06 16:06:11 +13:00
Jack Grigg 06bd43b53c test: Explicitly check Sapling consensus rules apply to shielded coinbase 2020-03-06 15:24:38 +13:00
Jack Grigg d8f0bc9e21 init: Inform on error that -mineraddress must be Sapling or transparent 2020-03-06 13:18:04 +13:00
Jack Grigg 6fd1b7c2e4 test: Check that shielded coinbase can be spent to a t-address 2020-03-06 13:10:39 +13:00
Jack Grigg 743a5f437f Use DoS level constants and parameters for ZIP 213 rejections 2020-03-06 12:03:57 +13:00
Jack Grigg 3b3382bb48 Adjust comments on ZIP 213 logic 2020-03-06 11:50:15 +13:00
Jack Grigg 675a9b5fd3 test: RPC test for shielded coinbase 2020-03-06 10:41:27 +13:00
Homu 6c00a8ccf9 Auto merge of #4280 - oxarbitrage:issue2197, r=daira
Allow negative heights in RPC calls

For issue https://github.com/zcash/zcash/issues/2197

Currently adding the feature to `getblock` and `getblockhash`. There is another candidate: `getblocksubsidy` however i want to have some review about these 2 first before repeating what could be a bad approach.
2020-03-05 16:36:32 +00:00
Daira Hopwood 8ca4d80078 Add release notes for removal of -maxtimeadjustment.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-04 01:06:03 +00:00
Jack Grigg 162dac1a45 test: Minor tweaks to comments in LibsodiumPubkeyValidation 2020-03-04 06:54:58 +13:00
Homu 26a24da745 Auto merge of #4265 - LarryRuane:CBufferedFile-fixes, r=str4d
util: CBufferedFile fixes

Cherry-pick https://github.com/bitcoin/bitcoin/pull/16577
2020-03-03 01:13:38 +00:00
Larry Ruane 75251cb2bc util: CBufferedFile fixes 2020-03-02 18:03:46 -07:00
Homu 086c2b4d9f Auto merge of #4379 - ebfull:fix-wallet-assertion, r=ebfull
Initialize ThreadNotifyWallets before additional blocks are imported

The intention of this PR is to address #4301. It seems `ThreadNotifyWallets` assumes that `chainActive.Tip()` on initialization reflects the wallet's view of the active tip, but prior to `ThreadNotifyWallets`'s initialization the active chain ends up being modified by blocks that are imported from disk, so our local `pindexLastTip` ends up out of sync with the wallet's actual "last" tip.

This PR moves the initialization of `ThreadNotifyWallets` to earlier in the process while passing in the current active tip. This addresses the problem for non-fresh nodes, and then for fresh nodes we have the notification thread wait until the genesis block has been loaded.
2020-02-28 17:39:45 +00:00
Jack Grigg 9ea5f6907f Add regtest-only -nurejectoldversions option
This enables us to write RPC tests for network upgrades before they have
been activated on testnet.
2020-02-28 13:59:53 +13:00
Jack Grigg 9b3a261831 wallet: Include coinbase txs in Sapling note selection 2020-02-28 13:59:53 +13:00
Jack Grigg 99ec1ff971 Add support for Sapling addresses in -mineraddress 2020-02-28 13:59:53 +13:00
Jack Grigg 80169c940f ZIP 213 consensus rules 2020-02-28 13:59:53 +13:00
Sean Bowe e597ad842a
Clarify comment 2020-02-27 17:57:59 -07:00
Jack Grigg 17b2af94f6 OutputDescriptionInfo::Build() 2020-02-28 13:50:57 +13:00
Homu 95e446bf69 Auto merge of #4380 - oxarbitrage:issue3446, r=ebfull
Change cm to cmu in sapling

Part of https://github.com/zcash/zcash/issues/3446

For each of the 2 commits, suggested change was made, then fixed build errors until compile. Finally ran bitcoin and gtests, both of them passing.
2020-02-27 20:46:05 +00:00
Homu 6ff6c9eeef Auto merge of #4378 - defuse:clean-afl-temp, r=ebfull
Have make clean delete fuzzing-related directories
2020-02-26 21:47:59 +00:00
Sean Bowe b79edf1b55
Handle case of fresh wallets in ThreadNotifyWallets. 2020-02-26 14:47:22 -07:00
Alfredo Garcia 8ebe538eaa change maybe_cm to maybe_cmu 2020-02-26 18:33:49 -03:00
Alfredo Garcia 445ae593d6 change the cm member of OutputDescription to cmu 2020-02-26 17:43:50 -03:00
Alfredo Garcia 4d4cb44440 change cm() to cmu() in SaplingNote class 2020-02-26 16:49:34 -03:00
Sean Bowe faca79eb2f
Initialize ThreadNotifyWallets before additional blocks are imported.
Co-authored-by: Daira Hopwood <daira@electriccoin.co>
2020-02-26 11:20:12 -07:00
Taylor Hornby 171ce8336b Have make clean delete AFL output directories. 2020-02-26 09:31:28 -07:00
Taylor Hornby 967b9a40f3 Add AFL build directory to .gitignore 2020-02-26 09:29:05 -07:00
Taylor Hornby eb6c722e78 Have make clean delete temporary AFL build directory 2020-02-26 09:27:44 -07:00
Homu 77c2e1c251 Auto merge of #3481 - LarryRuane:fetch-params-testnet-arg, r=mdr0id
zcutil/fetch-params.sh unneeded --testnet arg should warn user

If fetch-params.sh user doesn't know that testnet and mainnet params are the same, and user specifies --testnet, it's confusing that the argument is ignored.
2020-02-25 20:40:49 +00:00
Daira Hopwood ee4d73b841 Sort entries in zcash_gtest_SOURCES (other than test_tautology which is deliberately first).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-25 17:00:10 +00:00
Daira Hopwood 7fa7225509 Update GetAdjustedTime() to GetTime().
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-25 16:57:22 +00:00
Daira Hopwood d631187b39 Replace time adjustment with warning only.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-25 16:48:16 +00:00
Daira Hopwood e1fa4c98fd Remove uses of GetTimeOffset().
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-24 16:27:07 +00:00
Daira Hopwood ddc2bbf742 Revert "Add -maxtimeadjustment with default of 0 instead of the 4200 seconds used in Bitcoin Core."
This reverts commit eb5e328073.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-24 16:27:07 +00:00
Homu 69e0e7ee62 Auto merge of #4369 - daira:port-strMiscraceless, r=str4d
Upstream PRs relating to strMiscWarning

This pulls in upstream PRs bitcoin/bitcoin#7114 and bitcoin/bitcoin#9236 (non-QT parts).

* Fixes bitcoin/bitcoin#6809 - run-of-the-mill exceptions should not get into `strMiscWarning` (which is reported by `getinfo`).
* Eliminate data races for `strMiscWarning` and `fLargeWork*Found`. This moves all access to these data structures through accessor functions and protects them with a lock.
2020-02-21 19:06:29 +00:00
Gregory Maxwell 9f4ad7e1c6 Move GetWarnings() into its own file.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-21 01:31:16 +00:00