github.com/koko1123/flow-go-1@v0.29.6/engine/verification/assigner/processor.go (about)

     1  package assigner
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/model/flow"
     5  	"github.com/koko1123/flow-go-1/module"
     6  )
     7  
     8  // FinalizedBlockProcessor should be implemented by the verification node engine responsible
     9  // for processing execution receipts included in a finalized block.
    10  //
    11  // In the current version, the assigner engine is responsible of processing execution receipts
    12  // included in a finalized block.
    13  // From the architectural perspective, FinalizedBlockProcessor aligns as following on the verification pipeline:
    14  // -----------------------------                           ------------------                                  --------------------------
    15  // | Consensus Follower Engine | ---> finalized blocks --> | Block Consumer | ---> finalized block workers --> | FinalizedBlockProcessor|
    16  // -----------------------------                           ------------------                                  --------------------------
    17  type FinalizedBlockProcessor interface {
    18  	// ProcessFinalizedBlock receives a finalized block and processes all of its constituent execution receipts.
    19  	// Note: it should be implemented in a non-blocking way.
    20  	ProcessFinalizedBlock(*flow.Block)
    21  
    22  	// WithBlockConsumerNotifier sets the notifier of this finalized block processor.
    23  	// The notifier is called by the internal logic of the processor to let the consumer know that
    24  	// the processor is done by processing a block so that the next block may be passed to the processor
    25  	// by the consumer through invoking ProcessFinalizedBlock of this processor.
    26  	WithBlockConsumerNotifier(module.ProcessingNotifier)
    27  }