Skip to content

Conversation

geoknee
Copy link
Contributor

@geoknee geoknee commented Sep 29, 2025

Closes #17634

Description

Tests

Additional context

Metadata

@geoknee geoknee requested a review from a team as a code owner September 29, 2025 14:56
@geoknee geoknee changed the title txmgr: replace UseCellProofs flag with CellProofTime flag txmgr: replace UseCellProofs flag with CellProofTime flag Sep 29, 2025
@geoknee geoknee requested a review from a team as a code owner September 29, 2025 15:54
@geoknee geoknee added the H-l1-fusaka-defense Soft fork for being compatible with an L1 which has activated Fusaka label Sep 29, 2025
Copy link
Member

@sebastianst sebastianst left a 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,
Copy link
Member

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.",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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 {
Copy link
Member

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

Suggested change
if cellProofTime != math.MaxUint64 {
if cellProofTime != defaults.CellProofTime {

here instead?

Comment on lines +489 to +503
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)
}
}
Copy link
Member

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

Suggested change
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
}

Copy link
Member

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())
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H-l1-fusaka-defense Soft fork for being compatible with an L1 which has activated Fusaka
Projects
None yet
Development

Successfully merging this pull request may close these issues.

txmgr: automate the switch to cell proofs when fusaka activates
2 participants