feat: add proveAndFinalizeWithdrawalTransaction for L3 immediate TEE finality#328
Open
robriks wants to merge 4 commits into
Open
feat: add proveAndFinalizeWithdrawalTransaction for L3 immediate TEE finality#328robriks wants to merge 4 commits into
robriks wants to merge 4 commits into
Conversation
…ons using FinalizationDelays struct to avoid stack too deep, diff cleanup
…fier changes Co-authored-by: Cursor <cursoragent@cursor.com>
dguenther
reviewed
Jun 5, 2026
| } | ||
| if (_input.disputeGameFinalityDelaySeconds == 0) { | ||
| console.log("WARNING: disputeGameFinalityDelaySeconds is 0 - immediate finality mode enabled"); | ||
| } |
There was a problem hiding this comment.
Maybe some sort of configuration guard would be useful to make sure deployers either set all the 'immediate finality mode' flags or none of them?
dguenther
reviewed
Jun 5, 2026
|
|
||
| // This function bypasses the proof maturity delay check enforced by checkWithdrawal. | ||
| // It is only safe to use on chains configured for immediate TEE-backed finality. | ||
| if (PROOF_MATURITY_DELAY_SECONDS != 0) { |
There was a problem hiding this comment.
Does this need to check anchorStateRegistry.disputeGameFinalityDelaySeconds() != 0? Not sure if that's relevant here
dguenther
approved these changes
Jun 5, 2026
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.
This PR demonstrates the minimalist approach for solidity-layer support of the privacy appchain as an L3 settling to the Base L2. The changes are as simple as possible, adjusting only the parameters necessary for the Base stack to be used for an L3 settling to L2, rather than L2 (Base) settling to L1 (Ethereum).
Summary
proveAndFinalizeWithdrawalTransactiontoOptimismPortal2, enabling atomic prove-and-finalize in a single transaction for L3 chains with TEE-backed immediate finality (wherePROOF_MATURITY_DELAY_SECONDS == 0)_verifyWithdrawalProofinternal helper, used by bothproveWithdrawalTransactionand the new combined functionSLOW_FINALIZATION_DELAYandFAST_FINALIZATION_DELAYimmutable constructor parameters inAggregateVerifier(viaFinalizationDelaysstruct) to support L3 configurations with zero-delay finalizationcanProveAndFinalizeview function for off-chain tooling to check preconditionsdeploy-config/local-tee.jsonfor local TEE-enabled devnet deploymentsTesting
proveAndFinalizeWithdrawalTransactionhappy path and all revert conditionsproveWithdrawalTransactionandfinalizeWithdrawalTransactiontests pass (refactor is behavior-preserving)AggregateVerifiertests updated for immutable finalization delays