For those interested in this sort of thing, see also Raft's TLA+ specification: https://github.com/ongardie/raft.tla
The CURP paper doesn't define a new leader election algorithm and presumes you use an existing one like raft¹. Xline is using raft based on the readme
https://github.com/xline-kv/Xline/tree/master/curp/tla%2B
¹warning, I skimmed and ctrl-fd for "leader election"
https://github.com/xline-kv/Xline/blob/master/curp/tla%2B/cu...