change ballot num format to (ballot_num, leader_id) to ensure ballot nums are distinct from different leaders; beware that json converts tuple to list, so need to cast to tuple to compare ballot_num directly