-
Notifications
You must be signed in to change notification settings - Fork 236
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 concurrency issue for RBF #4258
Merged
quake
merged 4 commits into
nervosnetwork:develop
from
chenyukang:yukang-fix-rbf-parallel-issue
Dec 11, 2023
Merged
Fix concurrency issue for RBF #4258
quake
merged 4 commits into
nervosnetwork:develop
from
chenyukang:yukang-fix-rbf-parallel-issue
Dec 11, 2023
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
chenyukang
force-pushed
the
yukang-fix-rbf-parallel-issue
branch
2 times, most recently
from
December 6, 2023 08:52
abf43cf
to
55b13da
Compare
eval-exec
reviewed
Dec 6, 2023
chenyukang
force-pushed
the
yukang-fix-rbf-parallel-issue
branch
5 times, most recently
from
December 6, 2023 09:17
3e520a5
to
cc32b91
Compare
driftluo
approved these changes
Dec 7, 2023
quake
requested changes
Dec 7, 2023
chenyukang
force-pushed
the
yukang-fix-rbf-parallel-issue
branch
2 times, most recently
from
December 7, 2023 07:40
8902947
to
903a91e
Compare
quake
approved these changes
Dec 10, 2023
chenyukang
force-pushed
the
yukang-fix-rbf-parallel-issue
branch
from
December 11, 2023 02:41
903a91e
to
9985696
Compare
quake
approved these changes
Dec 11, 2023
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Dec 11, 2023
chenyukang
force-pushed
the
yukang-fix-rbf-parallel-issue
branch
from
December 11, 2023 05:35
dfd8908
to
f80d6b5
Compare
chenyukang
force-pushed
the
yukang-fix-rbf-parallel-issue
branch
from
December 11, 2023 05:45
f80d6b5
to
c0e7795
Compare
Closed
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.
What problem does this PR solve?
Problem Summary:
When multiple conflicted
tx
are added intotxpool
at the same time, because multiple threads may access same old data,resolve_tx
may not resolve the conflicted tx toDead
, thencheck_rbf
will be skipped, spec testRbfConcurrency
is added to reproduce this scenario.What is changed and how it works?
In this PR,
check_rbf
is moved tosubmit_entry
, which will be guarded with awrite
lock, this change will make sure there is no double-spending tx inPending
, and with an extra benefit that onlytx
passedverify_rtx
may invokecheck_rbf
.What's Changed:
Related changes
owner/repo
:Check List
Tests
Side effects
Release note