-
Notifications
You must be signed in to change notification settings - Fork 3.7k
txmgr: replace UseCellProofs
flag with CellProofTime
flag
#17649
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: develop
Are you sure you want to change the base?
Conversation
UseCellProofs
flag with CellProofTime
flag
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.
Could we add some test for this?
ReceiptQueryInterval: 50 * time.Millisecond, | ||
NetworkTimeout: 2 * time.Second, | ||
TxNotInMempoolTimeout: 2 * time.Minute, | ||
CellProofTime: math.MaxUint64, |
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.
Wondering if we will soon need to change this to the L1 Osaka time of the test calling this?
EnvVars: prefixEnvVars("TXMGR_ENABLE_CELL_PROOFS"), | ||
&cli.Uint64Flag{ | ||
Name: CellProofTimeFlagName, | ||
Usage: "Enables cell proofs in blob transactions for Fusaka (EIP-7742) compatibility from the provided unix timestamp. Set to the L1 Fusaka time. May be left blank for Ethereum Mainnet or Sepolia L1s.", |
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.
Usage: "Enables cell proofs in blob transactions for Fusaka (EIP-7742) compatibility from the provided unix timestamp. Set to the L1 Fusaka time. May be left blank for Ethereum Mainnet or Sepolia L1s.", | |
Usage: "Enables cell proofs in blob transactions for Fusaka (EIP-7742) compatibility from the provided unix timestamp. Should be set to the L1 Fusaka time. May be left blank for Ethereum Mainnet or Sepolia L1s.", |
} | ||
|
||
func fallbackToOsakaCellProofTimeIfKnown(chainID *big.Int, cellProofTime uint64) uint64 { | ||
if cellProofTime != math.MaxUint64 { |
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.
Wondering if we want to do
if cellProofTime != math.MaxUint64 { | |
if cellProofTime != defaults.CellProofTime { |
here instead?
if chainID.Cmp(params.MainnetChainConfig.ChainID) == 0 { | ||
if params.MainnetChainConfig.OsakaTime == nil { | ||
return math.MaxUint64 // not yet scheduled, so we never use cell proofs | ||
} else { | ||
return *(params.MainnetChainConfig.OsakaTime) | ||
} | ||
} | ||
|
||
if chainID.Cmp(params.SepoliaChainConfig.ChainID) == 0 { | ||
if params.SepoliaChainConfig.OsakaTime == nil { | ||
return math.MaxUint64 | ||
} else { | ||
return *(params.SepoliaChainConfig.OsakaTime) | ||
} | ||
} |
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.
Could shorten this a bit to
if chainID.Cmp(params.MainnetChainConfig.ChainID) == 0 { | |
if params.MainnetChainConfig.OsakaTime == nil { | |
return math.MaxUint64 // not yet scheduled, so we never use cell proofs | |
} else { | |
return *(params.MainnetChainConfig.OsakaTime) | |
} | |
} | |
if chainID.Cmp(params.SepoliaChainConfig.ChainID) == 0 { | |
if params.SepoliaChainConfig.OsakaTime == nil { | |
return math.MaxUint64 | |
} else { | |
return *(params.SepoliaChainConfig.OsakaTime) | |
} | |
} | |
var osakaTime *uint64 | |
if chainID.Cmp(params.MainnetChainConfig.ChainID) == 0 { | |
osakaTime = params.MainnetChainConfig.OsakaTime | |
} else if chainID.Cmp(params.SepoliaChainConfig.ChainID) == 0 { | |
osakaTime = params.SepoliaChainConfig.OsakaTime | |
} | |
if osakaTime != nil { | |
return *osakaTime | |
} |
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.
And do we want to add Holesky here?
} | ||
// Use configuration to determine whether to enable cell proofs | ||
if sidecar, blobHashes, err = MakeSidecar(candidate.Blobs, m.cfg.EnableCellProofs); err != nil { | ||
useCellProofs := m.cfg.CellProofTime < uint64(time.Now().Unix()) |
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.
Probably good enough for this one-time event.
I'm wondering though how the batcher will behave around the L1 activation time. If a blob tx is being submitted while L1 activates Osaka, there may be RPC errors because of wrong non-cell proofs. How would this play out? Would this error stop the current submission loop and this craftTx
would be entered again?
Closes #17634
Description
Tests
Additional context
Metadata