-
Couldn't load subscription status.
- Fork 934
core: add BlockTime to chain config
#607
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: optimism
Are you sure you want to change the base?
Conversation
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.
There is some code that hydrates the chain config from superchain-registry data. That will need to be updated too. And the op-deployer code that generates a genesis config too. cc @bitwiseguy maybe you can help bridge with platforms team here on chain config changes?
|
|
||
| // Seconds per L2 block | ||
| BlockTime uint64 `json:"blockTime,omitempty"` |
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.
It would be good to call this config var out as an op-stack diff with a comment
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.
Done in fed1b3c.
Done in 41cbd5d.
Yeah I was planning to modify op-deployer after this PR is merged. |
Currently L2 block time is available in op-node here, but sadly not available in op-geth.
In the codebase there're many places that actually want the next block time, but it's computed as
parentHead.Time+1, which is not accurate.This PR introduces a
BlockTimefield to chain config and replaces all those places that want the next block time withconfig.NextBlockTime(parentHead.Time).