Skip to content

op-challenger: Introduce --prestates-url to specify prestates source for all game types at once#12440

Merged
ajsutton merged 4 commits intodevelopfrom
aj/prestates-url
Oct 16, 2024
Merged

op-challenger: Introduce --prestates-url to specify prestates source for all game types at once#12440
ajsutton merged 4 commits intodevelopfrom
aj/prestates-url

Conversation

@ajsutton
Copy link
Contributor

Description

Since prestates are downloaded based on their state hash, states for different VMs can be downloaded from the same source to simplify configuration and managed. The new --prestates-url option makes this possible and is used as the source of prestates if not overridden by a VM specific option.

Since --prestates-url gets inherited for all VMs, the config now allows setting both ...AbsolutePreState and ...AbsolutePreStateBaseURL options with the ...AbsolutePreState option taking precedence. This ensures you can use --prestates-url but still override a specific game type to use a fixed prestate file.

The aim is to make configuration much more generic so supporting new game types is easier.

Tests

Added unit tests and updated existing ones for changed behaviour.

@ajsutton
Copy link
Contributor Author

The VMFlag util is new here. I think it will help remove a whole bunch of vm specific code so will refactor most of the duplicated VM flags to use it as a follow up.

Copy link
Contributor

@mbaxter mbaxter left a comment

Choose a reason for hiding this comment

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

lgtm!

@ajsutton ajsutton enabled auto-merge October 16, 2024 00:00
@ajsutton ajsutton added this pull request to the merge queue Oct 16, 2024
Merged via the queue into develop with commit cb9e667 Oct 16, 2024
@ajsutton ajsutton deleted the aj/prestates-url branch October 16, 2024 00:14
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…for all game types at once (ethereum-optimism#12440)

* op-challenger: Introduce --prestates-url to specify prestates source for all game types at once.

* op-challenger: Add required config validation for asterisc kona.

Allow specify both prestate and prestates url to allow overriding. Prestate takes priority.

* op-challenger: Introduce vm-flag to make default with overrides pattern easier.

* op-challenger: Add vm type info to override flags.
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