Closed horsefacts closed 1 year ago
Coverage after merging horsefacts/v3.1.0 into main will be
100.00% |
---|
File | Stmts | Branches | Funcs | Lines | Uncovered Lines |
---|---|---|---|---|---|
src | |||||
Bundler.sol | 100% | 100% | 100% | 100% | |
FnameResolver.sol | 100% | 100% | 100% | 100% | |
IdGateway.sol | 100% | 100% | 100% | 100% | |
IdRegistry.sol | 100% | 100% | 100% | 100% | |
KeyGateway.sol | 100% | 100% | 100% | 100% | |
KeyRegistry.sol | 98.56% | 94.44% | 100% | 100% | 153, 153 |
RecoveryProxy.sol | 100% | 100% | 100% | 100% | |
StorageRegistry.sol | 100% | 100% | 100% | 100% | |
src/abstract | |||||
EIP712.sol | 100% | 100% | 100% | 100% | |
Guardians.sol | 100% | 100% | 100% | 100% | |
Migration.sol | 100% | 100% | 100% | 100% | |
Nonces.sol | 100% | 100% | 100% | 100% | |
Signatures.sol | 100% | 100% | 100% | 100% | |
src/validators | |||||
SignedKeyRequestValidator.sol | 100% | 100% | 100% | 100% |
Motivation
Ensure that fid registration and key registry adds have associated costs and limits to prevent griefing.
Design goals in priority order:
Change Summary
Changes:
IdGateway
andKeyGateway
.IdRegistry.register
andKeyRegistry.add
maxKeysPerFid
toKeyRegistry
and enforce a key limit per fid.owner
may increase, but not decrease this value.KeyRegistry
migration. This enables us to migrate in existing key metadata, even though signature deadlines may have now expired.Pausable
toGuardians
. Contractowner
may grant multiple guardians authority topause()
, but only theowner
mayunpause()
.custodyOf
reverse mapping toIdRegistry
.Bundler
and add flexible migration toIdRegistry
.KeyRegistry
.Audit fixes:
KeyGateway
altogether. (Fix for Macro L-1)deadline
timestamp as valid in sig verification. (Fix for Macro L-2)extraStorage
inIdGateway
. (Fix for Macro Q-5 and G-2)useNonce
functions to bump nonces. (Partial fix for Macro Q-4, fix for Cyfrin M-1)Refactors:
IdManager
/KeyManager
IdGateway
/KeyGateway
.Move errors and events to interfaces.
Other:
Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewPR-Codex overview
Focus:
This PR focuses on updating various import paths and adding new addresses to the environment variables.
Detailed summary:
ImmutableCreate2Deployer
in multiple scripts.MIGRATOR_ADDRESS
to.env.prod
,.env.example
, and.env.local
.TransferHelper
inStorageRegistry.sol
.INonces
,IMetadataValidator
,ISignatures
,IEIP712
, andIdRegistryLike
.EIP712
inFnameResolver.sol
andSignedKeyRequestValidator.sol
.