Skip to content
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

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

Merged
merged 4 commits into from
Oct 16, 2024

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!

op-challenger/flags/flags.go Outdated Show resolved Hide resolved
@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
55 checks passed
@ajsutton ajsutton deleted the aj/prestates-url branch October 16, 2024 00:14
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