anchor.diff:    [{Key, assign, Value}].
   
   transaction(Node, Dst, Statements) ->
  -  {ok, T} = rpc:call(Node, antidote, start_transaction, [ignore, []]),
  +  {ok, T} = start_transaction(Node),
     Last = lists:foldl(fun(F, Acc) -> F(T, Acc) end, [], Statements),
  -  CT = rpc:call(Node, antidote, commit_transaction, [T]),
  +  CT = commit_transaction(Node, T),
     Dst ! {CT, Last}.
  +
  +blocking_transaction(Node, Statements) ->
  +  {ok, T} = start_transaction(Node),
  +  Last = lists:foldl(fun(F, Acc) -> F(T, Acc) end, [], Statements),
  +  CT = commit_transaction(Node, T),
  +  {CT, Last}.
  +
  +start_transaction(Node) ->
  +  rpc:call(Node, antidote, start_transaction, [ignore, []]).
  +
  +read_objects(Node, Tx, Keys) when is_list(Keys) ->
  +  rpc:call(Node, antidote, read_objects, [Keys, Tx]);
  +
  +read_objects(Node, Tx, Key) ->
  +  read_objects(Node, Tx, [Key]).
  +
  +update_objects(Node, Tx, Assignments) ->
  +  rpc:call(Node, antidote, update_objects, [write(Assignments), Tx]).
  +
  +commit_transaction(Node, Tx) ->
  +  rpc:call(Node, antidote, commit_transaction, [Tx]).
  
positive.code:     ])
    end.
  
  read_objects(Node, Tx, Keys) when is_list(Keys) ->
    rpc:call(Node, antidote, read_objects, [Keys, Tx]);
  
  read_objects(Node, Tx, Key) ->
    read_objects(Node, Tx, [Key]).
  
  update_objects(Node, Tx, Assingments) ->
    rpc:call(Node, antidote, update_objects, [write(Assingments), Tx]).
  
  collect(Processes, Results) ->
    case Processes of
  
negative.code: 
    ?assertMatch(ok, Status),
    ?assertEqual([20], Payload).
  
  read_log_test(Node) ->
    Key = ?KEY(read_log),
    BaseValue = initial_value,
  
    Updates = 15,
    UpdateTxs = lists:map(
      fun(N) -> blocking_read_write_tx(Node, {Key, N}) end,
      lists:seq(0, Updates)
    ),
  
    %% First, set the key to some initial value we can validate later
    _ = execute_blocking_sequential([blocking_read_write_tx(Node, {Key, BaseValue})]),
  
    %% Validate that the base value went through
    {{Status, _}, {_, Payload}} = execute_blocking_sequential(blocking_read_only_tx(Node, Key)),
    ?assertMatch(ok, Status),
    ?assertEqual([BaseValue], Payload),
  
    %% Now start a long-running transaction
    {ok, Tx} = start_transaction(Node),
  
    %% Pick up a dependency on the previous transaction
    {ok, Read1} = read_objects(Node, Tx, Key),
    ?assertEqual([BaseValue], Read1),
  
    timer:sleep(100),
  
    %% Now stress the partition by forcing it to garbage collect
    Res = execute_blocking_sequential(UpdateTxs),
    ?assert(lists:all(fun({{ok, _}, _}) -> true; (_) -> false end, Res)),
  
    %% Now read again. Because we picked up an empty clock,
    %% the snapshot should no longer be in memory, and has to
    %% be retrieved from the event log.
    {ok, SecondRead} = read_objects(Node, Tx, Key),
    ?assertEqual([BaseValue], SecondRead),
  
    {ok, []} = commit_transaction(Node, Tx),
    ok.
  
  %% Util functions
  
  