anchor.diff:  
   -type phase2() ::
       {phase2,  JoinUUId::pos_integer(), Options::[tuple()], MyKeyVersion::non_neg_integer(),
  -     ContactNodes::[{null | pos_integer(), comm:mypid()}],
  +     Connections::[{null | pos_integer(), comm:mypid()}],
        JoinIds::[?RT:key()], Candidates::[lb_op:lb_op()]}.
   -type phase2b() ::
       {phase2b, JoinUUId::pos_integer(), Options::[tuple()], MyKeyVersion::non_neg_integer(),
  -     ContactNodes::[{null | pos_integer(), comm:mypid()},...],
  +     Connections::[{null | pos_integer(), comm:mypid()},...],
        JoinIds::[?RT:key()], Candidates::[lb_op:lb_op()]}.
   -type phase3() ::
       {phase3,  JoinUUId::pos_integer(), Options::[tuple()], MyKeyVersion::non_neg_integer(),
  -     ContactNodes::[{null | pos_integer(), comm:mypid()}],
  +     Connections::[{null | pos_integer(), comm:mypid()}],
        JoinIds::[?RT:key()], Candidates::[lb_op:lb_op()]}.
   -type phase4() ::
       {phase4,  JoinUUId::pos_integer(), Options::[tuple()], MyKeyVersion::non_neg_integer(),
  -     ContactNodes::[{null | pos_integer(), comm:mypid()}],
  +     Connections::[{null | pos_integer(), comm:mypid()}],
        JoinIds::[?RT:key()], Candidates::[lb_op:lb_op()]}.
   -type phase_2_4() :: phase2() | phase2b() | phase3() | phase4().
   
   -type join_state() ::
       {join, {phase1,  JoinUUId::pos_integer(), Options::[tuple()], MyKeyVersion::non_neg_integer(),
  -            ContactNodes::[], JoinIds::[?RT:key()], Candidates::[]},
  +            Connections::[], JoinIds::[?RT:key()], Candidates::[]},
        QueuedMessages::msg_queue:msg_queue()} |
       {join, phase_2_4(), QueuedMessages::msg_queue:msg_queue()}.
   
  
positive.code:     end.
  
  %% @doc Tries to do a lookup for all join IDs in JoinState by contacting the
  %%      first node among the ContactNodes, then go to phase 3. If there is no
  %%      node to contact, try to get new contact nodes and continue in phase 2.
  %%      A node that has been contacted will be put at the end of the
  %%      ContactNodes list.
  %%      Note: the returned join state will stay in phase 4 if already in phase 4
  -spec lookup(phase2() | phase2b() | phase3()) -> NewState::phase_2_4().
  lookup(JoinState) ->
  
negative.code:     end.
  
  %% @doc Calls get_number_of_samples/1 on the configured passive load balancing
  %%      algorithm if there is a contact node in Connections and then adds them
  %%      to the list of connections.
  -spec get_number_of_samples
          (Phase, Connections::[]) -> Phase when is_subtype(Phase, phase_2_4());
          (phase_2_4(), Connections::[connection(),...]) -> phase2b().
  