Commit Graph

15078 Commits

Author SHA1 Message Date
Gregory Maxwell 9e67ec66a2 Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay.
Zcash: just a comment fix, no need to blacklist as -whitelistalwaysrelay
will never have been active.
(cherry picked from commit 89d113e02a83617b4e971c160d47551476dacc71)
2021-02-22 18:29:12 -07:00
Gregory Maxwell c411af61e7 Add whitelistforcerelay to control forced relaying.
Also renames whitelistalwaysrelay.

Nodes relay all transactions from whitelisted peers, this
 gets in the way of some useful reasons for whitelisting
 peers-- for example, bypassing bandwidth limitations.

The purpose of this forced relaying is for specialized gateway
 applications where a node is being used as a P2P connection
 filter and multiplexer, but where you don't want it getting
 in the way of (re-)broadcast.

This change makes it configurable with whitelistforcerelay.

(cherry picked from commit 325c725fb6205e38142914acb9ed1733d8482d46)
2021-02-22 18:26:40 -07:00
Homu 5c0f3ffe25 Auto merge of #5002 - mdr0id:gitian_libxml2_descriptor, r=str4d
add libxml2

Adding libxml2 to linux gitian descriptors
2021-02-23 00:13:18 +00:00
Marshall Gaucher 14de44030f
add libxml2
Adding libxml2 to linux gitian descriptors
2021-02-22 14:37:30 -08:00
mdr0id beb40ce3e7 add zstd package 2021-02-22 13:20:59 -08:00
Homu 1bcb118fe9 Auto merge of #5000 - str4d:cargo-update, r=str4d
Update Rust dependencies for 4.3.0

Fixes a regression in #4993, and also pins `funty` to avoid an ongoing issue.
2021-02-21 14:41:26 +00:00
Jack Grigg df489e9a50 rust: Pin funty =1.1.0
Temporary workaround for https://github.com/myrrlyn/funty/issues/3
2021-02-20 18:34:11 +00:00
Jack Grigg 81fd148475 cargo update 2021-02-20 18:32:34 +00:00
Kaz Wesley c3646bdf88 lock cs_main for chainActive
ActivateBestChain uses chainActive after releasing the lock; reorder operations
to move all access to synchronized object into existing LOCK(cs_main) block.

zcash: cherry picked from commit 719de56ab2c8e5bc6ce9f67c7bf159adc242d49b
zcash: https://github.com/bitcoin/bitcoin/pull/7942
2021-02-19 17:53:54 -07:00
Homu fd9bf43c3d Auto merge of #4998 - str4d:release-v4.3.0-rc1, r=str4d
Release v4.3.0-rc1
2021-02-20 00:52:04 +00:00
Kaz Wesley 111eedf7bf lock cs_main for State/Misbehaving
ProcessMessage calls State(...) and Misbehaving(...) without holding the
required lock; add LOCK(cs_main) blocks.

zcash: cherry picked from commit efb54ba065e41e0d36383bcabfcc01bbca7b2340
zcash: https://github.com/bitcoin/bitcoin/pull/7942
2021-02-19 16:53:15 -07:00
Pavel Janík 4798e94186 Notify other serviceQueue thread we are finished to prevent deadlocks.
zcash: cherry picked from commit 166e4b0dfa283fbdedc9a6a1e83296500c853a31
zcash: https://github.com/bitcoin/bitcoin/pull/8016
2021-02-19 15:11:22 -07:00
Yuri Zhykin e715e1393b Fix for incorrect locking in GetPubKey() (keystore.cpp)
zcash: cherry picked from commit 220f950ab1302f8f8c0bb5b9c818f3d6569796bd
zcash: https://github.com/bitcoin/bitcoin/pull/7913
2021-02-19 15:11:22 -07:00
Pieter Wuille 41713465f5 Clean up lockorder data of destroyed mutexes
The lockorder potential deadlock detection works by remembering for each
lock A that is acquired while holding another B the pair (A,B), and
triggering a warning when (B,A) already exists in the table.

A and B in the above text are represented by pointers to the CCriticalSection
object that is acquired. This does mean however that we need to clean up the
table entries that refer to any critical section which is destroyed, as it
memory address can potentially be used for another unrelated lock in the future.

Implement this clean up by remembering not only the pairs in forward direction,
but also backward direction. This allows for fast iteration over all pairs that
use a deleted CCriticalSection in either the first or the second position.

zcash: cherry picked from commit 5eeb913d6cff9cfe9a6769d7efe4a7b9f23de0f4
zcash: https://github.com/bitcoin/bitcoin/pull/7846
2021-02-19 15:11:22 -07:00
Jack Grigg 6052843b6f make-release.py: Updated release notes and changelog for 4.3.0-rc1. 2021-02-19 22:05:06 +00:00
Jack Grigg 1e12f4b00e make-release.py: Updated manpages for 4.3.0-rc1. 2021-02-19 22:05:05 +00:00
Jack Grigg e8096841a3 make-release.py: Versioning changes for 4.3.0-rc1. 2021-02-19 21:51:00 +00:00
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
Gregory Maxwell 227933f74d Actually only use filterInventoryKnown with MSG_TX inventory messages.
Previously this logic could erroneously filter a MSG_BLOCK inventory message.
2021-02-19 20:16:10 +00:00
Patick Strateman 2391de6375 Only use filterInventoryKnown with MSG_TX inventory messages.
Previously this logic could erroneously filter a MSG_BLOCK inventory message.
2021-02-19 20:16:10 +00:00
Patick Strateman 021ff72e60 Rename setInventoryKnown filterInventoryKnown 2021-02-19 20:16:10 +00:00
Gregory Maxwell 12ddfcacd4 Remove mruset as it is no longer used. 2021-02-19 20:16:10 +00:00
Gregory Maxwell 994a094379 Replace setInventoryKnown with a rolling bloom filter.
Mruset setInventoryKnown was reduced to a remarkably small 1000
 entries as a side effect of sendbuffer size reductions in 2012.

This removes setInventoryKnown filtering from merkleBlock responses
 because false positives there are especially unattractive and
 also because I'm not sure if there aren't race conditions around
 the relay pool that would cause some transactions there to
 be suppressed. (Also, ProcessGetData was accessing
 setInventoryKnown without taking the required lock.)
2021-02-19 20:16:10 +00:00
MarcoFalke c8f15614e5 Move blocksonly parameter interaction to InitParameterInteraction() 2021-02-19 20:01:02 +00:00
Jonas Schnelli 2acfcc801f Move -blocksonly parameter interaction to the new ParameterInteraction() function 2021-02-19 19:56:18 +00:00
Patick Strateman 724a7097a5 Improve log messages for blocks only violations. 2021-02-19 19:28:16 +00:00
Peter Todd f191acc477 Add relaytxes status to getpeerinfo 2021-02-19 19:28:16 +00:00
Patick Strateman bd129f177f Bail early in processing transactions in blocks only mode.
Previously unsolicited transactions would be processed as normal.
2021-02-19 19:28:16 +00:00
Patick Strateman 34560b5842 Fix relay mechanism for whitelisted peers under blocks only mode.
Previously in blocks only mode all inv messages where type!=MSG_BLOCK would be
rejected without regard for whitelisting or whitelistalwaysrelay.

As such whitelisted peers would never send the transaction (which would be
processed).

Zcash: We made a similar refactor in zcash/zcash#4944; this commit now
contains the necessary delta to bring us in line with the original
commit's output.
2021-02-19 19:28:16 +00:00
Patick Strateman 237de99aa9 Fix comment for blocksonly parameter interactions 2021-02-19 19:28:16 +00:00
Patick Strateman f9555b6c18 Fix fRelayTxs comment 2021-02-19 19:28:16 +00:00
Patick Strateman fd635a1f86 Display DEFAULT_WHITELISTALWAYSRELAY in help text 2021-02-19 19:28:16 +00:00
Patick Strateman 92f952e265 Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants 2021-02-19 19:28:16 +00:00
Patick Strateman 7e6ef59248 Add help text for blocksonly and whitelistalwaysrelay 2021-02-19 19:28:16 +00:00
Patick Strateman 32a1bbf0ae Add whitelistalwaysrelay option 2021-02-19 19:28:16 +00:00
Patick Strateman 57c544b0ed Do not process tx inv's in blocksonly mode 2021-02-19 19:28:16 +00:00
Patick Strateman 84636575a2 Add blocksonly mode 2021-02-19 19:28:16 +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