About to switch over will/wyll.

This commit is contained in:
C. Guy Yarvin 2016-10-27 22:03:47 -07:00
parent 101b6ef840
commit 6461bcb4e1
2 changed files with 65 additions and 92 deletions

View File

@ -17,6 +17,7 @@
::
|= pit/vase
=, crypto
=, ^jael
=, jael
:: ::::
:::: # models :: data structures
@ -821,10 +822,10 @@
(splice(pig (remove les.del)) mor.del)
--
:: :: ++we
:::: ## will^light :: will functions
:::: ## wyll^light :: wyll functions
:: ::::
++ we
|_ pub/will
|_ pub/wyll
:: :: ++collate:we
++ collate :: sort by version
|= com/$-({{life cert} {life cert}} ?)
@ -1186,7 +1187,7 @@
|- ^- farm
?: =(~ mor) out
::
:: nex: all wills to add
:: nex: all wylls to add
::
=/ nex
=/ rom (~(tap in mor))
@ -1196,7 +1197,7 @@
i.rom
(~(got by pug.urb) i.rom)
::
:: wit: all new ships in these wills
:: wit: all new ships in these wylls
::
=. sea (~(uni in sea) mor)
=/ wit
@ -1221,14 +1222,14 @@
|= who/ship
^- channel
::
:: pub: will of who
:: pub: wyll of who
:: exp: promises from our to who
:: imp: promises from who to our
:: out: symmetric key from our to who
:: inn: symmetric keys from who to our
::
=/ pub
^- will
^- wyll
=- ?~(- ~ u.-)
(~(get by pug.urb) who)
::
@ -1365,7 +1366,7 @@
(veil:feel rex)
:: :: ++said:su
++ said :: track cert change
|= $: :: rex: ship whose will has changed
|= $: :: rex: ship whose wyll has changed
:: vie: change authorized by
:: lyf: modified/created version
:: gan: modification
@ -1379,12 +1380,12 @@
::
=/ lip ^- farm
=- [[rex -] ~ ~]
^- will
^- wyll
=- [[lyf -] ~ ~]
^- cert
?- -.gan
::
:: add a new certificate to this will
:: add a new certificate to this wyll
:: {$step p/cert}
::
$step p.gan
@ -1403,7 +1404,7 @@
=. +>.$ ?. |(=(our rex) (~(has by cod.rel) rex)) +>.$
veal:feel
::
:: if a new deed, reset parent
:: if a new deyd, reset parent
::
=. dad.rel ?. &(=(our rex) ?=($step -.gan))
dad.rel
@ -1413,7 +1414,7 @@
::
=. +>.$ (veil:feel rex)
::
:: if we signed a will for someone else, send it home
:: if we signed a wyll for someone else, send it home
::
?: &(=([~ ~] vie) !=(our rex))
(~(home fire lip) rex)
@ -1433,8 +1434,8 @@
?~(vie ~ ?~(u.vie ~ `u.u.vie))
^- (list (set ship))
::
:: if our will has changed, send to parents and kids;
:: if a new deed has been added, also to pals
:: if our wyll has changed, send to parents and kids;
:: if a new deyd has been added, also to pals
::
?: =(our rex)
:* [dad.rel ~ ~]
@ -1587,10 +1588,10 @@
:: :: ++ex:ur
++ ex :: server engine
:: shy: private state
:: rug: domestic will
:: rug: domestic wyll
::
=| $: shy/(map ship safe)
rug/will
rug/wyll
==
=| :: rex: server ship
::
@ -1606,7 +1607,7 @@
++ able :: initialize
%_ .
shy (fall (~(get by pry) rex) *(map ship safe))
rug (fall (~(get by pug) rex) *will)
rug (fall (~(get by pug) rex) *wyll)
==
:: :: ++deal:ex:ur
++ deal :: alter rights
@ -1661,39 +1662,39 @@
:: ryt: private key as right
:: pub: public key
:: cet: unsigned certificate
:: wyl: initial will
:: hec: initial will as farm
:: wyl: initial wyll
:: hec: initial wyll as farm
::
=/ loy (pit:nu:crub 512 eny)
=* rig sec:ex:loy
=* ryt `rite`[%jewel [1 rig] ~ ~]
=* pub pub:ex:loy
=* cet `cert`[[doc pub] ~]
=* wyl `will`[[1 cet] ~ ~]
=* wyl `wyll`[[1 cet] ~ ~]
=* hec `farm`[[rex wyl] ~ ~]
=. +>.$ (deal rex [[ryt ~ ~] ~])
=. ..ex (meet [~ ~] hec)
+>.$
:: :: grow:ex:ur
++ grow :: merge wills
++ grow :: merge wylls
|= $: :: vie: data source
:: cod: merge context
:: gur: input will
:: gur: input wyll
::
vie/(unit (unit ship))
cod/farm
gur/will
gur/wyll
==
?: |(=(~ gur) =(gur rug)) ..grow
|^ ^+ ..grow
::
:: wap: ascending list of new certs
:: pre: previous deed
:: pre: previous deyd
::
=/ wap ~(forward we gur)
?~ wap ..grow
=/ pre
^- (unit deed)
^- (unit deyd)
?~ (dec p.i.wap) ~
`dat:(~(got by rug) (dec p.i.wap))
::
@ -1702,7 +1703,7 @@
|- ^+ ..grow
::
:: hub: changes
:: lub: merged deed
:: lub: merged deyd
::
=+ [hub lub]=[p q]:(grow-mate p.i.wap q.i.wap pre)
?~ t.wap ..grow
@ -1725,7 +1726,7 @@
|= {myn/mind ash/@ val/@}
^- ?
=: ..able able(rex who.myn)
gur (fall (~(get by cod) who.myn) *will)
gur (fall (~(get by cod) who.myn) *wyll)
==
(grow-lick (grow-look lyf.myn) ash val)
:: :: grow-look/ex:ur
@ -1750,13 +1751,13 @@
:: :: grow-mate/ex:ur
++ grow-mate :: merge lives
|= $: :: num: life we're merging
:: new: new deed
:: pre: previous deed
:: eld: old deed
:: new: new deyd
:: pre: previous deyd
:: eld: old deyd
::
num/@ud
new/cert
pre/(unit deed)
pre/(unit deyd)
==
=+ :* eld=`(unit cert)`(~(get by rug) num)
==
@ -1772,7 +1773,7 @@
?> ?=(^ eld)
[~ u.eld]
::
:: ash: hash of deed content
:: ash: hash of deyd content
:: def: our default parent
:: dad: our declared parent
:: mir: our rank
@ -1792,11 +1793,11 @@
::
=((clan def) (clan dad))
::
:: if we have an old deed at this life, merge new signatures
:: if we have an old deyd at this life, merge new signatures
::
?: ?=(^ eld)
::
:: deed data must be identical
:: deyd data must be identical
::
?> =(dat.new dat.u.eld)
::
@ -1824,7 +1825,7 @@
:_ p.mor
`change`[%fact rex vie num `growth`[%sign [[p q] r]:i.sow]]
::
:: non-initial deeds must be signed by previous
:: non-initial deyds must be signed by previous
::
?> ?| ?=($~ pre)
=+ laz=(~(got by syg.new) rex)
@ -1856,7 +1857,7 @@
=(~ pre)
==
::
:: the deed is homemade or sent by owner
:: the deyd is homemade or sent by owner
::
&(?=(^ vie) |(?=($~ u.vie) =(u.u.vie rex)))
::
@ -1868,12 +1869,12 @@
=- [[%fact rex p.- num %step q.-]~ q.-]
^- (pair (unit (unit ship)) cert)
::
:: the new deed is complete; report it
:: the new deyd is complete; report it
::
?: (~(has by syg.new) dad)
[vie new]
::
:: the new deed needs a parent signature; try to add it
:: the new deyd needs a parent signature; try to add it
::
:- [~ ~]
::

View File

@ -123,7 +123,7 @@
:: revokes and replaces the previous cert. the
:: version number of a ship is a ++life.
::
:: the deed contains an ++arms, a definition
:: the deyd contains an ++arms, a definition
:: of cosmetic identity; a semi-trusted parent,
:: which signs the initial certificate and provides
:: routing services; and a dirty bit. if the dirty
@ -137,7 +137,7 @@
dob/? :: & clean, | dirty
nym/arms :: identity strings
== ::
++ cert (tale deed) :: signed deed
++ cert (tale deyd) :: signed deyd
++ chip :: standard identity
$? $giv :: given name
$sur :: surname
@ -145,11 +145,11 @@
$mid :: middle name
== ::
++ coop (unit ares) :: e2e ack
++ deed :: certificate deed
++ deyd :: certificate deyd
$: doc/bull :: metadata
pub/pass :: public key
== ::
++ farm (map ship will) :: pki dump set
++ farm (map ship wyll) :: pki dump set
++ hand @uvH :: 128-bit hash
++ life @ud :: ship version
++ mind {who/ship lyf/life} :: key identifier
@ -160,7 +160,7 @@
$: dat/typ :: data
syg/(map ship (pair life oath)) :: signatures
== ::
++ will (map life cert) :: meta-certificate
++ wyll (map life cert) :: meta-certificate
:: ::
:::: ### promise^jael^models :: rights and promises
:: ::::
@ -250,7 +250,7 @@
$% $: $fact :: certificate change
rex/ship :: owner
vie/(unit (unit ship)) :: made/heard from
lyf/life :: deed added/modified
lyf/life :: deyd added/modified
gan/growth :: info gained
== ::
$: $rite :: rights change
@ -264,7 +264,7 @@
inn/(map hand bill) :: inbound keys
cur/(unit life) :: their version
sax/(list ship) :: their ancestry
pub/will :: their public keys
pub/wyll :: their public keys
== ::
++ gift :: out result <-$
$? {$veil p/channel} :: secure channel
@ -274,7 +274,7 @@
== ::
++ growth :: unit of learning
$% {$sign p/mind q/@} :: add/update signature
{$step p/cert} :: add whole deed
{$step p/cert} :: add whole deyd
== ::
++ note :: out request $->
$% {$b $wait p/@da} :: wait until
@ -695,7 +695,7 @@
:: ::
:::: # jael^engines :: security
:: ::::
++ jaelooo
++ jael
|%
++ foo %bar
--
@ -3092,13 +3092,24 @@
::
++ parsf :: make parser from:
|^ |* a/(pole _;/(*{$^(rule tape)})) :: ;"chars{rule}chars"
=- (cook - (bill (norm a)))
=- (cook - (boil (norm a)))
|* (list)
?~ +< ~
?~ t i
[i $(+< t)]
::
:: .= (boil ~[[& dim] [| ", "] [& dim]]:ag)
:: ;~(plug dim ;~(pfix com ace ;~(plug dim (easy)))):ag
::
++ boil
|* (list (each rule tape))
?~ +< (easy ~)
?: ?=($| -.i) ;~(pfix (jest (crip p.i)) $(+< t))
%+ cook |*({* *} [i t]=+<)
;~(plug p.i $(+< t))
::
:: .= (norm [;"{n}, {n}"]:n=dim:ag) ~[[& dim] [| ", "] [& dim]]:ag
::
++ norm
|* (pole _;/(*{$^(rule tape)}))
?~ +< ~
@ -3110,15 +3121,6 @@
?~ +.rul [%| p=rul]
?@ &2.rul [%| p=;;(tape rul)]
[%& p=rul]
::
:: .= (bill ~[[& dim] [| ", "] [& dim]]:ag)
:: ;~(plug dim ;~(pfix com ace ;~(plug dim (easy)))):ag
++ bill
|* (list (each rule tape))
?~ +< (easy ~)
?: ?=($| -.i) ;~(pfix (jest (crip p.i)) $(+< t))
%+ cook |*({* *} [i t]=+<)
;~(plug p.i $(+< t))
--
::
++ taco :: atom to octstream
@ -3926,11 +3928,11 @@
++ page (cask *) :: untyped cage
++ pail ?($none $warm $cold) :: connection status
++ pipe :: secure channel
$: out/(unit (pair hand bill)) :: outbound key
inn/(map hand bill) :: inbound keys
$: out/(unit (pair hand bill:^jael)) :: outbound key
inn/(map hand bill:^jael) :: inbound keys
cur/(unit life) :: their version
sax/(list ship) :: their ancestry
pub/wyll :: their public keys
pub/wyll:^jael :: their public keys
== ::
++ plan (trel view (pair @da (unit @dr)) path) :: subscription
++ plea {p/@ud q/{p/? q/@t}} :: live prompt
@ -4111,7 +4113,7 @@
++ kiss-xmas :: in request ->$
$% {$hear p/lane q/@} ::
{$mess p/ship q/path r/*} :: send message
{$gear p/farm q/(map life ring)} :: general update
{$gear p/farm:^jael q/(map life ring)} :: general update
{$wake $~} ::
== ::
++ card-xmas :: out cards
@ -4124,7 +4126,7 @@
$: $j :: to %jael
$% {$line p/ship q/@da r/code} ::
{$link p/ship q/@da r/code} ::
{$meet p/farm} ::
{$meet p/farm:^jael} ::
{$view p/ship} ::
{$west p/ship q/path r/*} :: to %gall
== == == ::
@ -4198,36 +4200,6 @@
{$west p/sack q/path r/@ud s/*} :: network request
== ::
::
:::: %jael
::
++ arms (map chip (pair @ta @t)) :: stated identity
++ bill (pair @da @) :: expiring value
++ bull :: cert metadata
$: dad/@p :: parent
dob/? :: & clean, | dirty
nym/arms :: identity strings
== ::
++ cert (tale deyd) :: signed deed
++ chip :: standard identity
$? $giv :: given name
$sur :: surname
$had :: handle
$mid :: middle name
== ::
++ deyd :: certificate deed
$: doc/bull :: metadata
pub/pass :: public key
== ::
++ farm (map ship wyll) :: pki dump set
++ wyll (map life cert) :: certificate
++ mind {who/@p lyf/@ud} :: key identifier
++ site (list @ta) :: [%com %yahoo %www ~]
++ tale :: urbit-signed *
|* typ/mold ::
$: dat/typ :: data
syg/(map ship (pair life @)) :: signatures
== ::
::
::::
::
++ blew {p/@ud q/@ud} :: columns rows
@ -4519,6 +4491,6 @@
{$e gift-eyre}
{$f gift-ford}
{$g gift:gall}
{$j gift:jael}
{$j gift:^jael}
==
--