Commit Graph

1233 Commits

Author SHA1 Message Date
Jack Grigg 0263185a65 depends: Postpone dependency updates
We aren't going to move to Clang 13 in a hotfix release. The other
dependencies passed their postponement re-evaluation date, but also
won't be updated just yet.
2021-10-08 16:54:36 +00:00
Kris Nuttycombe 2221bf5484 Add listaddresses check to wallet_addresses.py 2021-10-07 18:12:13 -06:00
Jack Grigg a7342cff71 depends: Postpone native_ccache 4.4.2 2021-09-29 01:36:35 +01:00
Jack Grigg 6e90c84be7 Fix bugs in testnet Orchard circuit
The consensus branch ID is updated (as the NU5 consensus rules are
altered). The testnet NU5 activation height is also reset.
2021-09-28 22:56:37 +01:00
Jack Grigg fd49f78042 wallet: Check spent shielded notes in CWalletTx::IsFromMe
The "IsFromMe" logic was implemented in several places in the Bitcoin
Core wallet. We had correctly updated CWallet::IsFromMe(CTransaction)
(which was used in most places in the wallet) to check for shielded
notes being spent, but did not notice that CWalletTx::IsFromMe also
needed this check.

This bug has existed since before Zcash launched. It went unnoticed
because CWalletTx::IsFromMe was previously only called from code
used to either create purely-transparent transactions, or provide
informational output on non-critical RPC methods.

Closes zcash/zcash#5325.
2021-09-28 02:51:04 +01:00
Jack Grigg 5a2e6183f3 net: Reject unknown CInv message types
Nodes will now reject messages containing unknown CInv message types,
instead of (mostly) ignoring them.
2021-09-15 20:08:01 +01:00
Jack Grigg 07143679dc test: Set up mininodes at the start of feature_zip239 2021-09-15 17:50:57 +01:00
str4d e989923041
Merge pull request #5291 from str4d/zip-239
ZIP 239 support
2021-09-16 03:08:25 +12:00
str4d 5d643898e7
Merge pull request #5293 from mdr0id/smoke_tests_update
Smoke Test Updates (Remove Sprout Logic )
2021-09-15 20:38:40 +12:00
Jack Grigg 1ad8ee8735 qa: Boost 1.77.0
- The patches `iostreams-106.patch` and `signals2-noise.patch` were
  incorporated into Boost 1.75.
- The allocator access deprecation issue was fixed in Boost 1.76.

Closes zcash/zcash#4945.
2021-09-15 00:35:53 +01:00
Jack Grigg 95280c10b0 Add named constants for legacy tx authDigest placeholder value 2021-09-14 21:26:05 +01:00
Jack Grigg befa57d0a6 test: Fix bug in mininode.SpendDescription.deserialize 2021-09-14 21:18:06 +01:00
Jack Grigg 966e285b61 depends: Update Rust to 1.54.0 2021-09-14 17:40:18 +01:00
Jack Grigg 6e562a27df Postpone dependency updates that require CMake 2021-09-14 17:33:25 +01:00
mdr0id dc41c13593 Update funding logic 2021-09-13 09:54:29 -07:00
mdr0id b6987844f8 Add usage documentation for manual and faucet driven tests 2021-09-10 19:49:52 -07:00
mdr0id 7d7d0e8565 Update funding logic bug 2021-09-10 19:46:33 -07:00
Jack Grigg a97cfd241d test: Implement CInv.__eq__() for mininode to simplify RPC test 2021-09-10 22:13:53 +01:00
Jack Grigg d503691778 Add MSG_WTX support to inv messages
The change to AlreadyHave() means that nodes will also now send getdata
requests for v5 transactions.
2021-09-10 21:47:42 +01:00
Jack Grigg 9476f5d7ef ProcessGetData: Respond to MSG_WTX requests 2021-09-10 21:46:05 +01:00
Jack Grigg de5563de71 test: Add v5 tx support to mininode 2021-09-10 21:46:05 +01:00
Jack Grigg 9047962637 test: Fix bugs in mininode transaction parser 2021-09-10 21:46:05 +01:00
Jack Grigg d715f4ecac Implement CInv message type MSG_WTX
This adds the double-hash message variant. The extra hash field is set
to null for block message types, and to all-ones for MSG_TX (to match
the legacy authHash value used for pre-v5 transactions in the Merkle
tree).
2021-09-10 21:46:05 +01:00
mdr0id 4721ee3eaa Add fix and note for timing issue 2021-09-09 14:58:30 -07:00
mdr0id 2f3698aa3a Remove sprout funding flow logic 2021-09-09 14:57:20 -07:00
Jack Grigg 7896a52015 test: Use correct field of getnetworkinfo to read protocol version
I tested the NU5 components of this PR by locally setting the protocol
version to 170014. I forgot to check that without that override, the
test would skip the NU5 checks. The reason it defaulted to NU5 is that
the test was reading the client version 4040150, which is indeed not
less than the NU5 protocol version ^_^;;
2021-09-01 01:00:26 +01:00
Jack Grigg 4c1c5f479d test: Add NU5 test cases to existing RPC tests 2021-08-27 15:31:04 +01:00
Jack Grigg e0f210f4fc test: Fix pyflakes warnings 2021-08-17 18:50:54 +01:00
Jack Grigg 1e352c108c test: Print reject reason if RPC test block rejected instead of accepted 2021-08-13 16:49:46 +01:00
MarcoFalke b67c86abdb [qa] py2: Unfiddle strings into bytes explicitly
(cherry picked from commit bitcoin/bitcoin@faa41ee204)

Zcash: Excluding RPC tests or framework code we don't have.
2021-08-13 16:49:46 +01:00
Wladimir J. van der Laan d9cb6b89b0 test: Add basic test for `reject` code
Extend P2P test framework to make it possible to expect reject
codes for transactions and blocks.

(cherry picked from commit bitcoin/bitcoin@20411903d7)
2021-08-13 16:49:46 +01:00
Shaul Kfir 55d4948207 Add absurdly high fee message to validation state (for RPC propagation)
(cherry picked from commit bitcoin/bitcoin@a651403e09)
2021-08-13 16:09:59 +01:00
Homu fd462fd8c4 Auto merge of #5269 - str4d:zip-239-prep-2, r=str4d
ZIP 239 preparations 2

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6722
  - Only the ancillary commits, not the mempool limiting commits (we have our own).
- bitcoin/bitcoin#6898
  - Only the first three commits (we'll cherry-pick the main content later).
- bitcoin/bitcoin#7840
2021-08-13 01:13:18 +00:00
Jack Grigg d6dd3cea67 qa: Bump `sync_mempool` timeout for `prioritisetransaction.py`
To try and get around transient CI failures.
2021-08-13 02:12:35 +01:00
John Newbery 3ef50b3647 [wallet] Remove wallet account RPCs
Also remove the RPC deprecation tests for accounts, and make one small
change to another wallet test that relies on account behaviour.

(cherry picked from commit f0dc850bf698f7377797d7d68365d4fc79b0221c)
2021-08-12 08:07:12 -06:00
John Newbery 0bf8b56b29 [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts.
(cherry picked from commit 702ae1e21a09d8c31406839c4ea507c5fa276898)
2021-08-11 19:36:14 -06:00
Gregory Maxwell 2a7ebb3aba Eliminate TX trickle bypass, sort TX invs for privacy and priority.
Previously Bitcoin would send 1/4 of transactions out to all peers
 instantly.  This causes high overhead because it makes >80% of
 INVs size 1.  Doing so harms privacy, because it limits the
 amount of source obscurity a transaction can receive.

These randomized broadcasts also disobeyed transaction dependencies
 and required use of the orphan pool.  Because the orphan pool is
 so small this leads to poor propagation for dependent transactions.

When the bypass wasn't in effect, transactions were sent in the
 order they were received.  This avoided creating orphans but
 undermines privacy fairly significantly.

This commit:
 Eliminates the bypass. The bypass is replaced by halving the
  average delay for outbound peers.

 Sorts candidate transactions for INV by their topological
  depth then by their feerate (then hash); removing the
  information leakage and providing priority service to
  higher fee transactions.

 Limits the amount of transactions sent in a single INV to
  7tx/sec (and twice that for outbound); this limits the
  harm of low fee transaction floods, gives faster relay
  service to higher fee transactions. The 7 sounds lower
  than it really is because received advertisements need
  not be sent, and because the aggregate rate is multipled
  by the number of peers.

(cherry picked from commit f2d3ba73860e875972738d1da1507124d0971ae5)

Zcash: Candidate transactions for INV are not sorted by their
topological depth because we haven't backported bitcoin/bitcoin#6654.
2021-08-12 00:37:51 +01:00
Homu 1cb1ed2653 Auto merge of #5265 - str4d:zip-239-prep-1, r=str4d
ZIP 239 preparations 1

This is the first of several backports to prepare for ZIP 239. The primary
change is altering `mapRelay` to store `CTransaction`s, which we need
because ZIP 239 requires changing `Inv` messages based on transaction
versions. The other changes are mainly for conflict removal but are also
independently useful.

Backports the following upstream PRs:
- bitcoin/bitcoin#6889
- bitcoin/bitcoin#7125
- bitcoin/bitcoin#7862
- bitcoin/bitcoin#7877
2021-08-10 00:22:32 +00:00
Pieter Wuille d3ccecd0b9 Report reindexing progress in GUI
(cherry picked from commit b4d24e142e25a21c78ab74146c3520f2259fd7c2)

Zcash: Excludes GUI changes (as we don't have the QT GUI).
2021-08-09 20:58:49 +01:00
Pieter Wuille d6d39449e5 Add -reindex-chainstate that does not rebuild block index
(cherry picked from commit d3d75479115bc3480f163df774ee9dd2f8bd9f54)
2021-08-09 20:58:49 +01:00
Jack Grigg 75b9fc4f27 test: Fix race condition in p2p_txexpiringsoon
The recent changes to mempool inv logic mean that nodes are much less
likely to immediately return an `inv` message in response to a `mempool`
message. The `p2p_txexpiringsoon` RPC test was relying on the prior
behaviour.

`TestNode.sync_with_ping` now takes an optional `waiting_for` closure
that allows the caller to require that a specific message kind is
received prior to the timeout.
2021-08-09 17:43:48 +01:00
Jack Grigg 6be1a2a9da test: Wait for transaction propagation in shorter_block_times RPC test
This was previously a transient test failure, that started reliably
failing after the move to Poisson delays.
2021-08-05 20:54:47 +01:00
Jack Grigg d9bcc2d303 depends: Update utfcpp to 3.2.1 2021-07-30 18:22:05 +01:00
Jack Grigg 374f60b326 depends: Update Clang / libcxx to LLVM 12
This is the second release in a row where LLVM has cut a X.0.1 for
everything except Darwin, so I've adjusted its URLs and paths on the
assumption this will continue.
2021-07-30 18:22:05 +01:00
Jack Grigg 0a5e69ab67 depends: Update Rust to 1.54.0 2021-07-30 18:22:05 +01:00
Jack Grigg 1eb848ada2 Postpone dependency updates we aren't doing in this release 2021-07-30 16:04:31 +01:00
str4d 92d6984842
test: Cleanups to ZIP 221 Python test code
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-06-20 21:25:59 +01:00
Jack Grigg a18f8b58a9 test: Check history trees across Canopy and NU5 activations 2021-06-18 12:56:19 +01:00
Jack Grigg 9930a27992 test: Check hashBlockCommitments before, at, and after NU5 activation 2021-06-18 01:05:04 +01:00
Jack Grigg 2d0a8f1f3a test: Check for valid hashBlockCommitments construction post-NU5 2021-06-18 01:05:04 +01:00