mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 04:40:50 +03:00
all breach tests pass
This commit is contained in:
parent
efd37a1e3c
commit
e39a2c0467
@ -216,24 +216,34 @@
|
||||
%+ (wrap-philter ,_eth-node ,~)
|
||||
router:eth-node
|
||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
||||
~& > 'BUD DONE'
|
||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
||||
~& > 'MARBUD DONE'
|
||||
;< file=@t bind:m (touch-file ~bud %base)
|
||||
~& > 'TOUCH DONE'
|
||||
(check-file-touched ~marbud %home file)
|
||||
;< eth-node=_eth-node bind:m
|
||||
(breach-and-hear:eth-node our.hid ~bud ~marbud)
|
||||
~& > 'BREACH-1 DONE'
|
||||
;< [eth-node=_eth-node ~] bind:m
|
||||
%+ (wrap-philter ,_eth-node ,~)
|
||||
router:eth-node
|
||||
(raw-ship ~bud `(dawn:eth-node ~bud))
|
||||
~& > 'BUD RE DONE'
|
||||
;< eth-node=_eth-node bind:m
|
||||
(breach-and-hear:eth-node our.hid ~marbud ~bud)
|
||||
~& > 'BREACH-2 DONE'
|
||||
;< [eth-node=_eth-node ~] bind:m
|
||||
%+ (wrap-philter ,_eth-node ,~)
|
||||
router:eth-node
|
||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
||||
~& > 'MARBUD RE DONE'
|
||||
;< file=@t bind:m (touch-file ~bud %base)
|
||||
~& > 'TOUCH-1 DONE'
|
||||
;< file=@t bind:m (touch-file ~bud %base)
|
||||
~& > 'TOUCH-2 DONE'
|
||||
(check-file-touched ~marbud %home file)
|
||||
~& > 'DONE DONE'
|
||||
(pure:m ~)
|
||||
==
|
||||
::
|
||||
|
@ -47,10 +47,10 @@
|
||||
:- | :_ [%wait ~]
|
||||
%+ answer-request req
|
||||
:- %o
|
||||
=/ number (hex-to-num:ethereum (get-block-hash req))
|
||||
=/ number (hex-to-num:ethereum (get-first-param req))
|
||||
=/ hash (number-to-hash number)
|
||||
~& who=who.pin
|
||||
~& number=number
|
||||
=/ hash (number-to-hash number)
|
||||
~& hash=hash
|
||||
=/ parent-hash (number-to-hash ?~(number number (dec number)))
|
||||
~& parent-hash=parent-hash
|
||||
@ -156,7 +156,7 @@
|
||||
?> ?=([* ~] id)
|
||||
i.id
|
||||
::
|
||||
++ get-block-hash
|
||||
++ get-first-param
|
||||
|= req=@t
|
||||
=, dejs:format
|
||||
=/ id
|
||||
@ -197,7 +197,7 @@
|
||||
::
|
||||
++ logs-by-range
|
||||
|= [from-block=@ud to-block=@ud]
|
||||
%+ logs-to-json from-block
|
||||
%+ logs-to-json (max launch:contracts:azimuth from-block)
|
||||
?: (lth to-block launch:contracts:azimuth)
|
||||
~
|
||||
%+ swag
|
||||
@ -232,7 +232,7 @@
|
||||
(crip (prefix-hex:ethereum (render-hex-bytes:ethereum 32 hash)))
|
||||
::
|
||||
:+ 'blockNumber' %s
|
||||
(crip (num-to-hex:ethereum (add launch:contracts:azimuth count)))
|
||||
(crip (num-to-hex:ethereum count))
|
||||
::
|
||||
:+ 'address' %s
|
||||
(crip (address-to-hex:ethereum azimuth:contracts:azimuth))
|
||||
@ -268,7 +268,7 @@
|
||||
:: Should only do galaxies
|
||||
::
|
||||
++ get-czars
|
||||
^- (map ship [life pass])
|
||||
^- (map ship [rift life pass])
|
||||
%- malt
|
||||
%+ murn
|
||||
~(tap by lives)
|
||||
@ -276,7 +276,7 @@
|
||||
?. =(%czar (clan:title who))
|
||||
~
|
||||
%- some
|
||||
:+ who lyfe
|
||||
:^ who rut lyfe
|
||||
%^ pass-from-eth:azimuth
|
||||
(as-octs:mimes:html (get-public who lyfe %crypt))
|
||||
(as-octs:mimes:html (get-public who lyfe %auth))
|
||||
|
@ -66,7 +66,7 @@
|
||||
+$ dawn-event
|
||||
$: =seed:able:jael
|
||||
spon=ship
|
||||
czar=(map ship [=life =pass])
|
||||
czar=(map ship [=rift =life =pass])
|
||||
turf=(list turf)
|
||||
bloq=@ud
|
||||
node=(unit purl:eyre)
|
||||
|
@ -2641,7 +2641,6 @@
|
||||
?. =(our her)
|
||||
:: no duct, foreign +rede or default
|
||||
::
|
||||
|
||||
:+ ?: (~(has by hoy.ruf) her)
|
||||
~
|
||||
[hun.rom.ruf %pass /sinks %k %public-keys (silt her ~)]~
|
||||
|
@ -278,21 +278,14 @@
|
||||
=. tuf.own.pki turf.tac
|
||||
:: our initial galaxy table as a +map from +life to +public
|
||||
::
|
||||
=/ diffs=(list [=ship =diff:point])
|
||||
%~ tap by
|
||||
=/ points=(map =ship =point)
|
||||
%- ~(run by czar.tac)
|
||||
|= [=a=life =a=pass]
|
||||
^- diff:point
|
||||
[%keys [*life 0 *pass] [a-life 1 a-pass]]
|
||||
|= [=a=rift =a=life =a=pass]
|
||||
^- point
|
||||
[a-rift a-life (malt [a-life 1 a-pass] ~) ~]
|
||||
=. +>.$
|
||||
|- ^+ +>.^$
|
||||
?~ diffs
|
||||
+>.^$
|
||||
=. +>.^$
|
||||
%- curd =< abet
|
||||
%- public-keys:~(feel su hen our pki etn sap)
|
||||
[%diff ship diff]:i.diffs
|
||||
$(diffs t.diffs)
|
||||
%- curd =< abet
|
||||
(public-keys:~(feel su hen our pki etn sap) %full points)
|
||||
::
|
||||
:: start subscriptions
|
||||
::
|
||||
@ -700,9 +693,11 @@
|
||||
++ new-event
|
||||
|= [=a=ship =a=udiff:point]
|
||||
^+ this-su
|
||||
=/ a-point=point (~(gut by pos.zim.pki) a-ship *point)
|
||||
=/ a-diff=diff:point (udiff-to-diff:point a-udiff a-point)
|
||||
(public-keys:feel %diff a-ship a-diff)
|
||||
=/ a-point=point (~(gut by pos.zim.pki) a-ship *point)
|
||||
=/ a-diff=(unit diff:point) (udiff-to-diff:point a-udiff a-point)
|
||||
?~ a-diff
|
||||
this-su
|
||||
(public-keys:feel %diff a-ship u.a-diff)
|
||||
::
|
||||
++ extract-snap :: extract rewind point
|
||||
^- snapshot
|
||||
|
@ -2135,7 +2135,7 @@
|
||||
$: %dawn :: boot from keys
|
||||
=seed:able:jael :: identity params
|
||||
spon=ship :: sponsor
|
||||
czar=(map ship [=life =pass]) :: galaxy table
|
||||
czar=(map ship [=rift =life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
node=(unit purl:eyre) :: gateway url
|
||||
@ -2307,7 +2307,7 @@
|
||||
$% $: %dawn :: boot from keys
|
||||
=seed:able:kale :: identity params
|
||||
spon=ship :: sponsor
|
||||
czar=(map ship [=life =pass]) :: galaxy table
|
||||
czar=(map ship [=rift =life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
node=(unit purl:eyre) :: gateway url
|
||||
@ -2411,13 +2411,18 @@
|
||||
::
|
||||
++ udiff-to-diff
|
||||
|= [=a=udiff =a=point]
|
||||
^- diff
|
||||
^- (unit diff)
|
||||
?- +<.a-udiff
|
||||
%disavow ~|(%udiff-to-diff-disavow !!)
|
||||
%rift [%rift rift.a-point rift.a-udiff]
|
||||
%spon [%spon sponsor.a-point sponsor.a-udiff]
|
||||
%spon `[%spon sponsor.a-point sponsor.a-udiff]
|
||||
%rift
|
||||
?: =(rift.a-udiff +(rift.a-point))
|
||||
`[%rift rift.a-point rift.a-udiff]
|
||||
~& [%ignoring-udiff a-udiff a-point]
|
||||
~
|
||||
::
|
||||
%keys
|
||||
:+ %keys
|
||||
:^ ~ %keys
|
||||
[life.a-point (~(gut by keys.a-point) life.a-point *[@ud pass])]
|
||||
[life crypto-suite pass]:a-udiff
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user