-
Notifications
You must be signed in to change notification settings - Fork 20
flag to determine if calculating state root #241
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
base: main
Are you sure you want to change the base?
flag to determine if calculating state root #241
Conversation
ctx.metrics | ||
.flashblock_byte_size_histogram | ||
.record(flashblock_byte_size as f64); | ||
if !is_doing_historical_sync { |
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.
solves the issue that it'd stream out flashblocks while historical syncing
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.
How exactly does it happen? As i understand if we are doing historical syncing we will answer SYNCING to FCU with attributes and don't start block building job
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.
IIRC that's when you are doing EL sync, for us we are still doing CL sync so this happens somehow
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.
does CL sync need to trigger a block building job? Can't you short circuit the block building much earlier during CL sync
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.
I'm not sure why it triggers but payload builder does get used during CL historical sync
What do you mean by short circuit the block building
?
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.
Only FCU w/ attr will initiate job creating
Are you replaying ALL cl historical calls (including FCU w/ attr and getPayload's)?
I think you should filter them out when you perform CL sync
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.
are there no websocket tests to check the block didn't compute state root when flashblocks_calculate_state_root = false? Also I don't think you need to specify this config here since it has a default
@@ -214,6 +219,12 @@ where | |||
|
|||
let chain_spec = self.client.chain_spec(); | |||
let timestamp = config.attributes.timestamp(); | |||
let is_doing_historical_sync = timestamp < current_timestamp; | |||
let calculate_state_root = if is_doing_historical_sync { |
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.
why do we need to build blocks and calculate the state root during historical sync?
📝 Summary
On Base Mainnet we don't calculate state root per flashblock, we control this with a flag. It only calculates state root when doing historical sync as it's necessary.
For calculate state root, it does via rollup-boost and op-geth. flashbots/rollup-boost#381
💡 Motivation and Context
✅ I have completed the following steps:
make lint
make test