Comment on page
The Home (contract code) is the core contract deployed on all chains that wish to send outbound messages. It serves as the "outbox" for all applications and users sending messages from the chain it is deployed on.
Nomad creates an authenticated data structure via the Home, and relays updates to that data structure on any number of Replicas deployed on destination chains. As a result, the Home and all Replicas will agree on the state of the data structure. By embedding data ("messages") in this data structure we can propagate it between chains with a high degree of confidence.
As described above, the primary data structure is the message tree. The Home enforces rules on the creation of this data structure. In the current design, this data structure is a sparse Merkle tree based on the design used in the Eth2 deposit contract. This tree commits to the vector of all previous messages.
The Home contract enforces an addressing and message scheme for messages and calculates the tree root. This root is what is relayed to Replicas.
The Home also maintains a queue of roots (one for each enqueued message). The Home must maintain a list of roots in order to provide data availability. By doing so, it makes it trivial to prove fraud.
Any Watcher can flag fraud on the Home chain if it sees two conflicting updates (
U_i_prev == U_i'_prev && U_i_new != U_i'_newor a single update where
U_newis not an element of the queue. The new root MUST be a member of the queue. E.g a list of updates
U_ishould follow the form [(A, B), (B, C), (C, D)...].
Semantically, updates represent a batch commitment to the messages between the two roots. Updates contain one or more messages that ought to be propagated to Replicas. Updates may occur at any frequency, as often as once per message. Because updates are chain-independent, any Home's update may be presented to any Replica. In other words, data availability of signed updates is guaranteed by the Home contract deployed on each sending chain.