[DO NOT MERGE] Simulation-only verifySim for use in VGL estimation bundler bytecode overrides
#72
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.
Problem
verifydoesn’t fix VGL estimation:Approach
verifySim(simulation‑only): ignores caller inputs and uses a known‑valid P‑256 vector. If RIP‑7212 is present, it succeeds there via the precompile, otherwise falls back to FCL using the conservatively high-gas vector.What changed
WebAuthn.sol: addverifySim, a simulation-only version ofverifythat uses a hardcoded successful P‑256ri max‑gas vector.test/fixtures/fcl_gas_profile.csvandtest/fixtures/fcl_gas_hist.html; commit artifacts to show work.Why this works
Validate
verifySimin your bundler sim; VGL should be stable and conservative.verifySimreturnstrueeven when fed an invalid signature.Gas usage for test vectors
The difference between the highest- and lowest-gas-consuming vectors is about 17,000 gas. Given that the full gas cost for a call to

verifyis roughly 250,000 gas (see benchmarks here, without RIP7212), a potential overestimation by 17,000 gas is only about a 7% overestimation for the call toWebAuthn.verify, and an even smaller percentage of the total gas required for the full ERC-4337 verification path. Therefore it is safe to use the maximum-gas vector for the FCL simulation without being likely to trigger the bundler's gas efficiency requirements (which typically tolerates closer to 50% overestimation for VGL above the actual VG used).