Documentation ¶
Overview ¶
Package proposals is a generated GoMock package.
nolint
Index ¶
- Variables
- func MustGetNumEligibleSlots(weight, minWeight, totalWeight uint64, committeeSize, layersPerEpoch uint32) uint32
- func MustSerializeVRFMessage(beacon types.Beacon, epoch types.EpochID, nonce types.VRFPostIndex, ...) []byte
- type Config
- type Handler
- func (h *Handler) HandleActiveSet(ctx context.Context, id types.Hash32, peer p2p.Peer, data []byte) error
- func (h *Handler) HandleProposal(ctx context.Context, peer p2p.Peer, data []byte) error
- func (h *Handler) HandleSyncedBallot(ctx context.Context, expHash types.Hash32, peer p2p.Peer, data []byte) error
- func (h *Handler) HandleSyncedProposal(ctx context.Context, expHash types.Hash32, peer p2p.Peer, data []byte) error
- type MockeligibilityValidator
- type MockeligibilityValidatorCheckEligibilityCall
- func (c *MockeligibilityValidatorCheckEligibilityCall) Do(f func(context.Context, *types.Ballot, uint64) error) *MockeligibilityValidatorCheckEligibilityCall
- func (c *MockeligibilityValidatorCheckEligibilityCall) DoAndReturn(f func(context.Context, *types.Ballot, uint64) error) *MockeligibilityValidatorCheckEligibilityCall
- func (c *MockeligibilityValidatorCheckEligibilityCall) Return(arg0 error) *MockeligibilityValidatorCheckEligibilityCall
- type MockeligibilityValidatorMockRecorder
- type MocklayerClock
- type MocklayerClockCurrentLayerCall
- func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall
- func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall
- func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall
- type MocklayerClockLayerToTimeCall
- func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall
- func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall
- func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall
- type MocklayerClockMockRecorder
- type MockmeshProvider
- func (m *MockmeshProvider) AddBallot(arg0 context.Context, arg1 *types.Ballot) (*wire.MalfeasanceProof, error)
- func (m *MockmeshProvider) AddTXsFromProposal(arg0 context.Context, arg1 types.LayerID, arg2 types.ProposalID, ...) error
- func (m *MockmeshProvider) EXPECT() *MockmeshProviderMockRecorder
- func (m *MockmeshProvider) ProcessedLayer() types.LayerID
- type MockmeshProviderAddBallotCall
- func (c *MockmeshProviderAddBallotCall) Do(f func(context.Context, *types.Ballot) (*wire.MalfeasanceProof, error)) *MockmeshProviderAddBallotCall
- func (c *MockmeshProviderAddBallotCall) DoAndReturn(f func(context.Context, *types.Ballot) (*wire.MalfeasanceProof, error)) *MockmeshProviderAddBallotCall
- func (c *MockmeshProviderAddBallotCall) Return(arg0 *wire.MalfeasanceProof, arg1 error) *MockmeshProviderAddBallotCall
- type MockmeshProviderAddTXsFromProposalCall
- func (c *MockmeshProviderAddTXsFromProposalCall) Do(...) *MockmeshProviderAddTXsFromProposalCall
- func (c *MockmeshProviderAddTXsFromProposalCall) DoAndReturn(...) *MockmeshProviderAddTXsFromProposalCall
- func (c *MockmeshProviderAddTXsFromProposalCall) Return(arg0 error) *MockmeshProviderAddTXsFromProposalCall
- type MockmeshProviderMockRecorder
- func (mr *MockmeshProviderMockRecorder) AddBallot(arg0, arg1 any) *MockmeshProviderAddBallotCall
- func (mr *MockmeshProviderMockRecorder) AddTXsFromProposal(arg0, arg1, arg2, arg3 any) *MockmeshProviderAddTXsFromProposalCall
- func (mr *MockmeshProviderMockRecorder) ProcessedLayer() *MockmeshProviderProcessedLayerCall
- type MockmeshProviderProcessedLayerCall
- func (c *MockmeshProviderProcessedLayerCall) Do(f func() types.LayerID) *MockmeshProviderProcessedLayerCall
- func (c *MockmeshProviderProcessedLayerCall) DoAndReturn(f func() types.LayerID) *MockmeshProviderProcessedLayerCall
- func (c *MockmeshProviderProcessedLayerCall) Return(arg0 types.LayerID) *MockmeshProviderProcessedLayerCall
- type MockproposalsConsumer
- type MockproposalsConsumerIsKnownCall
- func (c *MockproposalsConsumerIsKnownCall) Do(f func(types.LayerID, types.ProposalID) bool) *MockproposalsConsumerIsKnownCall
- func (c *MockproposalsConsumerIsKnownCall) DoAndReturn(f func(types.LayerID, types.ProposalID) bool) *MockproposalsConsumerIsKnownCall
- func (c *MockproposalsConsumerIsKnownCall) Return(arg0 bool) *MockproposalsConsumerIsKnownCall
- type MockproposalsConsumerMockRecorder
- type MockproposalsConsumerOnProposalCall
- func (c *MockproposalsConsumerOnProposalCall) Do(f func(*types.Proposal) error) *MockproposalsConsumerOnProposalCall
- func (c *MockproposalsConsumerOnProposalCall) DoAndReturn(f func(*types.Proposal) error) *MockproposalsConsumerOnProposalCall
- func (c *MockproposalsConsumerOnProposalCall) Return(arg0 error) *MockproposalsConsumerOnProposalCall
- type MocktortoiseProvider
- func (m *MocktortoiseProvider) DecodeBallot(arg0 *types.BallotTortoiseData) (*tortoise.DecodedBallot, error)
- func (m *MocktortoiseProvider) EXPECT() *MocktortoiseProviderMockRecorder
- func (m *MocktortoiseProvider) GetBallot(arg0 types.BallotID) *tortoise.BallotData
- func (m *MocktortoiseProvider) StoreBallot(arg0 *tortoise.DecodedBallot) error
- type MocktortoiseProviderDecodeBallotCall
- func (c *MocktortoiseProviderDecodeBallotCall) Do(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *MocktortoiseProviderDecodeBallotCall
- func (c *MocktortoiseProviderDecodeBallotCall) DoAndReturn(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *MocktortoiseProviderDecodeBallotCall
- func (c *MocktortoiseProviderDecodeBallotCall) Return(arg0 *tortoise.DecodedBallot, arg1 error) *MocktortoiseProviderDecodeBallotCall
- type MocktortoiseProviderGetBallotCall
- func (c *MocktortoiseProviderGetBallotCall) Do(f func(types.BallotID) *tortoise.BallotData) *MocktortoiseProviderGetBallotCall
- func (c *MocktortoiseProviderGetBallotCall) DoAndReturn(f func(types.BallotID) *tortoise.BallotData) *MocktortoiseProviderGetBallotCall
- func (c *MocktortoiseProviderGetBallotCall) Return(arg0 *tortoise.BallotData) *MocktortoiseProviderGetBallotCall
- type MocktortoiseProviderMockRecorder
- func (mr *MocktortoiseProviderMockRecorder) DecodeBallot(arg0 any) *MocktortoiseProviderDecodeBallotCall
- func (mr *MocktortoiseProviderMockRecorder) GetBallot(arg0 any) *MocktortoiseProviderGetBallotCall
- func (mr *MocktortoiseProviderMockRecorder) StoreBallot(arg0 any) *MocktortoiseProviderStoreBallotCall
- type MocktortoiseProviderStoreBallotCall
- func (c *MocktortoiseProviderStoreBallotCall) Do(f func(*tortoise.DecodedBallot) error) *MocktortoiseProviderStoreBallotCall
- func (c *MocktortoiseProviderStoreBallotCall) DoAndReturn(f func(*tortoise.DecodedBallot) error) *MocktortoiseProviderStoreBallotCall
- func (c *MocktortoiseProviderStoreBallotCall) Return(arg0 error) *MocktortoiseProviderStoreBallotCall
- type MockvrfVerifier
- type MockvrfVerifierMockRecorder
- type MockvrfVerifierVerifyCall
- func (c *MockvrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall
- func (c *MockvrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall
- func (c *MockvrfVerifierVerifyCall) Return(arg0 bool) *MockvrfVerifierVerifyCall
- type Opt
- type Validator
- type ValidatorOpt
- type VrfMessage
Constants ¶
This section is empty.
Variables ¶
var ( CalcEligibleLayer = util.CalcEligibleLayer GetNumEligibleSlots = util.GetNumEligibleSlots )
Functions ¶
func MustGetNumEligibleSlots ¶ added in v1.2.2
func MustSerializeVRFMessage ¶ added in v1.1.4
func MustSerializeVRFMessage( beacon types.Beacon, epoch types.EpochID, nonce types.VRFPostIndex, counter uint32, ) []byte
MustSerializeVRFMessage serializes a message for generating/verifying a VRF signature.
Types ¶
type Config ¶
type Config struct { LayerSize uint32 LayersPerEpoch uint32 GoldenATXID types.ATXID MaxExceptions int Hdist uint32 MinimalActiveSetWeight []types.EpochMinimalActiveWeight }
Config defines configuration for the handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler processes Proposal from gossip and, if deems it valid, propagates it to peers.
func NewHandler ¶
func NewHandler( db *sql.Database, atxsdata *atxsdata.Data, proposals proposalsConsumer, edVerifier *signing.EdVerifier, p pubsub.Publisher, f system.Fetcher, bc system.BeaconCollector, m meshProvider, tortoise tortoiseProvider, verifier vrfVerifier, clock layerClock, opts ...Opt, ) *Handler
NewHandler creates new Handler.
func (*Handler) HandleActiveSet ¶ added in v1.1.5
func (*Handler) HandleProposal ¶
HandleProposal is the gossip receiver for Proposal.
type MockeligibilityValidator ¶
type MockeligibilityValidator struct {
// contains filtered or unexported fields
}
MockeligibilityValidator is a mock of eligibilityValidator interface.
func NewMockeligibilityValidator ¶
func NewMockeligibilityValidator(ctrl *gomock.Controller) *MockeligibilityValidator
NewMockeligibilityValidator creates a new mock instance.
func (*MockeligibilityValidator) CheckEligibility ¶
func (m *MockeligibilityValidator) CheckEligibility(arg0 context.Context, arg1 *types.Ballot, arg2 uint64) error
CheckEligibility mocks base method.
func (*MockeligibilityValidator) EXPECT ¶
func (m *MockeligibilityValidator) EXPECT() *MockeligibilityValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockeligibilityValidatorCheckEligibilityCall ¶ added in v1.4.0
MockeligibilityValidatorCheckEligibilityCall wrap *gomock.Call
func (*MockeligibilityValidatorCheckEligibilityCall) Do ¶ added in v1.4.0
func (c *MockeligibilityValidatorCheckEligibilityCall) Do(f func(context.Context, *types.Ballot, uint64) error) *MockeligibilityValidatorCheckEligibilityCall
Do rewrite *gomock.Call.Do
func (*MockeligibilityValidatorCheckEligibilityCall) DoAndReturn ¶ added in v1.4.0
func (c *MockeligibilityValidatorCheckEligibilityCall) DoAndReturn(f func(context.Context, *types.Ballot, uint64) error) *MockeligibilityValidatorCheckEligibilityCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockeligibilityValidatorCheckEligibilityCall) Return ¶ added in v1.4.0
func (c *MockeligibilityValidatorCheckEligibilityCall) Return(arg0 error) *MockeligibilityValidatorCheckEligibilityCall
Return rewrite *gomock.Call.Return
type MockeligibilityValidatorMockRecorder ¶
type MockeligibilityValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MockeligibilityValidatorMockRecorder is the mock recorder for MockeligibilityValidator.
func (*MockeligibilityValidatorMockRecorder) CheckEligibility ¶
func (mr *MockeligibilityValidatorMockRecorder) CheckEligibility(arg0, arg1, arg2 any) *MockeligibilityValidatorCheckEligibilityCall
CheckEligibility indicates an expected call of CheckEligibility.
type MocklayerClock ¶
type MocklayerClock struct {
// contains filtered or unexported fields
}
MocklayerClock is a mock of layerClock interface.
func NewMocklayerClock ¶
func NewMocklayerClock(ctrl *gomock.Controller) *MocklayerClock
NewMocklayerClock creates a new mock instance.
func (*MocklayerClock) CurrentLayer ¶
func (m *MocklayerClock) CurrentLayer() types.LayerID
CurrentLayer mocks base method.
func (*MocklayerClock) EXPECT ¶
func (m *MocklayerClock) EXPECT() *MocklayerClockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocklayerClock) LayerToTime ¶
func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time
LayerToTime mocks base method.
type MocklayerClockCurrentLayerCall ¶ added in v1.4.0
MocklayerClockCurrentLayerCall wrap *gomock.Call
func (*MocklayerClockCurrentLayerCall) Do ¶ added in v1.4.0
func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall
Do rewrite *gomock.Call.Do
func (*MocklayerClockCurrentLayerCall) DoAndReturn ¶ added in v1.4.0
func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocklayerClockCurrentLayerCall) Return ¶ added in v1.4.0
func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall
Return rewrite *gomock.Call.Return
type MocklayerClockLayerToTimeCall ¶ added in v1.4.0
MocklayerClockLayerToTimeCall wrap *gomock.Call
func (*MocklayerClockLayerToTimeCall) Do ¶ added in v1.4.0
func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall
Do rewrite *gomock.Call.Do
func (*MocklayerClockLayerToTimeCall) DoAndReturn ¶ added in v1.4.0
func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocklayerClockLayerToTimeCall) Return ¶ added in v1.4.0
func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall
Return rewrite *gomock.Call.Return
type MocklayerClockMockRecorder ¶
type MocklayerClockMockRecorder struct {
// contains filtered or unexported fields
}
MocklayerClockMockRecorder is the mock recorder for MocklayerClock.
func (*MocklayerClockMockRecorder) CurrentLayer ¶
func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall
CurrentLayer indicates an expected call of CurrentLayer.
func (*MocklayerClockMockRecorder) LayerToTime ¶
func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *MocklayerClockLayerToTimeCall
LayerToTime indicates an expected call of LayerToTime.
type MockmeshProvider ¶
type MockmeshProvider struct {
// contains filtered or unexported fields
}
MockmeshProvider is a mock of meshProvider interface.
func NewMockmeshProvider ¶
func NewMockmeshProvider(ctrl *gomock.Controller) *MockmeshProvider
NewMockmeshProvider creates a new mock instance.
func (*MockmeshProvider) AddBallot ¶
func (m *MockmeshProvider) AddBallot(arg0 context.Context, arg1 *types.Ballot) (*wire.MalfeasanceProof, error)
AddBallot mocks base method.
func (*MockmeshProvider) AddTXsFromProposal ¶
func (m *MockmeshProvider) AddTXsFromProposal(arg0 context.Context, arg1 types.LayerID, arg2 types.ProposalID, arg3 []types.TransactionID) error
AddTXsFromProposal mocks base method.
func (*MockmeshProvider) EXPECT ¶
func (m *MockmeshProvider) EXPECT() *MockmeshProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockmeshProvider) ProcessedLayer ¶ added in v1.1.6
func (m *MockmeshProvider) ProcessedLayer() types.LayerID
ProcessedLayer mocks base method.
type MockmeshProviderAddBallotCall ¶ added in v1.4.0
MockmeshProviderAddBallotCall wrap *gomock.Call
func (*MockmeshProviderAddBallotCall) Do ¶ added in v1.4.0
func (c *MockmeshProviderAddBallotCall) Do(f func(context.Context, *types.Ballot) (*wire.MalfeasanceProof, error)) *MockmeshProviderAddBallotCall
Do rewrite *gomock.Call.Do
func (*MockmeshProviderAddBallotCall) DoAndReturn ¶ added in v1.4.0
func (c *MockmeshProviderAddBallotCall) DoAndReturn(f func(context.Context, *types.Ballot) (*wire.MalfeasanceProof, error)) *MockmeshProviderAddBallotCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockmeshProviderAddBallotCall) Return ¶ added in v1.4.0
func (c *MockmeshProviderAddBallotCall) Return(arg0 *wire.MalfeasanceProof, arg1 error) *MockmeshProviderAddBallotCall
Return rewrite *gomock.Call.Return
type MockmeshProviderAddTXsFromProposalCall ¶ added in v1.4.0
MockmeshProviderAddTXsFromProposalCall wrap *gomock.Call
func (*MockmeshProviderAddTXsFromProposalCall) Do ¶ added in v1.4.0
func (c *MockmeshProviderAddTXsFromProposalCall) Do(f func(context.Context, types.LayerID, types.ProposalID, []types.TransactionID) error) *MockmeshProviderAddTXsFromProposalCall
Do rewrite *gomock.Call.Do
func (*MockmeshProviderAddTXsFromProposalCall) DoAndReturn ¶ added in v1.4.0
func (c *MockmeshProviderAddTXsFromProposalCall) DoAndReturn(f func(context.Context, types.LayerID, types.ProposalID, []types.TransactionID) error) *MockmeshProviderAddTXsFromProposalCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockmeshProviderAddTXsFromProposalCall) Return ¶ added in v1.4.0
func (c *MockmeshProviderAddTXsFromProposalCall) Return(arg0 error) *MockmeshProviderAddTXsFromProposalCall
Return rewrite *gomock.Call.Return
type MockmeshProviderMockRecorder ¶
type MockmeshProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockmeshProviderMockRecorder is the mock recorder for MockmeshProvider.
func (*MockmeshProviderMockRecorder) AddBallot ¶
func (mr *MockmeshProviderMockRecorder) AddBallot(arg0, arg1 any) *MockmeshProviderAddBallotCall
AddBallot indicates an expected call of AddBallot.
func (*MockmeshProviderMockRecorder) AddTXsFromProposal ¶
func (mr *MockmeshProviderMockRecorder) AddTXsFromProposal(arg0, arg1, arg2, arg3 any) *MockmeshProviderAddTXsFromProposalCall
AddTXsFromProposal indicates an expected call of AddTXsFromProposal.
func (*MockmeshProviderMockRecorder) ProcessedLayer ¶ added in v1.1.6
func (mr *MockmeshProviderMockRecorder) ProcessedLayer() *MockmeshProviderProcessedLayerCall
ProcessedLayer indicates an expected call of ProcessedLayer.
type MockmeshProviderProcessedLayerCall ¶ added in v1.4.0
MockmeshProviderProcessedLayerCall wrap *gomock.Call
func (*MockmeshProviderProcessedLayerCall) Do ¶ added in v1.4.0
func (c *MockmeshProviderProcessedLayerCall) Do(f func() types.LayerID) *MockmeshProviderProcessedLayerCall
Do rewrite *gomock.Call.Do
func (*MockmeshProviderProcessedLayerCall) DoAndReturn ¶ added in v1.4.0
func (c *MockmeshProviderProcessedLayerCall) DoAndReturn(f func() types.LayerID) *MockmeshProviderProcessedLayerCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockmeshProviderProcessedLayerCall) Return ¶ added in v1.4.0
func (c *MockmeshProviderProcessedLayerCall) Return(arg0 types.LayerID) *MockmeshProviderProcessedLayerCall
Return rewrite *gomock.Call.Return
type MockproposalsConsumer ¶ added in v1.4.0
type MockproposalsConsumer struct {
// contains filtered or unexported fields
}
MockproposalsConsumer is a mock of proposalsConsumer interface.
func NewMockproposalsConsumer ¶ added in v1.4.0
func NewMockproposalsConsumer(ctrl *gomock.Controller) *MockproposalsConsumer
NewMockproposalsConsumer creates a new mock instance.
func (*MockproposalsConsumer) EXPECT ¶ added in v1.4.0
func (m *MockproposalsConsumer) EXPECT() *MockproposalsConsumerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockproposalsConsumer) IsKnown ¶ added in v1.4.0
func (m *MockproposalsConsumer) IsKnown(arg0 types.LayerID, arg1 types.ProposalID) bool
IsKnown mocks base method.
func (*MockproposalsConsumer) OnProposal ¶ added in v1.4.0
func (m *MockproposalsConsumer) OnProposal(p *types.Proposal) error
OnProposal mocks base method.
type MockproposalsConsumerIsKnownCall ¶ added in v1.4.0
MockproposalsConsumerIsKnownCall wrap *gomock.Call
func (*MockproposalsConsumerIsKnownCall) Do ¶ added in v1.4.0
func (c *MockproposalsConsumerIsKnownCall) Do(f func(types.LayerID, types.ProposalID) bool) *MockproposalsConsumerIsKnownCall
Do rewrite *gomock.Call.Do
func (*MockproposalsConsumerIsKnownCall) DoAndReturn ¶ added in v1.4.0
func (c *MockproposalsConsumerIsKnownCall) DoAndReturn(f func(types.LayerID, types.ProposalID) bool) *MockproposalsConsumerIsKnownCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockproposalsConsumerIsKnownCall) Return ¶ added in v1.4.0
func (c *MockproposalsConsumerIsKnownCall) Return(arg0 bool) *MockproposalsConsumerIsKnownCall
Return rewrite *gomock.Call.Return
type MockproposalsConsumerMockRecorder ¶ added in v1.4.0
type MockproposalsConsumerMockRecorder struct {
// contains filtered or unexported fields
}
MockproposalsConsumerMockRecorder is the mock recorder for MockproposalsConsumer.
func (*MockproposalsConsumerMockRecorder) IsKnown ¶ added in v1.4.0
func (mr *MockproposalsConsumerMockRecorder) IsKnown(arg0, arg1 any) *MockproposalsConsumerIsKnownCall
IsKnown indicates an expected call of IsKnown.
func (*MockproposalsConsumerMockRecorder) OnProposal ¶ added in v1.4.0
func (mr *MockproposalsConsumerMockRecorder) OnProposal(p any) *MockproposalsConsumerOnProposalCall
OnProposal indicates an expected call of OnProposal.
type MockproposalsConsumerOnProposalCall ¶ added in v1.4.0
MockproposalsConsumerOnProposalCall wrap *gomock.Call
func (*MockproposalsConsumerOnProposalCall) Do ¶ added in v1.4.0
func (c *MockproposalsConsumerOnProposalCall) Do(f func(*types.Proposal) error) *MockproposalsConsumerOnProposalCall
Do rewrite *gomock.Call.Do
func (*MockproposalsConsumerOnProposalCall) DoAndReturn ¶ added in v1.4.0
func (c *MockproposalsConsumerOnProposalCall) DoAndReturn(f func(*types.Proposal) error) *MockproposalsConsumerOnProposalCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockproposalsConsumerOnProposalCall) Return ¶ added in v1.4.0
func (c *MockproposalsConsumerOnProposalCall) Return(arg0 error) *MockproposalsConsumerOnProposalCall
Return rewrite *gomock.Call.Return
type MocktortoiseProvider ¶ added in v1.1.4
type MocktortoiseProvider struct {
// contains filtered or unexported fields
}
MocktortoiseProvider is a mock of tortoiseProvider interface.
func NewMocktortoiseProvider ¶ added in v1.1.4
func NewMocktortoiseProvider(ctrl *gomock.Controller) *MocktortoiseProvider
NewMocktortoiseProvider creates a new mock instance.
func (*MocktortoiseProvider) DecodeBallot ¶ added in v1.1.4
func (m *MocktortoiseProvider) DecodeBallot(arg0 *types.BallotTortoiseData) (*tortoise.DecodedBallot, error)
DecodeBallot mocks base method.
func (*MocktortoiseProvider) EXPECT ¶ added in v1.1.4
func (m *MocktortoiseProvider) EXPECT() *MocktortoiseProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocktortoiseProvider) GetBallot ¶ added in v1.1.4
func (m *MocktortoiseProvider) GetBallot(arg0 types.BallotID) *tortoise.BallotData
GetBallot mocks base method.
func (*MocktortoiseProvider) StoreBallot ¶ added in v1.1.4
func (m *MocktortoiseProvider) StoreBallot(arg0 *tortoise.DecodedBallot) error
StoreBallot mocks base method.
type MocktortoiseProviderDecodeBallotCall ¶ added in v1.4.0
MocktortoiseProviderDecodeBallotCall wrap *gomock.Call
func (*MocktortoiseProviderDecodeBallotCall) Do ¶ added in v1.4.0
func (c *MocktortoiseProviderDecodeBallotCall) Do(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *MocktortoiseProviderDecodeBallotCall
Do rewrite *gomock.Call.Do
func (*MocktortoiseProviderDecodeBallotCall) DoAndReturn ¶ added in v1.4.0
func (c *MocktortoiseProviderDecodeBallotCall) DoAndReturn(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *MocktortoiseProviderDecodeBallotCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocktortoiseProviderDecodeBallotCall) Return ¶ added in v1.4.0
func (c *MocktortoiseProviderDecodeBallotCall) Return(arg0 *tortoise.DecodedBallot, arg1 error) *MocktortoiseProviderDecodeBallotCall
Return rewrite *gomock.Call.Return
type MocktortoiseProviderGetBallotCall ¶ added in v1.4.0
MocktortoiseProviderGetBallotCall wrap *gomock.Call
func (*MocktortoiseProviderGetBallotCall) Do ¶ added in v1.4.0
func (c *MocktortoiseProviderGetBallotCall) Do(f func(types.BallotID) *tortoise.BallotData) *MocktortoiseProviderGetBallotCall
Do rewrite *gomock.Call.Do
func (*MocktortoiseProviderGetBallotCall) DoAndReturn ¶ added in v1.4.0
func (c *MocktortoiseProviderGetBallotCall) DoAndReturn(f func(types.BallotID) *tortoise.BallotData) *MocktortoiseProviderGetBallotCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocktortoiseProviderGetBallotCall) Return ¶ added in v1.4.0
func (c *MocktortoiseProviderGetBallotCall) Return(arg0 *tortoise.BallotData) *MocktortoiseProviderGetBallotCall
Return rewrite *gomock.Call.Return
type MocktortoiseProviderMockRecorder ¶ added in v1.1.4
type MocktortoiseProviderMockRecorder struct {
// contains filtered or unexported fields
}
MocktortoiseProviderMockRecorder is the mock recorder for MocktortoiseProvider.
func (*MocktortoiseProviderMockRecorder) DecodeBallot ¶ added in v1.1.4
func (mr *MocktortoiseProviderMockRecorder) DecodeBallot(arg0 any) *MocktortoiseProviderDecodeBallotCall
DecodeBallot indicates an expected call of DecodeBallot.
func (*MocktortoiseProviderMockRecorder) GetBallot ¶ added in v1.1.4
func (mr *MocktortoiseProviderMockRecorder) GetBallot(arg0 any) *MocktortoiseProviderGetBallotCall
GetBallot indicates an expected call of GetBallot.
func (*MocktortoiseProviderMockRecorder) StoreBallot ¶ added in v1.1.4
func (mr *MocktortoiseProviderMockRecorder) StoreBallot(arg0 any) *MocktortoiseProviderStoreBallotCall
StoreBallot indicates an expected call of StoreBallot.
type MocktortoiseProviderStoreBallotCall ¶ added in v1.4.0
MocktortoiseProviderStoreBallotCall wrap *gomock.Call
func (*MocktortoiseProviderStoreBallotCall) Do ¶ added in v1.4.0
func (c *MocktortoiseProviderStoreBallotCall) Do(f func(*tortoise.DecodedBallot) error) *MocktortoiseProviderStoreBallotCall
Do rewrite *gomock.Call.Do
func (*MocktortoiseProviderStoreBallotCall) DoAndReturn ¶ added in v1.4.0
func (c *MocktortoiseProviderStoreBallotCall) DoAndReturn(f func(*tortoise.DecodedBallot) error) *MocktortoiseProviderStoreBallotCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocktortoiseProviderStoreBallotCall) Return ¶ added in v1.4.0
func (c *MocktortoiseProviderStoreBallotCall) Return(arg0 error) *MocktortoiseProviderStoreBallotCall
Return rewrite *gomock.Call.Return
type MockvrfVerifier ¶
type MockvrfVerifier struct {
// contains filtered or unexported fields
}
MockvrfVerifier is a mock of vrfVerifier interface.
func NewMockvrfVerifier ¶
func NewMockvrfVerifier(ctrl *gomock.Controller) *MockvrfVerifier
NewMockvrfVerifier creates a new mock instance.
func (*MockvrfVerifier) EXPECT ¶
func (m *MockvrfVerifier) EXPECT() *MockvrfVerifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockvrfVerifier) Verify ¶
func (m *MockvrfVerifier) Verify(arg0 types.NodeID, arg1 []byte, arg2 types.VrfSignature) bool
Verify mocks base method.
type MockvrfVerifierMockRecorder ¶
type MockvrfVerifierMockRecorder struct {
// contains filtered or unexported fields
}
MockvrfVerifierMockRecorder is the mock recorder for MockvrfVerifier.
func (*MockvrfVerifierMockRecorder) Verify ¶
func (mr *MockvrfVerifierMockRecorder) Verify(arg0, arg1, arg2 any) *MockvrfVerifierVerifyCall
Verify indicates an expected call of Verify.
type MockvrfVerifierVerifyCall ¶ added in v1.4.0
MockvrfVerifierVerifyCall wrap *gomock.Call
func (*MockvrfVerifierVerifyCall) Do ¶ added in v1.4.0
func (c *MockvrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall
Do rewrite *gomock.Call.Do
func (*MockvrfVerifierVerifyCall) DoAndReturn ¶ added in v1.4.0
func (c *MockvrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockvrfVerifierVerifyCall) Return ¶ added in v1.4.0
func (c *MockvrfVerifierVerifyCall) Return(arg0 bool) *MockvrfVerifierVerifyCall
Return rewrite *gomock.Call.Return
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator validates the eligibility of a Ballot. the validation focuses on eligibility only and assumes the Ballot to be valid otherwise.
func NewEligibilityValidator ¶
func NewEligibilityValidator( avgLayerSize, layersPerEpoch uint32, minActiveSetWeight []types.EpochMinimalActiveWeight, clock layerClock, tortoise tortoiseProvider, atxsdata *atxsdata.Data, bc system.BeaconCollector, lg log.Log, vrfVerifier vrfVerifier, opts ...ValidatorOpt, ) *Validator
NewEligibilityValidator returns a new EligibilityValidator.
type VrfMessage ¶
type VrfMessage struct { Type types.EligibilityType // always types.EligibilityVoting Beacon types.Beacon Epoch types.EpochID Nonce types.VRFPostIndex Counter uint32 }
VrfMessage is a verification message. It is the payload for the signature in `VotingEligibility`.
func (*VrfMessage) DecodeScale ¶
func (t *VrfMessage) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*VrfMessage) EncodeScale ¶
func (t *VrfMessage) EncodeScale(enc *scale.Encoder) (total int, err error)