feat(contracts): cover the three Platform Verifiers - #39
Conversation
The crate covered NotaryService, CeremonyProofVerifier and GoogleJwtRoots but not the Platform Verifiers they route to, so a deployer had to carry its own copies of the artifacts and sol! interfaces. Vendor the three and bind them: one interface for the two TLSNotary verifiers, which share a surface, and one for Google, whose initializer differs in shape. A unit test pins every bound selector to the vendored methodIdentifiers. Assisted-by: Claude Fable 5.1 Signed-off-by: xgreenx <xgreenx9999@gmail.com>
PlatformVerifierBase refuses a Notary Service that disagrees with what the profile notarizes, a code hash that is not the Honk verifier's, and a parameter over its ceiling — rules a deployer met as an opaque proxy constructor revert. `platform_verifier::Initializer` checks them off chain, reads the code hash, and builds the exact `initialize` call; `deploy_platform_verifier` puts the implementation behind a proxy with it. Assisted-by: Claude Fable 5.1 Signed-off-by: xgreenx <xgreenx9999@gmail.com>
On anvil, against the collaborators each pins. The views prove the initialization took, the Proof Verifier registers each one, the crate's ceilings match the contract's, and the wrapper's refusals are shown to be the contract's own reverts rather than rules of its own. Assisted-by: Claude Fable 5.1 Signed-off-by: xgreenx <xgreenx9999@gmail.com>
|
Should this crate also ship the two bb-generated UltraHonk verifiers? No. Facts:
Cost of doing it here: a committed circuits pin, Recommendation: keep them out. The linking path ( |
The three Platform Verifiers have their sources here but the crate did not carry them, so a deployer (chain-configurations #8) reimplemented
Artifactsand thesol!interfaces to deploy one.Changes
XPlatformVerifier,GitHubPlatformVerifier,GooglePlatformVerifier(COVERED+vendor-artifacts.sh, in sync).bindings::ceremony:TlsNotaryPlatformVerifier(exported asXPlatformVerifierandGitHubPlatformVerifier; one shared surface) andGooglePlatformVerifier, withinitialize, views, setters, ceilings, events, initializer errors.platform_verifier:Initializer::{X,GitHub,Google}checks what__PlatformVerifierBase_initrefuses (notary per profile, zero addresses, ceilings), reads the Honk verifier's code hash off chain (codehash_at) and builds the typedinitializecall;deploy_platform_verifierputs the implementation behind an ERC1967 proxy with it.Error::Initializerfor refusals caught before any transaction.methodIdentifiersandnotarizes()to thelibid-profilestable (path-only dev-dependency, stripped at publish).Verified
forge test: 479 passed.cargo +nightly fmt --check,clippy --all-targets --all-features -D warnings,cargo test --allunderRUSTFLAGS=-D warnings: 9 unit + 5 anvil tests pass (new anvil test 0.5 s);cargo doc -D warningsclean.Not verified / known issues
@libid/contracts(TS) lists no Platform Verifier ABI; out of scope.initializepins a code hash and never callsverify.