From 85d43286133e3fd40908dd5986cacd2c61b0bec7 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Tue, 15 Jan 2019 16:33:17 -0800 Subject: [PATCH] add ability to restore from snapshot on-demand --- mar/snap.hoon | 16 ++++++++++++++++ sys/vane/gall.hoon | 1 + sys/vane/jael.hoon | 5 +++++ sys/zuse.hoon | 1 + 4 files changed, 23 insertions(+) create mode 100644 mar/snap.hoon diff --git a/mar/snap.hoon b/mar/snap.hoon new file mode 100644 index 0000000000..53f4a93d62 --- /dev/null +++ b/mar/snap.hoon @@ -0,0 +1,16 @@ +:: +:::: /hoon/snap/mar + :: +=, mimes:html +|_ snap/snapshot:jael +++ grow + |% + ++ mime [/application/octet-stream (jam snap)] + -- +++ grab + |% + ++ noun snapshot:jael + ++ mime |=([p=mite:eyre q=octs:eyre] (cue q.q)) + -- +++ grad %mime +-- diff --git a/sys/vane/gall.hoon b/sys/vane/gall.hoon index 2871a7fc58..0a9f3c530b 100644 --- a/sys/vane/gall.hoon +++ b/sys/vane/gall.hoon @@ -1281,6 +1281,7 @@ $perm `%c $rule `%e $serv `%e + $snap `%j $them `%e $wait `%b $want `%a diff --git a/sys/vane/jael.hoon b/sys/vane/jael.hoon index 20e101ce82..84662737bb 100644 --- a/sys/vane/jael.hoon +++ b/sys/vane/jael.hoon @@ -848,6 +848,11 @@ %+ cure hen [[%meet ship.tac life.tac pass.tac]~ urb] :: + :: restore snapshot + :: [%snap snap=snapshot kick=?] + %snap + (restore-snap hen snap.tac kick.tac) + :: :: XX should be a subscription :: XX reconcile with .dns.eth :: request domains diff --git a/sys/zuse.hoon b/sys/zuse.hoon index 9f63b54714..cd743a0a38 100644 --- a/sys/zuse.hoon +++ b/sys/zuse.hoon @@ -1856,6 +1856,7 @@ [%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 [%vein ~] :: view signing keys [%vent ~] :: view ethereum events