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

[R4R] skip verification on account storage root to tolerate with fastnode when doing diffsync #812

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

unclezoro
Copy link
Collaborator

@unclezoro unclezoro commented Mar 23, 2022

Description

The developer proposes a fast node in these PR #640.

And the fast node is adopted by many developers, there is some adaptive work to do to make fast node serve diffsync well.

Rationale

A fast node is a node without MPT(Merkle Patricia Tries, which means the account inside the generated difflayer will not have the correct storageRoot.

Currently, diffsync will check the calculated storageRoot of each account against the storageRoot within the untrusted difflaayer. While this is not necessary to guarantee the correctness of each account, since diffsync will verify the state root of the biggest account MPT, which already guarantees the data consistency. We will remove the redundant check in this PR to be compatible with fast node.

Example

No API changes.

Changes

No

@unclezoro unclezoro changed the title [WIP]skip verification on acccount storage root to tolerate with fastnode [R4R] skip verification on account storage root to tolerate with fastnode when doing diffsync Mar 23, 2022
@unclezoro unclezoro requested a review from keefel March 23, 2022 10:01
Copy link
Contributor

@setunapo setunapo left a comment

Choose a reason for hiding this comment

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

LGTM

@unclezoro unclezoro merged commit 65dc39e into bnb-chain:develop Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants