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

fix(mempool): Stop ignoring new transactions after the mempool is newly activated #6448

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Apr 2, 2023

Motivation

Currently, when Zebra's mempool is newly activated, it skips adding newly verified transactions until the next request.

Instead, the first request to a newly activated mempool should show all available transactions.

This could be related to #6195, but I'm not sure if it is.

Specifications

Mempool transaction selection is a standard rule, so either implementation is valid here.

Solution

Only skip the reset when the mempool is newly activated, rather than skipping all of poll_ready().

Review

This is a routine mempool bug.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added C-bug Category: This is a bug P-Medium ⚡ I-slow Problems with performance or responsiveness I-usability Zebra is hard to understand or use A-mempool Area: Memory pool transactions labels Apr 2, 2023
@teor2345 teor2345 self-assigned this Apr 2, 2023
@teor2345 teor2345 requested a review from a team as a code owner April 2, 2023 23:44
@teor2345 teor2345 requested review from oxarbitrage and removed request for a team April 2, 2023 23:44
@teor2345 teor2345 changed the title Fix: stop ignoring new transactions after the mempool is newly activated fix(mempool): stop ignoring new transactions after the mempool is newly activated Apr 2, 2023
@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #6448 (a2bbf09) into main (5db2243) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6448      +/-   ##
==========================================
+ Coverage   77.78%   77.83%   +0.04%     
==========================================
  Files         304      304              
  Lines       39637    39636       -1     
==========================================
+ Hits        30833    30852      +19     
+ Misses       8804     8784      -20     

@teor2345
Copy link
Contributor Author

teor2345 commented Apr 3, 2023

Temporary error:

ERROR: (gcloud.compute.instances.create-with-container) Could not fetch resource:

  • Internal error. Please try again or contact Google Support. (Code: '5F864782189D7.6B5868C.50A111B')

https://github.com/ZcashFoundation/zebra/actions/runs/4591441080/jobs/8108460458?pr=6448#step:10:83

@teor2345 teor2345 changed the title fix(mempool): stop ignoring new transactions after the mempool is newly activated fix(mempool): Stop ignoring new transactions after the mempool is newly activated Apr 3, 2023
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

Looks good!

mergify bot added a commit that referenced this pull request Apr 3, 2023
@mergify mergify bot merged commit f92db25 into main Apr 3, 2023
@mergify mergify bot deleted the accept-mempool-txs-after-activation branch April 3, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mempool Area: Memory pool transactions C-bug Category: This is a bug I-slow Problems with performance or responsiveness I-usability Zebra is hard to understand or use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants