Documentation ¶
Overview ¶
Package miner is a generated GoMock package.
Package miner is responsible for creating valid blocks that contain valid activation transactions and transactions
Index ¶
- type EpochEligibility
- type MockconservativeState
- type MockconservativeStateMockRecorder
- type MocklayerClock
- type MocklayerClockMockRecorder
- type MocknonceFetcher
- type MocknonceFetcherMockRecorder
- type MockproposalOracle
- type MockproposalOracleMockRecorder
- type MockvotesEncoder
- func (m *MockvotesEncoder) EXPECT() *MockvotesEncoderMockRecorder
- func (m *MockvotesEncoder) EncodeVotes(arg0 context.Context, arg1 ...tortoise.EncodeVotesOpts) (*types.Opinion, error)
- func (m *MockvotesEncoder) LatestComplete() types.LayerID
- func (m *MockvotesEncoder) TallyVotes(arg0 context.Context, arg1 types.LayerID)
- type MockvotesEncoderMockRecorder
- type Opt
- type Oracle
- type ProposalBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpochEligibility ¶ added in v1.0.0
type MockconservativeState ¶ added in v1.0.0
type MockconservativeState struct {
// contains filtered or unexported fields
}
MockconservativeState is a mock of conservativeState interface.
func NewMockconservativeState ¶ added in v1.0.0
func NewMockconservativeState(ctrl *gomock.Controller) *MockconservativeState
NewMockconservativeState creates a new mock instance.
func (*MockconservativeState) EXPECT ¶ added in v1.0.0
func (m *MockconservativeState) EXPECT() *MockconservativeStateMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockconservativeState) SelectProposalTXs ¶ added in v1.0.0
func (m *MockconservativeState) SelectProposalTXs(arg0 types.LayerID, arg1 int) []types.TransactionID
SelectProposalTXs mocks base method.
type MockconservativeStateMockRecorder ¶ added in v1.0.0
type MockconservativeStateMockRecorder struct {
// contains filtered or unexported fields
}
MockconservativeStateMockRecorder is the mock recorder for MockconservativeState.
func (*MockconservativeStateMockRecorder) SelectProposalTXs ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) SelectProposalTXs(arg0, arg1 interface{}) *gomock.Call
SelectProposalTXs indicates an expected call of SelectProposalTXs.
type MocklayerClock ¶ added in v1.0.0
type MocklayerClock struct {
// contains filtered or unexported fields
}
MocklayerClock is a mock of layerClock interface.
func NewMocklayerClock ¶ added in v1.0.0
func NewMocklayerClock(ctrl *gomock.Controller) *MocklayerClock
NewMocklayerClock creates a new mock instance.
func (*MocklayerClock) AwaitLayer ¶ added in v1.0.0
func (m *MocklayerClock) AwaitLayer(layerID types.LayerID) chan struct{}
AwaitLayer mocks base method.
func (*MocklayerClock) CurrentLayer ¶ added in v1.0.0
func (m *MocklayerClock) CurrentLayer() types.LayerID
CurrentLayer mocks base method.
func (*MocklayerClock) EXPECT ¶ added in v1.0.0
func (m *MocklayerClock) EXPECT() *MocklayerClockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocklayerClock) LayerToTime ¶ added in v1.0.0
func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time
LayerToTime mocks base method.
type MocklayerClockMockRecorder ¶ added in v1.0.0
type MocklayerClockMockRecorder struct {
// contains filtered or unexported fields
}
MocklayerClockMockRecorder is the mock recorder for MocklayerClock.
func (*MocklayerClockMockRecorder) AwaitLayer ¶ added in v1.0.0
func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID interface{}) *gomock.Call
AwaitLayer indicates an expected call of AwaitLayer.
func (*MocklayerClockMockRecorder) CurrentLayer ¶ added in v1.0.0
func (mr *MocklayerClockMockRecorder) CurrentLayer() *gomock.Call
CurrentLayer indicates an expected call of CurrentLayer.
func (*MocklayerClockMockRecorder) LayerToTime ¶ added in v1.0.0
func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 interface{}) *gomock.Call
LayerToTime indicates an expected call of LayerToTime.
type MocknonceFetcher ¶ added in v1.0.0
type MocknonceFetcher struct {
// contains filtered or unexported fields
}
MocknonceFetcher is a mock of nonceFetcher interface.
func NewMocknonceFetcher ¶ added in v1.0.0
func NewMocknonceFetcher(ctrl *gomock.Controller) *MocknonceFetcher
NewMocknonceFetcher creates a new mock instance.
func (*MocknonceFetcher) EXPECT ¶ added in v1.0.0
func (m *MocknonceFetcher) EXPECT() *MocknonceFetcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocknonceFetcher) VRFNonce ¶ added in v1.0.0
func (m *MocknonceFetcher) VRFNonce(arg0 types.NodeID, arg1 types.EpochID) (types.VRFPostIndex, error)
VRFNonce mocks base method.
type MocknonceFetcherMockRecorder ¶ added in v1.0.0
type MocknonceFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MocknonceFetcherMockRecorder is the mock recorder for MocknonceFetcher.
func (*MocknonceFetcherMockRecorder) VRFNonce ¶ added in v1.0.0
func (mr *MocknonceFetcherMockRecorder) VRFNonce(arg0, arg1 interface{}) *gomock.Call
VRFNonce indicates an expected call of VRFNonce.
type MockproposalOracle ¶ added in v1.0.0
type MockproposalOracle struct {
// contains filtered or unexported fields
}
MockproposalOracle is a mock of proposalOracle interface.
func NewMockproposalOracle ¶ added in v1.0.0
func NewMockproposalOracle(ctrl *gomock.Controller) *MockproposalOracle
NewMockproposalOracle creates a new mock instance.
func (*MockproposalOracle) EXPECT ¶ added in v1.0.0
func (m *MockproposalOracle) EXPECT() *MockproposalOracleMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockproposalOracle) GetProposalEligibility ¶ added in v1.0.0
func (m *MockproposalOracle) GetProposalEligibility(arg0 types.LayerID, arg1 types.Beacon, arg2 types.VRFPostIndex) (*EpochEligibility, error)
GetProposalEligibility mocks base method.
type MockproposalOracleMockRecorder ¶ added in v1.0.0
type MockproposalOracleMockRecorder struct {
// contains filtered or unexported fields
}
MockproposalOracleMockRecorder is the mock recorder for MockproposalOracle.
func (*MockproposalOracleMockRecorder) GetProposalEligibility ¶ added in v1.0.0
func (mr *MockproposalOracleMockRecorder) GetProposalEligibility(arg0, arg1, arg2 interface{}) *gomock.Call
GetProposalEligibility indicates an expected call of GetProposalEligibility.
type MockvotesEncoder ¶ added in v1.0.0
type MockvotesEncoder struct {
// contains filtered or unexported fields
}
MockvotesEncoder is a mock of votesEncoder interface.
func NewMockvotesEncoder ¶ added in v1.0.0
func NewMockvotesEncoder(ctrl *gomock.Controller) *MockvotesEncoder
NewMockvotesEncoder creates a new mock instance.
func (*MockvotesEncoder) EXPECT ¶ added in v1.0.0
func (m *MockvotesEncoder) EXPECT() *MockvotesEncoderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockvotesEncoder) EncodeVotes ¶ added in v1.0.0
func (m *MockvotesEncoder) EncodeVotes(arg0 context.Context, arg1 ...tortoise.EncodeVotesOpts) (*types.Opinion, error)
EncodeVotes mocks base method.
func (*MockvotesEncoder) LatestComplete ¶ added in v1.0.0
func (m *MockvotesEncoder) LatestComplete() types.LayerID
LatestComplete mocks base method.
func (*MockvotesEncoder) TallyVotes ¶ added in v1.0.0
func (m *MockvotesEncoder) TallyVotes(arg0 context.Context, arg1 types.LayerID)
TallyVotes mocks base method.
type MockvotesEncoderMockRecorder ¶ added in v1.0.0
type MockvotesEncoderMockRecorder struct {
// contains filtered or unexported fields
}
MockvotesEncoderMockRecorder is the mock recorder for MockvotesEncoder.
func (*MockvotesEncoderMockRecorder) EncodeVotes ¶ added in v1.0.0
func (mr *MockvotesEncoderMockRecorder) EncodeVotes(arg0 interface{}, arg1 ...interface{}) *gomock.Call
EncodeVotes indicates an expected call of EncodeVotes.
func (*MockvotesEncoderMockRecorder) LatestComplete ¶ added in v1.0.0
func (mr *MockvotesEncoderMockRecorder) LatestComplete() *gomock.Call
LatestComplete indicates an expected call of LatestComplete.
func (*MockvotesEncoderMockRecorder) TallyVotes ¶ added in v1.0.0
func (mr *MockvotesEncoderMockRecorder) TallyVotes(arg0, arg1 interface{}) *gomock.Call
TallyVotes indicates an expected call of TallyVotes.
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 WithMinimalActiveSetWeight ¶ added in v1.0.0
func WithNodeID ¶ added in v1.0.0
WithNodeID defines the miner's NodeID.
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, nonce types.VRFPostIndex) (*EpochEligibility, 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, clock layerClock, signer *signing.EdSigner, vrfSigner *signing.VRFSigner, cdb *datastore.CachedDB, publisher pubsub.Publisher, trtl 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.