Merge branch 'release-candidate' into single-home

* release-candidate:
  [CI] updates pinned vere commit
  Use a trap to lazily evaluate the arguments to %dude in Eyre.
  Don't do two passes in the unjetted +sort
  %hold removed
  losing the `b` reference
  remove !:
  use assertion
  Update pin-vere-commit.txt
  type variance bug fix
  Trim ethereum snapshot in Jael (#911)
  Moved to +jack
  Add ~| to arvo to try to debug intermittent crash.
  Add special cases for %da and %ta to +slaw
This commit is contained in:
Joe Bryan 2018-12-06 19:07:38 -05:00
commit 6a1f32bb19
8 changed files with 150 additions and 115 deletions

View File

@ -1 +1 @@
https://ci-piers.urbit.org/zod-7b59c5eab333d6190f6ff199fa72d0bfafe76e9f.tgz
https://ci-piers.urbit.org/zod-234d9e7c45dbc52d8eed860d476815ff470832e7.tgz

View File

@ -1 +1 @@
591995934a8dd45735ee759142910bc966614224
65ce838b26f64311e73410512d83898b081873db

View File

@ -182,7 +182,9 @@
::
++ wink :: deploy
|= {now/@da eny/@ ski/slyd}
=^ rig worm.vane (~(slym wa worm.vane) vase.vane [who +<]) :: activate vane
=^ rig worm.vane
~| [%failed-vane-activation-for lal]
(~(slym wa worm.vane) vase.vane [who +<]) :: activate vane
~% %wink +>+> ~
|%
++ slid
@ -203,14 +205,18 @@
++ slur :: call gate on
|= {gat/vase hil/mill}
^- (unit (pair vase worm))
=^ sam worm.vane (~(slot wa worm.vane) 6 gat)
=^ sam worm.vane
~| [%failed-slot-in lal]
(~(slot wa worm.vane) 6 gat)
=^ hig worm.vane
~| [%failed-nest-in lal]
?- -.hil
%& (~(nest wa worm.vane) p.sam p.p.hil)
%| (~(nets wa worm.vane) p.sam p.p.hil)
==
?. hig
~
~| [%failed-slym-in lal]
`(~(slym wa worm.vane) gat +>.hil)
::
++ slur-a ~/(%slur-a |=({gat/vase hil/mill} =+(%a (slur gat hil))))
@ -354,6 +360,7 @@
hil/mill
==
^- [(list move) _vane]
~| [%failed-swim lal org pux]
:: ~& [%swim-wyt `@ud`~(wyt in worm.vane)]
=+ ^= pru
?~ pux
@ -390,6 +397,7 @@
==
=- ?:(?=(%| -.res) ((slog p.res) ~) (some p.res))
^= res %- mule |.
~| [%failed-vint lal]
=+ gen=(rain pax txt)
~& [%vane-parsed `@p`(mug gen)]
=+ pro=(vent who lal vil bud [(slym (slap bud gen) bud) *worm])
@ -419,6 +427,7 @@
|- ^- (unit (unit (cask)))
?~ vanes ~
?. =(lal label.i.vanes) $(vanes t.vanes)
~| [%failed-scry ron bed]
%- scry:(wink:(vent who lal vil bud vane.i.vanes) now (shax now) ..^$)
[fur ren bed]
::
@ -459,6 +468,7 @@
|= {org/@tas lal/@tas pux/(unit wire) hen/duct hil/mill =vane}
^- [p=(list move) q=_vane]
=+ ven=(vent who lal vil bud vane)
~| [%failed-take lal]
=+ win=(wink:ven now (shax now) beck)
(swim:win org pux hen hil)
::
@ -480,6 +490,7 @@
++ jack :: dispatch card
|= {lac/? gum/muse}
^- {{p/(list ovum) q/(list muse)} _vanes}
~| %failed-jack
:: =. lac |(lac ?=(?(%g %f) p.gum))
:: =. lac &(lac !?=($b p.gum))
%+ fire
@ -855,6 +866,7 @@
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
:_ t.vanes
:- label.i.vanes
~| [%failed-vane-activation now lal.fav]
vane:(ruck:(vent who lal.fav vil bud [vase.vane.i.vanes *worm]) pax.fav txt.fav)
==
::

View File

@ -787,10 +787,11 @@
=> .(a ^.(homo a))
|- ^+ a
?~ a ~
=+ s=(skid t.a |:(c=i.a (b c i.a)))
%+ weld
$(a (skim t.a |:(c=i.a (b c i.a))))
$(a p.s)
^+ t.a
[i.a $(a (skim t.a |:(c=i.a !(b c i.a))))]
[i.a $(a q.s)]
::
++ spin :: stateful turn
::
@ -5779,27 +5780,7 @@
++ crub
~+
;~ pose
%+ cook
|=(det/date `dime`[%da (year det)])
;~ plug
%+ cook
|=({a/@ b/?} [b a])
;~(plug dim:ag ;~(pose (cold | hep) (easy &)))
;~(pfix dot mot:ag) :: month
;~(pfix dot dip:ag) :: day
;~ pose
;~ pfix
;~(plug dot dot)
;~ plug
dum:ag
;~(pfix dot dum:ag)
;~(pfix dot dum:ag)
;~(pose ;~(pfix ;~(plug dot dot) (most dot qix:ab)) (easy ~))
==
==
(easy [0 0 0 ~])
==
==
(cook |=(det/date `dime`[%da (year det)]) when)
::
%+ cook
|= {a/(list {p/?($d $h $m $s) q/@}) b/(list @)}
@ -5923,6 +5904,28 @@
(stag %$ crub)
==
::
++ when
~+
;~ plug
%+ cook
|=({a/@ b/?} [b a])
;~(plug dim:ag ;~(pose (cold | hep) (easy &)))
;~(pfix dot mot:ag) :: month
;~(pfix dot dip:ag) :: day
;~ pose
;~ pfix
;~(plug dot dot)
;~ plug
dum:ag
;~(pfix dot dum:ag)
;~(pfix dot dum:ag)
;~(pose ;~(pfix ;~(plug dot dot) (most dot qix:ab)) (easy ~))
==
==
(easy [0 0 0 ~])
==
==
::
++ zust
~+
;~ pose
@ -5949,6 +5952,9 @@
::
=+ con=(slay txt)
?.(&(?=({~ $$ @ @} con) =(p.p.u.con mod)) ~ [~ q.p.u.con])
::
%da
(rush txt ;~(pfix sig (cook year when:so)))
::
%p
(rush txt ;~(pfix sig fed:ag))
@ -5961,6 +5967,9 @@
::
%uv
(rush txt ;~(pfix (jest '0v') viz:ag))
::
%ta
(rush txt ;~(pfix ;~(plug sig dot) urs:ab))
::
%tas
(rush txt sym)
@ -9757,10 +9766,11 @@
^- type
?- -.lap
%& p.lap
%| %- fire
%| %- fork
%+ turn ~(tap in q.lap)
|= {a/type b/foot}
[a [%dry %$ 1]]
|= [a=type *]
?> ?=([%core *] a)
[%core q.q.a q.a]
==
:: ::
++ feel :: detect existence
@ -11609,6 +11619,7 @@
++ seem |=(toy/typo `type`toy) :: promote typo
++ seer |=(vix/vise `vase`vix) :: promote vise
++ sell :: tank pretty-print
~/ %sell
|= vax/vase ^- tank
~| %sell
(~(deal us p.vax) q.vax)

View File

@ -4,7 +4,7 @@
|= pit/vase
=, eyre
=, wired
=, unity
=, unity
=, format
=, mimes:html
=, html
@ -281,41 +281,6 @@
:: (weld (turn cug |=(a=@t ['set-cookie' a]))
[sas ~[content-type+(en-mite mit)] [~ (as-octs rez)]]
::
++ add-links :: x-urbit:// urls
|= a/wall ^- marl
?. [x-urbit-links=&] [;/((of-wall a))]~ :: default disable
|- ^- marl
?~ a ~
=^ pax i.a :: parse path if any
^- {(unit path) tape}
=/ vex (fel:stab [1 1] i.a)
?~ q.vex [~ i.a]
[`p q.q]:u.q.vex
?~ pax [;/("{i.a}\0a") $(a t.a)]
:- ;a/"x-urbit:{(spud u.pax)}":"{(spud u.pax)}"
[;/("{i.a}\0a") $(a t.a)]
::
++ render-tang :: tanks to manx
|= {dep/@uvH tan/tang}
;html
;head
;link(rel "stylesheet", href "/lib/base.css");
;title: server error
==
;body:div#c.err:pre:code:"*{(add-links (wush 80 tan))}"
;script@"/~/on/{<dep>}.js";
==
::
++ render-turbo-tang
|= tan/tang
;html
;head
;link(rel "stylesheet", href "/lib/base.css");
;title: server error
==
;body:div#c.err:pre:code:"*{(add-links (wush 80 tan))}"
==
::
++ favi :: XX favicon
0w3.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.
~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.~~~~~.
@ -1170,10 +1135,51 @@
(execute-turbo tea live=%.n req)
::
++ execute-turbo
~/ %execute-turbo
|= [tea=whir live=? request=schematic:ford]
%+ pass-note tea
:* %f %build our live
[%dude [|.(+)]:[%leaf "eyre: execute {<tea>}"] request]
[%dude |.([%leaf "eyre: execute {<tea>}"]) request]
==
::
++ add-links :: x-urbit:// urls
~/ %add-links
|= a/wall ^- marl
?. [x-urbit-links=&] [;/((of-wall a))]~ :: default disable
|- ^- marl
?~ a ~
=^ pax i.a :: parse path if any
^- {(unit path) tape}
=/ vex (fel:stab [1 1] i.a)
?~ q.vex [~ i.a]
[`p q.q]:u.q.vex
?~ pax [;/("{i.a}\0a") $(a t.a)]
:- ;a/"x-urbit:{(spud u.pax)}":"{(spud u.pax)}"
[;/("{i.a}\0a") $(a t.a)]
::
++ render-tang :: tanks to manx
~/ %render-tang
|= {dep/@uvH tan/tang}
~& [%render-tang dep]
%- (slog tan)
;html
;head
;link(rel "stylesheet", href "/lib/base.css");
;title: server error
==
;body:div#c.err:pre:code:"*{(add-links (wush 80 tan))}"
;script@"/~/on/{<dep>}.js";
==
::
++ render-turbo-tang
~/ %render-turbo-tang
|= tan/tang
;html
;head
;link(rel "stylesheet", href "/lib/base.css");
;title: server error
==
;body:div#c.err:pre:code:"*{(add-links (wush 80 tan))}"
==
::
++ fail

View File

@ -82,7 +82,6 @@
== ::
++ state-absolute :: absolute urbit
$: pry/(map ship (map ship safe)) :: promises
eve=logs :: on-chain events
== ::
++ state-snapshots :: rewind points
$: interval=_100 :: block interval
@ -702,7 +701,7 @@
=/ cub (nol:nu:crub:crypto key.seed.tac)
%+ ~(put by kyz.puk.sub)
our
[& lyf.seed.tac (my [lyf.seed.tac pub:ex:cub] ~)]
[lyf.seed.tac (my [lyf.seed.tac pub:ex:cub] ~)]
:: our initial private key, as a +tree of +rite
::
=/ rit (sy [%jewel (my [lyf.seed.tac key.seed.tac] ~)] ~)
@ -711,7 +710,7 @@
::
=/ kyz
%- ~(run by czar.tac)
|=([=life =pass] `public`[live=| life (my [life pass] ~)])
|=([=life =pass] `public`[life (my [life pass] ~)])
=. +>.$
%- curd =< abet
(pubs:~(feel su hen our urb sub etn sap) kyz)
@ -768,7 +767,7 @@
:: our initial public key
::
=. kyz.puk.sub
(~(put by kyz.puk.sub) our [& 1 (my [1 pub:ex:cub] ~)])
(~(put by kyz.puk.sub) our [1 (my [1 pub:ex:cub] ~)])
:: our private key, as a +tree of +rite
::
:: Private key updates are disallowed for fake ships,
@ -1109,10 +1108,10 @@
::
++ extract-snap :: extract rewind point
^- snapshot
:* eve.urb
kyz.puk.sub
+.eth.sub
etn(source *(each ship node-src))
:* kyz.puk.sub
[dns hul]:eth.sub
heard.etn
latest-block.etn
==
:: :: ++feed:su
++ feed :: subscribe to view
@ -1149,7 +1148,7 @@
%. [[hen ~ ~] snap+last-snap]
%_ vent-pass
:: %_ ..feed ::TODO see ++abet
:: moz [[hen %give %vent &+eve] moz]
:: moz [[hen %give %vent] moz]
yen.eth (~(put in yen.eth) hen)
==
:: :: ++fake:feed:su
@ -1159,7 +1158,7 @@
++ pubs
|= who=ship
=/ cub (pit:nu:crub:crypto 512 who)
=/ pub [live=| life=1 (my [1 pub:ex:cub] ~)]
=/ pub [life=1 (my [1 pub:ex:cub] ~)]
=. moz [[hen %give %pubs pub] moz]
(pubs:feel (my [who pub] ~))
--
@ -1186,7 +1185,7 @@
:: update public key store and notify subscribers
:: of the new state
::
:: ~& [%sending-pubs-about who life.pub live.pub]
:: ~& [%sending-pubs-about who life.pub]
%+ exec(kyz.puk (~(put by kyz.puk) who pub))
(~(get ju yen.puk) who)
[%give %pubs pub]
@ -1313,21 +1312,21 @@
=(who (^sein:title our))
==
?~ old
[live=& life (my [life pass] ~)]
[life (my [life pass] ~)]
=/ fyl life.u.old
=/ sap (~(got by pubs.u.old) fyl)
~| [%met-mismatch who life=[old=fyl new=life] pass=[old=sap new=pass]]
?> ?: =(fyl life)
=(sap pass)
=(+(fyl) life)
[live=& life (~(put by pubs.u.old) life pass)]
[life (~(put by pubs.u.old) life pass)]
?. ?=(^ old)
~| [%met-unknown-ship who] !!
=/ fyl life.u.old
=/ sap (~(got by pubs.u.old) fyl)
~| [%met-mismatch who life=[old=fyl new=life] pass=[old=sap new=pass]]
?> &(=(fyl life) =(sap pass))
[live=& life pubs.u.old]
[life pubs.u.old]
:: :: ++file:su
++ file :: process event logs
::TODO whenever we add subscriptions for data,
@ -1358,7 +1357,7 @@
:: sends out entire new state, rather than
:: just the processed changes.
%+ fall (~(get by kyz.puk) who)
%*(. *public live |)
*public
::
++ file-keys
|= [who=ship =life =pass]
@ -1370,15 +1369,14 @@
~| [%key-mismatch who life `@ux`u.puk `@ux`pass (get-public ~zod)]
?>(=(u.puk pass) kyz)
%+ ~(put by kyz) who
:+ live.pub
(max life life.pub)
:- (max life life.pub)
(~(put by pubs.pub) life pass)
::
++ file-discontinuity
|= who=ship
^+ kyz
=+ (get-public who)
(~(put by kyz) who -(live |))
(~(put by kyz) who -)
::
++ file-event
|= [wer=event-id dif=diff-constitution]
@ -1525,8 +1523,6 @@
|= ven=chain
%_ +>
hab [[%ethe ven] hab]
eve ?: ?=(%& -.ven) p.ven
(~(uni by eve) p.ven)
==
:: :: ++lawn:ur
++ lawn :: debts, rex to pal
@ -2104,7 +2100,7 @@
==
=^ snap=snapshot +>.$
?: |(=(~ old-qeu) (lth block block-number:(need ~(top to old-qeu))))
[%*(. *snapshot latest-block.etn launch:contracts) +>.$]
[%*(. *snapshot latest-block launch:contracts) +>.$]
|- ^- [snapshot _+>.^$]
=^ snap=[block-number=@ud snap=snapshot] old-qeu
~(get to old-qeu)
@ -2115,7 +2111,7 @@
?: |(=(~ old-qeu) (lth block block-number:(need ~(top to old-qeu))))
[snap.snap +>.^$]
$
~& [%restoring-block block latest-block.etn.snap ~(wyt by hul.eth.snap)]
~& [%restoring-block block latest-block.snap ~(wyt by hul.eth.snap)]
(restore-snap snap &)
:: :: ++restore-snap:et
++ restore-snap :: restore snapshot
@ -2128,7 +2124,7 @@
~(tap by yen.puk.sub)
|- ^+ +>.^$
?~ subs +>.^$
=/ pub (fall (~(get by kyz.snap) p.i.subs) %*(. *public live |))
=/ pub (fall (~(get by kyz.snap) p.i.subs) *public)
=. +>.^$ (exec q.i.subs [%give %pubs pub])
$(subs t.subs)
:: update vent subscribers
@ -2137,11 +2133,12 @@
:: keep the following in sync with ++extract-snap:file:su
::
%= +>.$
eve.urb eve.snap
etn etn.snap(source source.etn)
kyz.puk.sub kyz.snap
+.eth.sub eth.snap
sap sap(last-block 0)
heard.etn heard.snap
latest-block.etn latest-block.snap
kyz.puk.sub kyz.snap
dns.eth.sub dns.eth.snap
hul.eth.sub hul.eth.snap
sap sap(last-block 0)
moves
?. look moves
=- [[hen %pass /wind/look %j %look our -] moves]

View File

@ -2117,8 +2117,7 @@
[%sunk p=ship q=life] :: report death
== == == ::
++ public :: public key state
$: live=? :: seen in current era
life=life :: current key number
$: life=life :: current key number
pubs=(map life pass) :: pubkeys by number
== ::
++ remote :: remote notification
@ -2177,19 +2176,25 @@
== ::
++ snapshot :: rewind point
=, constitution:ethe ::
$: eve=logs:able :: eth absolute state
kyz=(map ship public:able) :: public key state
$: kyz=(map ship public:able) :: public key state
$= eth ::
$: dns=dnses :: on-chain dns state
hul=(map ship hull) :: on-chain ship state
== ::
etn=state-eth-node :: eth connection state
== ::
eth-bookmark
==
:: +eth-bookmark: cursor into the ethereum chain
::
++ eth-bookmark
$: heard=(set event-id:ethe)
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
heard=(set event-id:ethe) :: processed events
latest-block=@ud :: last heard block
foreign-block=@ud :: node's latest block
eth-bookmark
== ::
:: ::
:::: ++pki:jael :: (1h2) certificates
@ -8316,7 +8321,7 @@
++ bloq
|= snap=snapshot:jael
^- @ud
latest-block.etn.snap
latest-block.snap
:: +czar:snap:dawn: extract galaxy table
::
++ czar

View File

@ -31,17 +31,21 @@
:: snapshot
::
++ snap
^- snapshot:jael
:* *logs:able:jael
~
:* ['urbit.org' 'urbit.org' '']
%- malt
:* ~zod^hul
~marzod^hul
(turn (gulf 1 255) |=(gal=@ gal^hul))
==
==
%*(. *state-eth-node:jael latest-block 4.230.000)
=| =snapshot:jael
%_ snapshot
kyz ~
::
dns.eth
['urbit.org' 'urbit.org' '']
::
hul.eth
%- malt
:* ~zod^hul
~marzod^hul
(turn (gulf 1 255) |=(gal=@ gal^hul))
==
::
latest-block 4.230.000
==
::
++ test-give-bloq