Updater
Last updated
Last updated
Updater Code:
The Updater is an off-chain agent that does the following:
Observe on the origin chain
Sign attestations to new roots
Publish the signed attestation to the Home
The Home contract permissions an "updater" that must attest to the state of the message tree. The updater places a bond on the home chain and is required to periodically sign attestations (updates or U). Each attestation contains the root from the previous attestation (U_prev), and a new root (U_new).
The Updater maps logically to a single Home contract. Its entire job is to observe the Home to ensure that new messages (and hence new roots) are notarized such that they can be relayed to any number of Replicas.
The Updater listens for events on the Home, and calls functions to perform its job.
Cross-chain applications enqueue messages to be sent by calling on the Home contract. Once the message is enqueued in the Home's message tree, the Home emits the following event:
Updaters listen for these events, and after batching some number of messages (per their SLA), will sign an update over the old root and new root.
At a given time, there is only one Updater enrolled per Home contract. This helps reduce overhead of verification, relative to externally verified systems that require many validators or guardians.
If an Updater ever attempts to commit fraud (by attesting to an invalid root), the Home contract will be set to a failed state, at which point the Updater will be slashed:
Updaters sign attestations off-chain and publish them by calling on the Home contract:
Once the update has been performed, a may relay the new update to on destination chains.
Updaters are selected and enrolled on the Home contract by the , which is established at initialization time.
The UpdaterManager can be changed by calling . This function can only be called by the owner
role, which belongs to .
The function in the UpdaterManager will be implemented when updater bonding and rotation are also implemented in the future.