-
Notifications
You must be signed in to change notification settings - Fork 1
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
Validator Signatures #6
base: main
Are you sure you want to change the base?
Conversation
* @notice Emitted when a validator signature is verified | ||
* @dev Used by watchtowers to detect fraudulent validators | ||
* @param domain The origin domain of the Mailbox being validated | ||
* @param mailbox The address of the Mailbox being validated, as bytes32 | ||
* @param root The merkle root that the validator is attesting to | ||
* @param index The message count that the validator is attesting to | ||
* @param signature The 65-byte ECDSA validator signature | ||
*/ | ||
event ValidatorSignature( | ||
uint32 domain, | ||
bytes32 mailbox, | ||
bytes32 root, | ||
uint32 index | ||
bytes signature | ||
); |
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.
seems expensive to emit this for every signature verification
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.
lots of redundant event info every message
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.
Yeah good call, it's about 600 gas to emit the domain/mailbox/root/index, plus another couple hundred for the event itself.
Maybe this would be better? Wdyt?
event ValidatorSignatures(
uint32 domain,
bytes32 mailbox,
bytes32 root,
uint32 index
bytes[] signatures
);
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.
imo domain and mailbox are unnecessary as well
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.
doesn't the root implicitly commit to this?
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.
It does not. Even if did, as a watcher, how would you recover the mailbox/origin domain in order to construct your fraud proof?
No description provided.