Documentation ¶
Overview ¶
Package miner is responsible for creating valid blocks that contain valid activation transactions and transactions
Index ¶
Constants ¶
const (
// AtxsPerBlockLimit indicates the maximum number of ATXs a Ballot can reference.
AtxsPerBlockLimit = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockBuilder ¶
type BlockBuilder struct { log.Log TransactionPool txPool // contains filtered or unexported fields }
BlockBuilder is the struct that orchestrates the building of blocks, it is responsible for receiving hare results. referencing txs and atxs from mem pool and referencing them in the created block it is also responsible for listening to the clock and querying when a block should be created according to the block oracle.
func NewBlockBuilder ¶
func NewBlockBuilder( config Config, sgn signer, publisher pubsub.Publisher, beginRoundEvent chan types.LayerID, msh meshProvider, bbp baseBlockProvider, blockOracle blockOracle, beaconProvider system.BeaconGetter, syncer system.SyncStateProvider, projector projector, txPool txPool, logger log.Log, ) *BlockBuilder
NewBlockBuilder creates a struct of block builder type.
func (*BlockBuilder) Close ¶
func (t *BlockBuilder) Close() error
Close stops listeners and stops trying to create block in layers.
func (*BlockBuilder) Start ¶
func (t *BlockBuilder) Start(ctx context.Context) error
Start starts the process of creating a block, it listens for txs and atxs received by gossip, and starts querying block oracle when it should create a block. This function returns an error if Start was already called once.