Skip to content

Conversation

@blockchaindevsh
Copy link
Collaborator

@blockchaindevsh blockchaindevsh commented Nov 21, 2025

Skip refundIsthmusOperatorCost() during gas estimation (when shouldCheckGasFormula is false) since operator cost wasn't pre-charged.

Fixes QuarkChain/optimism#130

UPDATE

l1 cost has the same issue, so also fixed.

}

if rules.IsOptimismIsthmus {
if rules.IsOptimismIsthmus && shouldCheckGasFormula {
Copy link

Choose a reason for hiding this comment

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

It seems that the original logic is changed if we add shouldCheckGasFormula here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

shouldCheckGasFormula is always true within consensus; it's only false for api calls like estimate_gas .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Strictly speak, this is an upstream issue, there's a related but un-merged pr here: ethereum-optimism#599 .

Copy link

@qzhodl qzhodl left a comment

Choose a reason for hiding this comment

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

LGTM

@blockchaindevsh
Copy link
Collaborator Author

blockchaindevsh commented Nov 22, 2025

would like to also hear @qizhou 's opinion before merging.

return nil, fmt.Errorf("optimism l1 cost overflows U256: %d", l1Cost)
}
if shouldCheckGasFormula {
if shouldCheckGasFormula {
Copy link

Choose a reason for hiding this comment

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

I guess you can put all shouldCheckGasFormula checks in one condition check rather than multiple ones.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, done!

@blockchaindevsh blockchaindevsh merged commit e888082 into op-es Nov 26, 2025
1 check failed
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.

Local go test failure: Test_ProgramAction_OperatorFeeConsistency/JunkClaim-StateRefund-jovian

5 participants