kale -> jael

This commit is contained in:
Philip Monk 2019-08-06 15:42:37 -07:00
parent 4ddd08890c
commit 6212422015
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
21 changed files with 596 additions and 3565 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:34b32dd0a3821943fadccc15c0f1ddd708f181c498fa6483290bc3e58a4c1cc9
size 4536451
oid sha256:f37432dba5cc7ebb82f52a159a1f65540d12ff74868cac1ad298adc2fd4431a5
size 4512165

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a7fc5c2782cd7893e007e7b478f72ccc0f995a32aeb6fd6b9dd0b6177871adf
size 9482745
oid sha256:c59db7d499fe7336a3bcc4a3ac8b48783e7b3e7e830e473f542162b0d990c13f
size 9376028

View File

@ -367,7 +367,6 @@
%f %ford
%g %gall
%j %jael
%k %kale
==
=/ pax
/(scot %p our.hid)/home/(scot %da now.hid)/sys/vane/[vane]

View File

@ -1,5 +1,5 @@
/+ tapp, stdio
=, able:kale
=, able:jael
=> |%
+$ pending-udiffs (map number:block udiffs:point)
+$ app-state
@ -13,7 +13,7 @@
+$ peek-data ~
+$ in-poke-data
$: %azimuth-tracker-poke
$% [%listen whos=(list ship) =source:kale]
$% [%listen whos=(list ship) =source:jael]
[%watch url=@ta]
==
==
@ -266,10 +266,10 @@
::
=> |%
::
:: Send %listen to kale
:: Send %listen to jael
::
++ listen
|= [state=app-state whos=(list ship) =source:kale]
|= [state=app-state whos=(list ship) =source:jael]
=/ m (async:stdio ,app-state)
^- form:m
;< ~ bind:m (send-effect:stdio %listen /lo (silt whos) source)

View File

@ -6,7 +6,7 @@
--
:- %say
|= [* [whos=(list ship) =src] ~]
=/ =source:kale
=/ =source:jael
?- -.src
%ship [%& ship.src]
%app [%| term.src]

View File

@ -1,6 +1,6 @@
=> |%
+$ config
[url=@ta =from=number:block:able:kale]
[url=@ta =from=number:block:able:jael]
--
:- %say
|= [* config ~]

View File

@ -28,10 +28,10 @@
%- produce
:- %tang :_ ~
leaf+"can't create keys for {(scow %p mon)}, which belongs to {(scow %p seg)}"
=/ lyf=life .^(@ud k+/(scot %p our)/life/(scot %da now)/(scot %p our))
=/ sed=seed:able:kale
.^ seed:able:kale
k+/(scot %p our)/earl/(scot %da now)/(scot %p mon)/(scot %ud lyf)
=/ lyf=life .^(@ud j+/(scot %p our)/life/(scot %da now)/(scot %p our))
=/ sed=seed:able:jael
.^ seed:able:jael
j+/(scot %p our)/earl/(scot %da now)/(scot %p mon)/(scot %ud lyf)
==
%+ print leaf+"moon: {(scow %p mon)}"
%- produce [%atom (scot %uw (jam sed))]

View File

@ -40,9 +40,8 @@
$% [%bonk wire ~] ::
{$conf wire dock $load ship term} ::
{$flog wire flog:dill} ::
[%mint wire p=ship q=safe:rights:jael]
{$nuke wire ship} ::
[%serve wire binding:eyre generator:eyre]
[%serve wire binding:eyre generator:eyre] ::
{$poke wire dock pear} ::
{$rest wire @da} ::
{$wait wire @da} ::
@ -86,7 +85,8 @@
:: our new private key, as a +tree of +rite
::
=/ rit (sy [%jewel (my [lyf.u.sed key.u.sed] ~)] ~)
(emit %mint / our rit)
~& %rekey-not-implemented
+>.$
::
++ poke-nuke :: initialize
|= him/ship =< abet

View File

@ -182,14 +182,14 @@
==
::
++ number-to-hash
|= =number:block:able:kale
|= =number:block:able:jael
^- @
?: (lth number launch:contracts:azimuth)
(cat 3 0x5364 (sub launch:contracts:azimuth number))
(cat 3 0x5363 (sub number launch:contracts:azimuth))
::
++ hash-to-number
|= =hash:block:able:kale
|= =hash:block:able:jael
(add launch:contracts:azimuth (div hash 0x1.0000))
::
++ logs-by-range
@ -205,8 +205,8 @@
logs
::
++ logs-by-hash
|= =hash:block:able:kale
=/ =number:block:able:kale (hash-to-number hash)
|= =hash:block:able:jael
=/ =number:block:able:jael (hash-to-number hash)
(logs-by-range number number)
::
++ logs-to-json
@ -278,15 +278,15 @@
*[address address address address]:azimuth
`[life=life pass rift spon-spon ~]
~
=/ =seed:able:kale
=/ =seed:able:jael
?: =(%earl (clan:title who))
=/ pax
;: weld
/i/(scot %p ship.spon)/k/(scot %p ship.spon)/earl/(scot %da now)
/i/(scot %p ship.spon)/j/(scot %p ship.spon)/earl/(scot %da now)
/(scot %p who)/(scot %ud life.spon)
/noun
==
(need (scry-aqua (unit seed:able:kale) our now pax))
(need (scry-aqua (unit seed:able:jael) our now pax))
=/ life-rift (~(got by lives) who)
=/ =life lyfe.life-rift
[who life sec:ex:(get-keys who life) ~]
@ -349,7 +349,7 @@
:+ & ~
=/ aqua-pax
:- %i
/(scot %p her)/k/(scot %p her)/life/(scot %da now.pin)/(scot %p who)/noun
/(scot %p her)/j/(scot %p her)/life/(scot %da now.pin)/(scot %p who)/noun
=/ lyfe (scry-aqua noun our now.pin aqua-pax)
~& [new-lyfe=[0 new-lyfe] lyfe=lyfe]
?: =([~ new-lyfe] lyfe)
@ -389,7 +389,7 @@
:+ & ~
=/ aqua-pax
:- %i
/(scot %p her)/k/(scot %p her)/rift/(scot %da now.pin)/(scot %p who)/noun
/(scot %p her)/j/(scot %p her)/rift/(scot %da now.pin)/(scot %p who)/noun
=/ rut (scry-aqua noun our now.pin aqua-pax)
?: =([~ new-rut] rut)
[%done ~]

View File

@ -61,7 +61,7 @@
[%i /vane/iris]
:: sys/vane/jael: security
::
[%k /vane/kale]
[%j /vane/jael]
==
|= [=term =path]
=/ pax (weld sys path)

View File

@ -412,10 +412,10 @@
^- (quip move _this-tapp)
(take-async bowl `[wire %bound success binding])
::
:: Receive source update from kale
:: Receive source update from jael
::
++ source
|= [=wire whos=(set ship) =source:kale]
|= [=wire whos=(set ship) =source:jael]
^- (quip move _this-tapp)
=. waiting (~(put to waiting) ost.bowl [%take %source whos source])
?^ active

View File

@ -15,10 +15,10 @@
[%connect wire binding:eyre term]
[%http-response =http-event:http]
[%rule wire %turf %put turf]
[%source wire whos=(set ship) src=source:kale]
[%source wire whos=(set ship) src=source:jael]
[%sources wire ~]
[%new-event wire =ship =udiff:point:able:kale]
[%listen wire whos=(set ship) =source:kale]
[%new-event wire =ship =udiff:point:able:jael]
[%listen wire whos=(set ship) =source:jael]
==
::
:: Possible async responses
@ -30,7 +30,7 @@
[%reap =dock =path error=(unit tang)]
[%bound success=? =binding:eyre]
[%http-response response=client-response:iris]
[%source whos=(set ship) =source:kale]
[%source whos=(set ship) =source:jael]
==
::
:: Outstanding contracts

View File

@ -20,13 +20,13 @@
$: %d :: to %dill
$>(%flog task:able:dill) :: log output
== ::
$: %k :: to %jael
$: %j :: to %jael
$> $? %meet :: neighbor
%public-keys :: view public keys
%turf :: view domains
%private-keys :: view private keys
== ::
task:able:kale ::
task:able:jael ::
== ::
$: @tas :: to any
$>(%west task:able) :: deliver message
@ -36,12 +36,12 @@
$% $: %b :: from %behn
$>(%wake gift:able:behn) :: timer activate
== ::
$: %k :: from %jael
$: %j :: from %jael
$> $? %public-keys :: public keys
%turf :: bind to domains
%private-keys :: private keys
== ::
gift:able:kale ::
gift:able:jael ::
== ::
$: %g :: from %gall
$% [%mean p=ares] :: XX obsolete
@ -573,7 +573,7 @@
%- (sloy-light ski)
=/ pur=spur
/(scot %ud lyf)/(scot %p who)
[[151 %noun] %k our %deed da+now pur]
[[151 %noun] %j our %deed da+now pur]
:: +life-scry: for a +life
::
++ life-scry
@ -586,7 +586,7 @@
%- (sloy-light ski)
=/ pur=spur
/(scot %p who)
[[151 %noun] %k our %life da+now pur]
[[151 %noun] %j our %life da+now pur]
:: +sein-scry: for sponsor
::
++ sein-scry
@ -595,7 +595,7 @@
;; ship
%- need %- need
%- (sloy-light ski)
[[151 %noun] %k our %sein da+now /(scot %p who)]
[[151 %noun] %j our %sein da+now /(scot %p who)]
:: +saxo-scry: for sponsorship chain
::
++ saxo-scry
@ -604,7 +604,7 @@
;; (list ship)
%- need %- need
%- (sloy-light ski)
[[151 %noun] %k our %saxo da+now /(scot %p who)]
[[151 %noun] %j our %saxo da+now /(scot %p who)]
:: +turf-scry: for network domains
::
++ turf-scry
@ -613,7 +613,7 @@
|. ;; (list turf)
%- need %- need
%- (sloy-light ski)
[[151 %noun] %k our %turf da+now ~]
[[151 %noun] %j our %turf da+now ~]
::
++ vein :: vein:am
~/ %vein
@ -1341,7 +1341,7 @@
?- -.bon
%beer
=/ =wire /pubs/(scot %p p.bon)
:_ fox [hen [%pass wire %k %public-keys (silt p.bon ~)]]~
:_ fox [hen [%pass wire %j %public-keys (silt p.bon ~)]]~
::
%bock
:: ignore %turf if we haven't yet learned a unix duct
@ -1354,7 +1354,7 @@
[gad.fox %give %turf tuf.fox]~
::
%brew
:_ fox [hen [%pass / %k %turf ~]]~
:_ fox [hen [%pass / %j %turf ~]]~
::
%cake
:: ~? ?=(^ r.bon) [%cake-woot-bad hen r.bon]
@ -1369,7 +1369,7 @@
%milk
:: ~& [%milk p.bon q.bon]
?> ?=([@ @ *] q.q.bon)
?> ?=(?(%a %c %e %g %j %k) i.q.q.bon)
?> ?=(?(%a %c %e %g %j %j) i.q.q.bon)
=/ =wire [(scot %p our) (scot %p p.bon) q.q.bon]
:_ fox [hen %pass wire i.q.q.bon %west p.bon t.q.q.bon r.bon]~
::
@ -1400,11 +1400,11 @@
::
%raki
:_ fox
[hen [%pass / %k %meet who=p.bon life=q.bon pass=r.bon]]~
[hen [%pass / %j %meet who=p.bon life=q.bon pass=r.bon]]~
::
%sake
=/ =wire /our/(scot %p our)
:_ fox [hen [%pass wire %k %private-keys ~]]~
:_ fox [hen [%pass wire %j %private-keys ~]]~
::
%wine
[[(print hen p.bon q.bon) ~] fox]
@ -1457,7 +1457,7 @@
=/ ded=(unit deed)
?: ?=(%full -.public-keys-result.sih)
~| [her=her public-keys-result=public-keys-result.sih]
=/ a-point=(unit point:able:kale)
=/ a-point=(unit point:able:jael)
(~(get by points.public-keys-result.sih) her)
?~ a-point
~
@ -1465,7 +1465,7 @@
`[life.u.a-point a-pass oath=~]
?> ?=(%keys -.diff.public-keys-result.sih)
?> =(her who.public-keys-result.sih)
=/ a-key-update=key-update:point:able:kale
=/ a-key-update=key-update:point:able:jael
to.diff.public-keys-result.sih
`[life.a-key-update pass.a-key-update oath=~]
?~ ded

View File

@ -498,8 +498,8 @@
== ::
task:able:ford ::
== ::
$: %k :: by %kale
$>(%public-keys task:able:kale) ::
$: %j :: by %jael
$>(%public-keys task:able:jael) ::
== == ::
++ riot (unit rant) :: response+complete
++ sign :: in result $<-
@ -527,8 +527,8 @@
$: %f :: by %ford
$>(%made gift:able:ford) ::
== ::
$: %k :: by %kale
$>(%public-keys gift:able:kale) ::
$: %j :: by %jael
$>(%public-keys gift:able:jael) ::
== ::
$: @tas :: by any
$>(%crud vane-task) :: XX strange
@ -2643,7 +2643,7 @@
::
:+ ?: (~(has by hoy.ruf) her)
~
[hun.rom.ruf %pass /sinks %k %public-keys (silt her ~)]~
[hun.rom.ruf %pass /sinks %j %public-keys (silt her ~)]~
~
=/ rus rus:(~(gut by hoy.ruf) her *rung)
%+ ~(gut by rus) syd

View File

@ -79,15 +79,15 @@
$: %i ::
$>(%wegh task:able:iris) ::
== ::
$: %k ::
$: %j ::
$> $? %dawn ::
%fake ::
%wegh ::
== ::
task:able:kale ::
task:able:jael ::
== == ::
++ sign :: in result $<-
$~ [%k %init *@p] ::
$~ [%j %init *@p] ::
$% $: %a ::
$% [%nice ~] :: XX obsolete
$> $? %mass ::
@ -127,11 +127,11 @@
$: %i ::
$>(%mass gift:able:iris) ::
== ::
$: %k ::
$: %j ::
$> $? %init ::
%mass ::
== ::
gift:able:kale ::
gift:able:jael ::
== == ::
:::::::: :: dill tiles
--
@ -283,7 +283,7 @@
[hen %pass /heft/ford %f %wegh ~]
[hen %pass /heft/gall %g %wegh ~]
[hen %pass /heft/iris %i %wegh ~]
[hen %pass /heft/jael %k %wegh ~]
[hen %pass /heft/jael %j %wegh ~]
moz
==
==
@ -294,7 +294,7 @@
;; ship
%- need %- need
%- (sloy-light ski)
[[151 %noun] %k our %sein da+now /(scot %p who)]
[[151 %noun] %j our %sein da+now /(scot %p who)]
::
++ init :: initialize
^+ .
@ -383,14 +383,14 @@
|= sih/sign
^+ +>
?- sih
{?($a $b $c $e $f $g $i $j %k) $mass *}
{?($a $b $c $e $f $g $i $j) $mass *}
(wegh -.sih p.sih)
::
{$a $nice *}
:: ~& [%take-nice-ames sih]
+>
::
[%k %init *]
[%j %init *]
:: pass thru to unix
::
+>(moz :_(moz [hen %give +.sih]))
@ -438,7 +438,7 @@
:: +wegh: receive a memory report from a vane and maybe emit full report
::
++ wegh
|= [lal=?(%a %b %c %e %f %g %i %k) mas=mass]
|= [lal=?(%a %b %c %e %f %g %i %j) mas=mass]
^+ +>
:: update our listing of vane responses with this new one
::
@ -451,7 +451,7 @@
%f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
%g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
%i ~?(?=(^ i.hef.all) %double-mass-i hef.all(i `mas))
%k ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas))
%j ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas))
==
:: if not all vanes have responded yet, no-op
::
@ -510,12 +510,12 @@
?> =(~ hey.all)
=. hey.all `hen
=/ boot
((soft $>($?(%dawn %fake) task:able:kale)) p.task)
((soft $>($?(%dawn %fake) task:able:jael)) p.task)
?~ boot
~& %dill-no-boot
~& p.task
~| invalid-boot-event+hen !!
:_(..^$ [hen %pass / %k u.boot]~)
:_(..^$ [hen %pass / %j u.boot]~)
:: we are subsequently initialized. single-home
::
?: ?=(%init -.task)

View File

@ -1334,7 +1334,7 @@
%keep `%f
%kill `%f
%look `%j
%listen `%k
%listen `%j
%merg `%c
%mint `%j
%mont `%c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2049,239 +2049,6 @@
:: ::
:::: ++able:jael :: (1h1) arvo moves
:: ::::
++ able ^?
=, pki
=, rights
|%
:: %jael has two general kinds of task: changes
:: and change subscriptions.
::
:: change tasks are designed to match high-level
:: operations - for instance, we have %burn, %mint,
:: and %move, not just a single delta operation.
:: more of these operations will probably be added,
:: and invariants enforced at transaction end.
::
:: subscriptions are also user-focused - for instance,
:: %vein sends all the information needed to maintain
:: the secure channel, both rights and certificates.
:: the security-critical tasks (%veil, %vein, %vine)
:: should probably be bound to a whitelisted duct set.
:: (all secrets are redacted from %vest gifts.)
::
:: %jael only talks to %ames and %behn. we send messages
:: through %ames and use %behn timers.
::
++ logs :: on-chain changes
%+ map event-id:ethereum-types :: per event log
diff-azimuth:azimuth-types :: the change
++ action :: balance change
%+ pair ship :: partner
%+ each bump :: &/liability change
bump :: |/asset change
:: ::
++ balance :: balance sheet
%+ pair ::
(map ship safe) :: liabilities
(map ship safe) :: assets
:: ::
++ vent-result :: %vent result
$% [%snap snap=snapshot:jael] :: restore snapshot
[%chain can=chain] :: get new events
== ::
:: ::
++ chain :: batch of changes
%+ each logs :: & all events
logs :: | new events
++ change :: urbit change
$% [%ethe can=chain] :: on-chain change
[%meet who=ship =life =pass] :: meet in new era
$: %rite :: rights change
rex/ship :: issuer
pal/ship :: issued to
del/bump :: change
== == ::
++ gift :: out result <-$
$% [%init p=ship] :: report install unix
[%mass p=mass] :: memory usage report
[%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
[%vent p=vent-result] :: ethereum changes
== ::
:: ::
++ public :: public key state
$: life=life :: current key number
pubs=(map life pass) :: pubkeys by number
== ::
++ remote :: remote notification
%+ each safe :: &/addition
safe :: |/replacement
:: +seed: private boot parameters
::
+$ seed [who=ship lyf=life key=ring sig=(unit oath:pki)]
::
++ tally :: balance update
%+ each balance :: complete
action :: change
::
+= task :: in request ->$
$~ [%vega ~] ::
$% [%burn p=ship q=safe] :: destroy rights
[%hail p=ship q=remote] :: remote update
$: %dawn :: boot from keys
=seed:able:jael :: identity params
spon=ship :: sponsor
czar=(map ship [=life =pass]) :: galaxy table
turf=(list turf) :: domains
bloq=@ud :: block number
node=(unit purl:eyre) :: gateway url
snap=(unit snapshot) :: head start
== ::
[%fake =ship] :: fake boot
[%look src=(each ship purl:eyre)] :: set ethereum source
[%mint p=ship q=safe] :: create rights
[%move p=ship q=ship r=safe] :: transfer from=to
::TODO %next for generating/putting new private key
[%nuke ~] :: cancel tracker from
[%pubs =ship] :: view public keys
[%meet =ship =life =pass] :: met after breach
[%snap snap=snapshot kick=?] :: load snapshot
[%turf ~] :: view domains
$>(%vega vane-task) :: report upgrade
[%vein ~] :: view signing keys
[%vent ~] :: view ethereum events
[%vest ~] :: view public balance
[%vine ~] :: view secret history
$>(%wegh vane-task) :: memory usage request
$>(%west vane-task) :: remote request
[%wind p=@ud] :: rewind before block
== ::
-- ::
:: ::
:::: ::
:: ::
++ node-src :: ethereum node comms
$: node=purl:eyre :: node url
filter-id=@ud :: current filter
poll-timer=@da :: next filter poll
== ::
++ snapshot :: rewind point
=, azimuth-types ::
$: kyz=(map ship public:able) :: public key state
$= eth ::
$: dns=dnses :: on-chain dns state
pos=(map ship point) :: on-chain ship state
== ::
eth-bookmark
==
:: +eth-bookmark: cursor into the ethereum chain
::
++ eth-bookmark
$: heard=(set event-id:ethereum-types)
latest-block=@ud
==
:: +state-eth-node: state of a connection to an ethereum node
::
++ state-eth-node :: node config + meta
$: source=(each ship node-src) :: learning from
foreign-block=@ud :: node's latest block
eth-bookmark
== ::
:: ::
:::: ++pki:jael :: (1h2) certificates
:: ::::
++ pki ^?
|%
::TODO update to fit azimuth-style keys
:: the urbit meta-certificate (++will) is a sequence
:: of certificates (++cert). each cert in a will
:: revokes and replaces the previous cert. the
:: version number of a ship is a ++life.
::
:: the deed 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
:: bit is set, the new life of this ship may have
:: lost information that the old life had.
::
++ hand @uvH :: 128-bit hash
++ mind {who/ship lyf/life} :: key identifier
++ name (pair @ta @t) :: ascii / unicode
++ oath @ :: signature
-- :: pki
:: ::
:::: ++rights:jael :: (1h3) claims
:: ::::
++ rights ^?
=, pki
|%
:: %jael tracks promises (++rite) from ship to ship.
:: a rite may be any right, badge, asset, secret, etc.
:: un-shared secret or private asset is stored as a
:: rite from self to self.
::
:: each rite is really a class of rights, and often
:: has its own internal set or map structure.
::
:: present kinds of rite:
::
:: %apple: application secret for a web api.
:: %block: the promisee is banned.
:: %email: email tied to promissee's ship.
:: %final: ship/ticket pair, ready to launch.
:: %fungi: fungible, countable asset.
:: %guest: permission to adopt foreign child.
:: %hotel: block of unissued children.
:: %jewel: urbit private keys.
:: %login: user's login passcode.
:: %pword: password for a website/api.
:: %token: user access token for a web api.
:: %urban: symmetric key for urbit networking.
::
:: %fungi keys can be anything, but don't reuse
:: currency codes. codes for urbit invitations:
:: %ugl == galaxy, %usr == star, %upl == planet
::
:: you can think of [our her rite] as an rdf triple.
::
++ bill (pair @da @) :: expiring value
++ bump :: rights change
$: mor/safe :: add rights
les/safe :: lose rights
== ::
++ dorm (pair ship bloq) :: issuing group
++ pile (tree (pair @ @)) :: efficient ship set
++ rite :: urbit commitment
$% {$apple p/(map site @)} :: web api key
{$block ~} :: banned
{$email p/(set @t)} :: email addresses
{$final p/(map ship @pG)} :: ticketed ships
{$fungi p/(map term @ud)} :: fungibles
{$guest ~} :: refugee visa
{$hotel p/(map dorm pile)} :: reserved block
{$jewel p/(map life ring)} :: private keyring
{$login p/(set @pG)} :: login secret
{$pword p/(map site (map @t @t))} :: web passwd by user
{$token p/(map site (map @t @t))} :: app tokens by user
{$urban p/(map hand bill)} :: urbit symmetric keys
== ::
++ site (list @ta) :: [%com %yahoo %www ~]
++ safe (tree rite) :: rights set
-- :: rights
-- :: jael
:: ::::
:::: ++kale :: (1h) security
:: ::::
++ kale ^?
|%
:: ::
:::: ++able:kale :: (1h1) arvo moves
:: ::::
++ able ^?
=, pki
|%
@ -2305,7 +2072,7 @@
+= task :: in request ->$
$~ [%vega ~] ::
$% $: %dawn :: boot from keys
=seed:able:kale :: identity params
=seed:able:jael :: identity params
spon=[=ship point:azimuth-types] :: sponsor
czar=(map ship [=rift =life =pass]) :: galaxy table
turf=(list turf) :: domains
@ -2327,24 +2094,6 @@
$>(%west vane-task) :: remote request
[%wind p=@ud] :: rewind before block
== ::
:: %kale has two general kinds of task: changes
::
:: and change subscriptions.
::
:: change tasks are designed to match high-level
:: operations - for instance, we have %burn, %mint,
:: and %move, not just a single delta operation.
:: more of these operations will probably be added,
:: and invariants enforced at transaction end.
::
:: subscriptions are also user-focused - for instance,
:: %vein sends all the information needed to maintain
:: the secure channel, both rights and certificates.
:: the security-critical tasks (%veil, %vein, %vine)
:: should probably be bound to a whitelisted duct set.
:: (all secrets are redacted from %vest gifts.)
::
:: %kale only talks to %ames and itself.
::
++ block
=< block
@ -2487,7 +2236,7 @@
ship-sources-reverse=(jug source-id ship)
== ::
:: ::
:::: ++pki:kale :: (1h2) certificates
:::: ++pki:jael :: (1h2) certificates
:: ::::
++ pki ^?
|%
@ -2509,7 +2258,7 @@
++ name (pair @ta @t) :: ascii / unicode
++ oath @ :: signature
-- :: pki
-- :: kale
-- :: jael
:: ::::
:::: ++xmas :: (1i) new network
:: ::::
@ -7096,7 +6845,7 @@
++ sein :: autoboss
|= [our=ship now=@da who=ship]
.^ ship
%k
%j
/(scot %p our)/sein/(scot %da now)/(scot %p who)
==
:: :: ++team:title
@ -7712,7 +7461,6 @@
{$g gift:able:gall}
[%i gift:able:iris]
{$j gift:able:jael}
{$k gift:able:kale}
==
::
+$ unix-task :: input from unix
@ -9224,45 +8972,25 @@
++ bloq
|= snap=snapshot:jael
^- (unit @ud)
=- ?:(?=(%| -.out) ~ (some p.out))
^= out %- mule |.
latest-block.snap
~
:: +czar:snap:dawn: extract galaxy table
::
++ czar
|= snap=snapshot:jael
^- (unit (map ship [=life =pass]))
=- ?:(?=(%| -.out) ~ (some p.out))
^= out %- mule |.
%- ~(gas by *(map ship [=life =pass]))
%+ turn (gulf 0 255)
|= gal=@
^- [ship [life pass]]
:- gal
~| czar-gal=gal
[life pass]:(need net:(~(got by pos.eth.snap) gal))
~
:: +point:snap:dawn: extract ship's contract state
::
++ point
|= [who=ship snap=snapshot:jael]
^- (unit point:azimuth)
(~(get by pos.eth.snap) who)
~
:: +turf:snap:dawn: extract network domains
::
++ turf
|= snap=snapshot:jael
^- (unit (list ^turf))
=- ?:(?=(%| -.out) ~ (some p.out))
^= out %- mule |.
%+ murn
^- (list host:eyre)
%+ murn
^- (list @t)
~[pri sec ter]:dns.eth.snap
|= dom=@t
^- (unit host:eyre)
(rush dom thos:de-purl:html)
|=(a=host:eyre ?:(?=(%| -.a) ~ (some p.a)))
~
--
:: +veri:dawn: validate keys, life, discontinuity, &c
::

View File

@ -18,7 +18,7 @@
ames-gate
now=~1234.5.6
call-args=[duct type=*type %soft %init ~nul]
expected-moves=[[duct %pass wire %k %private-keys ~] [duct %pass / %k %turf ~] ~]
expected-moves=[[duct %pass wire %j %private-keys ~] [duct %pass / %j %turf ~] ~]
==
::
results1
@ -56,7 +56,7 @@
%: ames-take
ames-gate
now
take-args=[wire duct -:!>([%k %private-keys vein-data]) [%k %private-keys vein-data]]
take-args=[wire duct -:!>([%j %private-keys vein-data]) [%j %private-keys vein-data]]
expected-moves=~
==
::
@ -67,7 +67,7 @@
ames-gate
now
call-args=[duct type=*type %soft [%want ~nul /foo 1]]
:~ [duct %pass /pubs/~nul %k %public-keys (silt ~nul ~)]
:~ [duct %pass /pubs/~nul %j %public-keys (silt ~nul ~)]
[duct %give %send *lane:ames pact1]
:: XX why ~s4 ??
::

View File

@ -1,159 +0,0 @@
/+ *test
::
/= jael-raw /: /===/sys/vane/jael
/!noun/
=/ type-spear -:!>(jael-raw)
::
=/ test-pit=vase !>(.)
=/ jael-gate (jael-raw test-pit)
::
|%
:: tests that booting into %jael inits other vanes
::
++ test-boot-dawn
:: +key ~nul
=/ key=ring
0w8O.k5Ry4.QsKQq.1k~uj.DBOU4.numfq.nXOwa.cSk7B.VcHVm.
-8~kX.3ALiG.rQjOi.HZ9hj.84b6G.P5pCZ.UtNtt.Lh9TE.2DQJ2
=/ url (de-purl:html 'http://localhost:8545')
=/ dan
[`seed:able:jael`[~nul 1 key ~] ~nul ~ [/org/urbit ~] 0 url ~]
::
=^ results1 jael-gate
=/ hen=duct
[/ /term/1 / ~]
%- jael-call
:* jael-gate
now=~1234.5.6
call-args=[hen type=*type %dawn dan]
:~ [hen %slip %a %init ~nul]
[hen %slip %c %init ~nul]
[hen %slip %g %init ~nul]
[hen %slip %d %init ~nul]
[hen %slip %e %init ~nul]
[hen %give %init ~nul]
[hen %pass /~nul/init %b %wait +(~1234.5.6)]
== ==
::
=^ results2 jael-gate
=/ wir=wire
/our/~nul/now/(scot %da (add ~s1 ~1234.5.6))
%- jael-call-with-comparator :*
jael-gate
now=(add ~s1 ~1234.5.6)
call-args=[duct=[/ /term/1 wir ~] type=*type %vein ~]
^= comparator
|= moves=(list move:jael-gate)
;: weld
%+ expect-eq
!> 1
!> (lent moves)
::
%+ expect-eq
!> [%give %vein 1 (my [1 key] ~)]
!> q:(head moves)
== ==
::
=^ results3 jael-gate
::
=/ request=request:http
%+ light-json-request:rpc:ethereum
(need url)
%+ request-to-json:rpc:ethereum
`'block number'
[%eth-block-number ~]
::
%- jael-take-with-comparator :*
jael-gate
now=(add ~s2 ~1234.5.6)
take-args=[wire=/~nul/init duct=[/ /term/1 ~] type=*type %b %wake ~]
^= comparator
|= moves=(list move:jael-gate)
?> ?=(^ moves)
?> ?=([* %pass * %i %request *] i.moves)
;: weld
%+ expect-eq
!> 1
!> (lent moves)
::
%+ expect-eq
!> request
!> request.q.q.i.moves
== ==
::
:(weld results1 results2 results3)
::
++ jael-call
|= $: jael-gate=_jael-gate
now=@da
call-args=[=duct wrapped-task=(hypo (hobo task:able:jael-gate))]
expected-moves=(list move:jael-gate)
==
^- [tang _jael-gate]
::
=/ jael (jael-gate our=~nul now=now eny=`@`0xdead.beef scry=*sley)
::
=^ moves jael-gate
%- call:jael call-args
::
=/ output=tang
%+ expect-eq
!> expected-moves
!> moves
::
[output jael-gate]
::
++ jael-call-with-comparator
|= $: jael-gate=_jael-gate
now=@da
call-args=[=duct wrapped-task=(hypo (hobo task:able:jael-gate))]
move-comparator=$-((list move:jael-gate) tang)
==
^- [tang _jael-gate]
::
=/ jael (jael-gate our=~nul now=now eny=`@`0xdead.beef scry=*sley)
::
=^ moves jael-gate
%- call:jael call-args
::
=/ output=tang (move-comparator moves)
::
[output jael-gate]
::
++ jael-take
|= $: jael-gate=_jael-gate
now=@da
take-args=[=wire =duct wrapped-task=(hypo sign:jael-gate)]
expected-moves=(list move:jael-gate)
==
^- [tang _jael-gate]
::
=/ jael (jael-gate our=~nul now=now eny=`@`0xdead.beef scry=*sley)
::
=^ moves jael-gate
%- take:jael take-args
::
=/ output=tang
%+ expect-eq
!> expected-moves
!> moves
::
[output jael-gate]
::
++ jael-take-with-comparator
|= $: jael-gate=_jael-gate
now=@da
take-args=[=wire =duct wrapped-task=(hypo sign:jael-gate)]
move-comparator=$-((list move:jael-gate) tang)
==
^- [tang _jael-gate]
::
=/ jael (jael-gate our=~nul now=now eny=`@`0xdead.beef scry=*sley)
::
=^ moves jael-gate
%- take:jael take-args
::
=/ output=tang (move-comparator moves)
::
[output jael-gate]
--