hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
246 stars 282 forks source link

Update Inboxes to expose `domainHash()` #1002

Closed asaj closed 1 year ago

asaj commented 1 year ago

In the current design, every mailbox has an associated domainHash(), used as a domain separator to ensure that validator signatures cannot be replayed on different mailboxes.

Right now, this domainHash() is stored in the [Out|In]boxValidatorManager contracts. This works because there is a 1:1 mapping between mailboxes and ValidatorManagers; each Mailbox can look to its ValidatorManager for its domainHash.

With the replacement of ValidatorManagers with sovereign ValidatorManagers, this 1:1 mapping will no longer exist; each Mailboxes will not have a single ValidatorManager at which it can query its domainHash().

To address this, we should move domainHash() from the ValidatorManager contracts to the Inbox contracts.

jennifermarie commented 1 year ago

@asaj is this ticket still relevant with the re-scoping of Sovereign Consensus / Hyperlane v2?

asaj commented 1 year ago

Closing in favor of more up to date tickets