op-challenger: Introduce --prestates-url to specify prestates source for all game types at once #12440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.