feat(contracts): create a new game requires a proof - #909
Open
alessandromazza98 wants to merge 1 commit into
Open
feat(contracts): create a new game requires a proof#909alessandromazza98 wants to merge 1 commit into
alessandromazza98 wants to merge 1 commit into
Conversation
alessandromazza98
requested review from
0xForerunner,
0xOsiris,
Dzejkop,
Kemperino,
cichaczem,
karankurbur,
kilianglas,
murph and
piohei
as code owners
July 23, 2026 13:00
Kemperino
reviewed
Jul 23, 2026
| } | ||
|
|
||
| /// @notice Records the mandatory proof supplied atomically while the factory creates this game. | ||
| function submitInitialProofLane(uint8 laneId, bytes calldata proof) external { |
Contributor
There was a problem hiding this comment.
cant this be internal and on propose? no reason to have it on ABI / external if it's required only for proposing right??
Kemperino
approved these changes
Jul 23, 2026
Contributor
Author
|
I'm waiting to merge this to understand if we can / want to remove our custom factory and anchor registry as this is useless if we inherit OP contracts |
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.
Closes https://linear.app/worldcoin/issue/PROTO-4996/contracts-creating-a-game-requires-including-one-proof
Next Steps
world-chain-defenderfirst, thenbindings.rsnow and thereforeworld-chain-proposerneeds to be adjusted as well. Here is the linear ticket for this: https://linear.app/worldcoin/issue/PROTO-4995/proposer-it-must-include-a-proof-when-creating-a-gameNote
High Risk
This changes the on-chain proposal entrypoint, L1 origin binding, and mandatory proof-at-creation behavior—core security paths for the proof system; downstream proposer/bindings must adopt the new
proposesignature.Overview
Game creation now requires a valid proof lane and explicit L1 origin metadata, instead of inferring L1 origin from the previous block inside the factory.
proposetakesl1OriginHash,l1OriginNumber,laneId, andproof. The factory checks the origin is in the past, withinblockhash(256 blocks) or EIP-2935 history (8191 blocks), and matches the claimed hash. It deploys the game, then atomically callssubmitInitialProofLane; bad or empty proofs revert the whole transaction so no game is registered.WorldChainProofSystemGameadds factory-onlysubmitInitialProofLane(while stillPROPOSED) and shares lane verification with post-challengesubmitProofLanevia_submitProofLane. Interfaces and tests are updated for the new API and validation paths.Reviewed by Cursor Bugbot for commit 806c2dd. Bugbot is set up for automated code reviews on this repo. Configure here.