You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Hydrozoa relies on multi-signed post-dated transactions for two features:
64
64
\begin{itemize}
65
-
\item Refunding a deposit after its deadline (\cref{h:l1-rule-based-transition}).
66
-
\itemTransitioning the head from the multisig regime to the rule-based regime after the multisig regime timeout (\cref{h:l1-rule-based-transition}).
65
+
\item Refunding a deposit after its deadline (\cref{h:l1-rule-based-fallback}).
66
+
\itemFallback to the rule-based regime after the multisig regime timeout (\cref{h:l1-rule-based-fallback}).
67
67
\end{itemize}
68
68
These transactions must be multi-signed because they spend utxos from the head's multisig native address.
69
69
However, they are only intended as a fallback when the peers fail to reach a timely consensus on the preferred alternatives. For this reason, the L2 consensus protocol requires them to be post-dated; in this way, they can be multi-signed ahead of time while the peers can still reach a timely consensus.
This new observer script can classify its spent input as the treasury utxo or a deposit utxo. Then, it can decide whether to allow the rule-based transition or refund by comparing the transaction's time validity lower bound to the datum.
90
+
This new observer script can classify its spent input as the treasury utxo or a deposit utxo. Then, it can decide whether to allow the rule-based fallback or refund by comparing the transaction's time validity lower bound to the datum.
91
91
In other words, it allows a rule-based exit from a state managed by a native script.
Given the somewhat transient nature of state channels and the small numbers, we do not expect this constraint to affect most typical Hydrozoa use cases.
100
100
However, if this becomes a problem, we could explore how to fragment a Hydrozoa head's treasury across multiple utxos.
101
-
Observer scripts are helpful for fragmented treasuries because they facilitate an orderly transition of treasury fragments to the rule-based regime.
101
+
Observer scripts are helpful for fragmented treasuries because they facilitate an orderly fallback of treasury fragments to the rule-based regime.
102
102
103
103
\section{Hydrozoa network and L2 interoperability}%
The Hydrozoa protocol strives to generate L1 transactions deterministically whenever they require consensus from all peers (i.e., in the multisig regime).
9
9
This determinism allows the L2 consensus protocol and block validation procedure to focus on the essential contents of blocks without getting distracted in verifying the minutiae of the blocks' effects expressed as L1 transactions.
10
10
11
-
This determinism is easy to accomplish for a refund (\cref{h:l1-multisig-refund}) and a transition to the rule-based regime (\cref{h:l1-rule-based-transition}) because each of those transactions has a bounded number of inputs/outputs that are guaranteed to fit within Cardano's transaction size limit.
11
+
This determinism is easy to accomplish for a refund (\cref{h:l1-multisig-refund}) and the fallback to the rule-based regime (\cref{h:l1-rule-based-fallback}) because each of those transactions has a bounded number of inputs/outputs that are guaranteed to fit within Cardano's transaction size limit.
12
12
On the other hand, settlement of a major block on L1 (\cref{h:l1-multisig-settlement}) may require a large number of L2 withdrawals to be paid out on L1, such that one or more rollout transactions may be needed to handle its overflow of L1 outputs.
13
13
Finalization (\cref{h:l1-multisig-finalization}) is also unconstrained in the number of L2 withdrawals it can pay out.
\caption[Multisig regime: Initialization tx.]{The Hydrozoa head's peers initialize its treasury utxo with an empty L2 ledger.}
111
+
\label{fig:tx-initialization}
112
+
\end{figure}
113
+
97
114
\section{Deposit}%
98
115
\label{h:l1-multisig-deposit}%
99
116
@@ -117,6 +134,14 @@ \section{Deposit}%
117
134
The \code{refundAddress} and \code{refundDatum} fields define the address and datum to which the deposit's funds should be sent on L1 if the deposit is refunded.
118
135
The funds in the deposit must be sufficient to pay for the refund transaction cost and create the refund utxo.
\caption[Multisig regime: Deposit tx.]{A user places some funds and instructions into a deposit utxo for a Hydrozoa Head.}
142
+
\label{fig:tx-deposit}
143
+
\end{figure}
144
+
120
145
\section{Refund}%
121
146
\label{h:l1-multisig-refund}%
122
147
@@ -132,6 +157,14 @@ \section{Refund}%
132
157
The L2 consensus protocol (\cref{h:l2-consensus-on-refunds}) allows peers to obtain multi-signed post-dated refund transactions before posting their deposits on L1.
133
158
It also allows them to immediately refund any deposits that its rules disqualify from being absorbed into the treasury.
\caption[Multisig regime: Settlement tx.]{The peers absorb some deposits and pay out some withdrawals from the head's treasury.
191
+
A rollout utxo can be produced to defer payout of some withdrawals for later.}
192
+
\label{fig:tx-settlement}
193
+
\end{figure}
194
+
153
195
\section{Finalization}%
154
196
\label{h:l1-multisig-finalization}%
155
197
@@ -164,10 +206,27 @@ \section{Finalization}%
164
206
After the finalization transaction deals with the treasury and immediate/post-dated refund transactions deal with the unabsorbed deposits, no trace of the Hydrozoa head should be left in the L1 ledger.
165
207
Any other utxos that remain at the head's native script address---assumed to be unrelated to the head---can be manually spent by the peers.
\caption[Multisig regime: Finalization tx.]{The peers pay out all remaining funds from the head's treasury.
214
+
A rollout utxo can be produced to defer the payout of some withdrawals for later.}
215
+
\label{fig:tx-finalization}
216
+
\end{figure}
217
+
167
218
\section{Rollout}%
168
219
\label{h:l1-multisig-rollout}%
169
220
170
221
The rollout utxo is spent in a rollout transaction, paying out some more withdrawals, and outputting a new rollout utxo with the aggregate funds of the rest of the withdrawals, if any remain.
171
222
Further rollout transactions spend the shrinking rollout utxo, until all the withdrawals have been paid out (\cref{h:deterministic-rollout-rollouts}).
0 commit comments