Commit Graph

17619 Commits

Author SHA1 Message Date
str4d ac7f8d88c6
Merge pull request #6595 from str4d/merge-v5.5.0-rc1
Merge v5.5.0-rc1 into the main branch
2023-04-21 19:28:28 +01:00
Jack Grigg 1c62d05940 Clear out v5.5.0 release notes
This enables PRs that have release notes to be merged in parallel to the
RC process.
2023-04-21 17:04:47 +00:00
Jack Grigg d3556d26b2 Zcashd release candidate v5.5.0-rc1
-----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org
 
 iQIzBAABCgAdFiEEM8uh69MjC3Gih0YlOANKuf2lcGcFAmRB4nwACgkQOANKuf2l
 cGcctg//QI8vAZUXt9N7P1hs6154HvSRQpFaTPNuWhyln/EtLqk+AkeA4yFIPTwu
 jJ7bgEOse4P12WsPkx6GLxZXo65+XW9IW/vJsluDzy6mU0T2OM1DLZHZJiAxkcZC
 VMKssgwDwiWcivM8EoWqAxX6htGVV8ReKNMdM0hw+rJV2Qj0FFAXRXcH2qk2441d
 x/d6vEjUORM9WjOd99sxzwnrZvFp/jFL6y7LWzRe5hDtq9u5hh2OYO9fxLfeD0V0
 u31V5ijbWDsFwtoLVTjTV/ikM7mpyG1bDcV/Vd9avkxkxHLMQjSn+4BaGxYz4V2D
 gSSSYXFfwmtEUR7WlOs5O3GOnz1Wp51eqm4iWv6sVvW7w0bcOtcJDUsJAdvBpYxw
 e7dfJwPUIsa6TzaE2hcm5VoRB5NidSFyaSQxajrvYJveP9X1bGgsLxmOUw6Jqo7r
 +SfhqFHPv/ely5au+XKTShsaA2jC09uLtodsqFViE5DuufE9wImvJnTIlHBAvJlJ
 Sr2C/Bh/i0WFc29jUJedHUg7Nh8N0QgSh/Uey7W1rkU+qm4GlD2M50WR9HW6u1PV
 2c/vWks3MRbr5acH+9zaimHp3erx/1KAphBoE8RuMDxzPHq1oyx/2kgE+KcLdbLZ
 a8qV8r9bg4PG46ZhZGvMcx0UnQdvzL4Krz443LHKfeHJ9XEfAy8=
 =KbTA
 -----END PGP SIGNATURE-----

Merge tag 'v5.5.0-rc1' into merge-v5.5.0-rc1

Zcashd release candidate v5.5.0-rc1
2023-04-21 17:03:38 +00:00
Kris Nuttycombe a2e345a638
Merge pull request #6593 from nuttycom/doc/rc_release_notes
Note when (not) to apply the "add release notes" part of the release process.
2023-04-20 20:47:36 -06:00
Kris Nuttycombe dea42336e9 Note when (not) to apply the "add release notes" part of the release process. 2023-04-20 19:18:55 -06:00
Jack Grigg 33e6e6a522 make-release.py: Updated book for 5.5.0-rc1. 2023-04-20 22:19:50 +00:00
Jack Grigg 7caa4123aa make-release.py: Updated release notes and changelog for 5.5.0-rc1. 2023-04-20 22:19:50 +00:00
Jack Grigg d71650e964 make-release.py: Updated manpages for 5.5.0-rc1. 2023-04-20 22:19:50 +00:00
Jack Grigg c2e8b87264 make-release.py: Versioning changes for 5.5.0-rc1. 2023-04-20 22:16:52 +00:00
Jack Grigg 0e74a9f40f depends: Rust 1.69.0 2023-04-20 21:58:08 +00:00
str4d 555e085539
Merge pull request #6569 from sellout/wallet_tx_builder-z_mergetoaddress
Have z_mergetoaddress use WalletTxBuilder
2023-04-20 22:50:09 +01:00
Greg Pfeil 3bf966eef2
Address z_mergetoaddress review feedback
This removes a btest case (can’t mix Sprout and Sapling inputs in
z_mergetoaddress) that is no longer testable outside the RPC interface (and
there is an rpc-test for it already).

It also adds a new failure case in `WalletTxBuilder::PrepareTransaction` – we
now check that the fee is in `MoneyRange`. This is generally protected by
`AmountFromValue` in RPC calls, but we have tests that check it at this level,
and better safe than sorry.
2023-04-20 11:50:40 -06:00
Kris Nuttycombe 3143ad5944
Merge pull request #6589 from daira/zip317-blocktemplate-followup 2023-04-20 10:38:42 -06:00
Daira Emma Hopwood f1956ae442 Fix/suppress clippy warnings.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-20 16:29:57 +01:00
Daira Emma Hopwood d2fd0a2e82 random.h documentation improvements.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-20 16:22:00 +01:00
Daira Emma Hopwood bafc49e39e miner_tests.cpp improvements.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-20 15:46:56 +01:00
Greg Pfeil ac218b697a
Avoid extra copy in ResolveInputsAndPayments
This change takes `const SpendableInputs&` instead of copying it. It does an explicit copy later in
more limited scope, avoiding an extra copy in the conventional fee side.

However, this means both the reference and mutable copy are in scope at the same time, making it
easy to use the wrong one by mistake.
2023-04-20 01:30:28 -06:00
Greg Pfeil d0522df5c0
Many z_mergetoaddress updates
- add ZIP 317 support
- address review comments
- restructure `AsyncRPCOperation_mergetoaddress` (removing the just-added
  `prepare`)
2023-04-20 01:24:39 -06:00
Greg Pfeil 94f5bfc595
Update z_mergetoaddress to use WalletTxBuilder
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Co-authored-by: Jack Grigg <jack@z.cash>
2023-04-19 22:26:42 -06:00
str4d 250a3f049b
Merge pull request #6403 from daira/zip317-blocktemplate
Implement ZIP 317 block construction algorithm
2023-04-20 02:23:59 +01:00
Kris Nuttycombe f0e0c281ad
Merge pull request #6585 from str4d/update-deps-5.5.0 2023-04-19 18:18:43 -06:00
Daira Emma Hopwood 11dc0d7277 Add a `-blockunpaidactionlimit` config option to configure the per-block
limit on unpaid actions for ZIP 317 block template construction.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-20 00:48:38 +01:00
Daira Emma Hopwood c1930170d2 Remove the implementation of score-based block template construction
and the `-blockminsize` option.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Daira Emma Hopwood 783bd52556 mergetoaddress_helper.py: use Decimal for amounts and integers otherwise.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Daira Emma Hopwood 7c956ffab6 mergetoaddress_helper.py: Use `generate_and_check` helper to mine a block
and make sure that it contains the expected number of transactions.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Daira Emma Hopwood eb74c8e8b0 Repair some RPC tests.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Daira Emma Hopwood 3b255b8941 Repair `miner_tests.py` btest.
The previous code did not mine enough blocks to have sufficient matured
funds for the tests it needed to perform, taking into account the slow
start. So, we now mine 200 instead of 110 blocks.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Daira Emma Hopwood 9af901e1a9 Add assertions that `GetRandInt*` functions are called with `nMax >= 0`.
All existing uses have been checked to ensure they are consistent with
this assertion.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Daira Emma Hopwood 75030610f2 ZIP 317 block construction algorithm.
This breaks tests which are repaired in subsequent commits.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 22:48:46 +01:00
Jack Grigg 8f848e8ef3 cargo update 2023-04-19 20:06:12 +00:00
Daira Emma Hopwood c111bff3d7 Implement `GetUnpaidActionCount` and `GetWeightRatio` for ZIP 317.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-19 20:04:51 +01:00
Jack Grigg fde211c7f6 qa: Postpone Clang 16.0.2 2023-04-19 18:50:01 +00:00
Jack Grigg 787d840841 depends: Boost 1.82.0 2023-04-19 18:44:53 +00:00
str4d 6cb4c9e144
Merge pull request #6576 from sellout/wallet_tx_builder-net-payments
WalletTxBuilder support for net payments
2023-04-19 10:24:00 +01:00
Greg Pfeil e3b1802637
Don’t test “Insufficient funds” for `z_shieldcoinbase`
I don’t think it’s possible for this error condition to be tested for `z_shieldcoinbase` any more

1. to hit this failure, we need a fee higher than the amount available in coinbase UTXOs;
2. if there are no UTXOs to shield, we fail before reaching an “insufficient funds” check;
3. coinbase UTXOs are >1 ZEC, which is the highest we can set `-maxtxfee` to without emitting a
   warning;
4. emitting a warning causes the test to fail.
2023-04-18 19:39:47 -06:00
str4d 63b644b20f
Merge pull request #6578 from sellout/maxtxfee-bounds
Restore previous `-maxtxfee` bound
2023-04-19 00:12:08 +01:00
Greg Pfeil 1100829d99
fixup! WalletTxBuilder support for net payments
This just rearranges functions so they’re defined before they’re called.
2023-04-18 15:57:13 -06:00
Greg Pfeil f655f482ab
WalletTxBuilder support for net payments
Previously, `WalletTxBuilder` expected a vector of payments with known amounts.
This meant that operations like `z_shieldcoinbase` and `z_mergetoaddress` needed
to pre-calculate the amount to be sent to the target address.

With ZIP 317 fees, this became harder to do. Now `WalletTxBuilder` accepts
either a vector of payments or a single address (and optional memo) for the net
amount to be paid to.

This also converts `z_shieldcoinbase` to use this approach. `z_mergetoaddress`
conversion is blocked by #6569.
2023-04-18 15:55:21 -06:00
Greg Pfeil 9820a6399b
Correct -maxtxfee lower bound diagnostic messages
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: str4d <thestr4d@gmail.com>
2023-04-18 15:00:27 -06:00
Greg Pfeil 23a680a05f
Restore previous `-maxtxfee` bound
And warn on the new bound.

Fixes #6577.
2023-04-18 13:55:35 -06:00
str4d f512291ff2
Merge pull request #6555 from sellout/zip-317-legacy-wallet
Support ZIP 317 fees for legacy wallet operations
2023-04-18 20:44:46 +01:00
Kris Nuttycombe 65e90a7964
Merge pull request #6574 from str4d/fix-mempool_packages-nondeterminism
Fix `mempool_packages` nondeterminism
2023-04-18 13:24:57 -06:00
Kris Nuttycombe 0a47f1c148 Use the conventional fee for prioritisation in prioritisetransactions.py
Co-authored-by: Greg Pfeil <greg@technomadic.org>
2023-04-18 12:37:04 -06:00
Jack Grigg b3e40d8548 test: Sync blocks before invalidating them in `mempool_packages` RPC test
This avoids a race condition where node 1 attempts to fetch the block
while it is considered invalid by node 0, which eventually leads to the
nodes becoming disconnected, preventing the test from advancing.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-04-18 18:24:15 +00:00
Jack Grigg 8342e350b1 test: Avoid generating a chain fork in `mempool_packages` RPC test
There was a race condition here between the block generated by node 0
being broadcast to node 1, and being invalidated by node 0. Due to the
changes we made to the difficulty adjustment algorithm, the invalidated
block and the block replacing it generated by node 0 would have the same
chain work; thus if node 1 observed the invalidated block, it would
never reorg to the replacement block.

We fix this by having node 0 reconsider the invalidated block before
generating its next block. This avoids the chain fork, and also clears
the mempool to provide better separation between test stages.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-04-18 17:00:54 +00:00
Kris Nuttycombe f177deaa37 Fix formating of money strings. 2023-04-18 07:51:17 -06:00
Kris Nuttycombe e566955acb Calculate convential fee in `CreateTransaction` before stripping sigs. 2023-04-18 07:51:17 -06:00
Greg Pfeil bf68d69439 Remove `-txconfirmtarget` config option 2023-04-18 07:51:17 -06:00
Greg Pfeil 3f9714aa9d Address review comments re: legacy wallet ZIP 317 2023-04-18 07:51:17 -06:00
Greg Pfeil 59b98d8290 Remove `-mintxfee` config option 2023-04-18 07:51:16 -06:00