Documentation
¶
Overview ¶
Package miner is responsible for creating valid blocks that contain valid activation transactions and transactions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶ added in v1.0.0
type Opt func(h *ProposalBuilder)
Opt for configuring ProposalBuilder.
func WithLayerPerEpoch ¶ added in v1.0.0
WithLayerPerEpoch defines the number of layers per epoch.
func WithLayerSize ¶ added in v1.0.0
WithLayerSize defines the average number of proposal per layer.
func WithLogger ¶ added in v1.0.0
WithLogger defines the logger.
func WithTxsPerProposal ¶
WithTxsPerProposal defines the number of TXs in a Proposal.
type Oracle ¶ added in v0.1.15
type Oracle struct {
// contains filtered or unexported fields
}
Oracle provides proposal eligibility proofs for the miner.
func (*Oracle) GetProposalEligibility ¶ added in v1.0.0
func (o *Oracle) GetProposalEligibility(lid types.LayerID, beacon types.Beacon) (types.ATXID, []types.ATXID, []types.VotingEligibilityProof, error)
GetProposalEligibility returns the miner's ATXID and the active set for the layer's epoch, along with the list of eligibility proofs for that layer.
type ProposalBuilder ¶ added in v1.0.0
type ProposalBuilder struct {
// contains filtered or unexported fields
}
ProposalBuilder builds Proposals for a miner.
func NewProposalBuilder ¶ added in v1.0.0
func NewProposalBuilder( ctx context.Context, layerTimer timesync.LayerTimer, signer *signing.EdSigner, vrfSigner *signing.VRFSigner, sqlDB *sql.Database, atxDB activationDB, msh meshProvider, publisher pubsub.Publisher, bbp votesEncoder, beaconProvider system.BeaconGetter, syncer system.SyncStateProvider, conState conservativeState, opts ...Opt, ) *ProposalBuilder
NewProposalBuilder creates a struct of block builder type.
func (*ProposalBuilder) Close ¶ added in v1.0.0
func (pb *ProposalBuilder) Close()
Close stops the loop that listens to layers and build proposals.