mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
Support continuity number from Ships contract.
This commit is contained in:
parent
d9e5856b66
commit
1c7c61c9bb
@ -2315,6 +2315,9 @@
|
|||||||
~? !=(key-revision.huv key-revision.hul)
|
~? !=(key-revision.huv key-revision.hul)
|
||||||
:- %key-revision-differs
|
:- %key-revision-differs
|
||||||
[key-revision.huv key-revision.hul]
|
[key-revision.huv key-revision.hul]
|
||||||
|
~? !=(continuity-number.huv continuity-number.hul)
|
||||||
|
:- %continuity-number-differs
|
||||||
|
[continuity-number.huv continuity-number.hul]
|
||||||
~? !=(spawn-count.huv spawn-count.hul)
|
~? !=(spawn-count.huv spawn-count.hul)
|
||||||
:- %spawn-count-differs
|
:- %spawn-count-differs
|
||||||
[spawn-count.huv spawn-count.hul]
|
[spawn-count.huv spawn-count.hul]
|
||||||
|
@ -192,6 +192,7 @@
|
|||||||
encryption-key=@
|
encryption-key=@
|
||||||
authentication-key=@
|
authentication-key=@
|
||||||
key-revision=@ud
|
key-revision=@ud
|
||||||
|
continuity-number=@ud
|
||||||
spawn-count=@ud
|
spawn-count=@ud
|
||||||
spawned=(set @p)
|
spawned=(set @p)
|
||||||
sponsor=@p
|
sponsor=@p
|
||||||
@ -220,6 +221,7 @@
|
|||||||
[%bytes-n 32] :: encryptionKey
|
[%bytes-n 32] :: encryptionKey
|
||||||
[%bytes-n 32] :: authenticationKey
|
[%bytes-n 32] :: authenticationKey
|
||||||
%uint :: keyRevisionNumber
|
%uint :: keyRevisionNumber
|
||||||
|
%uint :: continuityNumber
|
||||||
%uint :: spawnCount
|
%uint :: spawnCount
|
||||||
%uint :: sponsor
|
%uint :: sponsor
|
||||||
%bool :: escapeRequested
|
%bool :: escapeRequested
|
||||||
@ -237,6 +239,7 @@
|
|||||||
encryption-key=octs
|
encryption-key=octs
|
||||||
authentication-key=octs
|
authentication-key=octs
|
||||||
key-revision=@ud
|
key-revision=@ud
|
||||||
|
continuity-number=@ud
|
||||||
spawn-count=@ud
|
spawn-count=@ud
|
||||||
sponsor=@ud
|
sponsor=@ud
|
||||||
escape-requested=?
|
escape-requested=?
|
||||||
@ -272,6 +275,7 @@
|
|||||||
[%owner new=address]
|
[%owner new=address]
|
||||||
[%spawned who=@p]
|
[%spawned who=@p]
|
||||||
[%keys enc=@ aut=@ rev=@ud]
|
[%keys enc=@ aut=@ rev=@ud]
|
||||||
|
[%continuity new=@ud]
|
||||||
[%sponsor new=@p]
|
[%sponsor new=@p]
|
||||||
[%escape new=(unit @p)]
|
[%escape new=(unit @p)]
|
||||||
[%spawn-proxy new=address]
|
[%spawn-proxy new=address]
|
||||||
@ -5736,6 +5740,8 @@
|
|||||||
`@`q.authentication-key
|
`@`q.authentication-key
|
||||||
::
|
::
|
||||||
key-revision
|
key-revision
|
||||||
|
::
|
||||||
|
continuity-number
|
||||||
::
|
::
|
||||||
spawn-count
|
spawn-count
|
||||||
::
|
::
|
||||||
@ -5796,6 +5802,11 @@
|
|||||||
?> &(=(p.enc 32) =(p.aut 32)) :: sanity
|
?> &(=(p.enc 32) =(p.aut 32)) :: sanity
|
||||||
[who %keys q.enc q.aut rev]~
|
[who %keys q.enc q.aut rev]~
|
||||||
::
|
::
|
||||||
|
?: =(event.log broke-continuity)
|
||||||
|
=+ ^- [who=@ num=@]
|
||||||
|
(decode-results data.log ~[%uint %uint])
|
||||||
|
[who %continuity num]~
|
||||||
|
::
|
||||||
?: =(event.log changed-spawn-proxy)
|
?: =(event.log changed-spawn-proxy)
|
||||||
=+ ^- [who=@ sox=address]
|
=+ ^- [who=@ sox=address]
|
||||||
(decode-results data.log ~[%uint %address])
|
(decode-results data.log ~[%uint %address])
|
||||||
@ -5815,17 +5826,18 @@
|
|||||||
|= [hul=hull dif=diff-hull]
|
|= [hul=hull dif=diff-hull]
|
||||||
^- hull
|
^- hull
|
||||||
?- -.dif
|
?- -.dif
|
||||||
%full new.dif
|
%full new.dif
|
||||||
%owner hul(owner new.dif)
|
%owner hul(owner new.dif)
|
||||||
%spawned =+ (~(put in spawned.hul) who.dif)
|
%spawned =+ (~(put in spawned.hul) who.dif)
|
||||||
hul(spawn-count +(spawn-count.hul), spawned -)
|
hul(spawn-count +(spawn-count.hul), spawned -)
|
||||||
%keys %_ hul
|
%keys %_ hul
|
||||||
encryption-key enc.dif
|
encryption-key enc.dif
|
||||||
authentication-key aut.dif
|
authentication-key aut.dif
|
||||||
key-revision rev.dif
|
key-revision rev.dif
|
||||||
==
|
==
|
||||||
%sponsor hul(sponsor new.dif, escape ~)
|
%continuity hul(continuity-number new.dif)
|
||||||
%escape hul(escape new.dif)
|
%sponsor hul(sponsor new.dif, escape ~)
|
||||||
|
%escape hul(escape new.dif)
|
||||||
%spawn-proxy hul(spawn-proxy new.dif)
|
%spawn-proxy hul(spawn-proxy new.dif)
|
||||||
%transfer-proxy hul(transfer-proxy new.dif)
|
%transfer-proxy hul(transfer-proxy new.dif)
|
||||||
==
|
==
|
||||||
|
Loading…
Reference in New Issue
Block a user