@@ -4,7 +4,7 @@ weight = 5
4template = "doc.html"
4template = "doc.html"
7−This document provides technical detail on Azimuth's "Layer 2" scaling solution
7+This document provides technical details on Azimuth's "Layer 2" scaling solution
8for Azimuth, known more formally as "naive rollups". We focus here primarily on the
8for Azimuth, known more formally as "naive rollups". We focus here primarily on the
9"Hoon smart contract" located at `/lib/naive.hoon` in your ship's pier, as well
9"Hoon smart contract" located at `/lib/naive.hoon` in your ship's pier, as well
10as other proximal topis.
10as other proximal topis.
@@ -17,7 +17,8 @@ This is not intended for everyday users who only wish to know how
17to either transfer their ship to layer 2 or perform layer 2 actions. For that,
17to either transfer their ship to layer 2 or perform layer 2 actions. For that,
18see ((bridge documentation yet to be written)). For a casual overview of the
18see ((bridge documentation yet to be written)). For a casual overview of the
19rationale and functionality of layer 2, please see this [blog
19rationale and functionality of layer 2, please see this [blog
20−post](/blog/rollups).
20+post](/blog/rollups). For more information on how Azimuth works more generally,
21+including interactions with Bridge and Ethereum, see the page on [Azimuth data flow](/docs/azimuth/l2-flow).
22This page is also not where to find instruction on how to run your own "aggregator"/"roller".
23This page is also not where to find instruction on how to run your own "aggregator"/"roller".
23Documentation for this process is forthcoming. However, this page does contain
24Documentation for this process is forthcoming. However, this page does contain
@@ -50,7 +51,7 @@ By default, step four always succeeds. It has always been possible in theory for
50your urbit to dispute what it read on Ethereum, but there has never been any
51your urbit to dispute what it read on Ethereum, but there has never been any
51reason to do so.
52reason to do so.
53−### Layer 2
54+### Layer 2 {#layer-2}
55Layer 1 still functions identically today as it did before naive rollups. Naive
56Layer 1 still functions identically today as it did before naive rollups. Naive
56rollups work via the following process.
57rollups work via the following process.
@@ -104,9 +105,12 @@ They are:
104 duplicate information such as which smart contract the transactions are
105 duplicate information such as which smart contract the transactions are
105 intended for.
106 intended for.
107−Put together, these create a reduction in gas costs of at least 65x. This is
108+Put together, these create a reduction in gas costs of at least 65x when adding
108−true even for batches of L2 transactions that contain only a single transaction.
109+a transaction to a sufficiently large batch (approximately 30 or more
109−Thus there is reason to use one's own ship as an aggregator.
110+transactions). A single transaction submitted as a batch is approximately 5x
111+cheaper, while 10 transaction submitted as a batch is approximately 30x cheaper.
112+Thus using one's own ship to submit a single-transaction batch is still a
111### One way trip
115### One way trip
@@ -139,7 +143,8 @@ in the sponsee having no sponsor on layer 1, and layer 2 as well if they were
139the sponsor on layer 2. This is necessary to simplify the logic, but it also
143the sponsor on layer 2. This is necessary to simplify the logic, but it also
140guarantees that there is no hard requirement to ever utilize layer 2. Without
144guarantees that there is no hard requirement to ever utilize layer 2. Without
141this exception, sponsors with sponsees that move to layer 2 would be forced to
145this exception, sponsors with sponsees that move to layer 2 would be forced to
142−detach them as a layer 2 action if they wanted to cease sponsorship.
146+detach them as a layer 2 action if they wanted to cease sponsorship. This would
147+also have an unacceptable impact on ships owned by [smart contracts](#smart-contracts).
144If both sponsor and sponsee are on layer 1 then sponsorship actions may occur on
149If both sponsor and sponsee are on layer 1 then sponsorship actions may occur on
145either layer. As long as all sponsorship actions betweeen the two parties occur
150either layer. As long as all sponsorship actions betweeen the two parties occur
@@ -153,6 +158,12 @@ transitions](#sponsorship-state-transitions) section below, we give a table that
153shows how the sponsor and escape status of a ship changes according to which
158shows how the sponsor and escape status of a ship changes according to which
154actions are taken.
159actions are taken.
161+### Smart contracts {#smart-contracts}
163+Smart contracts are unable to own layer 2 ships, and thus cannot sign layer 2
164+transactions. This creates a hard requirement that layer 1 ships be allowed to
165+perform a layer 1 detach operation on a layer 2 ships.
156## Azimuth state
167## Azimuth state
158The introduction of layer 2 presents additional complication in understanding
169The introduction of layer 2 presents additional complication in understanding
@@ -195,6 +206,9 @@ state held on your ship (Layer 2 Azimuth state) claims that the sponsor of
195sponsor of `~sampel-palnet` was `~marzod` before `~sampel-palnet` was deposited
206sponsor of `~sampel-palnet` was `~marzod` before `~sampel-palnet` was deposited
196to layer 2, and thus the Azimuth PKI on Ethereum will forever reflect this.
207to layer 2, and thus the Azimuth PKI on Ethereum will forever reflect this.
209+For more information on how Azimuth state is handled, including how this
210+integrates with Bridge and Ethereum, see [Azimuth data flow](/docs/azimuth/l2-flow).
198### Sponsorship state transitions
212### Sponsorship state transitions
200When either a sponsor or sponsee is on layer 2, then all sponsorship actions
214When either a sponsor or sponsee is on layer 2, then all sponsorship actions
@@ -312,7 +326,8 @@ immediately creates problems, and the seller's reputation would be tarnished.
312Due to the expense or effort needed to acquire a star, this seems an unlikely
326Due to the expense or effort needed to acquire a star, this seems an unlikely
313scenario as the reward is much less than the cost. Nonetheless, buyers should
327scenario as the reward is much less than the cost. Nonetheless, buyers should
314always make an effort to purchase from a reputable star, as is the case with all
328always make an effort to purchase from a reputable star, as is the case with all
315−transactions in life.
329+transactions in life. If you want to be absolutely sure that you've received the
330+planet, just wait for the batch to be sent and confirmed.
317Multi-keyfiles were possible before layer 2, but as the cost of configuring keys
332Multi-keyfiles were possible before layer 2, but as the cost of configuring keys
318was comparable to the cost of buying a planet, they were not practical.
333was comparable to the cost of buying a planet, they were not practical.