Commit Graph

18446 Commits

Author SHA1 Message Date
Kris Nuttycombe 1d0955e357 Update documentation related to changing the end-of-service halt.
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-22 07:09:52 -06:00
Kris Nuttycombe 4d28840612 Update audit metadata for Rust crates. 2024-08-22 07:05:54 -06:00
Kris Nuttycombe 32f441437f make-release.py: Updated book for 5.10.0-rc1. 2024-08-21 22:55:30 -06:00
Kris Nuttycombe 41cee4bd9e make-release.py: Updated release notes and changelog for 5.10.0-rc1. 2024-08-21 22:55:30 -06:00
Kris Nuttycombe f20063a002 make-release.py: Updated manpages for 5.10.0-rc1. 2024-08-21 22:55:30 -06:00
Kris Nuttycombe 8f335af6d6 make-release.py: Versioning changes for 5.10.0-rc1. 2024-08-21 22:53:24 -06:00
Kris Nuttycombe 60af72cd52 Update `RELEASE_TO_DEPRECATION_WEEKS` to ensure v5.10.0-rc1 EOS halts before the halving. 2024-08-21 22:40:34 -06:00
Kris Nuttycombe 5b35f68f9e Update release notes for v5.10.0-rc1 2024-08-21 22:38:38 -06:00
Kris Nuttycombe 7ac8c9a791
Merge pull request #6926 from daira/createtransaction-init
Ensure out-reference parameters of `CWallet::CreateTransaction` are initialized
2024-08-21 22:23:33 -06:00
Kris Nuttycombe 4ca1c795df Use scopes to make it more obvious that certain variables are never used.
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 20:26:48 -06:00
Daira-Emma Hopwood 288c2ba0ce Ensure out-reference parameters of `CWallet::CreateTransaction` are initialized.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 20:21:04 -06:00
Kris Nuttycombe f59edb43a3 Update native_cxxbridge to version 1.0.126 2024-08-21 20:20:20 -06:00
Kris Nuttycombe 68521b0e26 Update native_rust to version 1.80.1 2024-08-21 20:20:20 -06:00
Kris Nuttycombe 1bcc6b030d Remove the invalid `librustzcash` entry from .cargo/config.toml.offline 2024-08-21 20:20:20 -06:00
Kris Nuttycombe bd841d88a5
Merge pull request #6929 from zcash/librustzcash_dependency_updates
Update `librustzcash` dependencies.
2024-08-21 20:19:46 -06:00
Kris Nuttycombe 1f4e4d6cbc
Merge pull request #6928 from daira/orphan-resolution
Backport fix for orphan handling
2024-08-21 20:01:25 -06:00
Kris Nuttycombe f4cad28f82
Merge pull request #6911 from dismad/patch-1
Update README.md, ZecHub URL update
2024-08-21 18:22:06 -06:00
Kris Nuttycombe a8faabf775
Merge pull request #6923 from daira/show-download-urls
depends: Show the URLs from which dependencies are being downloaded
2024-08-21 18:21:27 -06:00
Kris Nuttycombe 2147537ed7 Update to latest `librustzcash` release versions
* zcash_address 0.4
* zcash_encoding 0.2.1
* zcash_primitives 0.16
* zcash_proofs 0.16
* zcash_protocol 0.2

This also updates to the following upstream crate versions:
* bridgetree 0.5
* incrementalmerkletree 0.6
* orchard 0.9
* sapling-crypto 0.2
2024-08-21 18:14:30 -06:00
Daira-Emma Hopwood c890bb505a Mark mempool_nu_activation as a flaky RPC test.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-22 01:02:41 +01:00
Kris Nuttycombe 98a560fbe8 Apply suggestions from code review
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-22 01:02:41 +01:00
Pieter Wuille f00cf8cde7 Interrupt orphan processing after every transaction
This makes orphan processing work like handling getdata messages:
After every actual transaction validation attempt, interrupt
processing to deal with messages arriving from other peers.

(cherry picked from commit bitcoin/bitcoin@866c8058a7)
2024-08-22 01:02:41 +01:00
Pieter Wuille 317606474f [MOVEONLY] Move processing of orphan queue to ProcessOrphanTx
(cherry picked from commit bitcoin/bitcoin@6e051f3d32)

Zcash: Adapted to us not having various upstream changes, including the
orphan lock changes in bitcoin/bitcoin#11824.
2024-08-22 01:02:41 +01:00
Pieter Wuille 1a12eb41b8 Simplify orphan processing in preparation for interruptibility
(cherry picked from commit bitcoin/bitcoin@9453018fdc)

Zcash: Adapted to our codebase.
2024-08-22 01:02:41 +01:00
Gregory Maxwell df9971131e Increase maximum orphan size to 100,000 bytes.
Although this increases node memory usage in the worst case by perhaps
 30MB, the current behavior causes severe issues with dependent tx relay.

(cherry picked from commit bitcoin/bitcoin@54326a6808)
2024-08-22 01:02:41 +01:00
Gregory Maxwell e031b43c3c Treat orphans as implicit inv for parents, discard when parents rejected.
An orphan whos parents were rejected is never going to connect, so there
 is little utility in keeping it.

Orphans also helpfully tell us what we're missing, so go ahead and treat
 it as INVed.

(cherry picked from commit bitcoin/bitcoin@8c99d1b525)

Zcash: Adapted to our INV changes.
2024-08-22 01:02:41 +01:00
Gregory Maxwell 8cc74c9828 Adds an expiration time for orphan tx.
This prevents higher order orphans and other junk from
 holding positions in the orphan map.  Parents delayed
 twenty minutes are more are unlikely to ever arrive.

The freed space will improve the orphan matching success rate for
 other transactions.

(cherry picked from commit bitcoin/bitcoin@11cc143895)
2024-08-22 01:02:41 +01:00
Gregory Maxwell 22bfed25fd This eliminates the primary leak that causes the orphan map to
always grow to its maximum size.

This does not go so far as to attempt to connect orphans made
 connectable by a new block.

Keeping the orphan map less full helps improve the reliability
 of relaying chains of transactions.

(cherry picked from commit bitcoin/bitcoin@db0ffe80a0)
2024-08-22 01:02:41 +01:00
Pieter Wuille 7cb32b1634 Track orphan by prev COutPoint rather than prev hash
(cherry picked from commit bitcoin/bitcoin@1b0bcc5f95)

Zcash: Includes additional change to `IteratorComparator` cherry-picked
from commit bitcoin/bitcoin@fbf327b138.
2024-08-22 01:02:41 +01:00
Kris Nuttycombe 1b15589745
Merge pull request #6932 from LarryRuane/2024-08-getaddresstxids-range
fix getaddresstxids and getaddressdeltas range parsing
2024-08-21 17:52:19 -06:00
Kris Nuttycombe 6a7654f4b1
Fix comments and RPC documentation for `getaddresstxids` and `getaddressdeltas`
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 17:51:46 -06:00
Kris Nuttycombe da0952119e
Merge pull request #6933 from zcash/zip-236
Implement "ZIP 236: Blocks must balance exactly" for NU6
2024-08-21 17:38:09 -06:00
Daira-Emma Hopwood 5e6a62306e Update RPC test Python dependencies: base58 is required; simplejson is not.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 23:45:59 +01:00
Daira-Emma Hopwood 8af193808d Try to reduce the incidence of some RPC test race conditions.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 23:45:59 +01:00
Daira-Emma Hopwood 4783e1a948 test_validation gtest: ensure that there can be no UB as a result of
fake `CBlockIndex` objects still being referenced at the end of the test.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 17:44:08 +01:00
Larry Ruane 099cd24da3 fix getaddresstxids and getaddressdeltas range parsing 2024-08-21 08:41:30 -06:00
Daira-Emma Hopwood 6a1c55528e test_validation gtest: calls to internal functions (`SetChainPoolValues`
and `ReceivedBlockTransactions`) are required to take a lock on `cs_main`
in order to work when compiled with `--enable-debug`.

Also, `ReceivedBlockTransactions` added the passed-in index pointer to
the global `setDirtyBlockIndex`, which would cause UB in the test (because
nothing removes it before the fake index is destructed). Refactor this so
that non-test callers add the index pointer to `setDirtyBlockIndex`
outside the call to `ReceivedBlockTransactions`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 15:07:10 +01:00
Daira-Emma Hopwood ea228dcfbd test_validation gtest: also test initialization of the other chain value
pool balances (Sapling, Orchard, and Lockbox). This is not a very thorough
test but it will do for now.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 14:58:11 +01:00
Daira-Emma Hopwood 6b0eea70d7 test_validation gtest: make it more concise and readable.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 14:35:31 +01:00
Daira-Emma Hopwood c918ab4494 test_validation gtest: also test more recent upgrades in
`ContextualCheckInputsDetectsOldBranchId`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 14:35:31 +01:00
Daira-Emma Hopwood cf98b3ea1d Extend `coinbase_funding_streams` to also test ZIP 236.
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 11:28:36 +01:00
Daira-Emma Hopwood 9f7ee08af0 Ensure that `create_coinbase` can work on regtest after various
network upgrades:
* after Blossom, there is an extra halving of the block reward;
* after NU5, `nExpiryHeight` must be equal to the block height;
* after NU6, we need to take into account the lockbox value.

Also we rename `hashFinalSaplingRoot` to `hashBlockCommitments`,
and make `CBlock.rehash` implicitly recalculate the `hashMerkleRoot`
and `hashAuthDataRoot` fields.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 11:28:36 +01:00
Daira-Emma Hopwood e612ca0858 Add `test_framework.mininode.uint256_from_reversed_hex`.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 11:28:36 +01:00
Kris Nuttycombe f26bb38cdf Compute chain value earlier in block processing.
After the implementation of ZIP 236, `TestBlockValidity` would fail to
correctly handle blocks newly created by the miner because the value
allocated to the lockbox was not computed in the path to calling
`ContextualCheckBlock`. This refactors the computation of the lockbox
value and other pool values such that it is always performed prior to
invoking `CheckBlock`.

Secondarily, the `coinbase_funding_streams` test was previously
inadvertently creating a silent chain fork by applying different funding
stream rules on the node on which the block was created relative to the
second node used in the test.

Author: Kris Nuttycombe <kris@nutty.land>
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 11:27:36 +01:00
Kris Nuttycombe 9aee61f981 Improve logging of miner block construction. 2024-08-21 03:54:23 +01:00
Kris Nuttycombe d9bcc0686a Use __func__ for substitution in `ConnectBlock` error messages.
This makes it easier to find actual `ConnectBlock` call sites using
text search of the source code.
2024-08-21 03:54:23 +01:00
Daira-Emma Hopwood 97b1aba09b Implement "ZIP 236: Blocks must balance exactly" for NU6.
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 03:54:23 +01:00
Daira-Emma Hopwood 5f0d6a84c4
Merge pull request #6931 from daira/update-python-code
Update Python code to work, and avoid deprecation warnings, on Python 3.12
2024-08-21 03:53:49 +01:00
Daira-Emma Hopwood a888dfdbef Work around one of the race conditions in the `wallet_deprecation` test.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 02:12:40 +01:00
Daira-Emma Hopwood 6141a56ba2 Make use of the 'filter' option to `tarfile.extractall` conditional on
the version of Python that added it (3.11.4).

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-08-21 02:12:35 +01:00