Skip to content

Conversation

@amiecorso
Copy link
Contributor

@amiecorso amiecorso commented Dec 14, 2025

Summary

Adds simulation-only runtime bytecode and docs for use in producing accurate Verification Gas Limit (VGL) estimates for passkey (WebAuthn) flows via bundler overrides of CoinbaseSmartWallet v1.0.0 implementation.

See #135 for related PR with v1.1.0 simulation bytecode. See README there for additional explanation.

Motivation

Simulations necessarily use invalid passkey signatures. Invalid signatures take different verification paths than real valid signatures onchain, causing large gas deviations. (e.g., RIP-7212 precompile falls back to heavy FCL path during simulation but does not with a valid signature during execution.). This PR provides fake, simulation-friendly bytecode that forces the “valid signature” path so bundlers can estimate VGL accurately without manual buffers, instead passing this simulation bytecode as a state override to the bundler.

What’s in this PR

  • verifySim wired in CoinbaseSmartWallet to ignore provided WebAuthn signature data at the final check and instead use a known-valid P‑256 vector so simulation follows the same path as real execution.
  • Deployed/runtime bytecode exported for bundler overrides:
    • snapshots/SimulationOverrides/CoinbaseSmartWallet.runtime.hex
  • README section explaining purpose, build settings, and usage.

Usage (bundler overrides)

  • During eth_estimateUserOperationGas for passkey flows:
    • Override CoinbaseSmartWallet implementation address(es) with the bytecode in snapshots/SimulationOverrides/CoinbaseSmartWallet.runtime.hex.
    • Affected CoinbaseSmartWallet versions:
      • v1.0.0 (0x000100abaad02f1cfC8Bbe32bD5a564817339E72)
    • Continue providing a dummy signature for calldata parity; verifySim ensures the verification path succeeds to mirror onchain valid-signature behavior.

Simulation-only! Do not deploy

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Dec 14, 2025

🟡 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants