updates %jael to save and %ames to give domains (on boot/startup)

also defers initial clay merge,
renames +turf (utf8 to utf32) to +taft,
and removes duplicate +turf (domain) declarations,
and updates pinned vere to use them
This commit is contained in:
Joe Bryan 2018-10-04 02:43:40 -04:00
parent 4303426c61
commit 535ab6e90b
13 changed files with 86 additions and 40 deletions

View File

@ -1 +1 @@
fc6530fa30adbbe425a72cb048062d646fcb300e
6e77aa110aa3776fed386f5bd8cf3a17d5c7e1bc

View File

@ -139,9 +139,6 @@
%finalize-order
%finalize-trial
==
:: +turf: a domain, TLD first
::
+= turf (list @t)
:: +acct: an ACME service account
::
+= acct

View File

@ -34,7 +34,7 @@
((sef) jon)
::
++ change (ot ler+(at ni ni ~) ted+(pe 0v0 edit) ~)
++ char (cu turf so)
++ char (cu taft so)
++ edit
%+ ke *sole-edit |. ~+
%+ fo %nop

View File

@ -1,7 +1,4 @@
|%
:: +turf: a domain, TLD first
::
+= turf (list @t)
:: +provider: DNS service provider (gcloud only for now)
::
+= provider

View File

@ -4132,7 +4132,7 @@
?> |((gte b 32) =(10 b))
?:((lte b 127) 1 ?:((lte b 223) 2 ?:((lte b 239) 3 4)))
::
++ turf :: utf8 to utf32
++ taft :: utf8 to utf32
|= a/@t
^- @c
%+ rap 5
@ -4156,7 +4156,7 @@
++ tuba :: utf8 to utf32 tape
|= a/tape
^- (list @c)
(rip 5 (turf (rap 3 a))) :: XX horrible
(rip 5 (taft (rap 3 a))) :: XX horrible
::
++ tufa :: utf32 to utf8 tape
|= a/(list @c)
@ -4263,7 +4263,7 @@
?: =(`@`0 a)
~
=+ b=(teff a)
=+ c=(turf (end 3 b a))
=+ c=(taft (end 3 b a))
=+ d=$(a (rsh 3 b a))
?: ?| &((gte c 'a') (lte c 'z'))
&((gte c '0') (lte c '9'))
@ -5800,7 +5800,7 @@
(stag %p fed:ag)
;~(pfix dot (stag %ta urs:ab))
;~(pfix sig (stag %t urx:ab))
;~(pfix hep (stag %c (cook turf urx:ab)))
;~(pfix hep (stag %c (cook taft urx:ab)))
==
++ nuck
~/ %nuck |= a/nail %. a

View File

@ -1260,6 +1260,12 @@
=/ wir=wire
/our/(scot %p p.p.bon)/her/(scot %p q.p.bon)
:_ fox [hen [%pass wir %j %pubs p.p.bon q.p.bon]]~
::
%bock
:_ fox [hen %give %turf tuf.fox]~
::
%brew
:_ fox [hen [%pass / %j %turf ~]]~
::
%cake
:: ~? ?=(^ r.bon) [%cake-woot-bad hen r.bon]
@ -1312,6 +1318,11 @@
::
%mack ?~ +>.sih $(sih [%g %nice ~]) :: XX using old code
$(sih [%g %mean `[%mack +>+.sih]])
::
%turf
=. tuf.fox turf.sih
:: XX give %turf if already recvd %bar?
[~ +>.$]
::
%pubs
?. ?=([%our @ %her @ ~] tea)
@ -1381,7 +1392,8 @@
^- [p=(list boon) q=fort]
?- -.kyz
%barn
[~ fox(gad hen)]
:_ fox(gad hen)
[%bock ~]~
::
%hear
(~(gnaw am [now fox]) %good p.kyz q.kyz)
@ -1393,7 +1405,7 @@
(~(gnaw am [now fox]) %dead p.kyz q.kyz)
::
%init
:_ fox [%sake p.kyz]~
:_ fox [[%sake p.kyz] [%brew ~] ~]
::
:: XX confirm unused, remove
::

View File

@ -3793,15 +3793,17 @@
[mos ..^$]
::
$init
:_ %_ ..^$
fat.ruf
?< (~(has by fat.ruf) our.req)
(~(put by fat.ruf) our.req [-(hun hen)]:[*room .])
==
^- (list move)
=. fat.ruf
?< (~(has by fat.ruf) our.req)
(~(put by fat.ruf) our.req [-(hun hen)]:[*room .])
::
?: ?=(%czar (clan:title our.req))
~
[hen %pass /init-merge %c %merg our.req %base (sein:title our.req) %kids da+now %init]~
[~ ..^$]
=/ =task:able
[%merg our.req %base (sein:title our.req) %kids da+now %init]
=. cue.ruf (~(put to cue.ruf) [hen task])
=/ =move [hen %pass /queued-request %b %wait now]
[~[move] ..^$]
::
$into
=. hez.ruf `hen

View File

@ -73,7 +73,7 @@
=seed:able:jael :: identity params
spon=(unit ship) :: sponsor
czar=(map ship [=life =pass]) :: galaxy table
turf=(list (pair @ud (list @ta))) :: domains
turf=(list turf) :: domains
== ::
[%fake our=ship] :: boot fake
:: XX wegh ::

View File

@ -74,6 +74,8 @@
++ state-absolute :: absolute urbit
$: pry/(map ship (map ship safe)) :: promises
eve=logs :: on-chain events
:: XX reconcile with .dns.eth
tuf=(list turf) :: domains
fak/_| :: fake keys
== ::
++ state-eth-node :: node config + meta
@ -649,7 +651,7 @@
abet:abet:(deal:(burb our.tac) p.tac [~ q.tac])
::
:: boot from keys
:: {$dawn =seed spon=(unit ship) czar=(map ship [=life =pass]) turf=(list (pair @ud turf))}
:: {$dawn =seed spon=(unit ship) czar=(map ship [=life =pass]) turf=(list turf)}
::
%dawn
=* our who.seed.tac
@ -666,7 +668,11 @@
%- curd =< abet
(pubs:~(feel su our urb sub etn) kyz)
:: XX sponsor
:: XX turf
:: XX reconcile with .dns.eth
:: set initial domains
::
=. tuf.urb turf.tac
::
=. moz
%+ weld moz
:: order is crucial!
@ -778,6 +784,14 @@
%+ cure our.tac
[[%meet who.tac]~ urb]
::
:: XX should be a subscription
:: XX reconcile with .dns.eth
:: request domains
:: [%turf ~]
::
%turf
+>.$(moz [[hen %give %turf tuf.urb] moz])
::
:: watch private keys
:: {$vein $~}
::

View File

@ -95,6 +95,8 @@
%- unit :: ~: unknown
%- unit :: ~ ~: invalid
(cask vase) :: marked cargo
::
++ turf (list @t) :: domain, tld first
:: ::
:::: ++jstd :: json standards structures
:: ::::
@ -460,6 +462,7 @@
== == ::
$: %j :: to %jael
$% [%pubs our=ship who=ship] :: view public keys
[%turf ~] :: view domains
[%vein our=ship] :: view private keys
== == ::
$: $g :: to %gall
@ -474,11 +477,13 @@
{$mass p/mass} :: memory usage
{$rove p/ship q/lane} :: lane change
{$send p/lane q/@} :: transmit packet
{$turf p/(list turf)} :: bind to domains
{$woot p/ship q/coop} :: reaction message
== ::
++ sign :: in result _<-
$% $: %j :: from %jael
$% [%pubs public:able:jael] :: public keys
[%turf turf=(list turf)] :: bind to domains
[%vein =life vein=(map life ring)] :: private keys
== == ::
$: $g :: from %gall
@ -542,6 +547,8 @@
== ::
++ boon :: fort output
$% {$beer p/sock} :: request public keys
{$bock ~} :: bind to domains
{$brew ~} :: request domains
{$cake p/sock q/soap r/coop s/duct} :: e2e message result
{$maze p/ship q/lane} :: lane change
{$mead p/lane q/rock} :: accept packet
@ -581,6 +588,7 @@
++ fort :: formal state
$: $1 :: version
gad/duct :: client interface
tuf/(list turf) :: domains
hop/@da :: network boot date
bad/(set @p) :: bad ships
ton/town :: security
@ -1046,7 +1054,7 @@
++ hiss {p/purl q/moth} :: outbound request
++ hole @t :: session identity
++ hort {p/(unit @ud) q/host} :: http port+host
++ host (each (list @t) @if) :: http host
++ host (each turf @if) :: http host
++ hoke %+ each {$localhost ~} :: local host
?($.0.0.0.0 $.127.0.0.1) ::
:: +http-config: full http-server configuration
@ -1075,7 +1083,7 @@
[%cert p=(unit [key=wain cert=wain])]
:: %turf: add or remove established dns binding
::
[%turf p=?(%put %del) q=(list @t)]
[%turf p=?(%put %del) q=turf]
==
++ httq :: raw http request
$: p/meth :: method
@ -1993,6 +2001,7 @@
$% [%init p=ship] :: report install unix
[%mack p=(unit tang)] :: message n/ack
[%pubs public] :: public keys
[%turf turf=(list turf)] :: domains
{$vest p/tally} :: balance update
[%vein =life vein=(map life ring)] :: private keys
{$vine p/(list change)} :: all raw changes
@ -2036,7 +2045,7 @@
=seed:able:jael :: identity params
spon=(unit ship) :: sponsor
czar=(map ship [=life =pass]) :: galaxy table
turf=(list (pair @ud (list @ta))) :: domains
turf=(list turf) :: domains
== ::
[%fake our=ship] :: fake boot
[%look our=ship src=(each ship purl:eyre)] :: set ethereum source
@ -2046,6 +2055,7 @@
[%nuke ~] :: cancel tracker from
[%pubs our=ship who=ship] :: view public keys
[%meet our=ship who=ship] :: met after breach
[%turf ~] :: view domains
[%vein our=ship] :: view signing keys
[%vent our=ship] :: view ethereum events
[%vest our=ship] :: view public balance
@ -7968,18 +7978,32 @@
::
++ turf
|= rep=octs
^- (list [@ud (list @ta)])
^- (list ^turf)
=/ jon=json (need (de-json:html q.rep))
=/ res=(list [@t @t])
((ar (ot id+so result+so ~)) jon)
%+ turn res
|= [id=@t result=@t]
:- (slav %ud id)
=/ dom=tape
(decode-results:ethereum result [%string]~)
=/ hot=host:eyre
(scan dom thos:de-purl:html)
?>(?=(%& -.hot) p.hot)
=/ dom=(list (pair @ud ^turf))
%+ turn res
|= [id=@t result=@t]
^- (pair @ud ^turf)
:- (slav %ud id)
=/ dom=tape
(decode-results:ethereum result [%string]~)
=/ hot=host:eyre
(scan dom thos:de-purl:html)
?>(?=(%& -.hot) p.hot)
:: sort by id, ascending, removing duplicates
::
=| tuf=(map ^turf @ud)
|- ^- (list ^turf)
?~ dom
%+ turn
%+ sort ~(tap by tuf)
|=([a=(pair ^turf @ud) b=(pair ^turf @ud)] (lth q.a q.b))
head
=? tuf !(~(has by tuf) q.i.dom)
(~(put by tuf) q.i.dom p.i.dom)
$(dom t.dom)
--
:: +veri:dawn: validate keys, life, discontinuity, &c
::

View File

@ -20,7 +20,7 @@
:* ames-gate
now=~1234.5.6
call-args=[hen type=*type %soft %init ~nul]
[hen %pass wir %j %vein ~nul]~
[[hen %pass wir %j %vein ~nul] [hen %pass / %j %turf ~] ~]
==
::
results1

View File

@ -16,7 +16,7 @@
0w8O.k5Ry4.QsKQq.1k~uj.DBOU4.numfq.nXOwa.cSk7B.VcHVm.
-8~kX.3ALiG.rQjOi.HZ9hj.84b6G.P5pCZ.UtNtt.Lh9TE.2DQJ2
=/ dan
[`seed:able:jael`[~nul 1 key ~] ~ ~ [0 /urbit/org]~]
[`seed:able:jael`[~nul 1 key ~] ~ ~ [/org/urbit ~]]
::
=^ results1 jael-gate
=/ hen=duct

View File

@ -147,7 +147,7 @@
'"}]'
==
%+ expect-eq
!> [[0 /org/urbit] [1 /org/urbit] [2 /org/urbit] ~]
!> [/org/urbit ~]
!> (turf:take:dawn oct)
::
++ test-veri-good