op-challenger: never load the absolute prestate for permissioned games#21681
Open
pauldowman wants to merge 5 commits into
Open
op-challenger: never load the absolute prestate for permissioned games#21681pauldowman wants to merge 5 commits into
pauldowman wants to merge 5 commits into
Conversation
Inphi
reviewed
Jul 10, 2026
| provider, err := source(ctx, prestateHash) | ||
| if errors.Is(err, prestates.ErrPrestateUnavailable) { | ||
| logger.Warn("Prestate unavailable, using empty placeholder", "prestateHash", prestateHash, "err", err) | ||
| return vm.NewPrestateProvider("", stateConverter), nil |
Contributor
There was a problem hiding this comment.
what do you think about always returning the empty placeholder, rather than only when the prestate is unavailable.
Contributor
Author
There was a problem hiding this comment.
That's a good idea. There's no reason to even attempt to fetch it if permissioned. Will do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #21470.
When a permissioned game (type 1) is configured with
--prestates-url, op-challenger fetches the game's absolute prestate from that URL keyed by hash. Permissioned games are often configured with a placeholder prestate that isn't published there, so the fetch fails and op-challenger errors out creating the game player — even though it should still resolve the game. (With--cannon-prestate <file>this doesn't happen because the single-file source ignores the hash, hence the--cannon-prestate=any-stringworkaround.)Permissioned games are played only by trusted actors, resolve at the output-root level, and never reach
step(), so their VM prestate is never actually used. Per review feedback, the challenger now never loads the prestate for permissioned games at all (rather than only tolerating a failed fetch):--cannon-prestate/--prestates-url) are no longer required when only the permissioned game type is enabled, at both the CLI-flags and config validation layers, mirroring the existing op-program server relaxation. They are still required whenever the cannon game type is enabled.GameType.IsPermissioned()andCannonFamilyGameTypesingame/typescentralize the "permissioned ⇒ never reaches step()" property (already covering the upcoming SuperPermissionedGameType) and the cannon flag-family membership; the validators derive their own requirements from them instead of taking caller-supplied booleans.