Skip to content

Simplify and modularize aggregate verifier + verifiers#201

Open
roger-bai-coinbase wants to merge 139 commits intomainfrom
simplify-and-modularize-aggregate-verifier
Open

Simplify and modularize aggregate verifier + verifiers#201
roger-bai-coinbase wants to merge 139 commits intomainfrom
simplify-and-modularize-aggregate-verifier

Conversation

@roger-bai-coinbase
Copy link
Contributor

@roger-bai-coinbase roger-bai-coinbase commented Mar 5, 2026

  • TEE proof can be challenged with a ZK proof using intermediary roots
  • Game can still progress after a TEE nullification or ZK nullification by providing a proof of the un-nulllified system
  • Game can not progress if both proof systems nullified
  • Bond for games that cannot progress are unlocked after 2 weeks from initialization time
  • Nullifying strictly increases resolution time to allow time to intervene
  • Challenges strictly increase resolution time to allow time to nullify the challenge
  • Nullification automatically disables the nullified proof system, preventing further proof verifications from any game

…andling into a single function, improving code clarity and maintainability. Update tests accordingly to reflect the new verification structure.
…ild game in AggregateVerifier. Implement corresponding test case to verify this behavior.
…d rollup configuration. Update verification methods to use a journal hash instead of root claims. Modify MockVerifier and tests accordingly.
…ier, updating documentation and logic to clarify its purpose as the L2 sequence number.
…rnal to public, enhancing accessibility for contract interactions.
…er for consistency with internal function naming conventions.
…nsolidating the return statement for the first dispute game scenario.
leopoldjoy and others added 5 commits March 5, 2026 02:42
* Replace onchain Nitro cert verification with Automata ZK verifier, add ISemver to multiproof contracts, wire SystemConfigGlobal into standard deploy pipeline

* Integrate multiproof config into standard DeployConfig, fix TEEVerifier proof format to match AggregateVerifier's l1head change

* Fix fmt

* Replace aws-nitro-enclave-attestation submodule with no-git dependency in Makefile

* Consolidate deploy configs: migrate dev scripts to standard DeployConfig, add multiproof fields to sepolia.json and hardhat.json, remove separate nitro config files

* Regenerate snapshots for updated and new multiproof contracts

* Fix Initializable test: guard ETHLockbox entries for non-interop deploys, exclude AggregateVerifier (uses custom bool instead of OZ _initialized)

* Add test-multiproof recipe to Justfile for CI

* Address PR feedback: extract GameType local var, stricter pubKey check, iterate PCRs, add nitroEnclaveVerifier to Input, revert sepolia.json owner, remove redundant CI recipe

* Resolve merge conflicts and regenerate semver-lock snapshots

* Regenerate semver-lock with CI profile for correct bytecode hashes

* Regenerate semver-lock with all compiler profiles including dispute

* Regenerate semver-lock.json to remove stale dispute profile entries

* Fix misleading TEEVerifier comment, require nitroEnclaveVerifier in deploy config, and parameterize hardcoded l2ChainID/block intervals in DeployImplementations

* Reset semvar versioning in SystemConfigGlobal

* Regenerate semver-lock.json for SystemConfigGlobal and TEEVerifier changes

* correct SystemConfigGlobal.t.sol testInitialization() test cases to check correct version() number

* use a proof threshold and allow ZK proofs after TEE nullification (#199)

* use a proof threshold and allow ZK proofs after TEE nullification

* pr feedback

* update deployment scripts and tests

* allow tee nullfiication when a zk proof exists. extend timestamp in this case to allow for zk nullification

* Fix stack-too-deep in DeployImplementations and regenerate semver-lock

* add multiproofProofThreshold to DeployConfig.s.sol to fix CI failures

* Correct semver comment

* Regenerate semver-lock following fix

---------

Co-authored-by: roger-bai-coinbase <roger.bai@coinbase.com>
@leopoldjoy
Copy link
Contributor

@roger-bai-coinbase Nit: would it be possible to add a description to the PR? I started reviewing it but ran into some difficulty understanding the objectives (particularly in light of all of the different considerations we've been discussing of late).

@roger-bai-coinbase
Copy link
Contributor Author

@roger-bai-coinbase Nit: would it be possible to add a description to the PR? I started reviewing it but ran into some difficulty understanding the objectives (particularly in light of all of the different considerations we've been discussing of late).

Done

Base automatically changed from joby.thundil/CHAIN-3293-migrate-multiproof-contracts-to-basecontracts to main March 6, 2026 18:06
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Mar 6, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1


emit Proved(gameCreator(), proofType);
// Set the bond recipient to the creator. It can change if challenged successfully.
bondRecipient = gameCreator();
Copy link
Contributor

Choose a reason for hiding this comment

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

So if a challenger counters successfully but the game never resolves, the challenger doesn't get the bond, right? This behaviour seems correct to me, but wanted to confirm expectations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How would the game never resolve after a successful challenge? By successful, I mean the challenge is not later nullified

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I mean if its later nullified. I suppose this is the same case as here, yes?

// Update the expected resolution.
_updateExpectedResolution();
// We purposely increase the resolution to allow for a ZK nullification.
expectedResolution = Timestamp.wrap(uint64(block.timestamp + SLOW_FINALIZATION_DELAY));
Copy link
Contributor

Choose a reason for hiding this comment

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

To confirm, this enables TEE-only resolution following ZK nullification by reverting to the SLOW_FINALIZATION_DELAY timeout (thus potentially causing a total finalisation delay of up to 2 weeks), correct?

Again, this aligns with my expectations of the system, but want to confirm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but the theoretical finalization delay could be forever. E.g. Initialize with ZK -> nullify with ZK -> provide a TEE proof years later

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, but assuming there's no bug in the TEE prover, and the collective Multiproving system is progressing on single-path TEE-only finality, then a TEE proof would need to be provided in order to enable L2 -> L1 finality to progress at all, no? Obviously if we transitioned to the permissioned game then this also wouldn't be relevant.

As I see it, this theoretical indefinite finalisation delay only applies if L2 -> L1 finality has altogether stopped progressing.

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.

5 participants