Skip to content

feat(contracts): create a new game requires a proof - #909

Open
alessandromazza98 wants to merge 1 commit into
mainfrom
ale/contracts-propose-requires-a-proof
Open

feat(contracts): create a new game requires a proof#909
alessandromazza98 wants to merge 1 commit into
mainfrom
ale/contracts-propose-requires-a-proof

Conversation

@alessandromazza98

@alessandromazza98 alessandromazza98 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Closes https://linear.app/worldcoin/issue/PROTO-4996/contracts-creating-a-game-requires-including-one-proof

Next Steps


Note

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 propose signature.

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.

propose takes l1OriginHash, l1OriginNumber, laneId, and proof. The factory checks the origin is in the past, within blockhash (256 blocks) or EIP-2935 history (8191 blocks), and matches the claimed hash. It deploys the game, then atomically calls submitInitialProofLane; bad or empty proofs revert the whole transaction so no game is registered.

WorldChainProofSystemGame adds factory-only submitInitialProofLane (while still PROPOSED) and shares lane verification with post-challenge submitProofLane via _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.

}

/// @notice Records the mandatory proof supplied atomically while the factory creates this game.
function submitInitialProofLane(uint8 laneId, bytes calldata proof) external {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cant this be internal and on propose? no reason to have it on ABI / external if it's required only for proposing right??

@alessandromazza98

alessandromazza98 commented Jul 24, 2026

Copy link
Copy Markdown
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

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.

2 participants