anchor.diff:  %%                                   {stop, Reason, State}
   %% @end
   %%--------------------------------------------------------------------
  -handle_call({worker_req, generate_token, KeyId, Path, MaxLeaseTime}, _From, State) ->
  +handle_call({worker_req, generate_token, KeyId, Path, MaxLeaseTime}, From, State) ->
       #{worker := WorkerPort, max_lease_time := Timeout} = State,
  -    Reply = p_generate_token(KeyId, Path, MaxLeaseTime, WorkerPort, Timeout),
  +    Reply = p_generate_token(KeyId, Path, MaxLeaseTime, WorkerPort, From, Timeout),
       lager:info("Worker ~p request: {generate_token, {~p, ~p, ~p}} -> Reply: ~p",
                  [self(), KeyId, Path, MaxLeaseTime, Reply]),
       {reply, Reply, State};
  -handle_call({worker_req, get_token_id, Token}, _From, State) ->
  +handle_call({worker_req, get_token_id, Token}, From, State) ->
       #{worker := WorkerPort, max_lease_time := Timeout} = State,
  -    Reply = p_get_token_id(Token, WorkerPort, Timeout),
  +    Reply = p_get_token_id(Token, WorkerPort, From, Timeout),
       lager:info("Worker ~p request: {get_token_id, ~p} -> Reply: ~p",
                  [self(), Token, Reply]),
       {reply, Reply, State};
   handle_call({worker_req, submit_payload, {Token, _, Digest, HeaderSize} = SubmissionData,
  -             Secret}, _From, State) ->
  +             Secret}, From, State) ->
       #{worker := WorkerPort, max_lease_time := Timeout} = State,
  -    Reply = p_submit_payload(SubmissionData, Secret, WorkerPort, Timeout),
  +    Reply = p_submit_payload(SubmissionData, Secret, WorkerPort, From, Timeout),
       lager:info("Worker ~p request: {submit_payload, {{~p, PAYLOAD_NOT_SHOWN, ~p, ~p} ~p}} -> Reply: ~p",
                  [self(), Token, Digest, HeaderSize, Secret, Reply]),
       {reply, Reply, State};
  -handle_call({worker_req, commit, LeasePath, OldRootHash, NewRootHash, RepoTag}, _From, State) ->
  +handle_call({worker_req, commit, LeasePath, OldRootHash, NewRootHash, RepoTag}, From, State) ->
       #{worker := WorkerPort, max_lease_time := Timeout} = State,
  -    Reply = p_commit(WorkerPort, LeasePath, OldRootHash, NewRootHash, RepoTag, Timeout),
  +    Reply = p_commit(WorkerPort, LeasePath, OldRootHash, NewRootHash, RepoTag, From, Timeout),
       lager:info("Worker ~p request: {commit, ~p, ~p, ~p, ~p} -> Reply: ~p",
                  [self(), LeasePath, OldRootHash, NewRootHash, RepoTag, Reply]),
       {reply, Reply, State}.
  
positive.code:                 #{<<"status">> := <<"error">>, <<"reason">> := <<"invalid_token">>} ->
                      {error, invalid_lease}
              end;
          {error, worker_timeout} ->
              lager:error("Timeout reached waiting for reply from worker ~p", [WorkerPort]),
              {error, worker_timeout}
      end.
  
  
  -spec p_commit(WorkerPort, LeasePath, OldRootHash, NewRootHash, RepoTag, Timeout)
                -> ok | {error, merge_error | io_error | worker_timeout}
                                          when WorkerPort :: port(),
                                               LeasePath :: binary(),
                                               OldRootHash :: binary(),
                                               NewRootHash :: binary(),
                                               RepoTag :: cvmfs_common_types:repository_tag(),
                                               Timeout :: integer().
  p_commit(WorkerPort, LeasePath, OldRootHash, NewRootHash, RepoTag, Timeout) ->
      {TagName, TagChannel, TagDescription} = RepoTag,
      Req1 = jsx:encode(#{<<"lease_path">> => LeasePath,
                          <<"old_root_hash">> => OldRootHash,
  
negative.code:                              invalid_lease |
                               invalid_key |
                               invalid_macaroon |
                               worker_died |
                               worker_timeout |
                               path_violation |
                               other_error}.
  