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 |= pit/vase
=, crypto =, crypto
=, ^jael
=, jael =, jael
:: :::: :: ::::
:::: # models :: data structures :::: # models :: data structures
@ -821,10 +822,10 @@
(splice(pig (remove les.del)) mor.del) (splice(pig (remove les.del)) mor.del)
-- --
:: :: ++we :: :: ++we
:::: ## will^light :: will functions :::: ## wyll^light :: wyll functions
:: :::: :: ::::
++ we ++ we
|_ pub/will |_ pub/wyll
:: :: ++collate:we :: :: ++collate:we
++ collate :: sort by version ++ collate :: sort by version
|= com/$-({{life cert} {life cert}} ?) |= com/$-({{life cert} {life cert}} ?)
@ -1186,7 +1187,7 @@
|- ^- farm |- ^- farm
?: =(~ mor) out ?: =(~ mor) out
:: ::
:: nex: all wills to add :: nex: all wylls to add
:: ::
=/ nex =/ nex
=/ rom (~(tap in mor)) =/ rom (~(tap in mor))
@ -1196,7 +1197,7 @@
i.rom i.rom
(~(got by pug.urb) 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) =. sea (~(uni in sea) mor)
=/ wit =/ wit
@ -1221,14 +1222,14 @@
|= who/ship |= who/ship
^- channel ^- channel
:: ::
:: pub: will of who :: pub: wyll of who
:: exp: promises from our to who :: exp: promises from our to who
:: imp: promises from who to our :: imp: promises from who to our
:: out: symmetric key from our to who :: out: symmetric key from our to who
:: inn: symmetric keys from who to our :: inn: symmetric keys from who to our
:: ::
=/ pub =/ pub
^- will ^- wyll
=- ?~(- ~ u.-) =- ?~(- ~ u.-)
(~(get by pug.urb) who) (~(get by pug.urb) who)
:: ::
@ -1365,7 +1366,7 @@
(veil:feel rex) (veil:feel rex)
:: :: ++said:su :: :: ++said:su
++ said :: track cert change ++ said :: track cert change
|= $: :: rex: ship whose will has changed |= $: :: rex: ship whose wyll has changed
:: vie: change authorized by :: vie: change authorized by
:: lyf: modified/created version :: lyf: modified/created version
:: gan: modification :: gan: modification
@ -1379,12 +1380,12 @@
:: ::
=/ lip ^- farm =/ lip ^- farm
=- [[rex -] ~ ~] =- [[rex -] ~ ~]
^- will ^- wyll
=- [[lyf -] ~ ~] =- [[lyf -] ~ ~]
^- cert ^- cert
?- -.gan ?- -.gan
:: ::
:: add a new certificate to this will :: add a new certificate to this wyll
:: {$step p/cert} :: {$step p/cert}
:: ::
$step p.gan $step p.gan
@ -1403,7 +1404,7 @@
=. +>.$ ?. |(=(our rex) (~(has by cod.rel) rex)) +>.$ =. +>.$ ?. |(=(our rex) (~(has by cod.rel) rex)) +>.$
veal:feel veal:feel
:: ::
:: if a new deed, reset parent :: if a new deyd, reset parent
:: ::
=. dad.rel ?. &(=(our rex) ?=($step -.gan)) =. dad.rel ?. &(=(our rex) ?=($step -.gan))
dad.rel dad.rel
@ -1413,7 +1414,7 @@
:: ::
=. +>.$ (veil:feel rex) =. +>.$ (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)) ?: &(=([~ ~] vie) !=(our rex))
(~(home fire lip) rex) (~(home fire lip) rex)
@ -1433,8 +1434,8 @@
?~(vie ~ ?~(u.vie ~ `u.u.vie)) ?~(vie ~ ?~(u.vie ~ `u.u.vie))
^- (list (set ship)) ^- (list (set ship))
:: ::
:: if our will has changed, send to parents and kids; :: if our wyll has changed, send to parents and kids;
:: if a new deed has been added, also to pals :: if a new deyd has been added, also to pals
:: ::
?: =(our rex) ?: =(our rex)
:* [dad.rel ~ ~] :* [dad.rel ~ ~]
@ -1587,10 +1588,10 @@
:: :: ++ex:ur :: :: ++ex:ur
++ ex :: server engine ++ ex :: server engine
:: shy: private state :: shy: private state
:: rug: domestic will :: rug: domestic wyll
:: ::
=| $: shy/(map ship safe) =| $: shy/(map ship safe)
rug/will rug/wyll
== ==
=| :: rex: server ship =| :: rex: server ship
:: ::
@ -1606,7 +1607,7 @@
++ able :: initialize ++ able :: initialize
%_ . %_ .
shy (fall (~(get by pry) rex) *(map ship safe)) 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:ex:ur
++ deal :: alter rights ++ deal :: alter rights
@ -1661,39 +1662,39 @@
:: ryt: private key as right :: ryt: private key as right
:: pub: public key :: pub: public key
:: cet: unsigned certificate :: cet: unsigned certificate
:: wyl: initial will :: wyl: initial wyll
:: hec: initial will as farm :: hec: initial wyll as farm
:: ::
=/ loy (pit:nu:crub 512 eny) =/ loy (pit:nu:crub 512 eny)
=* rig sec:ex:loy =* rig sec:ex:loy
=* ryt `rite`[%jewel [1 rig] ~ ~] =* ryt `rite`[%jewel [1 rig] ~ ~]
=* pub pub:ex:loy =* pub pub:ex:loy
=* cet `cert`[[doc pub] ~] =* cet `cert`[[doc pub] ~]
=* wyl `will`[[1 cet] ~ ~] =* wyl `wyll`[[1 cet] ~ ~]
=* hec `farm`[[rex wyl] ~ ~] =* hec `farm`[[rex wyl] ~ ~]
=. +>.$ (deal rex [[ryt ~ ~] ~]) =. +>.$ (deal rex [[ryt ~ ~] ~])
=. ..ex (meet [~ ~] hec) =. ..ex (meet [~ ~] hec)
+>.$ +>.$
:: :: grow:ex:ur :: :: grow:ex:ur
++ grow :: merge wills ++ grow :: merge wylls
|= $: :: vie: data source |= $: :: vie: data source
:: cod: merge context :: cod: merge context
:: gur: input will :: gur: input wyll
:: ::
vie/(unit (unit ship)) vie/(unit (unit ship))
cod/farm cod/farm
gur/will gur/wyll
== ==
?: |(=(~ gur) =(gur rug)) ..grow ?: |(=(~ gur) =(gur rug)) ..grow
|^ ^+ ..grow |^ ^+ ..grow
:: ::
:: wap: ascending list of new certs :: wap: ascending list of new certs
:: pre: previous deed :: pre: previous deyd
:: ::
=/ wap ~(forward we gur) =/ wap ~(forward we gur)
?~ wap ..grow ?~ wap ..grow
=/ pre =/ pre
^- (unit deed) ^- (unit deyd)
?~ (dec p.i.wap) ~ ?~ (dec p.i.wap) ~
`dat:(~(got by rug) (dec p.i.wap)) `dat:(~(got by rug) (dec p.i.wap))
:: ::
@ -1702,7 +1703,7 @@
|- ^+ ..grow |- ^+ ..grow
:: ::
:: hub: changes :: hub: changes
:: lub: merged deed :: lub: merged deyd
:: ::
=+ [hub lub]=[p q]:(grow-mate p.i.wap q.i.wap pre) =+ [hub lub]=[p q]:(grow-mate p.i.wap q.i.wap pre)
?~ t.wap ..grow ?~ t.wap ..grow
@ -1725,7 +1726,7 @@
|= {myn/mind ash/@ val/@} |= {myn/mind ash/@ val/@}
^- ? ^- ?
=: ..able able(rex who.myn) =: ..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-lick (grow-look lyf.myn) ash val)
:: :: grow-look/ex:ur :: :: grow-look/ex:ur
@ -1750,13 +1751,13 @@
:: :: grow-mate/ex:ur :: :: grow-mate/ex:ur
++ grow-mate :: merge lives ++ grow-mate :: merge lives
|= $: :: num: life we're merging |= $: :: num: life we're merging
:: new: new deed :: new: new deyd
:: pre: previous deed :: pre: previous deyd
:: eld: old deed :: eld: old deyd
:: ::
num/@ud num/@ud
new/cert new/cert
pre/(unit deed) pre/(unit deyd)
== ==
=+ :* eld=`(unit cert)`(~(get by rug) num) =+ :* eld=`(unit cert)`(~(get by rug) num)
== ==
@ -1772,7 +1773,7 @@
?> ?=(^ eld) ?> ?=(^ eld)
[~ u.eld] [~ u.eld]
:: ::
:: ash: hash of deed content :: ash: hash of deyd content
:: def: our default parent :: def: our default parent
:: dad: our declared parent :: dad: our declared parent
:: mir: our rank :: mir: our rank
@ -1792,11 +1793,11 @@
:: ::
=((clan def) (clan dad)) =((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) ?: ?=(^ eld)
:: ::
:: deed data must be identical :: deyd data must be identical
:: ::
?> =(dat.new dat.u.eld) ?> =(dat.new dat.u.eld)
:: ::
@ -1824,7 +1825,7 @@
:_ p.mor :_ p.mor
`change`[%fact rex vie num `growth`[%sign [[p q] r]:i.sow]] `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) ?> ?| ?=($~ pre)
=+ laz=(~(got by syg.new) rex) =+ laz=(~(got by syg.new) rex)
@ -1856,7 +1857,7 @@
=(~ pre) =(~ pre)
== ==
:: ::
:: the deed is homemade or sent by owner :: the deyd is homemade or sent by owner
:: ::
&(?=(^ vie) |(?=($~ u.vie) =(u.u.vie rex))) &(?=(^ vie) |(?=($~ u.vie) =(u.u.vie rex)))
:: ::
@ -1868,12 +1869,12 @@
=- [[%fact rex p.- num %step q.-]~ q.-] =- [[%fact rex p.- num %step q.-]~ q.-]
^- (pair (unit (unit ship)) cert) ^- (pair (unit (unit ship)) cert)
:: ::
:: the new deed is complete; report it :: the new deyd is complete; report it
:: ::
?: (~(has by syg.new) dad) ?: (~(has by syg.new) dad)
[vie new] [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 :: revokes and replaces the previous cert. the
:: version number of a ship is a ++life. :: 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, :: of cosmetic identity; a semi-trusted parent,
:: which signs the initial certificate and provides :: which signs the initial certificate and provides
:: routing services; and a dirty bit. if the dirty :: routing services; and a dirty bit. if the dirty
@ -137,7 +137,7 @@
dob/? :: & clean, | dirty dob/? :: & clean, | dirty
nym/arms :: identity strings nym/arms :: identity strings
== :: == ::
++ cert (tale deed) :: signed deed ++ cert (tale deyd) :: signed deyd
++ chip :: standard identity ++ chip :: standard identity
$? $giv :: given name $? $giv :: given name
$sur :: surname $sur :: surname
@ -145,11 +145,11 @@
$mid :: middle name $mid :: middle name
== :: == ::
++ coop (unit ares) :: e2e ack ++ coop (unit ares) :: e2e ack
++ deed :: certificate deed ++ deyd :: certificate deyd
$: doc/bull :: metadata $: doc/bull :: metadata
pub/pass :: public key pub/pass :: public key
== :: == ::
++ farm (map ship will) :: pki dump set ++ farm (map ship wyll) :: pki dump set
++ hand @uvH :: 128-bit hash ++ hand @uvH :: 128-bit hash
++ life @ud :: ship version ++ life @ud :: ship version
++ mind {who/ship lyf/life} :: key identifier ++ mind {who/ship lyf/life} :: key identifier
@ -160,7 +160,7 @@
$: dat/typ :: data $: dat/typ :: data
syg/(map ship (pair life oath)) :: signatures 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 :::: ### promise^jael^models :: rights and promises
:: :::: :: ::::
@ -250,7 +250,7 @@
$% $: $fact :: certificate change $% $: $fact :: certificate change
rex/ship :: owner rex/ship :: owner
vie/(unit (unit ship)) :: made/heard from vie/(unit (unit ship)) :: made/heard from
lyf/life :: deed added/modified lyf/life :: deyd added/modified
gan/growth :: info gained gan/growth :: info gained
== :: == ::
$: $rite :: rights change $: $rite :: rights change
@ -264,7 +264,7 @@
inn/(map hand bill) :: inbound keys inn/(map hand bill) :: inbound keys
cur/(unit life) :: their version cur/(unit life) :: their version
sax/(list ship) :: their ancestry sax/(list ship) :: their ancestry
pub/will :: their public keys pub/wyll :: their public keys
== :: == ::
++ gift :: out result <-$ ++ gift :: out result <-$
$? {$veil p/channel} :: secure channel $? {$veil p/channel} :: secure channel
@ -274,7 +274,7 @@
== :: == ::
++ growth :: unit of learning ++ growth :: unit of learning
$% {$sign p/mind q/@} :: add/update signature $% {$sign p/mind q/@} :: add/update signature
{$step p/cert} :: add whole deed {$step p/cert} :: add whole deyd
== :: == ::
++ note :: out request $-> ++ note :: out request $->
$% {$b $wait p/@da} :: wait until $% {$b $wait p/@da} :: wait until
@ -695,7 +695,7 @@
:: :: :: ::
:::: # jael^engines :: security :::: # jael^engines :: security
:: :::: :: ::::
++ jaelooo ++ jael
|% |%
++ foo %bar ++ foo %bar
-- --
@ -3092,13 +3092,24 @@
:: ::
++ parsf :: make parser from: ++ parsf :: make parser from:
|^ |* a/(pole _;/(*{$^(rule tape)})) :: ;"chars{rule}chars" |^ |* a/(pole _;/(*{$^(rule tape)})) :: ;"chars{rule}chars"
=- (cook - (bill (norm a))) =- (cook - (boil (norm a)))
|* (list) |* (list)
?~ +< ~ ?~ +< ~
?~ t i ?~ t i
[i $(+< t)] [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 [;"{n}, {n}"]:n=dim:ag) ~[[& dim] [| ", "] [& dim]]:ag
::
++ norm ++ norm
|* (pole _;/(*{$^(rule tape)})) |* (pole _;/(*{$^(rule tape)}))
?~ +< ~ ?~ +< ~
@ -3110,15 +3121,6 @@
?~ +.rul [%| p=rul] ?~ +.rul [%| p=rul]
?@ &2.rul [%| p=;;(tape rul)] ?@ &2.rul [%| p=;;(tape rul)]
[%& p=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 ++ taco :: atom to octstream
@ -3926,11 +3928,11 @@
++ page (cask *) :: untyped cage ++ page (cask *) :: untyped cage
++ pail ?($none $warm $cold) :: connection status ++ pail ?($none $warm $cold) :: connection status
++ pipe :: secure channel ++ pipe :: secure channel
$: out/(unit (pair hand bill)) :: outbound key $: out/(unit (pair hand bill:^jael)) :: outbound key
inn/(map hand bill) :: inbound keys inn/(map hand bill:^jael) :: inbound keys
cur/(unit life) :: their version cur/(unit life) :: their version
sax/(list ship) :: their ancestry 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 ++ plan (trel view (pair @da (unit @dr)) path) :: subscription
++ plea {p/@ud q/{p/? q/@t}} :: live prompt ++ plea {p/@ud q/{p/? q/@t}} :: live prompt
@ -4111,7 +4113,7 @@
++ kiss-xmas :: in request ->$ ++ kiss-xmas :: in request ->$
$% {$hear p/lane q/@} :: $% {$hear p/lane q/@} ::
{$mess p/ship q/path r/*} :: send message {$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 $~} :: {$wake $~} ::
== :: == ::
++ card-xmas :: out cards ++ card-xmas :: out cards
@ -4124,7 +4126,7 @@
$: $j :: to %jael $: $j :: to %jael
$% {$line p/ship q/@da r/code} :: $% {$line p/ship q/@da r/code} ::
{$link p/ship q/@da r/code} :: {$link p/ship q/@da r/code} ::
{$meet p/farm} :: {$meet p/farm:^jael} ::
{$view p/ship} :: {$view p/ship} ::
{$west p/ship q/path r/*} :: to %gall {$west p/ship q/path r/*} :: to %gall
== == == :: == == == ::
@ -4198,36 +4200,6 @@
{$west p/sack q/path r/@ud s/*} :: network request {$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 ++ blew {p/@ud q/@ud} :: columns rows
@ -4519,6 +4491,6 @@
{$e gift-eyre} {$e gift-eyre}
{$f gift-ford} {$f gift-ford}
{$g gift:gall} {$g gift:gall}
{$j gift:jael} {$j gift:^jael}
== ==
-- --