Skip to content

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

Merged
unclezoro merged 1 commit intobnb-chain:developfrom
unclezoro:skip_storage_root_check
Mar 28, 2022
Merged

[R4R] skip verification on account storage root to tolerate with fastnode when doing diffsync#812
unclezoro merged 1 commit intobnb-chain:developfrom
unclezoro:skip_storage_root_check

Conversation

@unclezoro
Copy link
Copy Markdown
Contributor

@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 force-pushed the skip_storage_root_check branch from f28654e to 8f659a9 Compare March 23, 2022 05:04
@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
Copy Markdown
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