Understanding Consensus Mechanism