   end
 
   defrecord State, root: false, parent: nil,
-                   clock: nil, crash_clock: nil,
+                   clock: nil, crash_clock: nil, crash_clock_filename: nil,
                    outstanding: [],
                    snapshot: nil, log: [],
                    children: nil do
 
     record_type root: atom | boolean, parent: nil | Genomu.gen_server_ref,
                 clock: nil | ITC.t, crash_clock: nil | ITC.t,
+                crash_clock_filename: String.t,
                 outstanding: [ITC.t],
                 snapshot: nil | :ets.tid, log: [Genomu.Transaction.entry],
                 children: nil | :ets.tid

    end
    # If it's a root channel, and the clock is not
    # specified, read it
    def initialize(__MODULE__[clock: nil] = state) do
      crash_clock = read_crash_clock(state)
      state.crash_clock(crash_clock).clock(crash_clock)
    end

    end

    @spec dump_crash_clock(t) :: t
    defp dump_crash_clock(__MODULE__[crash_clock: crash_clock, crash_clock_filename: f] = state)  do
      File.write(f, ITC.encode_binary(crash_clock))
      state
    end

    @spec read_crash_clock(t) :: ITC.t
    defp read_crash_clock(__MODULE__[crash_clock_filename: f]) do
      if File.exists?(f) do
        File.read!(f) |> ITC.decode
      else
        ITC.seed
      end
    end

    @spec memoize(Genomu.key, binary, t) :: t
