-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make merkle proofs optional on multisig ISM #2173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. Haven't looked at tests yet
solidity/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol
Outdated
Show resolved
Hide resolved
solidity/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipped the contracts for expediency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the diff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-reviewed the contracts, just nits, we're in the home stretch
solidity/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol
Outdated
Show resolved
Hide resolved
solidity/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol
Outdated
Show resolved
Hide resolved
solidity/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just looked at the rust stuff and mostly focused on rust idoms since I think @asaj already looked more at the logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just looked at the rust stuff and mostly focused on rust idioms since I think @asaj already looked more at the logic
Description
Validators currently sign
(root, index)
checkpoints and during verification, amessage
is passed as calldata, anid()
is derived, and aproof
ofid()
atindex
inroot
is verifiedThis provides “all or nothing” censorship resistance guarantees because a validator can only sign roots to allow any contained messages to be processed.
We have considered alternatives where validators sign
message
directly and we lose censorship resistance in exchange for eliminating merkle proof verification gas costs.However, if validators sign
(root, index, message)
tuples, we can skip merkle proof verification on the destination chain while still maintaining censorship resistance by providing two valid metadata formats:message
It’s worth noting the validator is required to index event data to produce this new signature format. However, this does not require historical indexing and new validators being spun up can simply begin indexing from tip.
See #2187 for validator changes
See #2248 for relayer and e2e test changes
Drive-by changes
Merkle index also optional
Related issues
Backward compatibility
Testing
Unit (fuzz) Tests