2021-12-03 18:11:15 +03:00
|
|
|
:: dice: structures for Azimuth L2 rollers
|
2021-07-22 07:34:42 +03:00
|
|
|
::
|
2021-05-21 16:07:08 +03:00
|
|
|
/+ naive, ethereum
|
|
|
|
::
|
|
|
|
|%
|
2021-12-03 18:11:15 +03:00
|
|
|
+$ owner [=proxy:naive =address:naive]
|
|
|
|
+$ owners (jug owner ship)
|
|
|
|
+$ sponsors (map ship [residents=(set ship) requests=(set ship)])
|
|
|
|
+$ history (map address:ethereum (tree hist-tx))
|
azimuth: fetch snapshot on boot
Previously, the initial Azimuth snapshot was stored in Clay and shipped
in the pill. This causes several problems:
- It bloats the pill
- Updating the snapshot added large blobs to Clay's state. Even now
that tombstoning is possible, you don't want to have to do that
regularly.
- As a result, the snapshot was never updated.
- Even if you did tombstone those files, it could only be updated as
often as the pill
- And those updates would be sent over the network to people who didn't
need them
This moves the snapshot out of the pill and refactors Azimuth's
initialization process. On boot, when app/azimuth starts up, it first
downloads a snapshot from bootstrap.urbit.org and uses that to
initialize its state. As before, updates after this initial snapshot
come from an Ethereum node directly and are verified locally.
Relevant commands are:
- `-azimuth-snap-state %filename` creates a snapshot file
- `-azimuth-load "url"` downloads and inits from a snapshot, with url
defaulting to https://bootstrap.urbit.org/mainnet.azimuth-snapshot
- `:azimuth &azimuth-poke-data %load snap-state` takes a snap-state any
way you have it
Note the snapshot is downloaded from the same place as the pill, so this
doesn't introduce additional trust beyond what was already required.
When remote scry is released, we should consider allowing downloading
the snapshot in that way.
2022-07-01 08:55:57 +03:00
|
|
|
+$ events (list event-log:rpc:ethereum)
|
2022-10-26 06:01:32 +03:00
|
|
|
+$ net ?(%mainnet %ropsten %goerli %local %default)
|
2021-12-03 18:11:15 +03:00
|
|
|
+$ snap-state [%0 =id:block:jael nas=^state:naive =owners =sponsors]
|
2021-11-07 12:36:46 +03:00
|
|
|
::
|
|
|
|
+$ config
|
|
|
|
$% [%frequency frequency=@dr]
|
2021-12-10 13:36:45 +03:00
|
|
|
[%fallback gas=@ud]
|
2021-11-07 12:36:46 +03:00
|
|
|
[%setkey pk=@]
|
|
|
|
[%endpoint endpoint=@t =net]
|
|
|
|
[%resend-time time=@dr]
|
|
|
|
[%update-rate rate=@dr]
|
|
|
|
[%slice slice=@dr]
|
|
|
|
[%quota quota=@ud]
|
|
|
|
==
|
2021-07-22 07:34:42 +03:00
|
|
|
::
|
2021-11-10 19:46:22 +03:00
|
|
|
+$ indices
|
2021-11-24 17:31:59 +03:00
|
|
|
$: own=owners
|
2021-11-10 19:46:22 +03:00
|
|
|
spo=sponsors
|
|
|
|
==
|
|
|
|
::
|
2021-11-04 11:54:25 +03:00
|
|
|
+$ azimuth-config
|
|
|
|
$: refresh-rate=@dr
|
|
|
|
==
|
|
|
|
::
|
2021-06-29 08:45:44 +03:00
|
|
|
+$ roller-config
|
|
|
|
$: next-batch=time
|
|
|
|
frequency=@dr
|
2021-11-04 11:54:25 +03:00
|
|
|
resend-time=@dr
|
|
|
|
update-rate=@dr
|
2021-06-29 08:45:44 +03:00
|
|
|
contract=@ux
|
|
|
|
chain-id=@
|
2021-11-06 12:27:00 +03:00
|
|
|
slice=@dr
|
|
|
|
quota=@ud
|
2021-06-29 08:45:44 +03:00
|
|
|
==
|
|
|
|
::
|
2021-05-21 16:07:08 +03:00
|
|
|
+$ keccak @ux
|
|
|
|
::
|
2021-08-04 16:53:57 +03:00
|
|
|
+$ status
|
2021-10-16 13:47:39 +03:00
|
|
|
?(%unknown %pending %sending %confirmed %failed %cancelled)
|
2021-08-04 16:53:57 +03:00
|
|
|
::
|
2021-05-21 16:07:08 +03:00
|
|
|
+$ tx-status
|
2021-08-04 16:53:57 +03:00
|
|
|
$: =status
|
2021-05-21 16:07:08 +03:00
|
|
|
pointer=(unit l1-tx-pointer)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ l1-tx-pointer
|
|
|
|
$: =address:ethereum
|
|
|
|
nonce=@ud
|
|
|
|
==
|
|
|
|
::
|
2021-06-16 18:03:21 +03:00
|
|
|
+$ l2-tx
|
|
|
|
$? %transfer-point
|
|
|
|
%spawn
|
|
|
|
%configure-keys
|
|
|
|
%escape
|
|
|
|
%cancel-escape
|
|
|
|
%adopt
|
|
|
|
%reject
|
|
|
|
%detach
|
|
|
|
%set-management-proxy
|
|
|
|
%set-spawn-proxy
|
|
|
|
%set-transfer-proxy
|
|
|
|
==
|
|
|
|
::
|
2021-08-22 19:23:30 +03:00
|
|
|
+$ update
|
2021-11-28 18:37:06 +03:00
|
|
|
$% [%tx =pend-tx =status]
|
|
|
|
::
|
|
|
|
$: %point
|
|
|
|
=diff:naive
|
|
|
|
=ship
|
|
|
|
new=point:naive
|
|
|
|
old=(unit point:naive)
|
|
|
|
to=owner
|
|
|
|
from=(unit owner)
|
|
|
|
== ==
|
2021-08-22 19:23:30 +03:00
|
|
|
::
|
2021-10-16 13:47:39 +03:00
|
|
|
+$ hist-tx [p=time q=roll-tx]
|
2021-10-31 16:02:33 +03:00
|
|
|
+$ roll-tx [=ship =status hash=keccak type=l2-tx]
|
2021-10-11 18:16:17 +03:00
|
|
|
+$ pend-tx [force=? =address:naive =time =raw-tx:naive]
|
2022-02-12 16:02:50 +03:00
|
|
|
+$ send-tx
|
|
|
|
$: next-gas-price=@ud
|
|
|
|
sent=?
|
2022-03-20 16:07:27 +03:00
|
|
|
:: TODO: make txs as (list pend-tx)?
|
|
|
|
::
|
2022-02-12 16:02:50 +03:00
|
|
|
txs=(list [=address:naive force=? =raw-tx:naive])
|
|
|
|
==
|
2021-05-21 16:07:08 +03:00
|
|
|
+$ part-tx
|
|
|
|
$% [%raw raw=octs]
|
|
|
|
[%don =tx:naive]
|
|
|
|
[%ful raw=octs =tx:naive] ::TODO redundant?
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ rpc-send-roll
|
|
|
|
$: endpoint=@t
|
|
|
|
contract=address:ethereum
|
|
|
|
chain-id=@
|
|
|
|
pk=@
|
|
|
|
::
|
|
|
|
nonce=@ud
|
2021-12-10 13:36:45 +03:00
|
|
|
fallback-gas-price=@ud
|
2021-05-21 16:07:08 +03:00
|
|
|
next-gas-price=@ud
|
|
|
|
txs=(list raw-tx:naive)
|
|
|
|
==
|
2021-11-28 18:37:06 +03:00
|
|
|
::
|
|
|
|
+$ roller-data
|
|
|
|
[chain-id=@ =points:naive history=(tree hist-tx) =owners =sponsors]
|
|
|
|
::
|
2021-07-22 07:34:42 +03:00
|
|
|
--
|