Modularization of blockchain consensus mechanism

Modularization of blockchain consensus mechanism