Implement MasterElection

I added a TODO in `UpdateProposal()`