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

replace "enable_l2_blob" with "l2BlobTime" #60

Merged
merged 3 commits into from
Sep 18, 2024
Merged

Conversation

blockchaindevsh
Copy link
Collaborator

This PR replace "enable_l2_blob" with "l2BlobTime", following geth upgrade style.

@@ -362,13 +362,13 @@ func BuildBlocksValidator(log log.Logger, cfg *rollup.Config, runCfg GossipRunti

if blockVersion.HasBlobProperties() {
// [REJECT] if the block is on a topic >= V3 and has a blob gas used value that is not zero
if payload.BlobGasUsed == nil || (!cfg.IsL2BlobEnabled() && *payload.BlobGasUsed != 0) {
if payload.BlobGasUsed == nil || (!cfg.IsL2Blob(uint64(payload.Timestamp)-cfg.BlockTime) && *payload.BlobGasUsed != 0) {
Copy link

Choose a reason for hiding this comment

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

Why we need to subtract the blockTime (2s) here?

Copy link
Collaborator Author

@blockchaindevsh blockchaindevsh Sep 17, 2024

Choose a reason for hiding this comment

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

Because the geth side is always checking against the parent block to test HF activation of the current block. That's why the parameter for IsL2Blob is named parentTime.

@blockchaindevsh blockchaindevsh force-pushed the rm_enable_l2_blob branch 2 times, most recently from 79effd6 to 73b58c0 Compare September 18, 2024 01:54
@blockchaindevsh
Copy link
Collaborator Author

blockchaindevsh commented Sep 18, 2024

@qizhou The latest commit moves L2BlobTime to ChainConfig, and changed DeployConfig.L2BlobTime to DeployConfig.L2GenesisBlobTimeOffset.

EnableL2Blob bool `json:"enable_l2_blob,omitempty"`
DACURLS []string `json:"dac_urls,omitempty"`
L2GenesisBlobTimeOffset *hexutil.Uint64 `json:"l2GenesisBlobTimeOffset,omitempty"`
DACURLS []string `json:"dac_urls,omitempty"`
Copy link

Choose a reason for hiding this comment

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

As I understand it, we might want to remove the DACURLS from the rollup configuration, or do we want to do it in a seprate PR?

Copy link
Collaborator Author

@blockchaindevsh blockchaindevsh Sep 18, 2024

Choose a reason for hiding this comment

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

Yeah, there's a separate issue for that(no PR yet).

@blockchaindevsh
Copy link
Collaborator Author

@qizhou There's a commit after your first approval, after you approve again, I'll merge and create another PR that moves DAC away from rollup config(which is depending on this PR being merged first).

@blockchaindevsh blockchaindevsh merged commit 85befd5 into op-es Sep 18, 2024
2 checks passed
@blockchaindevsh blockchaindevsh deleted the rm_enable_l2_blob branch September 18, 2024 23:01
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.

3 participants