本文主要分析fabric共识模块的流程,方便自己添加新的共识模块。
主要涉及的函数和调用流程如下图所示:
一般来讲,如果要添加新的共识算法,主要实现这个接口:
type Chain interface {
// NOTE: The kafka consenter has not been updated to perform the revalidation
// checks conditionally. For now, Order/Configure are essentially Enqueue as before.
// This does not cause data inconsistency, but it wastes cycles and will be required
// to properly support the ConfigUpdate concept once introduced
// Once