anchor.diff:  %% VNode state
   -record(state, {
     partition :: partition_id(),
  -  queue :: queue()
  +  queue :: queue(),
  +  vectorclock :: vectorclock()
   }).
   
   %%%% API --------------------------------------------------------------------+
   
   -spec init([partition_id()]) -> {ok, #state{}}.
  -init([Partition]) -> {ok, #state{partition = Partition, queue = queue:new()}}.
  +init([Partition]) ->
  +  {ok, StableSnapshot} = vectorclock:get_stable_snapshot(),
  +  {ok, #state{partition = Partition, queue = queue:new(), vectorclock = StableSnapshot}}.
   
   start_vnode(I) -> riak_core_vnode_master:get_vnode_pid(I, ?MODULE).
   
  
positive.code:   case queue:peek(Queue) of
      empty -> State;
      {value, Txn} ->
        case try_store(Txn) of
          false -> State;
          true -> process_queue(State#state{queue = queue:drop(Queue)})
        end
    end.
  
  %% Store the heartbeat message.
  %% This is not a true transaction, so its dependencies are always satisfied.
  -spec try_store(#interdc_txn{}) -> boolean().
  try_store(#interdc_txn{dcid = DCID, partition = Partition, timestamp = Timestamp, operations = []}) ->
    vectorclock:update_clock(Partition, DCID, Timestamp),
    dc_utilities:call_vnode(Partition, vectorclock_vnode_master, calculate_stable_snapshot),
    true;
  
  %% Store the normal transaction
  try_store(Txn=#interdc_txn{dcid = DCID, partition = Partition, timestamp = Timestamp, operations = Ops}) ->
    %% The transactions are delivered reliably and in order, so the entry for originating DC is irrelevant.
    %% Therefore, we remove it prior to further checks.
    Dependencies = vectorclock:set_clock_of_dc(DCID, 0, Txn#interdc_txn.snapshot),
    CurrentClock = vectorclock:set_clock_of_dc(DCID, 0, get_partition_clock(Partition)),
  
    %% Check if the current clock is greather than or equal to the dependency vector
    case vectorclock:ge(CurrentClock, Dependencies) of
  
      %% If not, the transaction will not be stored right now.
      false -> false;
  
      %% If so, store the transaction
      true ->
  
negative.code: 
        %% Update the materializer (send only the update operations)
        ClockSiOps = updates_to_clocksi_payloads(Txn),
  
        lists:foreach(fun(Qwe) ->
          lager:info("Saving ~p", [Qwe])
        end, ClockSiOps),
  
        ok = lists:foreach(fun(Op) -> materializer_vnode:update(Op#clocksi_payload.key, Op) end, ClockSiOps),
  
        {update_the_clock(State, DCID, Timestamp), true}
    end.
  
  handle_command({txn, Txn}, _Sender, State=#state{queue=Queue}) ->
  