Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 30 additions & 45 deletions pkg/arvo/app/aqua.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -824,15 +824,10 @@
?< (~(has by lives.azi.piers) who)
=. lives.azi.piers (~(put by lives.azi.piers) who [1 0])
=. logs.azi.piers
=/ [cry=@ sgn=@] (get-public:aqua-azimuth who 1)
%+ weld logs.azi.piers
:_ ~
%- changed-keys:lo:aqua-azimuth
:* who
(get-public:aqua-azimuth who 1 %crypt)
(get-public:aqua-azimuth who 1 %auth)
1
1
==
(changed-keys:lo:aqua-azimuth [who cry sgn 1 1])
(spam-logs 10)
::
++ cycle-keys
Expand All @@ -844,15 +839,10 @@
=/ lyfe +(lyfe.prev)
=. lives.azi.piers (~(put by lives.azi.piers) who [lyfe rut.prev])
=. logs.azi.piers
=/ [cry=@ sgn=@] (get-public:aqua-azimuth who lyfe)
%+ weld logs.azi.piers
:_ ~
%- changed-keys:lo:aqua-azimuth
:* who
(get-public:aqua-azimuth who lyfe %crypt)
(get-public:aqua-azimuth who lyfe %auth)
1
lyfe
==
(changed-keys:lo:aqua-azimuth [who cry sgn 1 lyfe])
state
::
++ breach
Expand All @@ -871,56 +861,51 @@
|= who=ship
^- dawn-event:jael
=/ clan (clan:title who)
?> ?=(?(%czar %king %duke %earl) clan)
=/ spon=(list [ship point:azimuth])
=/ spon=(list [ship point:jael])
%- flop
|- ^- (list [ship point:azimuth])
|- ^- (list [ship point:jael])
=/ =ship (^sein:title who)
=/ a-point=[^ship point:azimuth]
=/ spon-spon [& (^sein:title ship)]
=/ life-rift ~|([ship lives.azi.piers] (~(got by lives.azi.piers) ship))
=/ =life lyfe.life-rift
=/ =rift rut.life-rift
=/ =pass
%^ pass-from-eth:azimuth
(as-octs:mimes:html (get-public:aqua-azimuth ship life %crypt))
(as-octs:mimes:html (get-public:aqua-azimuth ship life %auth))
1
:^ ship
*[address address address address]:azimuth
`[life=life pass rift spon-spon ~]
~
=/ a-point=[^ship point:jael]
=/ spon-spon (^sein:title ship)
=/ [=life =rift]
(~(gut by lives.azi.piers) ship [1 0])
=/ =pass pub:ex:(get-keys:aqua-azimuth ship life)
=/ keys
(~(put by *(map ^life [crypto-suite=@ud =^pass])) life [1 pass])
[ship rift life keys `spon-spon ~]
?: ?=(%czar (clan:title ship))
[a-point]~
[a-point $(who ship)]
=/ =feed:jael
=/ life-rift=[lyfe=life rut=rift]
?: =(%earl clan) [1 0]
=/ [lyfe=life rut=rift]
?: ?=(?(%earl %pawn) clan) [1 0]
(~(got by lives.azi.piers) who)
=/ =life lyfe.life-rift
[who life sec:ex:(get-keys:aqua-azimuth who life) ~]
:* feed
spon
=/ kyz=(list [life ring])
[lyfe sec:ex:(get-keys:aqua-azimuth who lyfe)]~
[[%2 ~] who rut kyz]
:* %1
feed
*(list [ship point:jael]) ::spon
get-czars
~[~['arvo' 'netw' 'ork']]
~[/arvo/netw/ork]
0
`(need (de-purl:html 'http://fake.aqua.domain/'))
*(list (pair @tas *))
==
::
:: Should only do galaxies
::
++ get-czars
^- (map ship [rift life pass])
^- (map ship point:jael)
%- malt
%+ murn
~(tap by lives.azi.piers)
|= [who=ship lyfe=life rut=rift]
?. =(%czar (clan:title who))
~
%- some
:^ who rut lyfe
%^ pass-from-eth:azimuth
(as-octs:mimes:html (get-public:aqua-azimuth who lyfe %crypt))
(as-octs:mimes:html (get-public:aqua-azimuth who lyfe %auth))
1
=/ =pass pub:ex:(get-keys:aqua-azimuth who lyfe)
=/ keys
(~(put by *(map life [crypto-suite=@ud =^pass])) lyfe [1 pass])
`[who rut lyfe keys ~ ~]
::
--
5 changes: 3 additions & 2 deletions pkg/arvo/app/azimuth.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,12 @@
=? snap.poke ?=(%0 -.snap.poke)
snap.poke(- %1, nas (load:naive nas.snap.poke))
?> ?=(%1 -.snap.poke)
=: net.state %default
=: net.state ?.(=('' url.state) net.state %default)
nas.state nas.snap.poke
own.state owners.snap.poke
spo.state sponsors.snap.poke
url.state 'http://eth-mainnet.urbit.org:8545'
url.state ?. =('' url.state) url.state
'http://eth-mainnet.urbit.org:8545'
sap.state snap.poke
logs.state ~
==
Expand Down
112 changes: 103 additions & 9 deletions pkg/arvo/lib/aqua-azimuth.hoon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/- *aquarium
/- dice, *aquarium
/+ ethereum, azimuth
::
|%
Expand All @@ -14,6 +14,25 @@
|= [our=ship her=ship uf=unix-effect azi=az-state]
^- (unit card:agent:gall)
=, enjs:format
=/ ask-load
%+ extract-request uf
'https://bootstrap.urbit.org/mainnet.azimuth-snapshot'
?^ ask-load
=/ events=(list aqua-event)
:_ ~
:* %event
her
/i/http-client/0v1n.2m9vh
%receive
num.u.ask-load
[%start [200 ~] `(as-octs:mimes:html (jam *versioned-snap:dice)) &]
==
%- some
:* %pass /aqua-events
%agent [our %aqua]
%poke %aqua-events
!>(events)
==
=/ ask (extract-request uf 'http://fake.aqua.domain/')
?~ ask
~
Expand Down Expand Up @@ -200,16 +219,91 @@
::
++ get-keys
|= [who=@p lyfe=life]
%+ pit:nu:cric:crypto 32
(can 5 [1 (scot %p who)] [1 (scot %ud lyfe)] ~)
?~ cum=(~(get by comets) who)
%^ pit:nu:cric:crypto 32
(can 5 [1 (scot %p who)] [1 (scot %ud lyfe)] ~)
[%b ~]
?. =(lyfe 1)
%^ pit:nu:cric:crypto 32
(can 5 [1 (scot %p who)] [1 (scot %ud lyfe)] ~)
[%c 0xdead.beef.cafe]
?: ?=(%b suite.u.cum)
(pit:nu:cric:crypto 512 seed.u.cum %b ~)
(pit:nu:cric:crypto 512 seed.u.cum %c 0xdead.beef.cafe)
::
++ get-public
|= [who=@p lyfe=life typ=?(%auth %crypt)]
=/ bod (rsh 3 pub:ex:(get-keys who lyfe))
=+ [enc=(rsh 8 bod) aut=(end 8 bod)]
?: =(%auth typ)
aut
enc
|= [who=@p lyfe=life]
^- public-keys:ames
ded:ex:(get-keys who lyfe)
:: +comets: allowed comets, their +cric suite and seeds
:: the tweak for %c comets is 0xdead.beef.cafe
::
++ comets
^~ ^- (map ship [suite=?(%b %c) seed=@uw])
%- ~(gas by *(map ship [suite=?(%b %c) seed=@uw]))
^- (list [=ship suite=?(%b %c) seed=@uw])
%+ zip
:: comet names
^- (list @p)
:~ :: marbud, %c suite
~fasteg-dinhet-malrum-ransub--hocduc-digtev-radsut-marbud
~daldyl-nildem-dispec-tilryx--dondus-dirmet-tintyl-marbud
~dansyr-ponbec-tocfel-laddux--socnut-nisnyx-dinsut-marbud
:: marbud, %b suite
~harrep-podpec-torsut-docnyx--mopsyx-fosdus-ladpen-marbud
~liblyn-togrut-tabwel-hodbet--dovbex-parryt-mirbyt-marbud
~hidreb-naptev-banben-bicrup--massup-dantus-fodwet-marbud
:: mardev, %c suite
~molpyx-novtyc-wortyc-noswyd--taltyv-loplev-dabwen-mardev
~fosnys-noctyd-talfyl-borryl--davhus-disbyn-fotnec-mardev
~tonmep-tabrux-rinbep-firmur--silmex-saldef-pasfer-mardev
:: mardev, %b suite
~holwyx-ramped-tognet-barsyn--navler-ronmeg-topbex-mardev
~hacmet-doslyr-narhut-tiptec--micbyl-motnev-worsyn-mardev
~ribmut-nopdul-minmet-pardeg--wisfex-rosfus-fogsyn-mardev
==
%+ zip
:: comet suites
^- (list ?(%b %c))
~[%c %c %c %b %b %b %c %c %c %b %b %b]
:: comet seeds
^- (list @uw)
:~ 0w2.5sfF0.~inVv.dQ7zb.ykQSG.aX5nF.uGQsm.keVzY.6Pu1S.
quvGI.b0Ht2.Ctbbr.-ADfG.7yIL4.NXJ5a.lGmJZ.5wkdb.9Z775
0w5Disb.xWJtw.cszH3.YBTFu.9k6Nc.JjeyV.origh.VkYmT.
9-Obr.T3TOs.IPdWd.MmsUQ.ZZGZa.OLHMe.5azFd.l7hXr.~vuI~
0w1.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7is8.~0Gg-
==
:: +zip: combine two lists into a list of cells of their elements
::
++ zip
|* [a=(list) b=(list)]
^- (list [_?>(?=(^ a) i.a) _?>(?=(^ b) i.b)])
=| out=(list [_?>(?=(^ a) i.a) _?>(?=(^ b) i.b)])
?> =((lent a) (lent b))
|-
?~ a (flop out)
?~ b (flop out)
$(out [[i.a i.b] out], a t.a, b t.b)
::
:: Generate logs
::
Expand Down
4 changes: 3 additions & 1 deletion pkg/arvo/sys/vane/jael.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@
=. +>.$
?: =(~ srcs.tac)
%^ poke-watch hen %azimuth
!>([%watch 'http://eth-mainnet.urbit.org:8545/' %default])
?~ node.tac
[%watch 'http://eth-mainnet.urbit.org:8545/' %default]
[%watch (crip (en-purl:html u.node.tac)) %default]
|- ^+ +>.^$
?~ srcs.tac +>.^$
=. +>.^$ (poke-watch hen i.srcs.tac)
Expand Down
Loading
Loading