Commit Graph

14788 Commits

Author SHA1 Message Date
Homu 6affd6c8e4 Auto merge of #4995 - str4d:release-notes-4.3.0, r=str4d
Fill out release notes for v4.3.0
2021-02-19 20:16:38 +00:00
Homu b08c673ddd Auto merge of #4992 - LarryRuane:upstream-locking-0.11, r=str4d
Bitcoin 0.12 locking PRs

These are locking changes from upstream (bitcoin core) release 0.12.

- bitcoin/bitcoin#7013
- bitcoin/bitcoin#7156
- bitcoin/bitcoin#7229
2021-02-19 19:21:53 +00:00
Jack Grigg 96317f3189 Fill out the rest of the 4.3.0 release notes 2021-02-19 18:21:01 +00:00
Jack Grigg 36e0e0e16c Add IBD download traffic reduction to release notes
Co-authored-by: therealyingtong <yingtong@z.cash>
2021-02-19 18:20:08 +00:00
MarcoFalke 4359b3bdcf [walletdb] Add missing LOCK() in Recover() for dummyWallet
zcash: cherry picked fa33d9740c9b0d1071094ab6c1736f27a7090c95
zcash: https://github.com/bitcoin/bitcoin/pull/7229
2021-02-19 08:49:50 -07:00
Wladimir J. van der Laan 2713f9680d rpc: remove cs_main lock from `createrawtransaction`
This is a pure utility function that doesn't use
main's data structures, so it does not require that lock.

zcash: cs_main still needed while calling chainActive()

zcash: cherry picked 6e765873605ee5e31652ce107848a157151791b4
zcash: https://github.com/bitcoin/bitcoin/pull/7156
2021-02-19 08:49:22 -07:00
Homu b62e35dee8 Auto merge of #4994 - str4d:2074-net-misc-1, r=nuttycom
Bitcoin 0.12 misc P2P/Net PRs

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#5288
  - Only the reorg, option was removed in bitcoin/bitcoin#6374 which we merged in #1258
- bitcoin/bitcoin#6561
- bitcoin/bitcoin#6728
- bitcoin/bitcoin#6829
- bitcoin/bitcoin#6974
- bitcoin/bitcoin#7075
- bitcoin/bitcoin#7166

Part of #2074.
2021-02-19 15:48:11 +00:00
Homu 89a4ab2ce9 Auto merge of #4993 - therealyingtong:postpone-depends-v4.3.0, r=str4d
Update/postpone dependencies for v4.3.0
2021-02-19 14:24:28 +00:00
Homu f0dcc1dbbe Auto merge of #4958 - zcash:4957_add_foundation_to_responsible_disclosure_list, r=str4d
Add Zcash Foundation to disclosure partners list

Adding the newly-negotiated agreement with the Foundation to our public commitment.
2021-02-19 02:41:49 +00:00
Jack Grigg e1fa80e9b7 Rename responsible_disclosure.md to SECURITY.md
This causes GitHub to provide a link to it on the "new issue" page,
which will direct people who are thinking of opening a normal issue
to read it.
2021-02-18 23:38:32 +00:00
str4d 897356584b
Update URL for Zcash Foundation security policy
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-02-19 12:37:34 +13:00
Homu 65122845c5 Auto merge of #4991 - nuttycom:backport/9792-fastrandom_chacha20, r=str4d
FastRandomContext improvements and switch to ChaCha20

Backport of bitcoin/bitcoin#9792

Commits are recorded here in stack order

- pick bitcoin/bitcoin@4fd2d2fc97
- pick bitcoin/bitcoin@16329224e7
- pick bitcoin/bitcoin@e04326fe66
- pick bitcoin/bitcoin@663fbae777 -- already applied in #3858, skip
- pick bitcoin/bitcoin@c21cbe61c6 -- already applied in #3858, skip
2021-02-18 21:40:41 +00:00
Homu 9d0d8f49a8 Auto merge of #4973 - str4d:bech32-known-answer, r=str4d
test: Convert Bech32 test vectors into known-answer test vectors

This enables other projects to confirm independently that their encoding
or decoding functions are consistent, instead of merely that they are
round-trip correct.
2021-02-18 20:15:58 +00:00
Gregory Maxwell 39cb786fda Disconnect on mempool requests from peers when over the upload limit.
Mempool requests use a fair amount of bandwidth when the mempool is large,
 disconnecting peers using them follows the same logic as disconnecting
 peers fetching historical blocks.
2021-02-18 19:34:58 +00:00
tulip a3bc3c3a57 Move time data log print to 'net' category to reduce log noise 2021-02-18 19:34:58 +00:00
Wladimir J. van der Laan fee9309f37 Always allow getheaders from whitelisted peers
Process `getheaders` messages from whitelisted peers even if we are in
initial block download. Whitelisted peers can always use a node as a
block source.

Also log a debug message when the request is ignored, for
troubleshooting.

Fixes #6971.
2021-02-18 19:03:58 +00:00
Daniel Kraft d620798930 doc: add comment explaining initial header request
Add a comment that explains why the initial "getheader" requests are
made starting from the block preceding the currently best one.

Thanks to sdaftuar for the explanation!
2021-02-18 19:03:58 +00:00
Wladimir J. van der Laan f2c38a528f timedata: Prevent warning overkill
The "please check your computer's data and time" message when the clock
deviates from the network currently generates an overkill of messages:

    orion@lethe:~/bitcoin$ src/bitcoind
    Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.

In the log:

    2015-09-27 16:24:13 *** Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.
    2015-09-27 16:24:13 Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.

Remove one level of 'Warning:' and reduce to one log message.
2021-02-18 19:03:58 +00:00
Casey Rodarmor 63a214ad45 Add limitedmap test 2021-02-18 19:03:58 +00:00
Casey Rodarmor b43fc81e79 Disallow unlimited limited maps 2021-02-18 19:03:58 +00:00
Casey Rodarmor 4a51753b00 Make limited map actually respect max size 2021-02-18 19:03:58 +00:00
Josh Lehan d3a2f120f5 Re-organize -maxconnections option handling
Zcash: Was "Added -whiteconnections=<n> option" from bitcoin/bitcoin#5288. The
option was later removed in bitcoin/bitcoin#6374 which we merged in #1258. This
commit contains the difference between the two.
2021-02-18 19:03:58 +00:00
Homu e83ecc1dcb Auto merge of #4972 - LarryRuane:remove-PartitionCheck, r=str4d
Remove bad chain alert partition check

(cherry picked from https://github.com/bitcoin/bitcoin/pull/8275 commit ab8be98fdb25b678a8cd7e89adf06d1b1f6bdd62), original commit message:

As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts

The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if not.
2021-02-18 18:46:40 +00:00
Homu 1d378b1eb0 Auto merge of #2816 - str4d:2074-maxuploadtarget, r=str4d
Introduce -maxuploadtarget

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6622
- bitcoin/bitcoin#6987
- bitcoin/bitcoin#6958
- bitcoin/bitcoin#6984
- bitcoin/bitcoin#6999

Part of #2074.
2021-02-18 17:51:10 +00:00
Homu 6f04751c49 Auto merge of #4986 - str4d:zcash-script-precompute, r=str4d
zcash_script: Add API to verify scripts with precomputed tx data

This enables users of libzcash_script to more efficiently verify transactions with multiple inputs.

Closes zcash/zcash#4876.
2021-02-18 15:59:11 +00:00
therealyingtong eb351e485b Postpone dependencies 2021-02-18 20:50:39 +08:00
therealyingtong cb50c0a083 Cargo update 2021-02-18 20:02:36 +08:00
Peter Todd bc3da48a11 Remove LOCK(cs_main) from decodescript
Completely static RPC call that doesn't change or even look at mutable
state anywhere.

zcash: cherry picked b3ae384a8d1606948427b7bd2059d781a779b62a
zcash: https://github.com/bitcoin/bitcoin/pull/7013
2021-02-17 23:30:04 -07:00
Kris Nuttycombe 676d302008 Update the maxuploadtarget.py tests to accommodate zcash.
Co-authored-by: str4d <thestr4d@gmail.com>
2021-02-17 17:00:18 -07:00
Jack Grigg a24f5b7bb4 zcash_script: Clarify return values in docs 2021-02-17 23:50:50 +00:00
Homu c8ed917ec6 Auto merge of #4989 - nuttycom:cleanup/chainparams_whitespace, r=str4d
Whitespace-only fix in chainparams.cpp

Fix a trivial annoyance.
2021-02-17 22:59:23 +00:00
Pieter Wuille 1f41301c97 Add a FastRandomContext::randrange and use it
(cherry picked from commit 4fd2d2fc97e21efceab849576e544160fd5e3e3d)
2021-02-17 15:43:43 -07:00
Pieter Wuille 12d8d06c80 Switch FastRandomContext to ChaCha20
(cherry picked from commit 16329224e70d0525208f6b0ba00c5e1531a4f5ea)
2021-02-17 15:43:43 -07:00
Pieter Wuille 89ab5b1eb6 Add ChaCha20
(cherry picked from commit e04326fe6652543dc26d90eba4a48fbdc935fd0c)
2021-02-17 15:43:43 -07:00
Homu cd00fb08d5 Auto merge of #4990 - nuttycom:backport/7888_prevector_bugs, r=nuttycom
Fix prevector bugs.

Backports:

bitcoin/bitcoin#7888
bitcoin/bitcoin#8671

Commits below are listed in stack order.

pick bitcoin/bitcoin@f71d4a3
pick bitcoin/bitcoin@a7af72a
pick bitcoin/bitcoin@4ed41a2
pick bitcoin/bitcoin@1e2c29f
2021-02-17 21:11:03 +00:00
Jack Grigg 1eb7bbc6be Fix some typos 2021-02-17 13:35:11 -07:00
Jack Grigg 51ae7a0ae5 init: Pass post-Blossom spacing into CNode::SetMaxOutboundTarget() 2021-02-17 13:35:11 -07:00
Jack Grigg 0f66b1e138 Pass current PoWTargetSpacing() into CNode::OutboundTargetReached() 2021-02-17 13:35:00 -07:00
Jack Grigg 2f24abe457 test: Migrate maxuploadtarget.py to Python 3 2021-02-17 13:35:00 -07:00
Jonas Schnelli 69ca2dde56 add (max)uploadtarget infos to getnettotals RPC help
Zcash: Update recommended minimum -maxuploadtarget
2021-02-17 13:34:49 -07:00
Jonas Schnelli 97e9a8162f add documentation for exluding whitelistes peer from maxuploadtarget 2021-02-17 13:34:49 -07:00
Jonas Schnelli 2f81b408c5 [docs] rename reducetraffic.md to reduce-traffic.md 2021-02-17 13:34:49 -07:00
Jonas Schnelli 385719c632 don't enforce maxuploadtargets disconnect for whitelisted peers 2021-02-17 13:34:41 -07:00
MarcoFalke 81adf52277 [doc] Add -maxuploadtarget release notes 2021-02-17 19:23:38 +00:00
MarcoFalke 72fbeae94e [net] Cleanup maxuploadtarget
* log: nMaxOutboundLimit is in bytes
* log: Hide misleading -maxuploadtarget=0 warning
* qa : Minor cleanup to maxuploadtarget rpc tests
* net: Use DEFAULT_MAX_UPLOAD_TARGET = 0
2021-02-17 19:23:38 +00:00
fanquake 2a10fcd083 [doc] Improve lanaguge in reducetraffic.md 2021-02-17 19:23:38 +00:00
Jonas Schnelli 4212d1c96d [doc] add documentation how to reduce traffic 2021-02-17 19:23:38 +00:00
Suhas Daftuar a0ca4116c1 Add RPC test for -maxuploadtarget 2021-02-17 19:23:38 +00:00
Jonas Schnelli 1a85cc8817 Introduce -maxuploadtarget
* -maxuploadtarget can be set in MiB
* if <limit> - ( time-left-in-24h-cycle / 600 * MAX_BLOCK_SIZE ) has reach, stop serve blocks older than one week and filtered blocks
* no action if limit has reached, no guarantee that the target will not be  surpassed
* add outbound limit informations to rpc getnettotals

Zcash: Also includes a cleanup from bitcoin/bitcoin#5697
2021-02-17 19:23:35 +00:00
Kris Nuttycombe 6c656ab13d Whitespace-only fix in chainparams.cpp
Fix a trivial annoyance.
2021-02-17 12:13:45 -07:00