-
Notifications
You must be signed in to change notification settings - Fork 106
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(rpc): Avoid re-verifying transactions in blocks if those transactions are in the mempool #8951
Open
arya2
wants to merge
7
commits into
main
Choose a base branch
from
avoid-reverifying-mined-mempool-txs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
Oct 19, 2024
arya2
force-pushed
the
avoid-reverifying-mined-mempool-txs
branch
from
October 19, 2024 05:10
3633bb6
to
837c077
Compare
github-actions
bot
added
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
labels
Oct 19, 2024
arya2
changed the title
change(rpc): Avoid re-verifying transactions for the block verifier that are present in the mempool
change(rpc): Avoid re-verifying transactions in blocks that are present in the mempool
Oct 19, 2024
arya2
changed the title
change(rpc): Avoid re-verifying transactions in blocks that are present in the mempool
change(rpc): Avoid re-verifying transactions in blocks if those transactions that are present in the mempool
Oct 19, 2024
arya2
changed the title
change(rpc): Avoid re-verifying transactions in blocks if those transactions that are present in the mempool
change(rpc): Avoid re-verifying transactions in blocks if those transactions are in the mempool
Oct 19, 2024
arya2
force-pushed
the
avoid-reverifying-mined-mempool-txs
branch
from
November 19, 2024 06:09
c902901
to
1d63b0e
Compare
arya2
removed
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
Nov 22, 2024
github-actions
bot
added
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
Nov 22, 2024
arya2
force-pushed
the
avoid-reverifying-mined-mempool-txs
branch
from
November 22, 2024 19:53
e1a3691
to
e0861ec
Compare
oxarbitrage
previously approved these changes
Nov 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how the problem is resolved in this pull request. The code and logic looks good and the test too. I left a few minor and optional comments and a question.
arya2
force-pushed
the
avoid-reverifying-mined-mempool-txs
branch
from
December 3, 2024 17:37
e0861ec
to
4d16805
Compare
arya2
added
do-not-merge
Tells Mergify not to merge this PR
and removed
do-not-merge
Tells Mergify not to merge this PR
labels
Dec 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We want the transaction verifier to avoid re-verifying transactions for the block verifier that have already been verified for the mempool.
Closes #5674.
Solution
transaction_hash
andknown_outpoint_hashes
fields ontransaction::Request::Block
.try_find_verified_unmined_tx()
method on the transaction verifier which queries the mempool for the transaction, then checks that all of its dependencies are present in the set ofknown_outpoint_hashes
.Tests
skips_verification_of_block_transactions_in_mempool
testPR Author's Checklist
PR Reviewer's Checklist