-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[R4R] state verification pipeline #795
Merged
unclezoro
merged 30 commits into
bnb-chain:develop
from
forcodedancing:state_verification_pipeline
Mar 28, 2022
Merged
[R4R] state verification pipeline #795
unclezoro
merged 30 commits into
bnb-chain:develop
from
forcodedancing:state_verification_pipeline
Mar 28, 2022
+190
−25
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
forcodedancing
commented
Mar 14, 2022
forcodedancing
commented
Mar 15, 2022
forcodedancing
commented
Mar 15, 2022
unclezoro
reviewed
Mar 16, 2022
unclezoro
reviewed
Mar 16, 2022
unclezoro
reviewed
Mar 16, 2022
unclezoro
reviewed
Mar 16, 2022
unclezoro
reviewed
Mar 16, 2022
unclezoro
reviewed
Mar 16, 2022
unclezoro
reviewed
Mar 16, 2022
NashBC
reviewed
Mar 18, 2022
unclezoro
reviewed
Mar 24, 2022
unclezoro
changed the title
[WIP] state verification pipeline
[R4R] state verification pipeline
Mar 24, 2022
unclezoro
reviewed
Mar 24, 2022
realuncle
reviewed
Mar 24, 2022
setunapo
approved these changes
Mar 24, 2022
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.
LGTM
unclezoro
reviewed
Mar 25, 2022
Let us use a special hash instead of emptyRoot. |
unclezoro
approved these changes
Mar 25, 2022
j75689
approved these changes
Mar 28, 2022
NashBC
reviewed
Mar 28, 2022
unclezoro
pushed a commit
that referenced
this pull request
Mar 29, 2022
* pipeline state verification * update codes and add logs for debug * refactor * update and add logs * refactor * refactor * remove unneeded logs * fix a blocking issue * fix sync issue when force kill * remove logs * refactor based on comments * refactor based on comments * refactor based on comments * refactor based on comments * refactor based on comments * fix a deadlock issue * fix merkle root mismatch issue during sync * refactor based on review comments * remove unnecessary code * remove unnecessary code * refactor based on review comments * change based on comments * refactor * uew dummyRoot to replace emptyRoot * add nil check * add comments * remove unneeded codes * format comments Co-authored-by: forcodedancing <liguo.fudan@gmail.com>
This was referenced Apr 8, 2022
Merged
This was referenced May 25, 2022
This was referenced Oct 12, 2022
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.
Description
Improve the performance of block importing by pipelining state verification, which consumes a big portion of time of block importing.
Rationale
In the previous release, the pipecommit feature is well implemented. Following the pipecommit feature, the pr tries to further pipeline state verification, by moving
AccountsIntermediateRoot
fromValidateState
function toCommit
function.Workflow
Commit Snapshot
will not wait forAccountsIntermediateRoot
(thereby the new snapshot data is not correct)Commit Snapshot
, needed accounts will be populatedAccountsIntermediateRoot
, the snapshot generated will be correctedPerformance
Instances with 8 cores, 64G memory, 2.5T SSD (S1 vs S3)
Importing Time (0.75 quantile)
Before SVP
After SVP (S1 is using SVP)
State Verification Percentage
S3
S1 (S1 is using SVP)
Instances with 16 cores, 64G memory, 7.5T NVME (155 vs 118)
Importing Time (0.75 quantile)
Before SVP
After SVP (155 is using SVP)
State Verification Percentage
118
115 (155 is using SVP)
In general, the performance improvement effect is different on different instance types and different transaction volumes; if there is more time spent on state verification, then the improvement will be more obvious.
Changes
Notable changes:
ValidateState
,Commit
function are changed to support state verification pipeline