anchor.diff:      
   
   % @doc Return a value from the cluster metadata dict
  -% @spec get_meta(Key :: term(), State :: hstate()) -> 
  +% @spec get_meta(Key :: term(), State :: chstate()) -> 
   %    {ok, term()} | error | undefined
   get_meta(Key, State) -> 
  -    case dict:find(Key, State#hstate.meta) of
  +    case dict:find(Key, State#chstate.meta) of
           error -> undefined;
           {ok, M} -> {ok, M#meta_entry.value}
       end.
   
                   
   % @doc Set a key in the cluster metadata dict
  -% @spec update_meta(Key :: term(), Val :: term(), State :: hstate()) ->
  -%     State :: hstate() | error
  +% @spec update_meta(Key :: term(), Val :: term(), State :: chstate()) ->
  +%     State :: chstate() | error
   update_meta(Key, Val, State) ->
       M = #meta_entry { 
  -        lastmod = calendar:datetime_to_gregorian_seconds(calendar:universal_time()),
  +        lastmod = calendar:datetime_to_gregorian_seconds(
  +                    calendar:universal_time()),
           value = Val
       },    
  -    VClock = vclock:increment(State#hstate.nodename, State#hstate.vclock),
  -    State#hstate{vclock=VClock, meta=dict:store(Key, M, State#hstate.meta)}.
  -
  +    VClock = vclock:increment(State#chstate.nodename, State#chstate.vclock),
  +    State#chstate{vclock=VClock, meta=dict:store(Key, M, State#chstate.meta)}.
   
   sequence_test() ->
       I1 = 365375409332725729550921208179070754913983135744,
       I2 = 730750818665451459101842416358141509827966271488,
       A = fresh(4,a),
  -    B1 = A#hstate{nodename=b},
  +    B1 = A#chstate{nodename=b},
       B2 = transfer_node(I1, b, B1),
       ?assertEqual(B2, transfer_node(I1, b, B2)),
       {new_ring, A1} = reconcile(B1,A),
  -    C1 = A#hstate{nodename=c},
  +    C1 = A#chstate{nodename=c},
       C2 = transfer_node(I1, c, C1),
       {new_ring, A2} = reconcile(C2,A1),
       {new_ring, A3} = reconcile(B2,A2),
  
positive.code: 
  % @doc riak_ring manages a riak node's local view of partition
  %      ownership.  The functions in this module revolve around use
  %      of the hstate record, which should be treated as opaque by
  %      other modules.  Riak nodes exchange instances of
  %      these records via gossip in order to converge on a common
  %      view of node/partition ownership.
  
negative.code: 
  % @doc If two states are mutually non-descendant, merge them anyway.
  %      This can cause a bit of churn, but should converge.
  % @spec reconcile(MyNodeName :: term(),
  %                 StateA :: chstate(), StateB :: chstate())
  %              -> chstate()
  reconcile(MyNodeName, StateA, StateB) ->
      % take two states (non-descendant) and merge them
      VClock = vclock:increment(MyNodeName,
  				 vclock:merge([StateA#chstate.vclock,
  					       StateB#chstate.vclock])),
      CHRing = chash:merge_rings(StateA#chstate.chring,StateB#chstate.chring),
      Meta = merge_meta(StateA#chstate.meta, StateB#chstate.meta),
      #chstate{nodename=MyNodeName,
  	    vclock=VClock,
  	    chring=CHRing,
              meta=Meta}.
  
  merge_meta(M1,M2) ->
  