-
Notifications
You must be signed in to change notification settings - Fork 900
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
Update sync pipelines to continue from era1 import #8403
base: main
Are you sure you want to change the base?
Update sync pipelines to continue from era1 import #8403
Conversation
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
…ormat-to-blocks-importer
Signed-off-by: Matilda Clerke <[email protected]>
…ormat-to-blocks-importer
Signed-off-by: Matilda Clerke <[email protected]>
… running Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
…ormat-to-blocks-importer
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda-Clerke <[email protected]>
…test Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
…files Signed-off-by: Matilda Clerke <[email protected]>
…sync after importing era1 files Signed-off-by: Matilda Clerke <[email protected]>
…era1-import Signed-off-by: Matilda-Clerke <[email protected]>
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.
is it correct
} else if (protocolContext | ||
.getWorldStateArchive() | ||
.getWorldState() | ||
.rootHash() | ||
.equals(Hash.EMPTY_TRIE_HASH)) { |
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.
try to understand the change, should not this condition be negated? I mean if the root hash is not empty?
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.
Hmm, you're right. We should be checking that the root hash is not empty. I guess this indicates that actually it's not currently set to the EMPTY_TRIE_HASH
. I'll have to figure out what it's actually returning and check for that.
… starting sync pipelines Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda Clerke <[email protected]>
protected static final Hash GENESIS_STATE_ROOT = | ||
Hash.fromHexString("0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"); |
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.
Should not this depend on the actual network or genesis used, so the value can change, maybe @matkt has suggestion on how to check if the world state is empty
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.
Good point. I'm not sure anyone really cares about the ability to import era1 files on sepolia, but it could be useful for testing. Afaik, we don't really know which network the era1 files we're importing are for, so I could add --network and --data-path to allow people to better specify what they're doing. The network option would allow us to just check a different genesis state root, but alternative ways of checking whether a sync is already completed might be preferable
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.
to check if the initial sync is done you can use
besu/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/state/SyncState.java
Line 319 in b7a0b91
public boolean isInitialSyncPhaseDone() { |
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.
yes clearly it's not good like that. So when we are passing this code the state is not empty and has the genesis modification already ?
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.
if it is the case why not using ?
Hash genesisStateRoot = protocolContext.getBlockchain().getGenesisBlock().getHeader().getStateRoot()
PR description
Update FAST sync and derivatives to sync after previously importing blocks from era1 files
Fixed Issue(s)
#7935