ames: remove old state versions & conversions
$% [%memo =message-num message=*]
[%send =message-num =ack-meat]
==
-:: previous state versions, for +stay/+load migrations
-::
-+| %plasmonics
-::
-+$ ames-state-2
- $: peers=(map ship ship-state)
- =unix=duct
- =life
- crypto-core=acru:ames
- veb=_veb-all-off
- ==
-::
-+$ queued-event-1
- $% [%call =duct type=* wrapped-task=(hobo task-1)]
- [%take =wire =duct type=* =sign]
- ==
-::
-+$ task-1
- $% [%wegh ~]
- task
- ==
-::
-+$ ames-state-1
- $: peers=(map ship ship-state-1)
- =unix=duct
- =life
- crypto-core=acru:ames
- ==
-+$ ship-state-1
- $% [%alien alien-agenda]
- [%known peer-state-1]
- ==
-+$ peer-state-1
- $: $: =symmetric-key
- =life
- =public-key
- sponsor=ship
- ==
- route=(unit [direct=? =lane])
- qos=qos-1
- =ossuary
- snd=(map bone message-pump-state)
- rcv=(map bone message-sink-state)
- nax=(set [=bone =message-num])
- heeds=(set duct)
- ==
-+$ qos-1
- $~ [%unborn ~]
- $% [%live last-contact=@da]
- [%dead last-contact=@da]
- [%unborn ~]
- ==
--
:: external vane interface
::
:: +load: load in old state after reload
::
++ load
- |= $= old-state
- $% [%4 ^ames-state]
- ==
- |^ ^+ ames-gate
- ?> ?=(%4 -.old-state)
+ |= old-state=[%4 ^ames-state]
+ ^+ ames-gate
ames-gate(ames-state +.old-state)
- ::
- ++ state-1-to-2
- |= =ames-state-1
- ^- ames-state-2
- ::
- =| =ames-state-2
- =. +.ames-state-2
- :* unix-duct.ames-state-1
- life.ames-state-1
- crypto-core.ames-state-1
- veb=veb-all-off
- ==
- =. peers.ames-state-2
- %- ~(gas by *(map ship ship-state))
- %+ turn ~(tap by peers.ames-state-1)
- |= [peer=ship =ship-state-1]
- ^- [ship ship-state]
- ?: ?=(%alien -.ship-state-1)
- [peer ship-state-1]
- :+ peer %known
- %= +.ship-state-1
- qos
- ?+ -.qos.ship-state-1 qos.ship-state-1
- %unborn [%unborn now]
- ==
- ==
- ames-state-2
- ::
- ++ state-2-to-3
- |= =ames-state-2
- ^- ^ames-state
- ::
- :* peers.ames-state-2
- unix-duct.ames-state-2
- life.ames-state-2
- crypto-core.ames-state-2
- bug=[veb=veb.ames-state-2 ships=~]
- ==
- --
:: +scry: dereference namespace
::
++ scry
