Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ZIP 401 mempool limiting to use conventional fee and new constants #6564

Merged
merged 2 commits into from
Apr 17, 2023

Conversation

daira
Copy link
Contributor

@daira daira commented Apr 16, 2023

  1. Apply the ZIP 401 low_fee_penalty to transactions paying below the ZIP 317 conventional fee, rather than to transactions paying below the previous ZIP 313 default fee of 1000 zatoshis.

  2. Change ZIP 401 mempool limiting to use constants decided in ZIP 401: Increase the minimum eviction cost to avoid penalizing Orchard zips#565

    In a ZIP sync meeting with @daira, @arya2, @teor2345, and @sellout (@nuttycom was also present but had to leave before these decisions were made), 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.

fixes #6518

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
@daira daira added I-dos Problems and improvements with respect to Denial-of-Service. F-tx-fees Feature: Transaction fees A-mempool Area: Mempool labels Apr 16, 2023
@daira daira marked this pull request as ready for review April 16, 2023 14:27
@daira daira added the safe-to-build Used to send PR to prod CI environment label Apr 16, 2023
@ECC-CI ECC-CI removed the safe-to-build Used to send PR to prod CI environment label Apr 16, 2023
nuttycom
nuttycom previously approved these changes Apr 16, 2023
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 060a4673ae167f98ed62f3c8a5b17f728d90aa6d

@daira daira requested a review from nuttycom April 16, 2023 19:01
@daira daira added the safe-to-build Used to send PR to prod CI environment label Apr 16, 2023
@ECC-CI ECC-CI removed the safe-to-build Used to send PR to prod CI environment label Apr 16, 2023
…s#565.

fixes zcash#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>
@daira daira added the safe-to-build Used to send PR to prod CI environment label Apr 16, 2023
@ECC-CI ECC-CI removed the safe-to-build Used to send PR to prod CI environment label Apr 16, 2023
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@str4d str4d added this to the Release 5.5.0 milestone Apr 17, 2023
@str4d str4d merged commit ebc042b into zcash:master Apr 17, 2023
@daira daira deleted the zip401-updates branch April 17, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mempool Area: Mempool F-tx-fees Feature: Transaction fees I-dos Problems and improvements with respect to Denial-of-Service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change ZIP 401 mempool limiting to use conventional fee and new constants
4 participants