Commit Graph

17550 Commits

Author SHA1 Message Date
Alex Morcos 3972c7e6b6 [test] Remove priority from tests
Remove all coin age priority functionality from unit tests and RPC tests.

(cherry picked from commit bitcoin/bitcoin@0315888d0d)

Zcash:
* We cannot remove the `pool` parameter from the `CTxMemPool` constructor
  because we do not have bitcoin/bitcoin#9138. (Backporting that PR is
  unnecessary and would be a distraction from the purpose of this one;
  the changes made by it are orthgonal.)
* We don't have `prioritise_transaction.py`, `MempoolAncestorIndexingTest`,
  `MempoolSizeLimitTest`, or the `estimateSmartFee` functionality, so omit
  the changes for those.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Daira Emma Hopwood 0d0e046b66 Log (at the mempool DEBUG level) when a transaction cannot be accepted to
the mempool because its modified fee is below the minimum relay fee.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Alex Morcos a4346b2012 [rpc] sendrawtransaction no longer bypasses minRelayTxFee
The prioritisetransaction API can always be used if a transaction needs to be submitted that bypasses minRelayTxFee.

(cherry picked from commit bitcoin/bitcoin@ad727f4eaf)

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Alex Morcos 1a57b52109 [cleanup] Remove estimatePriority
Unused everywhere now except one test.

(cherry picked from commit bitcoin/bitcoin@fe282acd76)

Zcash: We don't have `estimateSmartPriority` which was also removed in
the upstream commit. We have to keep `MAX_PRIORITY` for a little longer
because `CCoinsViewCache::GetPriority` still uses it.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Alex Morcos 335ac369ea [debug] Change -printpriority option
-printpriority output is now changed to only show the fee rate and hash of transactions included in a block by the mining code.

(cherry picked from commit bitcoin/bitcoin@400b15147c)

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Daira Emma Hopwood 63d08919d1 Warn on node startup if the removed `-blockprioritysize` option is set
to a non-zero value.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Alex Morcos dbf52938af [mining] Remove -blockprioritysize.
Remove ability of mining code to fill part of a block with transactions sorted by coin age.

(cherry picked from commit bitcoin/bitcoin@272b25a6a9)

Zcash:
* Add release notes.
* Remove a static assertion that no longer applies.
* Spell "prioritise" and "prioritisation" (when referring to tx prioritisation) consistently
  with 'ise', to match the "prioritisetransaction" RPC call.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Alex Morcos 9231eed603 [rpc] Remove estimatepriority.
The RPC call was already deprecated.

(cherry picked from commit bitcoin/bitcoin@12839cdd56)

Zcash: we do not have `estimatesmartpriority`.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
MarcoFalke 9a7dc79c08 wallet: Remove sendfree
This removes the option from the wallet to not pay a fee on "small"
transactions which spend "old" inputs.

This code is no longer worth keeping around, as almost all miners
prefer not to include transactions which pay no fee at all.

(cherry picked from commit bitcoin/bitcoin@ddf58c7573)

Zcash:
* Add release notes.
* Use `UIError` instead of `InitWarning` for the warning that
  `-sendfreetransactions` is no longer supported (because we haven't
  refactored `InitWarning` to be accessible from the wallet code).
* Update the `show_help` RPC test to remove `-sendfreetransactions`.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Wladimir J. van der Laan 12291b2e41 Merge #7730: Remove priority estimation
0bd581a add release notes for removal of priority estimation (Alex Morcos)
b2322e0 Remove priority estimation (Alex Morcos)

(cherry picked from commit bitcoin/bitcoin@3c03dc2cfc)

Zcash:
* MAX_PRIORITY is still needed because it's used for the priority of
  shielded transactions.
* Changes relating to "smart priority" are omitted since we do not have
  that.
* Change the new minimum client version for `fee_estimates.dat` to
  FEE_ESTIMATES_WITHOUT_PRIORITY_VERSION == 5050000. Immediately make
  sure we write at least that version and accept it for reading.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Suhas Daftuar 16f90b06e8 Remove GetMinRelayFee
One test in AcceptToMemoryPool was to compare a transaction's fee
agains the value returned by GetMinRelayFee. This value was zero for
all small transactions.  For larger transactions (between
DEFAULT_BLOCK_PRIORITY_SIZE and MAX_STANDARD_TX_SIZE), this function
was preventing low fee transactions from ever being accepted.

With this function removed, we will now allow transactions in that range
with fees (including modifications via PrioritiseTransaction) below
the minRelayTxFee, provided that they have sufficient priority.

(cherry picked from commit bitcoin/bitcoin@901b01d674)

Zcash: Take the upstream commit message (in particular the references to
priority) with a pinch of salt, since we're going to be removing priority
in the backport of bitcoin/bitcoin#9602 . The main reason to include this
commit is that it removes `GetMinRelayFee`, which is assumed to have
happened before bitcoin/bitcoin#9602 .

Note that Zcash doesn't have upstream's `-maxmempool` parameter; it
uses ZIP 401 for mempool size limiting instead.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Suhas Daftuar cf3786f86b Use fee deltas for determining mempool acceptance
(cherry picked from commit bitcoin/bitcoin@27fae3484c)

Zcash: The change to tests is not included because we do not have
`qa/rpc-tests/prioritize_transaction.py` (`prioritisetransaction.py` is
very different). There is no point adding a test for this when it's
immediately going to be broken by the removal of priority and "free"
transactions. It will be up to the PRs that add the ZIP 317 changes to
make sure that fee deltas are taken into account for transactions
entering the mempool.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Suhas Daftuar e01ad01c94 Fix mempool limiting for PrioritiseTransaction
Redo the feerate index to be based on mining score, rather than fee.

Update mempool_packages.py to test prioritisetransaction's effect on
package scores.

(cherry picked from commit bitcoin/bitcoin@eb306664e7)

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:41 +01:00
str4d ebc042b7bc
Merge pull request #6564 from daira/zip401-updates
Change ZIP 401 mempool limiting to use conventional fee and new constants
2023-04-17 17:48:42 +01:00
Daira Emma Hopwood 7c7e8645bc Change ZIP 401 mempool limiting to use constants decided in zcash/zips#565.
fixes #6518

In a ZIP sync meeting we decided that:

* The minimum cost should be changed to 10000, in order to avoid
  penalizing Orchard-using transactions too much relative to other
  transactions.
* `low_fee_penalty` should be changed to 40000. This preserves the
  property that a transaction paying less than the ZIP 317 conventional
  fee is deprioritized relative to a min-cost, conventional-fee
  transaction by a factor of 5, as in the original design.
* The recommended default for `mempooltxcostlimit` should remain at
  80000000. Rationale: 80000000 was chosen so that the worst-case size
  of the mempool would be equal to the worst-case size of 40 blocks,
  which is the current default transaction expiry delta. That reasoning
  still holds even with the above changes.
* `eviction_memory_entries` remains at 40000. It could have been lowered
  given that there will now be at most 80000000/10000 = 8000 transactions
  "in-flight", but it doesn't need to be because the rationale that
  "40000 [RecentlyEvicted queue] entries can be stored in ~1.6 MB,
  which is small compared to other node memory usage" still holds.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-16 23:04:57 +01:00
Daira Emma Hopwood 31c0dcf790 Change ZIP 401 mempool limiting to use conventional fee.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-16 11:41:40 +01:00
Kris Nuttycombe 0a901b06eb
Merge pull request #6559 from sellout/conventional-fee-sentinel
Use null as the ZIP 317 fee sentinel instead of -1
2023-04-15 22:24:09 -06:00
Kris Nuttycombe 0679ee64b9
Merge pull request #6562 from sellout/broken-cli-help
Fix zcash-cli crash when printing help message
2023-04-15 22:09:26 -06:00
Greg Pfeil 7770d9d647
Add z_sendmany RPC examples with fee field 2023-04-15 16:21:50 -06:00
Greg Pfeil 2e80bd74cf
Use null as the ZIP 317 fee sentinel instead of -1
Fixes #6556
2023-04-15 16:12:42 -06:00
Greg Pfeil 14c11c385a
Fix zcash-cli crash when printing help message
When a `zcash-cli` command fails, it attempts to print the help message for the command. However,
making the `help` call can also fail, and there was a bug in this check, so that we tried to display
the help message when the `help` call failed, and tried to display the error when the `help` call
succeeded – both leading to an assertion failure.

This also makes some minor changes to the output formatting.

Fixes #6561
2023-04-15 16:07:33 -06:00
str4d 7df187d905
Merge pull request #6558 from str4d/zcash_primitives-0.11
Use published `zcash_primitives 0.11` and `zcash_proofs 0.11`
2023-04-15 11:17:31 +01:00
Jack Grigg 716720775e Use published `zcash_primitives 0.11` and `zcash_proofs 0.11`
Closes zcash/zcash#6462.
2023-04-15 01:51:29 +00:00
Kris Nuttycombe 6ad60e7340
Merge pull request #6524 from sellout/zip317-wallet-support
Support ZIP 317 fees in the zcashd wallet
2023-04-14 14:14:11 -06:00
Greg Pfeil d78cee9680
Address more ZIP 317 fee feedback 2023-04-14 12:58:28 -06:00
Daira Hopwood 6ae7c532ce
Change spelling of prioritisation in an error message
For consistency with the `prioritisetransaction` RPC method.
2023-04-14 19:49:58 +01:00
Kris Nuttycombe 6854c25415
Merge pull request #5993 from str4d/5716-cxx-ed25519
rust: Migrate Ed25519 FFI to `cxx`
2023-04-14 09:37:30 -06:00
str4d c37569c6da
Merge pull request #6551 from str4d/update-deps-5.5.0
Update dependencies one more time for 5.5.0
2023-04-14 07:56:39 +01:00
Greg Pfeil 0b9b5c8dc1
Address review feedback for ZIP 317 fees in wallet 2023-04-13 19:20:10 -06:00
Greg Pfeil c54c4ee987
Adjust wallet absurd fee check for ZIP 317
It now happens async (in `PrepareTransaction`) and ensures that the fee doesn’t
exceed the maximum useful value for a transaction.
2023-04-13 19:16:09 -06:00
Jack Grigg 5e353a9fdb cargo update 2023-04-13 21:02:52 +00:00
Kris Nuttycombe 0b9126a846
Merge pull request #6448 from sellout/zcash-cli-conversion
Improve zcash-cli argument handling
2023-04-13 14:37:18 -06:00
Greg Pfeil 5a7c36c868
Rename Arg* to Param
Some of these are newly-introduced names in this PR, others are ones that I had
renamed from param -> arg in an earlier commit.

Also restores `strMethod` where it had been changed to `method`.
2023-04-13 13:28:28 -06:00
Greg Pfeil 2596b4920b
Fix edge case revealed by #6409
Without `AllowRevealedRecipients`, we can’t send transparent change, but previously we asserted if
we couldn’t get a transparent change address. Now it returns a new `TransparentChangeNotAllowed`
failure, which is just a more specific `TransparentRecipientNotAllowed` to avoid confusion when
there are no explicit unshielded recipients.
2023-04-13 12:47:52 -06:00
Jack Grigg 1f8887e0b6 qa: Postpone dependencies we aren't updating 2023-04-13 17:01:03 +00:00
Jack Grigg b3332c6273 depends: `cxx 1.0.94` 2023-04-13 17:01:03 +00:00
Jack Grigg b1de4909e8 depends: `native_zstd 1.5.5` 2023-04-13 16:47:44 +00:00
Jack Grigg 90b4366824 depends: Rust 1.68.2 2023-04-13 16:43:52 +00:00
Jack Grigg 93dddd2104 depends: CMake 3.26.3 2023-04-13 16:41:19 +00:00
Jack Grigg 30f258e2a6 qa: Fix update checker to handle `native_clang` version format 2023-04-13 16:32:10 +00:00
Kris Nuttycombe 504c63089f
Merge pull request #6548 from str4d/6462-orchard-0.4
Migrate to published `orchard 0.4`
2023-04-12 16:33:00 -06:00
Jack Grigg 002ed29c72 Migrate to published `orchard 0.4`
Part of zcash/zcash#6462.
2023-04-12 21:26:37 +00:00
Kris Nuttycombe 6f59cc9d10
Merge pull request #6545 from sellout/eliminate-ZTXOSelector-cycles
Eliminate LegacyCompat–ZTXOSelector cycle
2023-04-12 14:47:28 -06:00
str4d 6274da265d
Merge pull request #6547 from str4d/fix-cargo-vet
Fix `cargo vet`
2023-04-12 21:38:30 +01:00
Greg Pfeil 0fca843a5b
Simplify some vector initialization
Also simplify some calls to use `tl::make_unexpected`.
2023-04-12 14:20:37 -06:00
Jack Grigg c468437e31 More crate audits 2023-04-12 19:24:23 +00:00
Greg Pfeil 8d6dabd46a
Use examine instead of std::visit 2023-04-12 12:11:49 -06:00
Jack Grigg ad51f74d6e cargo-vet: Switch to Google's aggregated audits 2023-04-12 18:08:37 +00:00
Jack Grigg 878037af6a cargo-vet: Regenerate imports 2023-04-12 18:07:00 +00:00
Jack Grigg 279c82b093 Tell `cargo-vet` to ignore patched dependencies
The book page on Rust is updated to describe how to patch dependencies,
so `cargo-vet` can be kept passing while patches are present.
2023-04-12 18:04:29 +00:00