Skip to content

feat: let rollup configure min base fee#10

Draft
wlawt wants to merge 58 commits intodevelopfrom
configurable-min-basefee
Draft

feat: let rollup configure min base fee#10
wlawt wants to merge 58 commits intodevelopfrom
configurable-min-basefee

Conversation

@wlawt
Copy link
Owner

@wlawt wlawt commented Jul 21, 2025

WIP

This PR lets the rollup configure the minimum base fee log2

TODO:

  • How to re-generate the op-e2e/bindings?
  • Finish the logic to pass in the configurable from SystemConfig into the EIP1559Params
  • More testing everywhere? (to also confirm if above ^ was done correctly)
  • Take the log2

@wlawt wlawt force-pushed the configurable-min-basefee branch from 34fe331 to 56100a8 Compare July 22, 2025 14:08
@wlawt wlawt force-pushed the configurable-min-basefee branch from 4a51776 to 6226558 Compare July 25, 2025 15:01
denominator, elasticity uint64
minBaseFeeLog2 uint8
)
if len(extraData) == 10 {
Copy link
Owner Author

Choose a reason for hiding this comment

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

not sure if there was a way to do rollup.IsJovian

Copy link

Choose a reason for hiding this comment

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

oof. This code makes it clearer why DecodeHoloceneExtraData behaves the way it does with return values of 0, 0 when the extra data doesn't fit the Holocene format. In this context, maybe we've implemented DecodeMinBaseFeeExtraData incorrectly. I think we should update it to check if len(extra) == 9 and call the earlier DecodeHoloceneExtraData function to get the denominator and elasticity, and add zero as the third return value for minimum base fee. We'd also want to update the doc comment to indicate that it makes a best effort to decode the extra data for every block in the chain's history, including before the minimum base fee was implemented.

With those changes, we can remove the length check here and just call DecodeMinBaseFeeExtraData.

Copy link
Owner Author

Choose a reason for hiding this comment

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

done

@wlawt wlawt requested a review from niran July 25, 2025 19:47
// So we translate it here.
extraData := invalidatedBlock.ExecutionPayload.ExtraData
denominator, elasticity := eip1559.DecodeHoloceneExtraData(extraData)
denominator, elasticity, minBaseFeeLog2 := eip1559.DecodeMinBaseFeeExtraData(extraData)
Copy link
Owner Author

Choose a reason for hiding this comment

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

@niran this looks much better

@niran
Copy link

niran commented Jul 28, 2025

Let's open this RP upstream for visibility.

@wlawt wlawt force-pushed the configurable-min-basefee branch 4 times, most recently from 6ce75e9 to 279ca8e Compare August 8, 2025 13:57
@wlawt wlawt force-pushed the configurable-min-basefee branch from ed3dc9b to 7f9a1a7 Compare August 20, 2025 20:21
@wlawt wlawt force-pushed the configurable-min-basefee branch 4 times, most recently from 9ea7697 to 12e4a5f Compare September 2, 2025 17:59
@wlawt wlawt force-pushed the configurable-min-basefee branch from 12e4a5f to 0a0052a Compare September 11, 2025 20:38
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