feat(nitro-verifier): add revoker role for automated cert revocation#241
Merged
leopoldjoy merged 2 commits intomainfrom Apr 7, 2026
Conversation
roger-bai-coinbase
approved these changes
Apr 6, 2026
8230502 to
2e5c7cb
Compare
Base automatically changed from
leopoldjoy/chain-3889-add-expiry-aware-intermediate-certificate-caching-to
to
main
April 7, 2026 13:18
An error occurred while trying to automatically change base from
leopoldjoy/chain-3889-add-expiry-aware-intermediate-certificate-caching-to
to
main
April 7, 2026 13:18
Collaborator
✅ Heimdall Review Status
|
Add a dedicated revoker address to NitroEnclaveVerifier that can call revokeCert() without needing the owner multisig key. This enables an automated service (the registrar) to revoke compromised intermediate certificates with minimal latency. A compromised revoker key can only delete cached certs (DoS - increased proving costs), not forge attestations. Low blast radius. Changes: - Add revoker state variable, CallerNotOwnerOrRevoker error, RevokerUpdated event, onlyOwnerOrRevoker modifier - Add initialRevoker parameter to constructor (can be address(0)) - Add setRevoker() owner-only setter - Change revokeCert from onlyOwner to onlyOwnerOrRevoker - Update interface with revoker(), setRevoker(), event, error - 9 new tests for revoker role semantics - Semver: 0.2.0 -> 0.3.0 CHAIN-3890
2e5c7cb to
81a2372
Compare
roger-bai-coinbase
approved these changes
Apr 7, 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.
Summary
revokeraddress toNitroEnclaveVerifierthat can callrevokeCert()without needing the owner multisig keysetRevoker()(owner-only)Problem
NitroEnclaveVerifier.revokeCert()is currentlyonlyOwner(a multisig). If AWS revokes an intermediate cert early (key compromise while still valid), the only mechanism is a manualrevokeCert()call by the owner multisig, adding human latency to incident response.Risk Assessment
A compromised revoker key can only delete cached certs (DoS — increased proving costs since the ZK guest must re-verify more of the certificate chain), not forge attestations. Low blast radius.
Changes
NitroEnclaveVerifier.soladdress public revokerCallerNotOwnerOrRevoker()RevokerUpdated(address indexed newRevoker)onlyOwnerOrRevoker— allows eitherowner()orrevokerinitialRevokerparameter (can beaddress(0)to disable)setRevoker(address): Owner-only setter, emitsRevokerUpdatedrevokeCert(): Changed fromonlyOwnertoonlyOwnerOrRevoker0.2.0→0.3.0INitroEnclaveVerifier.solrevoker() external view returns (address)setRevoker(address) externalrevokeCertnatspecDeployRiscZeroStack.s.soladdress(0)forinitialRevokerTests (
NitroEnclaveVerifier.t.sol)9 new tests (72 total, all passing):
testConstructorSetsRevoker— constructor sets revoker correctlytestConstructorAcceptsZeroRevoker— address(0) disables the roletestRevokerCanRevokeCert— revoker can call revokeCerttestOwnerCanStillRevokeCert— owner retains revokeCert accesstestSetRevoker— owner can update revokertestSetRevokerToZeroDisablesRole— setting to zero prevents old revokertestSetRevokerEmitsEvent— RevokerUpdated event emittedtestSetRevokerRevertsIfNotOwner— non-owner cannot set revokertestSetRevokerRevertsIfCalledByRevoker— revoker cannot set itselftestRevokeCertRevertsIfNotOwnerOrRevoker— unauthorized caller gets CallerNotOwnerOrRevokerRelated