Consensus algorithms using various primitives