Documentation ¶
Overview ¶
Package activation is responsible for creating activation transactions and running the mining flow, coordinating Post building, sending proofs to PoET and building NIPost structs.
Package activation is a generated GoMock package.
Index ¶
- Constants
- Variables
- func CheckPrevATXs(ctx context.Context, logger *zap.Logger, db sql.Executor) error
- func NewPoetService(db poetDbAPI, server types.PoetServer, cfg PoetConfig, logger *zap.Logger, ...) (*poetService, error)
- func NewPoetServiceWithClient(db poetDbAPI, client PoetClient, cfg PoetConfig, logger *zap.Logger, ...) *poetService
- func NewPostStates(log *zap.Logger) *postStates
- func PostSubset(seed []byte) validatorOption
- func PrioritizeCall() validatorOption
- func PrioritizedCall() postVerifierOptionFunc
- func WithCertifierClientConfig(cfg CertifierClientConfig) certifierClientOpts
- func WithVerifierOptions(ops ...verifying.OptionFunc) postVerifierOptionFunc
- type AtxBuilder
- type AtxReceiver
- type AtxVersions
- type Builder
- func (b *Builder) BuildInitialPost(ctx context.Context, nodeID types.NodeID) error
- func (b *Builder) BuildNIPostChallenge(ctx context.Context, nodeID types.NodeID) (*types.NIPostChallenge, error)
- func (b *Builder) Coinbase() types.Address
- func (b *Builder) GetPrevAtx(nodeID types.NodeID) (*types.ActivationTx, error)
- func (b *Builder) PostStates() map[types.IdentityDescriptor]types.PostState
- func (b *Builder) PublishActivationTx(ctx context.Context, sig *signing.EdSigner) error
- func (b *Builder) Register(sig *signing.EdSigner)
- func (b *Builder) Regossip(ctx context.Context, nodeID types.NodeID) error
- func (b *Builder) SetCoinbase(rewardAddress types.Address)
- func (b *Builder) SmesherIDs() []types.NodeID
- func (b *Builder) Smeshing() bool
- func (b *Builder) StartSmeshing(coinbase types.Address) error
- func (b *Builder) StopSmeshing(deleteFiles bool) error
- type BuilderOption
- func BuilderAtxVersions(v AtxVersions) BuilderOption
- func WithContext(ctx context.Context) BuilderOption
- func WithPoetConfig(c PoetConfig) BuilderOption
- func WithPoetRetryInterval(interval time.Duration) BuilderOption
- func WithPoets(poets ...PoetService) BuilderOption
- func WithPostStates(ps PostStates) BuilderOption
- func WithPostValidityDelay(delay time.Duration) BuilderOption
- func WithValidator(v nipostValidator) BuilderOption
- type Certifier
- type CertifierClient
- type CertifierClientConfig
- type CertifierConfig
- type CertifyRequest
- type CertifyResponse
- type Config
- type ErrAtxNotFound
- type HTTPPoetClient
- func (c *HTTPPoetClient) Address() string
- func (c *HTTPPoetClient) CertifierInfo(ctx context.Context) (*url.URL, []byte, error)
- func (c *HTTPPoetClient) Id() []byte
- func (c *HTTPPoetClient) PowParams(ctx context.Context) (*PoetPowParams, error)
- func (c *HTTPPoetClient) Proof(ctx context.Context, roundID string) (*types.PoetProofMessage, []types.Hash32, error)
- func (c *HTTPPoetClient) Submit(ctx context.Context, deadline time.Time, prefix, challenge []byte, ...) (*types.PoetRound, error)
- type Handler
- type HandlerOption
- type HandlerV1
- type HandlerV2
- type InvalidChainError
- type InvalidPostIndexHandler
- type InvalidPrevATXHandler
- type MalfeasanceHandler
- type MockAtxBuilder
- type MockAtxBuilderMockRecorder
- type MockAtxBuilderRegisterCall
- type MockAtxReceiver
- type MockAtxReceiverMockRecorder
- type MockAtxReceiverOnAtxCall
- type MockPoetService
- func (m *MockPoetService) Address() string
- func (m *MockPoetService) Certify(ctx context.Context, id types.NodeID) (*certifier.PoetCert, error)
- func (m *MockPoetService) EXPECT() *MockPoetServiceMockRecorder
- func (m *MockPoetService) Proof(ctx context.Context, roundID string) (*types.PoetProof, []types.Hash32, error)
- func (m *MockPoetService) Submit(ctx context.Context, deadline time.Time, prefix, challenge []byte, ...) (*types.PoetRound, error)
- type MockPoetServiceAddressCall
- type MockPoetServiceCertifyCall
- func (c *MockPoetServiceCertifyCall) Do(f func(context.Context, types.NodeID) (*certifier.PoetCert, error)) *MockPoetServiceCertifyCall
- func (c *MockPoetServiceCertifyCall) DoAndReturn(f func(context.Context, types.NodeID) (*certifier.PoetCert, error)) *MockPoetServiceCertifyCall
- func (c *MockPoetServiceCertifyCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockPoetServiceCertifyCall
- type MockPoetServiceMockRecorder
- func (mr *MockPoetServiceMockRecorder) Address() *MockPoetServiceAddressCall
- func (mr *MockPoetServiceMockRecorder) Certify(ctx, id any) *MockPoetServiceCertifyCall
- func (mr *MockPoetServiceMockRecorder) Proof(ctx, roundID any) *MockPoetServiceProofCall
- func (mr *MockPoetServiceMockRecorder) Submit(ctx, deadline, prefix, challenge, signature, nodeID any) *MockPoetServiceSubmitCall
- type MockPoetServiceProofCall
- func (c *MockPoetServiceProofCall) Do(f func(context.Context, string) (*types.PoetProof, []types.Hash32, error)) *MockPoetServiceProofCall
- func (c *MockPoetServiceProofCall) DoAndReturn(f func(context.Context, string) (*types.PoetProof, []types.Hash32, error)) *MockPoetServiceProofCall
- func (c *MockPoetServiceProofCall) Return(arg0 *types.PoetProof, arg1 []types.Hash32, arg2 error) *MockPoetServiceProofCall
- type MockPoetServiceSubmitCall
- type MockPostClient
- type MockPostClientInfoCall
- func (c *MockPostClientInfoCall) Do(f func(context.Context) (*types.PostInfo, error)) *MockPostClientInfoCall
- func (c *MockPostClientInfoCall) DoAndReturn(f func(context.Context) (*types.PostInfo, error)) *MockPostClientInfoCall
- func (c *MockPostClientInfoCall) Return(arg0 *types.PostInfo, arg1 error) *MockPostClientInfoCall
- type MockPostClientMockRecorder
- type MockPostClientProofCall
- func (c *MockPostClientProofCall) Do(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *MockPostClientProofCall
- func (c *MockPostClientProofCall) DoAndReturn(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *MockPostClientProofCall
- func (c *MockPostClientProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *MockPostClientProofCall
- type MockPostStates
- type MockPostStatesGetCall
- func (c *MockPostStatesGetCall) Do(f func() map[types.NodeID]types.PostState) *MockPostStatesGetCall
- func (c *MockPostStatesGetCall) DoAndReturn(f func() map[types.NodeID]types.PostState) *MockPostStatesGetCall
- func (c *MockPostStatesGetCall) Return(arg0 map[types.NodeID]types.PostState) *MockPostStatesGetCall
- type MockPostStatesMockRecorder
- type MockPostStatesSetCall
- type MockPostVerifier
- type MockPostVerifierCloseCall
- type MockPostVerifierMockRecorder
- type MockPostVerifierVerifyCall
- func (c *MockPostVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...) error) *MockPostVerifierVerifyCall
- func (c *MockPostVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...) error) *MockPostVerifierVerifyCall
- func (c *MockPostVerifierVerifyCall) Return(arg0 error) *MockPostVerifierVerifyCall
- type MockSmeshingProvider
- func (m *MockSmeshingProvider) Coinbase() types.Address
- func (m *MockSmeshingProvider) EXPECT() *MockSmeshingProviderMockRecorder
- func (m *MockSmeshingProvider) SetCoinbase(coinbase types.Address)
- func (m *MockSmeshingProvider) SmesherIDs() []types.NodeID
- func (m *MockSmeshingProvider) Smeshing() bool
- func (m *MockSmeshingProvider) StartSmeshing(arg0 types.Address) error
- func (m *MockSmeshingProvider) StopSmeshing(arg0 bool) error
- type MockSmeshingProviderCoinbaseCall
- func (c *MockSmeshingProviderCoinbaseCall) Do(f func() types.Address) *MockSmeshingProviderCoinbaseCall
- func (c *MockSmeshingProviderCoinbaseCall) DoAndReturn(f func() types.Address) *MockSmeshingProviderCoinbaseCall
- func (c *MockSmeshingProviderCoinbaseCall) Return(arg0 types.Address) *MockSmeshingProviderCoinbaseCall
- type MockSmeshingProviderMockRecorder
- func (mr *MockSmeshingProviderMockRecorder) Coinbase() *MockSmeshingProviderCoinbaseCall
- func (mr *MockSmeshingProviderMockRecorder) SetCoinbase(coinbase any) *MockSmeshingProviderSetCoinbaseCall
- func (mr *MockSmeshingProviderMockRecorder) SmesherIDs() *MockSmeshingProviderSmesherIDsCall
- func (mr *MockSmeshingProviderMockRecorder) Smeshing() *MockSmeshingProviderSmeshingCall
- func (mr *MockSmeshingProviderMockRecorder) StartSmeshing(arg0 any) *MockSmeshingProviderStartSmeshingCall
- func (mr *MockSmeshingProviderMockRecorder) StopSmeshing(arg0 any) *MockSmeshingProviderStopSmeshingCall
- type MockSmeshingProviderSetCoinbaseCall
- func (c *MockSmeshingProviderSetCoinbaseCall) Do(f func(types.Address)) *MockSmeshingProviderSetCoinbaseCall
- func (c *MockSmeshingProviderSetCoinbaseCall) DoAndReturn(f func(types.Address)) *MockSmeshingProviderSetCoinbaseCall
- func (c *MockSmeshingProviderSetCoinbaseCall) Return() *MockSmeshingProviderSetCoinbaseCall
- type MockSmeshingProviderSmesherIDsCall
- func (c *MockSmeshingProviderSmesherIDsCall) Do(f func() []types.NodeID) *MockSmeshingProviderSmesherIDsCall
- func (c *MockSmeshingProviderSmesherIDsCall) DoAndReturn(f func() []types.NodeID) *MockSmeshingProviderSmesherIDsCall
- func (c *MockSmeshingProviderSmesherIDsCall) Return(arg0 []types.NodeID) *MockSmeshingProviderSmesherIDsCall
- type MockSmeshingProviderSmeshingCall
- type MockSmeshingProviderStartSmeshingCall
- func (c *MockSmeshingProviderStartSmeshingCall) Do(f func(types.Address) error) *MockSmeshingProviderStartSmeshingCall
- func (c *MockSmeshingProviderStartSmeshingCall) DoAndReturn(f func(types.Address) error) *MockSmeshingProviderStartSmeshingCall
- func (c *MockSmeshingProviderStartSmeshingCall) Return(arg0 error) *MockSmeshingProviderStartSmeshingCall
- type MockSmeshingProviderStopSmeshingCall
- func (c *MockSmeshingProviderStopSmeshingCall) Do(f func(bool) error) *MockSmeshingProviderStopSmeshingCall
- func (c *MockSmeshingProviderStopSmeshingCall) DoAndReturn(f func(bool) error) *MockSmeshingProviderStopSmeshingCall
- func (c *MockSmeshingProviderStopSmeshingCall) Return(arg0 error) *MockSmeshingProviderStopSmeshingCall
- type MockatxProvider
- type MockatxProviderGetAtxCall
- func (c *MockatxProviderGetAtxCall) Do(f func(types.ATXID) (*types.ActivationTx, error)) *MockatxProviderGetAtxCall
- func (c *MockatxProviderGetAtxCall) DoAndReturn(f func(types.ATXID) (*types.ActivationTx, error)) *MockatxProviderGetAtxCall
- func (c *MockatxProviderGetAtxCall) Return(arg0 *types.ActivationTx, arg1 error) *MockatxProviderGetAtxCall
- type MockatxProviderMockRecorder
- type MockcertifierClient
- type MockcertifierClientCertifyCall
- type MockcertifierClientMockRecorder
- type MockcertifierService
- func (m *MockcertifierService) Certificate(ctx context.Context, id types.NodeID, certifierAddress *url.URL, pubkey []byte) (*certifier.PoetCert, error)
- func (m *MockcertifierService) EXPECT() *MockcertifierServiceMockRecorder
- func (m *MockcertifierService) Recertify(ctx context.Context, id types.NodeID, certifierAddress *url.URL, pubkey []byte) (*certifier.PoetCert, error)
- type MockcertifierServiceCertificateCall
- func (c *MockcertifierServiceCertificateCall) Do(...) *MockcertifierServiceCertificateCall
- func (c *MockcertifierServiceCertificateCall) DoAndReturn(...) *MockcertifierServiceCertificateCall
- func (c *MockcertifierServiceCertificateCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockcertifierServiceCertificateCall
- type MockcertifierServiceMockRecorder
- type MockcertifierServiceRecertifyCall
- func (c *MockcertifierServiceRecertifyCall) Do(...) *MockcertifierServiceRecertifyCall
- func (c *MockcertifierServiceRecertifyCall) DoAndReturn(...) *MockcertifierServiceRecertifyCall
- func (c *MockcertifierServiceRecertifyCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockcertifierServiceRecertifyCall
- type MocklayerClock
- type MocklayerClockAwaitLayerCall
- func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall
- func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall
- func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall
- 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 MocknipostBuilder
- func (m *MocknipostBuilder) BuildNIPost(ctx context.Context, sig *signing.EdSigner, challengeHash types.Hash32, ...) (*nipost.NIPostState, error)
- func (m *MocknipostBuilder) EXPECT() *MocknipostBuilderMockRecorder
- func (m *MocknipostBuilder) Proof(ctx context.Context, nodeID types.NodeID, challenge []byte, ...) (*types.Post, *types.PostInfo, error)
- func (m *MocknipostBuilder) ResetState(arg0 types.NodeID) error
- type MocknipostBuilderBuildNIPostCall
- func (c *MocknipostBuilderBuildNIPostCall) Do(...) *MocknipostBuilderBuildNIPostCall
- func (c *MocknipostBuilderBuildNIPostCall) DoAndReturn(...) *MocknipostBuilderBuildNIPostCall
- func (c *MocknipostBuilderBuildNIPostCall) Return(arg0 *nipost.NIPostState, arg1 error) *MocknipostBuilderBuildNIPostCall
- type MocknipostBuilderMockRecorder
- func (mr *MocknipostBuilderMockRecorder) BuildNIPost(ctx, sig, challengeHash, postChallenge any) *MocknipostBuilderBuildNIPostCall
- func (mr *MocknipostBuilderMockRecorder) Proof(ctx, nodeID, challenge, postChallenge any) *MocknipostBuilderProofCall
- func (mr *MocknipostBuilderMockRecorder) ResetState(arg0 any) *MocknipostBuilderResetStateCall
- type MocknipostBuilderProofCall
- type MocknipostBuilderResetStateCall
- func (c *MocknipostBuilderResetStateCall) Do(f func(types.NodeID) error) *MocknipostBuilderResetStateCall
- func (c *MocknipostBuilderResetStateCall) DoAndReturn(f func(types.NodeID) error) *MocknipostBuilderResetStateCall
- func (c *MocknipostBuilderResetStateCall) Return(arg0 error) *MocknipostBuilderResetStateCall
- type MocknipostValidator
- func (m *MocknipostValidator) EXPECT() *MocknipostValidatorMockRecorder
- func (m *MocknipostValidator) InitialNIPostChallengeV1(challenge *wire.NIPostChallengeV1, atxs atxProvider, goldenATXID types.ATXID) error
- func (m *MocknipostValidator) IsVerifyingFullPost() bool
- func (m *MocknipostValidator) NIPost(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, ...) (uint64, error)
- func (m *MocknipostValidator) NIPostChallengeV1(challenge *wire.NIPostChallengeV1, previous *types.ActivationTx, ...) error
- func (m *MocknipostValidator) NumUnits(cfg *PostConfig, numUnits uint32) error
- func (m *MocknipostValidator) PoetMembership(ctx context.Context, membership *types.MultiMerkleProof, ...) (uint64, error)
- func (m *MocknipostValidator) PositioningAtx(id types.ATXID, atxs atxProvider, goldenATXID types.ATXID, ...) error
- func (m *MocknipostValidator) Post(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, ...) error
- func (m *MocknipostValidator) PostV2(ctx context.Context, smesherID types.NodeID, commitment types.ATXID, ...) error
- func (m *MocknipostValidator) VRFNonce(nodeId types.NodeID, commitmentAtxId types.ATXID, ...) error
- func (m *MocknipostValidator) VRFNonceV2(smesherID types.NodeID, commitment types.ATXID, vrfNonce uint64, ...) error
- func (m *MocknipostValidator) VerifyChain(ctx context.Context, id, goldenATXID types.ATXID, opts ...VerifyChainOption) error
- type MocknipostValidatorInitialNIPostChallengeV1Call
- func (c *MocknipostValidatorInitialNIPostChallengeV1Call) Do(f func(*wire.NIPostChallengeV1, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeV1Call
- func (c *MocknipostValidatorInitialNIPostChallengeV1Call) DoAndReturn(f func(*wire.NIPostChallengeV1, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeV1Call
- func (c *MocknipostValidatorInitialNIPostChallengeV1Call) Return(arg0 error) *MocknipostValidatorInitialNIPostChallengeV1Call
- type MocknipostValidatorIsVerifyingFullPostCall
- func (c *MocknipostValidatorIsVerifyingFullPostCall) Do(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall
- func (c *MocknipostValidatorIsVerifyingFullPostCall) DoAndReturn(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall
- func (c *MocknipostValidatorIsVerifyingFullPostCall) Return(arg0 bool) *MocknipostValidatorIsVerifyingFullPostCall
- type MocknipostValidatorMockRecorder
- func (mr *MocknipostValidatorMockRecorder) InitialNIPostChallengeV1(challenge, atxs, goldenATXID any) *MocknipostValidatorInitialNIPostChallengeV1Call
- func (mr *MocknipostValidatorMockRecorder) IsVerifyingFullPost() *MocknipostValidatorIsVerifyingFullPostCall
- func (mr *MocknipostValidatorMockRecorder) NIPost(ctx, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits any, ...) *MocknipostValidatorNIPostCall
- func (mr *MocknipostValidatorMockRecorder) NIPostChallengeV1(challenge, previous, nodeID any) *MocknipostValidatorNIPostChallengeV1Call
- func (mr *MocknipostValidatorMockRecorder) NumUnits(cfg, numUnits any) *MocknipostValidatorNumUnitsCall
- func (mr *MocknipostValidatorMockRecorder) PoetMembership(ctx, membership, postChallenge, poetChallenges any) *MocknipostValidatorPoetMembershipCall
- func (mr *MocknipostValidatorMockRecorder) PositioningAtx(id, atxs, goldenATXID, pubepoch any) *MocknipostValidatorPositioningAtxCall
- func (mr *MocknipostValidatorMockRecorder) Post(ctx, nodeId, commitmentAtxId, post, metadata, numUnits any, opts ...any) *MocknipostValidatorPostCall
- func (mr *MocknipostValidatorMockRecorder) PostV2(ctx, smesherID, commitment, post, challenge, numUnits any, opts ...any) *MocknipostValidatorPostV2Call
- func (mr *MocknipostValidatorMockRecorder) VRFNonce(nodeId, commitmentAtxId, vrfNonce, labelsPerUnit, numUnits any) *MocknipostValidatorVRFNonceCall
- func (mr *MocknipostValidatorMockRecorder) VRFNonceV2(smesherID, commitment, vrfNonce, numUnits any) *MocknipostValidatorVRFNonceV2Call
- func (mr *MocknipostValidatorMockRecorder) VerifyChain(ctx, id, goldenATXID any, opts ...any) *MocknipostValidatorVerifyChainCall
- type MocknipostValidatorNIPostCall
- type MocknipostValidatorNIPostChallengeV1Call
- func (c *MocknipostValidatorNIPostChallengeV1Call) Do(f func(*wire.NIPostChallengeV1, *types.ActivationTx, types.NodeID) error) *MocknipostValidatorNIPostChallengeV1Call
- func (c *MocknipostValidatorNIPostChallengeV1Call) DoAndReturn(f func(*wire.NIPostChallengeV1, *types.ActivationTx, types.NodeID) error) *MocknipostValidatorNIPostChallengeV1Call
- func (c *MocknipostValidatorNIPostChallengeV1Call) Return(arg0 error) *MocknipostValidatorNIPostChallengeV1Call
- type MocknipostValidatorNumUnitsCall
- func (c *MocknipostValidatorNumUnitsCall) Do(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall
- func (c *MocknipostValidatorNumUnitsCall) DoAndReturn(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall
- func (c *MocknipostValidatorNumUnitsCall) Return(arg0 error) *MocknipostValidatorNumUnitsCall
- type MocknipostValidatorPoetMembershipCall
- func (c *MocknipostValidatorPoetMembershipCall) Do(...) *MocknipostValidatorPoetMembershipCall
- func (c *MocknipostValidatorPoetMembershipCall) DoAndReturn(...) *MocknipostValidatorPoetMembershipCall
- func (c *MocknipostValidatorPoetMembershipCall) Return(arg0 uint64, arg1 error) *MocknipostValidatorPoetMembershipCall
- type MocknipostValidatorPositioningAtxCall
- func (c *MocknipostValidatorPositioningAtxCall) Do(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall
- func (c *MocknipostValidatorPositioningAtxCall) DoAndReturn(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall
- func (c *MocknipostValidatorPositioningAtxCall) Return(arg0 error) *MocknipostValidatorPositioningAtxCall
- type MocknipostValidatorPostCall
- type MocknipostValidatorPostV2Call
- type MocknipostValidatorVRFNonceCall
- func (c *MocknipostValidatorVRFNonceCall) Do(f func(types.NodeID, types.ATXID, uint64, uint64, uint32) error) *MocknipostValidatorVRFNonceCall
- func (c *MocknipostValidatorVRFNonceCall) DoAndReturn(f func(types.NodeID, types.ATXID, uint64, uint64, uint32) error) *MocknipostValidatorVRFNonceCall
- func (c *MocknipostValidatorVRFNonceCall) Return(arg0 error) *MocknipostValidatorVRFNonceCall
- type MocknipostValidatorVRFNonceV2Call
- func (c *MocknipostValidatorVRFNonceV2Call) Do(f func(types.NodeID, types.ATXID, uint64, uint32) error) *MocknipostValidatorVRFNonceV2Call
- func (c *MocknipostValidatorVRFNonceV2Call) DoAndReturn(f func(types.NodeID, types.ATXID, uint64, uint32) error) *MocknipostValidatorVRFNonceV2Call
- func (c *MocknipostValidatorVRFNonceV2Call) Return(arg0 error) *MocknipostValidatorVRFNonceV2Call
- type MocknipostValidatorVerifyChainCall
- func (c *MocknipostValidatorVerifyChainCall) Do(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall
- func (c *MocknipostValidatorVerifyChainCall) DoAndReturn(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall
- func (c *MocknipostValidatorVerifyChainCall) Return(arg0 error) *MocknipostValidatorVerifyChainCall
- type MockpoetDbAPI
- func (m *MockpoetDbAPI) EXPECT() *MockpoetDbAPIMockRecorder
- func (m *MockpoetDbAPI) Proof(arg0 types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)
- func (m *MockpoetDbAPI) ProofForRound(poetID []byte, roundID string) (*types.PoetProof, error)
- func (m *MockpoetDbAPI) ValidateAndStore(ctx context.Context, proofMessage *types.PoetProofMessage) error
- type MockpoetDbAPIMockRecorder
- type MockpoetDbAPIProofCall
- func (c *MockpoetDbAPIProofCall) Do(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *MockpoetDbAPIProofCall
- func (c *MockpoetDbAPIProofCall) DoAndReturn(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *MockpoetDbAPIProofCall
- func (c *MockpoetDbAPIProofCall) Return(arg0 *types.PoetProof, arg1 *types.Hash32, arg2 error) *MockpoetDbAPIProofCall
- type MockpoetDbAPIProofForRoundCall
- func (c *MockpoetDbAPIProofForRoundCall) Do(f func([]byte, string) (*types.PoetProof, error)) *MockpoetDbAPIProofForRoundCall
- func (c *MockpoetDbAPIProofForRoundCall) DoAndReturn(f func([]byte, string) (*types.PoetProof, error)) *MockpoetDbAPIProofForRoundCall
- func (c *MockpoetDbAPIProofForRoundCall) Return(arg0 *types.PoetProof, arg1 error) *MockpoetDbAPIProofForRoundCall
- type MockpoetDbAPIValidateAndStoreCall
- func (c *MockpoetDbAPIValidateAndStoreCall) Do(f func(context.Context, *types.PoetProofMessage) error) *MockpoetDbAPIValidateAndStoreCall
- func (c *MockpoetDbAPIValidateAndStoreCall) DoAndReturn(f func(context.Context, *types.PoetProofMessage) error) *MockpoetDbAPIValidateAndStoreCall
- func (c *MockpoetDbAPIValidateAndStoreCall) Return(arg0 error) *MockpoetDbAPIValidateAndStoreCall
- type MockpostService
- type MockpostServiceClientCall
- func (c *MockpostServiceClientCall) Do(f func(types.NodeID) (PostClient, error)) *MockpostServiceClientCall
- func (c *MockpostServiceClientCall) DoAndReturn(f func(types.NodeID) (PostClient, error)) *MockpostServiceClientCall
- func (c *MockpostServiceClientCall) Return(arg0 PostClient, arg1 error) *MockpostServiceClientCall
- type MockpostServiceMockRecorder
- type MockpostSetupProvider
- func (m *MockpostSetupProvider) EXPECT() *MockpostSetupProviderMockRecorder
- func (m *MockpostSetupProvider) PrepareInitializer(ctx context.Context, opts PostSetupOpts, id types.NodeID) error
- func (m *MockpostSetupProvider) Reset() error
- func (m *MockpostSetupProvider) StartSession(context context.Context, id types.NodeID) error
- func (m *MockpostSetupProvider) Status() *PostSetupStatus
- type MockpostSetupProviderMockRecorder
- func (mr *MockpostSetupProviderMockRecorder) PrepareInitializer(ctx, opts, id any) *MockpostSetupProviderPrepareInitializerCall
- func (mr *MockpostSetupProviderMockRecorder) Reset() *MockpostSetupProviderResetCall
- func (mr *MockpostSetupProviderMockRecorder) StartSession(context, id any) *MockpostSetupProviderStartSessionCall
- func (mr *MockpostSetupProviderMockRecorder) Status() *MockpostSetupProviderStatusCall
- type MockpostSetupProviderPrepareInitializerCall
- func (c *MockpostSetupProviderPrepareInitializerCall) Do(f func(context.Context, PostSetupOpts, types.NodeID) error) *MockpostSetupProviderPrepareInitializerCall
- func (c *MockpostSetupProviderPrepareInitializerCall) DoAndReturn(f func(context.Context, PostSetupOpts, types.NodeID) error) *MockpostSetupProviderPrepareInitializerCall
- func (c *MockpostSetupProviderPrepareInitializerCall) Return(arg0 error) *MockpostSetupProviderPrepareInitializerCall
- type MockpostSetupProviderResetCall
- type MockpostSetupProviderStartSessionCall
- func (c *MockpostSetupProviderStartSessionCall) Do(f func(context.Context, types.NodeID) error) *MockpostSetupProviderStartSessionCall
- func (c *MockpostSetupProviderStartSessionCall) DoAndReturn(f func(context.Context, types.NodeID) error) *MockpostSetupProviderStartSessionCall
- func (c *MockpostSetupProviderStartSessionCall) Return(arg0 error) *MockpostSetupProviderStartSessionCall
- type MockpostSetupProviderStatusCall
- func (c *MockpostSetupProviderStatusCall) Do(f func() *PostSetupStatus) *MockpostSetupProviderStatusCall
- func (c *MockpostSetupProviderStatusCall) DoAndReturn(f func() *PostSetupStatus) *MockpostSetupProviderStatusCall
- func (c *MockpostSetupProviderStatusCall) Return(arg0 *PostSetupStatus) *MockpostSetupProviderStatusCall
- type Mockscaler
- type MockscalerMockRecorder
- type MockscalerscaleCall
- type Mocksyncer
- type MocksyncerMockRecorder
- type MocksyncerRegisterForATXSyncedCall
- func (c *MocksyncerRegisterForATXSyncedCall) Do(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall
- func (c *MocksyncerRegisterForATXSyncedCall) DoAndReturn(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall
- func (c *MocksyncerRegisterForATXSyncedCall) Return(arg0 <-chan struct{}) *MocksyncerRegisterForATXSyncedCall
- type NIPostBuilder
- func (nb *NIPostBuilder) BuildNIPost(ctx context.Context, signer *signing.EdSigner, challenge types.Hash32, ...) (*nipost.NIPostState, error)
- func (nb *NIPostBuilder) Proof(ctx context.Context, nodeID types.NodeID, challenge []byte, ...) (*types.Post, *types.PostInfo, error)
- func (nb *NIPostBuilder) ResetState(nodeId types.NodeID) error
- type NIPostBuilderOption
- type PoetAuth
- type PoetClient
- type PoetClientOpt
- type PoetClientOpts
- type PoetConfig
- type PoetDb
- func (db *PoetDb) GetProofMessage(proofRef types.PoetProofRef) ([]byte, error)
- func (db *PoetDb) GetProofRef(poetID []byte, roundID string) (types.PoetProofRef, error)
- func (db *PoetDb) HasProof(proofRef types.PoetProofRef) bool
- func (db *PoetDb) Proof(proofRef types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)
- func (db *PoetDb) ProofForRound(poetID []byte, roundID string) (*types.PoetProof, error)
- func (db *PoetDb) StoreProof(ctx context.Context, ref types.PoetProofRef, ...) error
- func (db *PoetDb) Validate(root []byte, proof types.PoetProof, poetID []byte, roundID string, ...) error
- func (db *PoetDb) ValidateAndStore(ctx context.Context, proofMessage *types.PoetProofMessage) error
- func (db *PoetDb) ValidateAndStoreMsg(ctx context.Context, expHash types.Hash32, _ p2p.Peer, data []byte) error
- type PoetPoW
- type PoetPowParams
- type PoetService
- type PoetSvcUnstableError
- type PostClient
- type PostConfig
- type PostPowFlags
- type PostProofVerifyingOpts
- type PostProviderID
- type PostProvingOpts
- type PostRandomXMode
- type PostSetupManager
- type PostSetupManagerOpt
- type PostSetupOpts
- type PostSetupProvider
- type PostSetupState
- type PostSetupStatus
- type PostStates
- type PostSupervisor
- func (*PostSupervisor) Benchmark(p PostSetupProvider) (int, error)
- func (ps *PostSupervisor) Config() PostConfig
- func (*PostSupervisor) Providers() ([]PostSetupProvider, error)
- func (ps *PostSupervisor) Start(cmdCfg PostSupervisorConfig, opts PostSetupOpts, sig *signing.EdSigner) error
- func (ps *PostSupervisor) Status() *PostSetupStatus
- func (ps *PostSupervisor) Stop(deleteFiles bool) error
- type PostSupervisorConfig
- type PostVerifier
- type PostVerifierOpt
- type PowDifficulty
- type ProofToCertify
- type ProofToCertifyMetadata
- type SmeshingProvider
- type Validator
- func (v *Validator) InitialNIPostChallengeV1(challenge *wire.NIPostChallengeV1, atxs atxProvider, goldenATXID types.ATXID) error
- func (v *Validator) IsVerifyingFullPost() bool
- func (*Validator) LabelsPerUnit(cfg *PostConfig, labelsPerUnit uint64) error
- func (v *Validator) NIPost(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, ...) (uint64, error)
- func (*Validator) NIPostChallengeV1(challenge *wire.NIPostChallengeV1, prevATX *types.ActivationTx, ...) error
- func (*Validator) NumUnits(cfg *PostConfig, numUnits uint32) error
- func (v *Validator) PoetMembership(_ context.Context, membership *types.MultiMerkleProof, ...) (uint64, error)
- func (v *Validator) PositioningAtx(id types.ATXID, atxs atxProvider, goldenATXID types.ATXID, ...) error
- func (v *Validator) Post(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, ...) error
- func (v *Validator) PostV2(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, ...) error
- func (v *Validator) VRFNonce(nodeId types.NodeID, commitmentAtxId types.ATXID, ...) error
- func (v *Validator) VRFNonceV2(nodeId types.NodeID, commitment types.ATXID, vrfNonce uint64, numUnits uint32) error
- func (v *Validator) VerifyChain(ctx context.Context, id, goldenATXID types.ATXID, opts ...VerifyChainOption) error
- type VerifyChainOption
Constants ¶
const DefaultPostServiceName = "service"
Variables ¶
var ( // ErrATXChallengeExpired is returned when atx missed its publication window and needs to be regenerated. ErrATXChallengeExpired = errors.New("builder: atx expired") // ErrPoetServiceUnstable is returned when poet quality of service is low. ErrPoetServiceUnstable = &PoetSvcUnstableError{} // ErrPoetProofNotReceived is returned when no poet proof was received. ErrPoetProofNotReceived = errors.New("builder: didn't receive any poet proof") )
var ( ErrPostClientClosed = errors.New("post client closed") ErrPostClientNotConnected = errors.New("post service not registered") )
var ( ErrInvalidRequest = errors.New("invalid request") )
var ErrInvalidInitialPost = errors.New("invalid initial post")
var (
ErrNotFound = errors.New("not found")
)
var ErrObjectExists = sql.ErrObjectExists
var VerifyChainOpts verifyChainOptsNs
Functions ¶
func CheckPrevATXs ¶ added in v1.5.3
func NewPoetService ¶ added in v1.6.1
func NewPoetService( db poetDbAPI, server types.PoetServer, cfg PoetConfig, logger *zap.Logger, opts ...PoetClientOpt, ) (*poetService, error)
func NewPoetServiceWithClient ¶ added in v1.6.1
func NewPoetServiceWithClient( db poetDbAPI, client PoetClient, cfg PoetConfig, logger *zap.Logger, opts ...PoetClientOpt, ) *poetService
func NewPostStates ¶ added in v1.4.0
func PostSubset ¶ added in v1.4.0
func PostSubset(seed []byte) validatorOption
PostSubset configures the validator to validate only a subset of the POST indices. The `seed` is used to randomize the selection of indices.
func PrioritizeCall ¶ added in v1.6.1
func PrioritizeCall() validatorOption
func PrioritizedCall ¶ added in v1.6.1
func PrioritizedCall() postVerifierOptionFunc
func WithCertifierClientConfig ¶ added in v1.6.0
func WithCertifierClientConfig(cfg CertifierClientConfig) certifierClientOpts
func WithVerifierOptions ¶ added in v1.6.1
func WithVerifierOptions(ops ...verifying.OptionFunc) postVerifierOptionFunc
Types ¶
type AtxBuilder ¶ added in v1.4.0
type AtxReceiver ¶ added in v1.0.0
type AtxReceiver interface {
OnAtx(*types.ActivationTx)
}
type AtxVersions ¶ added in v1.6.0
type AtxVersions map[types.EpochID]types.AtxVersion
func (AtxVersions) Validate ¶ added in v1.6.0
func (v AtxVersions) Validate() error
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder struct is the struct that orchestrates the creation of activation transactions it is responsible for initializing post, receiving poet proof and orchestrating nipst. after which it will calculate total weight and providing relevant view as proof.
func NewBuilder ¶
func NewBuilder( conf Config, db sql.Executor, atxsdata *atxsdata.Data, localDB *localsql.Database, publisher pubsub.Publisher, nipostBuilder nipostBuilder, layerClock layerClock, syncer syncer, log *zap.Logger, opts ...BuilderOption, ) *Builder
NewBuilder returns an atx builder that will start a routine that will attempt to create an atx upon each new layer.
func (*Builder) BuildInitialPost ¶ added in v1.6.1
func (*Builder) BuildNIPostChallenge ¶ added in v1.4.0
func (*Builder) GetPrevAtx ¶
func (*Builder) PostStates ¶ added in v1.4.0
func (b *Builder) PostStates() map[types.IdentityDescriptor]types.PostState
PostState returns the current state of the post service for each registered smesher.
func (*Builder) PublishActivationTx ¶
PublishActivationTx attempts to publish an atx, it returns an error if an atx cannot be created.
func (*Builder) SetCoinbase ¶ added in v1.0.0
SetCoinbase sets the address rewardAddress to be the coinbase account written into the activation transaction the rewards for blocks made by this miner will go to this address.
func (*Builder) SmesherIDs ¶ added in v1.4.0
SmesherID returns the ID of the smesher that created this activation.
func (*Builder) StartSmeshing ¶ added in v1.0.0
StartSmeshing is the main entry point of the atx builder. It runs the main loop of the builder in a new go-routine and shouldn't be called more than once without calling StopSmeshing in between. If the post data is incomplete or missing, data creation session will be preceded. Changing of the post options (e.g., number of labels), after initial setup, is supported. If data creation fails for any reason then the go-routine will panic.
func (*Builder) StopSmeshing ¶ added in v1.0.0
StopSmeshing stops the atx builder.
type BuilderOption ¶ added in v1.0.0
type BuilderOption func(*Builder)
func BuilderAtxVersions ¶ added in v1.6.0
func BuilderAtxVersions(v AtxVersions) BuilderOption
func WithContext ¶ added in v1.0.0
func WithContext(ctx context.Context) BuilderOption
WithContext modifies parent context for background job.
func WithPoetConfig ¶ added in v1.0.0
func WithPoetConfig(c PoetConfig) BuilderOption
WithPoetConfig sets the poet config.
func WithPoetRetryInterval ¶ added in v1.0.0
func WithPoetRetryInterval(interval time.Duration) BuilderOption
WithPoetRetryInterval modifies time that builder will have to wait before retrying ATX build process if it failed due to issues with PoET server.
func WithPoets ¶ added in v1.6.0
func WithPoets(poets ...PoetService) BuilderOption
func WithPostStates ¶ added in v1.4.0
func WithPostStates(ps PostStates) BuilderOption
func WithPostValidityDelay ¶ added in v1.4.0
func WithPostValidityDelay(delay time.Duration) BuilderOption
func WithValidator ¶ added in v1.0.3
func WithValidator(v nipostValidator) BuilderOption
type Certifier ¶ added in v1.6.0
type Certifier struct {
// contains filtered or unexported fields
}
func NewCertifier ¶ added in v1.6.0
func (*Certifier) Certificate ¶ added in v1.6.0
type CertifierClient ¶ added in v1.6.0
type CertifierClient struct {
// contains filtered or unexported fields
}
func NewCertifierClient ¶ added in v1.6.0
type CertifierClientConfig ¶ added in v1.6.0
type CertifierClientConfig struct { // Base delay between retries, scaled with the number of retries. RetryDelay time.Duration `mapstructure:"retry-delay"` // Maximum time to wait between retries MaxRetryDelay time.Duration `mapstructure:"max-retry-delay"` // Maximum number of retries MaxRetries int `mapstructure:"max-retries"` }
func DefaultCertifierClientConfig ¶ added in v1.6.0
func DefaultCertifierClientConfig() CertifierClientConfig
type CertifierConfig ¶ added in v1.6.0
type CertifierConfig struct {
Client CertifierClientConfig `mapstructure:"client"`
}
func DefaultCertifierConfig ¶ added in v1.6.0
func DefaultCertifierConfig() CertifierConfig
type CertifyRequest ¶ added in v1.6.0
type CertifyRequest struct { Proof ProofToCertify `json:"proof"` Metadata ProofToCertifyMetadata `json:"metadata"` }
type CertifyResponse ¶ added in v1.6.0
type ErrAtxNotFound ¶
func (*ErrAtxNotFound) Error ¶ added in v1.0.0
func (e *ErrAtxNotFound) Error() string
func (*ErrAtxNotFound) Is ¶ added in v1.0.0
func (e *ErrAtxNotFound) Is(target error) bool
func (*ErrAtxNotFound) Unwrap ¶ added in v1.0.0
func (e *ErrAtxNotFound) Unwrap() error
type HTTPPoetClient ¶
type HTTPPoetClient struct {
// contains filtered or unexported fields
}
HTTPPoetClient implements PoetProvingServiceClient interface.
func NewHTTPPoetClient ¶
func NewHTTPPoetClient(server types.PoetServer, cfg PoetConfig, opts ...PoetClientOpts) (*HTTPPoetClient, error)
NewHTTPPoetClient returns new instance of HTTPPoetClient connecting to the specified url.
func (*HTTPPoetClient) Address ¶ added in v1.0.8
func (c *HTTPPoetClient) Address() string
func (*HTTPPoetClient) CertifierInfo ¶ added in v1.6.0
func (*HTTPPoetClient) Id ¶ added in v1.6.1
func (c *HTTPPoetClient) Id() []byte
func (*HTTPPoetClient) PowParams ¶ added in v1.0.0
func (c *HTTPPoetClient) PowParams(ctx context.Context) (*PoetPowParams, error)
type Handler ¶ added in v1.0.0
type Handler struct {
// contains filtered or unexported fields
}
Handler processes the atxs received from all nodes and their validity status.
func NewHandler ¶ added in v1.0.0
func NewHandler( local p2p.Peer, cdb *datastore.CachedDB, atxsdata *atxsdata.Data, edVerifier *signing.EdVerifier, c layerClock, pub pubsub.Publisher, fetcher system.Fetcher, goldenATXID types.ATXID, nipostValidator nipostValidator, beacon AtxReceiver, tortoise system.Tortoise, lg *zap.Logger, opts ...HandlerOption, ) *Handler
NewHandler returns a data handler for ATX.
func (*Handler) HandleGossipAtx ¶ added in v1.0.0
HandleGossipAtx handles the atx gossip data channel.
type HandlerOption ¶ added in v1.6.0
type HandlerOption func(*Handler)
HandlerOption is a functional option for the handler.
func WithAtxVersions ¶ added in v1.6.0
func WithAtxVersions(v AtxVersions) HandlerOption
func WithTickSize ¶ added in v1.6.0
func WithTickSize(tickSize uint64) HandlerOption
type HandlerV1 ¶ added in v1.6.0
type HandlerV1 struct {
// contains filtered or unexported fields
}
HandlerV1 processes ATXs version 1.
type HandlerV2 ¶ added in v1.6.0
type HandlerV2 struct {
// contains filtered or unexported fields
}
type InvalidChainError ¶ added in v1.4.0
func (*InvalidChainError) Error ¶ added in v1.4.0
func (e *InvalidChainError) Error() string
func (*InvalidChainError) Is ¶ added in v1.4.0
func (e *InvalidChainError) Is(target error) bool
func (*InvalidChainError) Unwrap ¶ added in v1.4.0
func (e *InvalidChainError) Unwrap() error
type InvalidPostIndexHandler ¶ added in v1.6.0
type InvalidPostIndexHandler struct {
// contains filtered or unexported fields
}
func NewInvalidPostIndexHandler ¶ added in v1.6.0
func NewInvalidPostIndexHandler( db sql.Executor, logger *zap.Logger, edVerifier *signing.EdVerifier, postVerifier PostVerifier, ) *InvalidPostIndexHandler
func (*InvalidPostIndexHandler) ReportInvalidProof ¶ added in v1.6.0
func (mh *InvalidPostIndexHandler) ReportInvalidProof(numInvalidProofs *prometheus.CounterVec)
func (*InvalidPostIndexHandler) ReportProof ¶ added in v1.6.0
func (mh *InvalidPostIndexHandler) ReportProof(numProofs *prometheus.CounterVec)
type InvalidPrevATXHandler ¶ added in v1.6.0
type InvalidPrevATXHandler struct {
// contains filtered or unexported fields
}
func NewInvalidPrevATXHandler ¶ added in v1.6.0
func NewInvalidPrevATXHandler( db sql.Executor, logger *zap.Logger, edVerifier *signing.EdVerifier, ) *InvalidPrevATXHandler
func (*InvalidPrevATXHandler) ReportInvalidProof ¶ added in v1.6.0
func (mh *InvalidPrevATXHandler) ReportInvalidProof(numInvalidProofs *prometheus.CounterVec)
func (*InvalidPrevATXHandler) ReportProof ¶ added in v1.6.0
func (mh *InvalidPrevATXHandler) ReportProof(numProofs *prometheus.CounterVec)
type MalfeasanceHandler ¶ added in v1.6.0
type MalfeasanceHandler struct {
// contains filtered or unexported fields
}
func NewMalfeasanceHandler ¶ added in v1.6.0
func NewMalfeasanceHandler( db sql.Executor, logger *zap.Logger, edVerifier *signing.EdVerifier, ) *MalfeasanceHandler
func (*MalfeasanceHandler) ReportInvalidProof ¶ added in v1.6.0
func (mh *MalfeasanceHandler) ReportInvalidProof(numInvalidProofs *prometheus.CounterVec)
func (*MalfeasanceHandler) ReportProof ¶ added in v1.6.0
func (mh *MalfeasanceHandler) ReportProof(numProofs *prometheus.CounterVec)
type MockAtxBuilder ¶ added in v1.4.0
type MockAtxBuilder struct {
// contains filtered or unexported fields
}
MockAtxBuilder is a mock of AtxBuilder interface.
func NewMockAtxBuilder ¶ added in v1.4.0
func NewMockAtxBuilder(ctrl *gomock.Controller) *MockAtxBuilder
NewMockAtxBuilder creates a new mock instance.
func (*MockAtxBuilder) EXPECT ¶ added in v1.4.0
func (m *MockAtxBuilder) EXPECT() *MockAtxBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAtxBuilder) Register ¶ added in v1.4.0
func (m *MockAtxBuilder) Register(sig *signing.EdSigner)
Register mocks base method.
type MockAtxBuilderMockRecorder ¶ added in v1.4.0
type MockAtxBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockAtxBuilderMockRecorder is the mock recorder for MockAtxBuilder.
func (*MockAtxBuilderMockRecorder) Register ¶ added in v1.4.0
func (mr *MockAtxBuilderMockRecorder) Register(sig any) *MockAtxBuilderRegisterCall
Register indicates an expected call of Register.
type MockAtxBuilderRegisterCall ¶ added in v1.4.0
MockAtxBuilderRegisterCall wrap *gomock.Call
func (*MockAtxBuilderRegisterCall) Do ¶ added in v1.4.0
func (c *MockAtxBuilderRegisterCall) Do(f func(*signing.EdSigner)) *MockAtxBuilderRegisterCall
Do rewrite *gomock.Call.Do
func (*MockAtxBuilderRegisterCall) DoAndReturn ¶ added in v1.4.0
func (c *MockAtxBuilderRegisterCall) DoAndReturn(f func(*signing.EdSigner)) *MockAtxBuilderRegisterCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAtxBuilderRegisterCall) Return ¶ added in v1.4.0
func (c *MockAtxBuilderRegisterCall) Return() *MockAtxBuilderRegisterCall
Return rewrite *gomock.Call.Return
type MockAtxReceiver ¶ added in v1.0.0
type MockAtxReceiver struct {
// contains filtered or unexported fields
}
MockAtxReceiver is a mock of AtxReceiver interface.
func NewMockAtxReceiver ¶ added in v1.0.0
func NewMockAtxReceiver(ctrl *gomock.Controller) *MockAtxReceiver
NewMockAtxReceiver creates a new mock instance.
func (*MockAtxReceiver) EXPECT ¶ added in v1.0.0
func (m *MockAtxReceiver) EXPECT() *MockAtxReceiverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAtxReceiver) OnAtx ¶ added in v1.0.0
func (m *MockAtxReceiver) OnAtx(arg0 *types.ActivationTx)
OnAtx mocks base method.
type MockAtxReceiverMockRecorder ¶ added in v1.0.0
type MockAtxReceiverMockRecorder struct {
// contains filtered or unexported fields
}
MockAtxReceiverMockRecorder is the mock recorder for MockAtxReceiver.
func (*MockAtxReceiverMockRecorder) OnAtx ¶ added in v1.0.0
func (mr *MockAtxReceiverMockRecorder) OnAtx(arg0 any) *MockAtxReceiverOnAtxCall
OnAtx indicates an expected call of OnAtx.
type MockAtxReceiverOnAtxCall ¶ added in v1.4.0
MockAtxReceiverOnAtxCall wrap *gomock.Call
func (*MockAtxReceiverOnAtxCall) Do ¶ added in v1.4.0
func (c *MockAtxReceiverOnAtxCall) Do(f func(*types.ActivationTx)) *MockAtxReceiverOnAtxCall
Do rewrite *gomock.Call.Do
func (*MockAtxReceiverOnAtxCall) DoAndReturn ¶ added in v1.4.0
func (c *MockAtxReceiverOnAtxCall) DoAndReturn(f func(*types.ActivationTx)) *MockAtxReceiverOnAtxCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAtxReceiverOnAtxCall) Return ¶ added in v1.4.0
func (c *MockAtxReceiverOnAtxCall) Return() *MockAtxReceiverOnAtxCall
Return rewrite *gomock.Call.Return
type MockPoetService ¶ added in v1.6.1
type MockPoetService struct {
// contains filtered or unexported fields
}
MockPoetService is a mock of PoetService interface.
func NewMockPoetService ¶ added in v1.6.1
func NewMockPoetService(ctrl *gomock.Controller) *MockPoetService
NewMockPoetService creates a new mock instance.
func (*MockPoetService) Address ¶ added in v1.6.1
func (m *MockPoetService) Address() string
Address mocks base method.
func (*MockPoetService) Certify ¶ added in v1.6.1
func (m *MockPoetService) Certify(ctx context.Context, id types.NodeID) (*certifier.PoetCert, error)
Certify mocks base method.
func (*MockPoetService) EXPECT ¶ added in v1.6.1
func (m *MockPoetService) EXPECT() *MockPoetServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPoetServiceAddressCall ¶ added in v1.6.1
MockPoetServiceAddressCall wrap *gomock.Call
func (*MockPoetServiceAddressCall) Do ¶ added in v1.6.1
func (c *MockPoetServiceAddressCall) Do(f func() string) *MockPoetServiceAddressCall
Do rewrite *gomock.Call.Do
func (*MockPoetServiceAddressCall) DoAndReturn ¶ added in v1.6.1
func (c *MockPoetServiceAddressCall) DoAndReturn(f func() string) *MockPoetServiceAddressCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPoetServiceAddressCall) Return ¶ added in v1.6.1
func (c *MockPoetServiceAddressCall) Return(arg0 string) *MockPoetServiceAddressCall
Return rewrite *gomock.Call.Return
type MockPoetServiceCertifyCall ¶ added in v1.6.1
MockPoetServiceCertifyCall wrap *gomock.Call
func (*MockPoetServiceCertifyCall) Do ¶ added in v1.6.1
func (c *MockPoetServiceCertifyCall) Do(f func(context.Context, types.NodeID) (*certifier.PoetCert, error)) *MockPoetServiceCertifyCall
Do rewrite *gomock.Call.Do
func (*MockPoetServiceCertifyCall) DoAndReturn ¶ added in v1.6.1
func (c *MockPoetServiceCertifyCall) DoAndReturn(f func(context.Context, types.NodeID) (*certifier.PoetCert, error)) *MockPoetServiceCertifyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPoetServiceCertifyCall) Return ¶ added in v1.6.1
func (c *MockPoetServiceCertifyCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockPoetServiceCertifyCall
Return rewrite *gomock.Call.Return
type MockPoetServiceMockRecorder ¶ added in v1.6.1
type MockPoetServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockPoetServiceMockRecorder is the mock recorder for MockPoetService.
func (*MockPoetServiceMockRecorder) Address ¶ added in v1.6.1
func (mr *MockPoetServiceMockRecorder) Address() *MockPoetServiceAddressCall
Address indicates an expected call of Address.
func (*MockPoetServiceMockRecorder) Certify ¶ added in v1.6.1
func (mr *MockPoetServiceMockRecorder) Certify(ctx, id any) *MockPoetServiceCertifyCall
Certify indicates an expected call of Certify.
func (*MockPoetServiceMockRecorder) Proof ¶ added in v1.6.1
func (mr *MockPoetServiceMockRecorder) Proof(ctx, roundID any) *MockPoetServiceProofCall
Proof indicates an expected call of Proof.
func (*MockPoetServiceMockRecorder) Submit ¶ added in v1.6.1
func (mr *MockPoetServiceMockRecorder) Submit(ctx, deadline, prefix, challenge, signature, nodeID any) *MockPoetServiceSubmitCall
Submit indicates an expected call of Submit.
type MockPoetServiceProofCall ¶ added in v1.6.1
MockPoetServiceProofCall wrap *gomock.Call
func (*MockPoetServiceProofCall) Do ¶ added in v1.6.1
func (c *MockPoetServiceProofCall) Do(f func(context.Context, string) (*types.PoetProof, []types.Hash32, error)) *MockPoetServiceProofCall
Do rewrite *gomock.Call.Do
func (*MockPoetServiceProofCall) DoAndReturn ¶ added in v1.6.1
func (c *MockPoetServiceProofCall) DoAndReturn(f func(context.Context, string) (*types.PoetProof, []types.Hash32, error)) *MockPoetServiceProofCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPoetServiceProofCall) Return ¶ added in v1.6.1
func (c *MockPoetServiceProofCall) Return(arg0 *types.PoetProof, arg1 []types.Hash32, arg2 error) *MockPoetServiceProofCall
Return rewrite *gomock.Call.Return
type MockPoetServiceSubmitCall ¶ added in v1.6.1
MockPoetServiceSubmitCall wrap *gomock.Call
func (*MockPoetServiceSubmitCall) Do ¶ added in v1.6.1
func (c *MockPoetServiceSubmitCall) Do(f func(context.Context, time.Time, []byte, []byte, types.EdSignature, types.NodeID) (*types.PoetRound, error)) *MockPoetServiceSubmitCall
Do rewrite *gomock.Call.Do
func (*MockPoetServiceSubmitCall) DoAndReturn ¶ added in v1.6.1
func (c *MockPoetServiceSubmitCall) DoAndReturn(f func(context.Context, time.Time, []byte, []byte, types.EdSignature, types.NodeID) (*types.PoetRound, error)) *MockPoetServiceSubmitCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPoetServiceSubmitCall) Return ¶ added in v1.6.1
func (c *MockPoetServiceSubmitCall) Return(arg0 *types.PoetRound, arg1 error) *MockPoetServiceSubmitCall
Return rewrite *gomock.Call.Return
type MockPostClient ¶ added in v1.3.0
type MockPostClient struct {
// contains filtered or unexported fields
}
MockPostClient is a mock of PostClient interface.
func NewMockPostClient ¶ added in v1.3.0
func NewMockPostClient(ctrl *gomock.Controller) *MockPostClient
NewMockPostClient creates a new mock instance.
func (*MockPostClient) EXPECT ¶ added in v1.3.0
func (m *MockPostClient) EXPECT() *MockPostClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPostClientInfoCall ¶ added in v1.4.0
MockPostClientInfoCall wrap *gomock.Call
func (*MockPostClientInfoCall) Do ¶ added in v1.4.0
func (c *MockPostClientInfoCall) Do(f func(context.Context) (*types.PostInfo, error)) *MockPostClientInfoCall
Do rewrite *gomock.Call.Do
func (*MockPostClientInfoCall) DoAndReturn ¶ added in v1.4.0
func (c *MockPostClientInfoCall) DoAndReturn(f func(context.Context) (*types.PostInfo, error)) *MockPostClientInfoCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPostClientInfoCall) Return ¶ added in v1.4.0
func (c *MockPostClientInfoCall) Return(arg0 *types.PostInfo, arg1 error) *MockPostClientInfoCall
Return rewrite *gomock.Call.Return
type MockPostClientMockRecorder ¶ added in v1.3.0
type MockPostClientMockRecorder struct {
// contains filtered or unexported fields
}
MockPostClientMockRecorder is the mock recorder for MockPostClient.
func (*MockPostClientMockRecorder) Info ¶ added in v1.3.0
func (mr *MockPostClientMockRecorder) Info(ctx any) *MockPostClientInfoCall
Info indicates an expected call of Info.
func (*MockPostClientMockRecorder) Proof ¶ added in v1.3.0
func (mr *MockPostClientMockRecorder) Proof(ctx, challenge any) *MockPostClientProofCall
Proof indicates an expected call of Proof.
type MockPostClientProofCall ¶ added in v1.4.0
MockPostClientProofCall wrap *gomock.Call
func (*MockPostClientProofCall) Do ¶ added in v1.4.0
func (c *MockPostClientProofCall) Do(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *MockPostClientProofCall
Do rewrite *gomock.Call.Do
func (*MockPostClientProofCall) DoAndReturn ¶ added in v1.4.0
func (c *MockPostClientProofCall) DoAndReturn(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *MockPostClientProofCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPostClientProofCall) Return ¶ added in v1.4.0
func (c *MockPostClientProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *MockPostClientProofCall
Return rewrite *gomock.Call.Return
type MockPostStates ¶ added in v1.4.0
type MockPostStates struct {
// contains filtered or unexported fields
}
MockPostStates is a mock of PostStates interface.
func NewMockPostStates ¶ added in v1.4.0
func NewMockPostStates(ctrl *gomock.Controller) *MockPostStates
NewMockPostStates creates a new mock instance.
func (*MockPostStates) EXPECT ¶ added in v1.4.0
func (m *MockPostStates) EXPECT() *MockPostStatesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPostStatesGetCall ¶ added in v1.4.0
MockPostStatesGetCall wrap *gomock.Call
func (*MockPostStatesGetCall) Do ¶ added in v1.4.0
func (c *MockPostStatesGetCall) Do(f func() map[types.NodeID]types.PostState) *MockPostStatesGetCall
Do rewrite *gomock.Call.Do
func (*MockPostStatesGetCall) DoAndReturn ¶ added in v1.4.0
func (c *MockPostStatesGetCall) DoAndReturn(f func() map[types.NodeID]types.PostState) *MockPostStatesGetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPostStatesGetCall) Return ¶ added in v1.4.0
func (c *MockPostStatesGetCall) Return(arg0 map[types.NodeID]types.PostState) *MockPostStatesGetCall
Return rewrite *gomock.Call.Return
type MockPostStatesMockRecorder ¶ added in v1.4.0
type MockPostStatesMockRecorder struct {
// contains filtered or unexported fields
}
MockPostStatesMockRecorder is the mock recorder for MockPostStates.
func (*MockPostStatesMockRecorder) Get ¶ added in v1.4.0
func (mr *MockPostStatesMockRecorder) Get() *MockPostStatesGetCall
Get indicates an expected call of Get.
func (*MockPostStatesMockRecorder) Set ¶ added in v1.4.0
func (mr *MockPostStatesMockRecorder) Set(id, state any) *MockPostStatesSetCall
Set indicates an expected call of Set.
type MockPostStatesSetCall ¶ added in v1.4.0
MockPostStatesSetCall wrap *gomock.Call
func (*MockPostStatesSetCall) Do ¶ added in v1.4.0
func (c *MockPostStatesSetCall) Do(f func(types.NodeID, types.PostState)) *MockPostStatesSetCall
Do rewrite *gomock.Call.Do
func (*MockPostStatesSetCall) DoAndReturn ¶ added in v1.4.0
func (c *MockPostStatesSetCall) DoAndReturn(f func(types.NodeID, types.PostState)) *MockPostStatesSetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPostStatesSetCall) Return ¶ added in v1.4.0
func (c *MockPostStatesSetCall) Return() *MockPostStatesSetCall
Return rewrite *gomock.Call.Return
type MockPostVerifier ¶ added in v1.0.0
type MockPostVerifier struct {
// contains filtered or unexported fields
}
MockPostVerifier is a mock of PostVerifier interface.
func NewMockPostVerifier ¶ added in v1.0.0
func NewMockPostVerifier(ctrl *gomock.Controller) *MockPostVerifier
NewMockPostVerifier creates a new mock instance.
func (*MockPostVerifier) Close ¶ added in v1.0.0
func (m *MockPostVerifier) Close() error
Close mocks base method.
func (*MockPostVerifier) EXPECT ¶ added in v1.0.0
func (m *MockPostVerifier) EXPECT() *MockPostVerifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPostVerifier) Verify ¶ added in v1.0.0
func (m_2 *MockPostVerifier) Verify(ctx context.Context, p *shared.Proof, m *shared.ProofMetadata, opts ...postVerifierOptionFunc) error
Verify mocks base method.
type MockPostVerifierCloseCall ¶ added in v1.4.0
MockPostVerifierCloseCall wrap *gomock.Call
func (*MockPostVerifierCloseCall) Do ¶ added in v1.4.0
func (c *MockPostVerifierCloseCall) Do(f func() error) *MockPostVerifierCloseCall
Do rewrite *gomock.Call.Do
func (*MockPostVerifierCloseCall) DoAndReturn ¶ added in v1.4.0
func (c *MockPostVerifierCloseCall) DoAndReturn(f func() error) *MockPostVerifierCloseCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPostVerifierCloseCall) Return ¶ added in v1.4.0
func (c *MockPostVerifierCloseCall) Return(arg0 error) *MockPostVerifierCloseCall
Return rewrite *gomock.Call.Return
type MockPostVerifierMockRecorder ¶ added in v1.0.0
type MockPostVerifierMockRecorder struct {
// contains filtered or unexported fields
}
MockPostVerifierMockRecorder is the mock recorder for MockPostVerifier.
func (*MockPostVerifierMockRecorder) Close ¶ added in v1.0.0
func (mr *MockPostVerifierMockRecorder) Close() *MockPostVerifierCloseCall
Close indicates an expected call of Close.
func (*MockPostVerifierMockRecorder) Verify ¶ added in v1.0.0
func (mr *MockPostVerifierMockRecorder) Verify(ctx, p, m any, opts ...any) *MockPostVerifierVerifyCall
Verify indicates an expected call of Verify.
type MockPostVerifierVerifyCall ¶ added in v1.4.0
MockPostVerifierVerifyCall wrap *gomock.Call
func (*MockPostVerifierVerifyCall) Do ¶ added in v1.4.0
func (c *MockPostVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...postVerifierOptionFunc) error) *MockPostVerifierVerifyCall
Do rewrite *gomock.Call.Do
func (*MockPostVerifierVerifyCall) DoAndReturn ¶ added in v1.4.0
func (c *MockPostVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...postVerifierOptionFunc) error) *MockPostVerifierVerifyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockPostVerifierVerifyCall) Return ¶ added in v1.4.0
func (c *MockPostVerifierVerifyCall) Return(arg0 error) *MockPostVerifierVerifyCall
Return rewrite *gomock.Call.Return
type MockSmeshingProvider ¶ added in v1.0.0
type MockSmeshingProvider struct {
// contains filtered or unexported fields
}
MockSmeshingProvider is a mock of SmeshingProvider interface.
func NewMockSmeshingProvider ¶ added in v1.0.0
func NewMockSmeshingProvider(ctrl *gomock.Controller) *MockSmeshingProvider
NewMockSmeshingProvider creates a new mock instance.
func (*MockSmeshingProvider) Coinbase ¶ added in v1.0.0
func (m *MockSmeshingProvider) Coinbase() types.Address
Coinbase mocks base method.
func (*MockSmeshingProvider) EXPECT ¶ added in v1.0.0
func (m *MockSmeshingProvider) EXPECT() *MockSmeshingProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSmeshingProvider) SetCoinbase ¶ added in v1.0.0
func (m *MockSmeshingProvider) SetCoinbase(coinbase types.Address)
SetCoinbase mocks base method.
func (*MockSmeshingProvider) SmesherIDs ¶ added in v1.4.0
func (m *MockSmeshingProvider) SmesherIDs() []types.NodeID
SmesherIDs mocks base method.
func (*MockSmeshingProvider) Smeshing ¶ added in v1.0.0
func (m *MockSmeshingProvider) Smeshing() bool
Smeshing mocks base method.
func (*MockSmeshingProvider) StartSmeshing ¶ added in v1.0.0
func (m *MockSmeshingProvider) StartSmeshing(arg0 types.Address) error
StartSmeshing mocks base method.
func (*MockSmeshingProvider) StopSmeshing ¶ added in v1.0.0
func (m *MockSmeshingProvider) StopSmeshing(arg0 bool) error
StopSmeshing mocks base method.
type MockSmeshingProviderCoinbaseCall ¶ added in v1.4.0
MockSmeshingProviderCoinbaseCall wrap *gomock.Call
func (*MockSmeshingProviderCoinbaseCall) Do ¶ added in v1.4.0
func (c *MockSmeshingProviderCoinbaseCall) Do(f func() types.Address) *MockSmeshingProviderCoinbaseCall
Do rewrite *gomock.Call.Do
func (*MockSmeshingProviderCoinbaseCall) DoAndReturn ¶ added in v1.4.0
func (c *MockSmeshingProviderCoinbaseCall) DoAndReturn(f func() types.Address) *MockSmeshingProviderCoinbaseCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockSmeshingProviderCoinbaseCall) Return ¶ added in v1.4.0
func (c *MockSmeshingProviderCoinbaseCall) Return(arg0 types.Address) *MockSmeshingProviderCoinbaseCall
Return rewrite *gomock.Call.Return
type MockSmeshingProviderMockRecorder ¶ added in v1.0.0
type MockSmeshingProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockSmeshingProviderMockRecorder is the mock recorder for MockSmeshingProvider.
func (*MockSmeshingProviderMockRecorder) Coinbase ¶ added in v1.0.0
func (mr *MockSmeshingProviderMockRecorder) Coinbase() *MockSmeshingProviderCoinbaseCall
Coinbase indicates an expected call of Coinbase.
func (*MockSmeshingProviderMockRecorder) SetCoinbase ¶ added in v1.0.0
func (mr *MockSmeshingProviderMockRecorder) SetCoinbase(coinbase any) *MockSmeshingProviderSetCoinbaseCall
SetCoinbase indicates an expected call of SetCoinbase.
func (*MockSmeshingProviderMockRecorder) SmesherIDs ¶ added in v1.4.0
func (mr *MockSmeshingProviderMockRecorder) SmesherIDs() *MockSmeshingProviderSmesherIDsCall
SmesherIDs indicates an expected call of SmesherIDs.
func (*MockSmeshingProviderMockRecorder) Smeshing ¶ added in v1.0.0
func (mr *MockSmeshingProviderMockRecorder) Smeshing() *MockSmeshingProviderSmeshingCall
Smeshing indicates an expected call of Smeshing.
func (*MockSmeshingProviderMockRecorder) StartSmeshing ¶ added in v1.0.0
func (mr *MockSmeshingProviderMockRecorder) StartSmeshing(arg0 any) *MockSmeshingProviderStartSmeshingCall
StartSmeshing indicates an expected call of StartSmeshing.
func (*MockSmeshingProviderMockRecorder) StopSmeshing ¶ added in v1.0.0
func (mr *MockSmeshingProviderMockRecorder) StopSmeshing(arg0 any) *MockSmeshingProviderStopSmeshingCall
StopSmeshing indicates an expected call of StopSmeshing.
type MockSmeshingProviderSetCoinbaseCall ¶ added in v1.4.0
MockSmeshingProviderSetCoinbaseCall wrap *gomock.Call
func (*MockSmeshingProviderSetCoinbaseCall) Do ¶ added in v1.4.0
func (c *MockSmeshingProviderSetCoinbaseCall) Do(f func(types.Address)) *MockSmeshingProviderSetCoinbaseCall
Do rewrite *gomock.Call.Do
func (*MockSmeshingProviderSetCoinbaseCall) DoAndReturn ¶ added in v1.4.0
func (c *MockSmeshingProviderSetCoinbaseCall) DoAndReturn(f func(types.Address)) *MockSmeshingProviderSetCoinbaseCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockSmeshingProviderSetCoinbaseCall) Return ¶ added in v1.4.0
func (c *MockSmeshingProviderSetCoinbaseCall) Return() *MockSmeshingProviderSetCoinbaseCall
Return rewrite *gomock.Call.Return
type MockSmeshingProviderSmesherIDsCall ¶ added in v1.4.0
MockSmeshingProviderSmesherIDsCall wrap *gomock.Call
func (*MockSmeshingProviderSmesherIDsCall) Do ¶ added in v1.4.0
func (c *MockSmeshingProviderSmesherIDsCall) Do(f func() []types.NodeID) *MockSmeshingProviderSmesherIDsCall
Do rewrite *gomock.Call.Do
func (*MockSmeshingProviderSmesherIDsCall) DoAndReturn ¶ added in v1.4.0
func (c *MockSmeshingProviderSmesherIDsCall) DoAndReturn(f func() []types.NodeID) *MockSmeshingProviderSmesherIDsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockSmeshingProviderSmesherIDsCall) Return ¶ added in v1.4.0
func (c *MockSmeshingProviderSmesherIDsCall) Return(arg0 []types.NodeID) *MockSmeshingProviderSmesherIDsCall
Return rewrite *gomock.Call.Return
type MockSmeshingProviderSmeshingCall ¶ added in v1.4.0
MockSmeshingProviderSmeshingCall wrap *gomock.Call
func (*MockSmeshingProviderSmeshingCall) Do ¶ added in v1.4.0
func (c *MockSmeshingProviderSmeshingCall) Do(f func() bool) *MockSmeshingProviderSmeshingCall
Do rewrite *gomock.Call.Do
func (*MockSmeshingProviderSmeshingCall) DoAndReturn ¶ added in v1.4.0
func (c *MockSmeshingProviderSmeshingCall) DoAndReturn(f func() bool) *MockSmeshingProviderSmeshingCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockSmeshingProviderSmeshingCall) Return ¶ added in v1.4.0
func (c *MockSmeshingProviderSmeshingCall) Return(arg0 bool) *MockSmeshingProviderSmeshingCall
Return rewrite *gomock.Call.Return
type MockSmeshingProviderStartSmeshingCall ¶ added in v1.4.0
MockSmeshingProviderStartSmeshingCall wrap *gomock.Call
func (*MockSmeshingProviderStartSmeshingCall) Do ¶ added in v1.4.0
func (c *MockSmeshingProviderStartSmeshingCall) Do(f func(types.Address) error) *MockSmeshingProviderStartSmeshingCall
Do rewrite *gomock.Call.Do
func (*MockSmeshingProviderStartSmeshingCall) DoAndReturn ¶ added in v1.4.0
func (c *MockSmeshingProviderStartSmeshingCall) DoAndReturn(f func(types.Address) error) *MockSmeshingProviderStartSmeshingCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockSmeshingProviderStartSmeshingCall) Return ¶ added in v1.4.0
func (c *MockSmeshingProviderStartSmeshingCall) Return(arg0 error) *MockSmeshingProviderStartSmeshingCall
Return rewrite *gomock.Call.Return
type MockSmeshingProviderStopSmeshingCall ¶ added in v1.4.0
MockSmeshingProviderStopSmeshingCall wrap *gomock.Call
func (*MockSmeshingProviderStopSmeshingCall) Do ¶ added in v1.4.0
func (c *MockSmeshingProviderStopSmeshingCall) Do(f func(bool) error) *MockSmeshingProviderStopSmeshingCall
Do rewrite *gomock.Call.Do
func (*MockSmeshingProviderStopSmeshingCall) DoAndReturn ¶ added in v1.4.0
func (c *MockSmeshingProviderStopSmeshingCall) DoAndReturn(f func(bool) error) *MockSmeshingProviderStopSmeshingCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockSmeshingProviderStopSmeshingCall) Return ¶ added in v1.4.0
func (c *MockSmeshingProviderStopSmeshingCall) Return(arg0 error) *MockSmeshingProviderStopSmeshingCall
Return rewrite *gomock.Call.Return
type MockatxProvider ¶ added in v1.0.0
type MockatxProvider struct {
// contains filtered or unexported fields
}
MockatxProvider is a mock of atxProvider interface.
func NewMockatxProvider ¶ added in v1.0.0
func NewMockatxProvider(ctrl *gomock.Controller) *MockatxProvider
NewMockatxProvider creates a new mock instance.
func (*MockatxProvider) EXPECT ¶ added in v1.0.0
func (m *MockatxProvider) EXPECT() *MockatxProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockatxProvider) GetAtx ¶ added in v1.6.0
func (m *MockatxProvider) GetAtx(id types.ATXID) (*types.ActivationTx, error)
GetAtx mocks base method.
type MockatxProviderGetAtxCall ¶ added in v1.6.0
MockatxProviderGetAtxCall wrap *gomock.Call
func (*MockatxProviderGetAtxCall) Do ¶ added in v1.6.0
func (c *MockatxProviderGetAtxCall) Do(f func(types.ATXID) (*types.ActivationTx, error)) *MockatxProviderGetAtxCall
Do rewrite *gomock.Call.Do
func (*MockatxProviderGetAtxCall) DoAndReturn ¶ added in v1.6.0
func (c *MockatxProviderGetAtxCall) DoAndReturn(f func(types.ATXID) (*types.ActivationTx, error)) *MockatxProviderGetAtxCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockatxProviderGetAtxCall) Return ¶ added in v1.6.0
func (c *MockatxProviderGetAtxCall) Return(arg0 *types.ActivationTx, arg1 error) *MockatxProviderGetAtxCall
Return rewrite *gomock.Call.Return
type MockatxProviderMockRecorder ¶ added in v1.0.0
type MockatxProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockatxProviderMockRecorder is the mock recorder for MockatxProvider.
func (*MockatxProviderMockRecorder) GetAtx ¶ added in v1.6.0
func (mr *MockatxProviderMockRecorder) GetAtx(id any) *MockatxProviderGetAtxCall
GetAtx indicates an expected call of GetAtx.
type MockcertifierClient ¶ added in v1.6.0
type MockcertifierClient struct {
// contains filtered or unexported fields
}
MockcertifierClient is a mock of certifierClient interface.
func NewMockcertifierClient ¶ added in v1.6.0
func NewMockcertifierClient(ctrl *gomock.Controller) *MockcertifierClient
NewMockcertifierClient creates a new mock instance.
func (*MockcertifierClient) Certify ¶ added in v1.6.0
func (m *MockcertifierClient) Certify(ctx context.Context, id types.NodeID, certifierAddress *url.URL, pubkey []byte) (*certifier.PoetCert, error)
Certify mocks base method.
func (*MockcertifierClient) EXPECT ¶ added in v1.6.0
func (m *MockcertifierClient) EXPECT() *MockcertifierClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockcertifierClientCertifyCall ¶ added in v1.6.0
MockcertifierClientCertifyCall wrap *gomock.Call
func (*MockcertifierClientCertifyCall) Do ¶ added in v1.6.0
func (c *MockcertifierClientCertifyCall) Do(f func(context.Context, types.NodeID, *url.URL, []byte) (*certifier.PoetCert, error)) *MockcertifierClientCertifyCall
Do rewrite *gomock.Call.Do
func (*MockcertifierClientCertifyCall) DoAndReturn ¶ added in v1.6.0
func (c *MockcertifierClientCertifyCall) DoAndReturn(f func(context.Context, types.NodeID, *url.URL, []byte) (*certifier.PoetCert, error)) *MockcertifierClientCertifyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockcertifierClientCertifyCall) Return ¶ added in v1.6.0
func (c *MockcertifierClientCertifyCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockcertifierClientCertifyCall
Return rewrite *gomock.Call.Return
type MockcertifierClientMockRecorder ¶ added in v1.6.0
type MockcertifierClientMockRecorder struct {
// contains filtered or unexported fields
}
MockcertifierClientMockRecorder is the mock recorder for MockcertifierClient.
func (*MockcertifierClientMockRecorder) Certify ¶ added in v1.6.0
func (mr *MockcertifierClientMockRecorder) Certify(ctx, id, certifierAddress, pubkey any) *MockcertifierClientCertifyCall
Certify indicates an expected call of Certify.
type MockcertifierService ¶ added in v1.6.0
type MockcertifierService struct {
// contains filtered or unexported fields
}
MockcertifierService is a mock of certifierService interface.
func NewMockcertifierService ¶ added in v1.6.0
func NewMockcertifierService(ctrl *gomock.Controller) *MockcertifierService
NewMockcertifierService creates a new mock instance.
func (*MockcertifierService) Certificate ¶ added in v1.6.0
func (m *MockcertifierService) Certificate(ctx context.Context, id types.NodeID, certifierAddress *url.URL, pubkey []byte) (*certifier.PoetCert, error)
Certificate mocks base method.
func (*MockcertifierService) EXPECT ¶ added in v1.6.0
func (m *MockcertifierService) EXPECT() *MockcertifierServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockcertifierServiceCertificateCall ¶ added in v1.6.0
MockcertifierServiceCertificateCall wrap *gomock.Call
func (*MockcertifierServiceCertificateCall) Do ¶ added in v1.6.0
func (c *MockcertifierServiceCertificateCall) Do(f func(context.Context, types.NodeID, *url.URL, []byte) (*certifier.PoetCert, error)) *MockcertifierServiceCertificateCall
Do rewrite *gomock.Call.Do
func (*MockcertifierServiceCertificateCall) DoAndReturn ¶ added in v1.6.0
func (c *MockcertifierServiceCertificateCall) DoAndReturn(f func(context.Context, types.NodeID, *url.URL, []byte) (*certifier.PoetCert, error)) *MockcertifierServiceCertificateCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockcertifierServiceCertificateCall) Return ¶ added in v1.6.0
func (c *MockcertifierServiceCertificateCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockcertifierServiceCertificateCall
Return rewrite *gomock.Call.Return
type MockcertifierServiceMockRecorder ¶ added in v1.6.0
type MockcertifierServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockcertifierServiceMockRecorder is the mock recorder for MockcertifierService.
func (*MockcertifierServiceMockRecorder) Certificate ¶ added in v1.6.0
func (mr *MockcertifierServiceMockRecorder) Certificate(ctx, id, certifierAddress, pubkey any) *MockcertifierServiceCertificateCall
Certificate indicates an expected call of Certificate.
func (*MockcertifierServiceMockRecorder) Recertify ¶ added in v1.6.0
func (mr *MockcertifierServiceMockRecorder) Recertify(ctx, id, certifierAddress, pubkey any) *MockcertifierServiceRecertifyCall
Recertify indicates an expected call of Recertify.
type MockcertifierServiceRecertifyCall ¶ added in v1.6.0
MockcertifierServiceRecertifyCall wrap *gomock.Call
func (*MockcertifierServiceRecertifyCall) Do ¶ added in v1.6.0
func (c *MockcertifierServiceRecertifyCall) Do(f func(context.Context, types.NodeID, *url.URL, []byte) (*certifier.PoetCert, error)) *MockcertifierServiceRecertifyCall
Do rewrite *gomock.Call.Do
func (*MockcertifierServiceRecertifyCall) DoAndReturn ¶ added in v1.6.0
func (c *MockcertifierServiceRecertifyCall) DoAndReturn(f func(context.Context, types.NodeID, *url.URL, []byte) (*certifier.PoetCert, error)) *MockcertifierServiceRecertifyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockcertifierServiceRecertifyCall) Return ¶ added in v1.6.0
func (c *MockcertifierServiceRecertifyCall) Return(arg0 *certifier.PoetCert, arg1 error) *MockcertifierServiceRecertifyCall
Return rewrite *gomock.Call.Return
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 MocklayerClockAwaitLayerCall ¶ added in v1.4.0
MocklayerClockAwaitLayerCall wrap *gomock.Call
func (*MocklayerClockAwaitLayerCall) Do ¶ added in v1.4.0
func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall
Do rewrite *gomock.Call.Do
func (*MocklayerClockAwaitLayerCall) DoAndReturn ¶ added in v1.4.0
func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocklayerClockAwaitLayerCall) Return ¶ added in v1.4.0
func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall
Return rewrite *gomock.Call.Return
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 ¶ 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 any) *MocklayerClockAwaitLayerCall
AwaitLayer indicates an expected call of AwaitLayer.
func (*MocklayerClockMockRecorder) CurrentLayer ¶ added in v1.0.0
func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall
CurrentLayer indicates an expected call of CurrentLayer.
func (*MocklayerClockMockRecorder) LayerToTime ¶ added in v1.0.0
func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *MocklayerClockLayerToTimeCall
LayerToTime indicates an expected call of LayerToTime.
type MocknipostBuilder ¶ added in v1.0.0
type MocknipostBuilder struct {
// contains filtered or unexported fields
}
MocknipostBuilder is a mock of nipostBuilder interface.
func NewMocknipostBuilder ¶ added in v1.0.0
func NewMocknipostBuilder(ctrl *gomock.Controller) *MocknipostBuilder
NewMocknipostBuilder creates a new mock instance.
func (*MocknipostBuilder) BuildNIPost ¶ added in v1.0.0
func (m *MocknipostBuilder) BuildNIPost(ctx context.Context, sig *signing.EdSigner, challengeHash types.Hash32, postChallenge *types.NIPostChallenge) (*nipost.NIPostState, error)
BuildNIPost mocks base method.
func (*MocknipostBuilder) EXPECT ¶ added in v1.0.0
func (m *MocknipostBuilder) EXPECT() *MocknipostBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocknipostBuilder) Proof ¶ added in v1.3.5
func (m *MocknipostBuilder) Proof(ctx context.Context, nodeID types.NodeID, challenge []byte, postChallenge *types.NIPostChallenge) (*types.Post, *types.PostInfo, error)
Proof mocks base method.
func (*MocknipostBuilder) ResetState ¶ added in v1.4.0
func (m *MocknipostBuilder) ResetState(arg0 types.NodeID) error
ResetState mocks base method.
type MocknipostBuilderBuildNIPostCall ¶ added in v1.4.0
MocknipostBuilderBuildNIPostCall wrap *gomock.Call
func (*MocknipostBuilderBuildNIPostCall) Do ¶ added in v1.4.0
func (c *MocknipostBuilderBuildNIPostCall) Do(f func(context.Context, *signing.EdSigner, types.Hash32, *types.NIPostChallenge) (*nipost.NIPostState, error)) *MocknipostBuilderBuildNIPostCall
Do rewrite *gomock.Call.Do
func (*MocknipostBuilderBuildNIPostCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostBuilderBuildNIPostCall) DoAndReturn(f func(context.Context, *signing.EdSigner, types.Hash32, *types.NIPostChallenge) (*nipost.NIPostState, error)) *MocknipostBuilderBuildNIPostCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostBuilderBuildNIPostCall) Return ¶ added in v1.4.0
func (c *MocknipostBuilderBuildNIPostCall) Return(arg0 *nipost.NIPostState, arg1 error) *MocknipostBuilderBuildNIPostCall
Return rewrite *gomock.Call.Return
type MocknipostBuilderMockRecorder ¶ added in v1.0.0
type MocknipostBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MocknipostBuilderMockRecorder is the mock recorder for MocknipostBuilder.
func (*MocknipostBuilderMockRecorder) BuildNIPost ¶ added in v1.0.0
func (mr *MocknipostBuilderMockRecorder) BuildNIPost(ctx, sig, challengeHash, postChallenge any) *MocknipostBuilderBuildNIPostCall
BuildNIPost indicates an expected call of BuildNIPost.
func (*MocknipostBuilderMockRecorder) Proof ¶ added in v1.3.5
func (mr *MocknipostBuilderMockRecorder) Proof(ctx, nodeID, challenge, postChallenge any) *MocknipostBuilderProofCall
Proof indicates an expected call of Proof.
func (*MocknipostBuilderMockRecorder) ResetState ¶ added in v1.4.0
func (mr *MocknipostBuilderMockRecorder) ResetState(arg0 any) *MocknipostBuilderResetStateCall
ResetState indicates an expected call of ResetState.
type MocknipostBuilderProofCall ¶ added in v1.4.0
MocknipostBuilderProofCall wrap *gomock.Call
func (*MocknipostBuilderProofCall) Do ¶ added in v1.4.0
func (c *MocknipostBuilderProofCall) Do(f func(context.Context, types.NodeID, []byte, *types.NIPostChallenge) (*types.Post, *types.PostInfo, error)) *MocknipostBuilderProofCall
Do rewrite *gomock.Call.Do
func (*MocknipostBuilderProofCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostBuilderProofCall) DoAndReturn(f func(context.Context, types.NodeID, []byte, *types.NIPostChallenge) (*types.Post, *types.PostInfo, error)) *MocknipostBuilderProofCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostBuilderProofCall) Return ¶ added in v1.4.0
func (c *MocknipostBuilderProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *MocknipostBuilderProofCall
Return rewrite *gomock.Call.Return
type MocknipostBuilderResetStateCall ¶ added in v1.4.0
MocknipostBuilderResetStateCall wrap *gomock.Call
func (*MocknipostBuilderResetStateCall) Do ¶ added in v1.4.0
func (c *MocknipostBuilderResetStateCall) Do(f func(types.NodeID) error) *MocknipostBuilderResetStateCall
Do rewrite *gomock.Call.Do
func (*MocknipostBuilderResetStateCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostBuilderResetStateCall) DoAndReturn(f func(types.NodeID) error) *MocknipostBuilderResetStateCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostBuilderResetStateCall) Return ¶ added in v1.4.0
func (c *MocknipostBuilderResetStateCall) Return(arg0 error) *MocknipostBuilderResetStateCall
Return rewrite *gomock.Call.Return
type MocknipostValidator ¶ added in v1.0.0
type MocknipostValidator struct {
// contains filtered or unexported fields
}
MocknipostValidator is a mock of nipostValidator interface.
func NewMocknipostValidator ¶ added in v1.0.0
func NewMocknipostValidator(ctrl *gomock.Controller) *MocknipostValidator
NewMocknipostValidator creates a new mock instance.
func (*MocknipostValidator) EXPECT ¶ added in v1.0.0
func (m *MocknipostValidator) EXPECT() *MocknipostValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocknipostValidator) InitialNIPostChallengeV1 ¶ added in v1.6.0
func (m *MocknipostValidator) InitialNIPostChallengeV1(challenge *wire.NIPostChallengeV1, atxs atxProvider, goldenATXID types.ATXID) error
InitialNIPostChallengeV1 mocks base method.
func (*MocknipostValidator) IsVerifyingFullPost ¶ added in v1.4.0
func (m *MocknipostValidator) IsVerifyingFullPost() bool
IsVerifyingFullPost mocks base method.
func (*MocknipostValidator) NIPost ¶ added in v1.0.0
func (m *MocknipostValidator) NIPost(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, NIPost *types.NIPost, expectedChallenge types.Hash32, numUnits uint32, opts ...validatorOption) (uint64, error)
NIPost mocks base method.
func (*MocknipostValidator) NIPostChallengeV1 ¶ added in v1.6.0
func (m *MocknipostValidator) NIPostChallengeV1(challenge *wire.NIPostChallengeV1, previous *types.ActivationTx, nodeID types.NodeID) error
NIPostChallengeV1 mocks base method.
func (*MocknipostValidator) NumUnits ¶ added in v1.0.0
func (m *MocknipostValidator) NumUnits(cfg *PostConfig, numUnits uint32) error
NumUnits mocks base method.
func (*MocknipostValidator) PoetMembership ¶ added in v1.6.0
func (m *MocknipostValidator) PoetMembership(ctx context.Context, membership *types.MultiMerkleProof, postChallenge types.Hash32, poetChallenges [][]byte) (uint64, error)
PoetMembership mocks base method.
func (*MocknipostValidator) PositioningAtx ¶ added in v1.0.0
func (m *MocknipostValidator) PositioningAtx(id types.ATXID, atxs atxProvider, goldenATXID types.ATXID, pubepoch types.EpochID) error
PositioningAtx mocks base method.
func (*MocknipostValidator) Post ¶ added in v1.0.0
func (m *MocknipostValidator) Post(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, post *types.Post, metadata *types.PostMetadata, numUnits uint32, opts ...validatorOption) error
Post mocks base method.
func (*MocknipostValidator) PostV2 ¶ added in v1.6.0
func (m *MocknipostValidator) PostV2(ctx context.Context, smesherID types.NodeID, commitment types.ATXID, post *types.Post, challenge []byte, numUnits uint32, opts ...validatorOption) error
PostV2 mocks base method.
func (*MocknipostValidator) VRFNonce ¶ added in v1.0.0
func (m *MocknipostValidator) VRFNonce(nodeId types.NodeID, commitmentAtxId types.ATXID, vrfNonce, labelsPerUnit uint64, numUnits uint32) error
VRFNonce mocks base method.
func (*MocknipostValidator) VRFNonceV2 ¶ added in v1.6.0
func (m *MocknipostValidator) VRFNonceV2(smesherID types.NodeID, commitment types.ATXID, vrfNonce uint64, numUnits uint32) error
VRFNonceV2 mocks base method.
func (*MocknipostValidator) VerifyChain ¶ added in v1.4.0
func (m *MocknipostValidator) VerifyChain(ctx context.Context, id, goldenATXID types.ATXID, opts ...VerifyChainOption) error
VerifyChain mocks base method.
type MocknipostValidatorInitialNIPostChallengeV1Call ¶ added in v1.6.0
MocknipostValidatorInitialNIPostChallengeV1Call wrap *gomock.Call
func (*MocknipostValidatorInitialNIPostChallengeV1Call) Do ¶ added in v1.6.0
func (c *MocknipostValidatorInitialNIPostChallengeV1Call) Do(f func(*wire.NIPostChallengeV1, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeV1Call
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorInitialNIPostChallengeV1Call) DoAndReturn ¶ added in v1.6.0
func (c *MocknipostValidatorInitialNIPostChallengeV1Call) DoAndReturn(f func(*wire.NIPostChallengeV1, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeV1Call
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorInitialNIPostChallengeV1Call) Return ¶ added in v1.6.0
func (c *MocknipostValidatorInitialNIPostChallengeV1Call) Return(arg0 error) *MocknipostValidatorInitialNIPostChallengeV1Call
Return rewrite *gomock.Call.Return
type MocknipostValidatorIsVerifyingFullPostCall ¶ added in v1.4.0
MocknipostValidatorIsVerifyingFullPostCall wrap *gomock.Call
func (*MocknipostValidatorIsVerifyingFullPostCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorIsVerifyingFullPostCall) Do(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorIsVerifyingFullPostCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorIsVerifyingFullPostCall) DoAndReturn(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorIsVerifyingFullPostCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorIsVerifyingFullPostCall) Return(arg0 bool) *MocknipostValidatorIsVerifyingFullPostCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorMockRecorder ¶ added in v1.0.0
type MocknipostValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MocknipostValidatorMockRecorder is the mock recorder for MocknipostValidator.
func (*MocknipostValidatorMockRecorder) InitialNIPostChallengeV1 ¶ added in v1.6.0
func (mr *MocknipostValidatorMockRecorder) InitialNIPostChallengeV1(challenge, atxs, goldenATXID any) *MocknipostValidatorInitialNIPostChallengeV1Call
InitialNIPostChallengeV1 indicates an expected call of InitialNIPostChallengeV1.
func (*MocknipostValidatorMockRecorder) IsVerifyingFullPost ¶ added in v1.4.0
func (mr *MocknipostValidatorMockRecorder) IsVerifyingFullPost() *MocknipostValidatorIsVerifyingFullPostCall
IsVerifyingFullPost indicates an expected call of IsVerifyingFullPost.
func (*MocknipostValidatorMockRecorder) NIPost ¶ added in v1.0.0
func (mr *MocknipostValidatorMockRecorder) NIPost(ctx, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits any, opts ...any) *MocknipostValidatorNIPostCall
NIPost indicates an expected call of NIPost.
func (*MocknipostValidatorMockRecorder) NIPostChallengeV1 ¶ added in v1.6.0
func (mr *MocknipostValidatorMockRecorder) NIPostChallengeV1(challenge, previous, nodeID any) *MocknipostValidatorNIPostChallengeV1Call
NIPostChallengeV1 indicates an expected call of NIPostChallengeV1.
func (*MocknipostValidatorMockRecorder) NumUnits ¶ added in v1.0.0
func (mr *MocknipostValidatorMockRecorder) NumUnits(cfg, numUnits any) *MocknipostValidatorNumUnitsCall
NumUnits indicates an expected call of NumUnits.
func (*MocknipostValidatorMockRecorder) PoetMembership ¶ added in v1.6.0
func (mr *MocknipostValidatorMockRecorder) PoetMembership(ctx, membership, postChallenge, poetChallenges any) *MocknipostValidatorPoetMembershipCall
PoetMembership indicates an expected call of PoetMembership.
func (*MocknipostValidatorMockRecorder) PositioningAtx ¶ added in v1.0.0
func (mr *MocknipostValidatorMockRecorder) PositioningAtx(id, atxs, goldenATXID, pubepoch any) *MocknipostValidatorPositioningAtxCall
PositioningAtx indicates an expected call of PositioningAtx.
func (*MocknipostValidatorMockRecorder) Post ¶ added in v1.0.0
func (mr *MocknipostValidatorMockRecorder) Post(ctx, nodeId, commitmentAtxId, post, metadata, numUnits any, opts ...any) *MocknipostValidatorPostCall
Post indicates an expected call of Post.
func (*MocknipostValidatorMockRecorder) PostV2 ¶ added in v1.6.0
func (mr *MocknipostValidatorMockRecorder) PostV2(ctx, smesherID, commitment, post, challenge, numUnits any, opts ...any) *MocknipostValidatorPostV2Call
PostV2 indicates an expected call of PostV2.
func (*MocknipostValidatorMockRecorder) VRFNonce ¶ added in v1.0.0
func (mr *MocknipostValidatorMockRecorder) VRFNonce(nodeId, commitmentAtxId, vrfNonce, labelsPerUnit, numUnits any) *MocknipostValidatorVRFNonceCall
VRFNonce indicates an expected call of VRFNonce.
func (*MocknipostValidatorMockRecorder) VRFNonceV2 ¶ added in v1.6.0
func (mr *MocknipostValidatorMockRecorder) VRFNonceV2(smesherID, commitment, vrfNonce, numUnits any) *MocknipostValidatorVRFNonceV2Call
VRFNonceV2 indicates an expected call of VRFNonceV2.
func (*MocknipostValidatorMockRecorder) VerifyChain ¶ added in v1.4.0
func (mr *MocknipostValidatorMockRecorder) VerifyChain(ctx, id, goldenATXID any, opts ...any) *MocknipostValidatorVerifyChainCall
VerifyChain indicates an expected call of VerifyChain.
type MocknipostValidatorNIPostCall ¶ added in v1.4.0
MocknipostValidatorNIPostCall wrap *gomock.Call
func (*MocknipostValidatorNIPostCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorNIPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *MocknipostValidatorNIPostCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorNIPostCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorNIPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *MocknipostValidatorNIPostCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorNIPostCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorNIPostCall) Return(arg0 uint64, arg1 error) *MocknipostValidatorNIPostCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorNIPostChallengeV1Call ¶ added in v1.6.0
MocknipostValidatorNIPostChallengeV1Call wrap *gomock.Call
func (*MocknipostValidatorNIPostChallengeV1Call) Do ¶ added in v1.6.0
func (c *MocknipostValidatorNIPostChallengeV1Call) Do(f func(*wire.NIPostChallengeV1, *types.ActivationTx, types.NodeID) error) *MocknipostValidatorNIPostChallengeV1Call
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorNIPostChallengeV1Call) DoAndReturn ¶ added in v1.6.0
func (c *MocknipostValidatorNIPostChallengeV1Call) DoAndReturn(f func(*wire.NIPostChallengeV1, *types.ActivationTx, types.NodeID) error) *MocknipostValidatorNIPostChallengeV1Call
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorNIPostChallengeV1Call) Return ¶ added in v1.6.0
func (c *MocknipostValidatorNIPostChallengeV1Call) Return(arg0 error) *MocknipostValidatorNIPostChallengeV1Call
Return rewrite *gomock.Call.Return
type MocknipostValidatorNumUnitsCall ¶ added in v1.4.0
MocknipostValidatorNumUnitsCall wrap *gomock.Call
func (*MocknipostValidatorNumUnitsCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorNumUnitsCall) Do(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorNumUnitsCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorNumUnitsCall) DoAndReturn(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorNumUnitsCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorNumUnitsCall) Return(arg0 error) *MocknipostValidatorNumUnitsCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorPoetMembershipCall ¶ added in v1.6.0
MocknipostValidatorPoetMembershipCall wrap *gomock.Call
func (*MocknipostValidatorPoetMembershipCall) Do ¶ added in v1.6.0
func (c *MocknipostValidatorPoetMembershipCall) Do(f func(context.Context, *types.MultiMerkleProof, types.Hash32, [][]byte) (uint64, error)) *MocknipostValidatorPoetMembershipCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorPoetMembershipCall) DoAndReturn ¶ added in v1.6.0
func (c *MocknipostValidatorPoetMembershipCall) DoAndReturn(f func(context.Context, *types.MultiMerkleProof, types.Hash32, [][]byte) (uint64, error)) *MocknipostValidatorPoetMembershipCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorPoetMembershipCall) Return ¶ added in v1.6.0
func (c *MocknipostValidatorPoetMembershipCall) Return(arg0 uint64, arg1 error) *MocknipostValidatorPoetMembershipCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorPositioningAtxCall ¶ added in v1.4.0
MocknipostValidatorPositioningAtxCall wrap *gomock.Call
func (*MocknipostValidatorPositioningAtxCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorPositioningAtxCall) Do(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorPositioningAtxCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorPositioningAtxCall) DoAndReturn(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorPositioningAtxCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorPositioningAtxCall) Return(arg0 error) *MocknipostValidatorPositioningAtxCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorPostCall ¶ added in v1.4.0
MocknipostValidatorPostCall wrap *gomock.Call
func (*MocknipostValidatorPostCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *MocknipostValidatorPostCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorPostCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *MocknipostValidatorPostCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorPostCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorPostCall) Return(arg0 error) *MocknipostValidatorPostCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorPostV2Call ¶ added in v1.6.0
MocknipostValidatorPostV2Call wrap *gomock.Call
func (*MocknipostValidatorPostV2Call) Do ¶ added in v1.6.0
func (c *MocknipostValidatorPostV2Call) Do(f func(context.Context, types.NodeID, types.ATXID, *types.Post, []byte, uint32, ...validatorOption) error) *MocknipostValidatorPostV2Call
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorPostV2Call) DoAndReturn ¶ added in v1.6.0
func (c *MocknipostValidatorPostV2Call) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.Post, []byte, uint32, ...validatorOption) error) *MocknipostValidatorPostV2Call
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorPostV2Call) Return ¶ added in v1.6.0
func (c *MocknipostValidatorPostV2Call) Return(arg0 error) *MocknipostValidatorPostV2Call
Return rewrite *gomock.Call.Return
type MocknipostValidatorVRFNonceCall ¶ added in v1.4.0
MocknipostValidatorVRFNonceCall wrap *gomock.Call
func (*MocknipostValidatorVRFNonceCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorVRFNonceCall) Do(f func(types.NodeID, types.ATXID, uint64, uint64, uint32) error) *MocknipostValidatorVRFNonceCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorVRFNonceCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorVRFNonceCall) DoAndReturn(f func(types.NodeID, types.ATXID, uint64, uint64, uint32) error) *MocknipostValidatorVRFNonceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorVRFNonceCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorVRFNonceCall) Return(arg0 error) *MocknipostValidatorVRFNonceCall
Return rewrite *gomock.Call.Return
type MocknipostValidatorVRFNonceV2Call ¶ added in v1.6.0
MocknipostValidatorVRFNonceV2Call wrap *gomock.Call
func (*MocknipostValidatorVRFNonceV2Call) Do ¶ added in v1.6.0
func (c *MocknipostValidatorVRFNonceV2Call) Do(f func(types.NodeID, types.ATXID, uint64, uint32) error) *MocknipostValidatorVRFNonceV2Call
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorVRFNonceV2Call) DoAndReturn ¶ added in v1.6.0
func (c *MocknipostValidatorVRFNonceV2Call) DoAndReturn(f func(types.NodeID, types.ATXID, uint64, uint32) error) *MocknipostValidatorVRFNonceV2Call
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorVRFNonceV2Call) Return ¶ added in v1.6.0
func (c *MocknipostValidatorVRFNonceV2Call) Return(arg0 error) *MocknipostValidatorVRFNonceV2Call
Return rewrite *gomock.Call.Return
type MocknipostValidatorVerifyChainCall ¶ added in v1.4.0
MocknipostValidatorVerifyChainCall wrap *gomock.Call
func (*MocknipostValidatorVerifyChainCall) Do ¶ added in v1.4.0
func (c *MocknipostValidatorVerifyChainCall) Do(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall
Do rewrite *gomock.Call.Do
func (*MocknipostValidatorVerifyChainCall) DoAndReturn ¶ added in v1.4.0
func (c *MocknipostValidatorVerifyChainCall) DoAndReturn(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocknipostValidatorVerifyChainCall) Return ¶ added in v1.4.0
func (c *MocknipostValidatorVerifyChainCall) Return(arg0 error) *MocknipostValidatorVerifyChainCall
Return rewrite *gomock.Call.Return
type MockpoetDbAPI ¶ added in v1.0.0
type MockpoetDbAPI struct {
// contains filtered or unexported fields
}
MockpoetDbAPI is a mock of poetDbAPI interface.
func NewMockpoetDbAPI ¶ added in v1.0.0
func NewMockpoetDbAPI(ctrl *gomock.Controller) *MockpoetDbAPI
NewMockpoetDbAPI creates a new mock instance.
func (*MockpoetDbAPI) EXPECT ¶ added in v1.0.0
func (m *MockpoetDbAPI) EXPECT() *MockpoetDbAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpoetDbAPI) Proof ¶ added in v1.5.2
func (m *MockpoetDbAPI) Proof(arg0 types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)
Proof mocks base method.
func (*MockpoetDbAPI) ProofForRound ¶ added in v1.5.2
ProofForRound mocks base method.
func (*MockpoetDbAPI) ValidateAndStore ¶ added in v1.0.0
func (m *MockpoetDbAPI) ValidateAndStore(ctx context.Context, proofMessage *types.PoetProofMessage) error
ValidateAndStore mocks base method.
type MockpoetDbAPIMockRecorder ¶ added in v1.0.0
type MockpoetDbAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockpoetDbAPIMockRecorder is the mock recorder for MockpoetDbAPI.
func (*MockpoetDbAPIMockRecorder) Proof ¶ added in v1.5.2
func (mr *MockpoetDbAPIMockRecorder) Proof(arg0 any) *MockpoetDbAPIProofCall
Proof indicates an expected call of Proof.
func (*MockpoetDbAPIMockRecorder) ProofForRound ¶ added in v1.5.2
func (mr *MockpoetDbAPIMockRecorder) ProofForRound(poetID, roundID any) *MockpoetDbAPIProofForRoundCall
ProofForRound indicates an expected call of ProofForRound.
func (*MockpoetDbAPIMockRecorder) ValidateAndStore ¶ added in v1.0.0
func (mr *MockpoetDbAPIMockRecorder) ValidateAndStore(ctx, proofMessage any) *MockpoetDbAPIValidateAndStoreCall
ValidateAndStore indicates an expected call of ValidateAndStore.
type MockpoetDbAPIProofCall ¶ added in v1.5.2
MockpoetDbAPIProofCall wrap *gomock.Call
func (*MockpoetDbAPIProofCall) Do ¶ added in v1.5.2
func (c *MockpoetDbAPIProofCall) Do(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *MockpoetDbAPIProofCall
Do rewrite *gomock.Call.Do
func (*MockpoetDbAPIProofCall) DoAndReturn ¶ added in v1.5.2
func (c *MockpoetDbAPIProofCall) DoAndReturn(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *MockpoetDbAPIProofCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpoetDbAPIProofCall) Return ¶ added in v1.5.2
func (c *MockpoetDbAPIProofCall) Return(arg0 *types.PoetProof, arg1 *types.Hash32, arg2 error) *MockpoetDbAPIProofCall
Return rewrite *gomock.Call.Return
type MockpoetDbAPIProofForRoundCall ¶ added in v1.5.2
MockpoetDbAPIProofForRoundCall wrap *gomock.Call
func (*MockpoetDbAPIProofForRoundCall) Do ¶ added in v1.5.2
func (c *MockpoetDbAPIProofForRoundCall) Do(f func([]byte, string) (*types.PoetProof, error)) *MockpoetDbAPIProofForRoundCall
Do rewrite *gomock.Call.Do
func (*MockpoetDbAPIProofForRoundCall) DoAndReturn ¶ added in v1.5.2
func (c *MockpoetDbAPIProofForRoundCall) DoAndReturn(f func([]byte, string) (*types.PoetProof, error)) *MockpoetDbAPIProofForRoundCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpoetDbAPIProofForRoundCall) Return ¶ added in v1.5.2
func (c *MockpoetDbAPIProofForRoundCall) Return(arg0 *types.PoetProof, arg1 error) *MockpoetDbAPIProofForRoundCall
Return rewrite *gomock.Call.Return
type MockpoetDbAPIValidateAndStoreCall ¶ added in v1.4.0
MockpoetDbAPIValidateAndStoreCall wrap *gomock.Call
func (*MockpoetDbAPIValidateAndStoreCall) Do ¶ added in v1.4.0
func (c *MockpoetDbAPIValidateAndStoreCall) Do(f func(context.Context, *types.PoetProofMessage) error) *MockpoetDbAPIValidateAndStoreCall
Do rewrite *gomock.Call.Do
func (*MockpoetDbAPIValidateAndStoreCall) DoAndReturn ¶ added in v1.4.0
func (c *MockpoetDbAPIValidateAndStoreCall) DoAndReturn(f func(context.Context, *types.PoetProofMessage) error) *MockpoetDbAPIValidateAndStoreCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpoetDbAPIValidateAndStoreCall) Return ¶ added in v1.4.0
func (c *MockpoetDbAPIValidateAndStoreCall) Return(arg0 error) *MockpoetDbAPIValidateAndStoreCall
Return rewrite *gomock.Call.Return
type MockpostService ¶ added in v1.3.0
type MockpostService struct {
// contains filtered or unexported fields
}
MockpostService is a mock of postService interface.
func NewMockpostService ¶ added in v1.3.0
func NewMockpostService(ctrl *gomock.Controller) *MockpostService
NewMockpostService creates a new mock instance.
func (*MockpostService) Client ¶ added in v1.3.0
func (m *MockpostService) Client(nodeId types.NodeID) (PostClient, error)
Client mocks base method.
func (*MockpostService) EXPECT ¶ added in v1.3.0
func (m *MockpostService) EXPECT() *MockpostServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockpostServiceClientCall ¶ added in v1.4.0
MockpostServiceClientCall wrap *gomock.Call
func (*MockpostServiceClientCall) Do ¶ added in v1.4.0
func (c *MockpostServiceClientCall) Do(f func(types.NodeID) (PostClient, error)) *MockpostServiceClientCall
Do rewrite *gomock.Call.Do
func (*MockpostServiceClientCall) DoAndReturn ¶ added in v1.4.0
func (c *MockpostServiceClientCall) DoAndReturn(f func(types.NodeID) (PostClient, error)) *MockpostServiceClientCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpostServiceClientCall) Return ¶ added in v1.4.0
func (c *MockpostServiceClientCall) Return(arg0 PostClient, arg1 error) *MockpostServiceClientCall
Return rewrite *gomock.Call.Return
type MockpostServiceMockRecorder ¶ added in v1.3.0
type MockpostServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockpostServiceMockRecorder is the mock recorder for MockpostService.
func (*MockpostServiceMockRecorder) Client ¶ added in v1.3.0
func (mr *MockpostServiceMockRecorder) Client(nodeId any) *MockpostServiceClientCall
Client indicates an expected call of Client.
type MockpostSetupProvider ¶ added in v1.0.0
type MockpostSetupProvider struct {
// contains filtered or unexported fields
}
MockpostSetupProvider is a mock of postSetupProvider interface.
func NewMockpostSetupProvider ¶ added in v1.0.0
func NewMockpostSetupProvider(ctrl *gomock.Controller) *MockpostSetupProvider
NewMockpostSetupProvider creates a new mock instance.
func (*MockpostSetupProvider) EXPECT ¶ added in v1.0.0
func (m *MockpostSetupProvider) EXPECT() *MockpostSetupProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpostSetupProvider) PrepareInitializer ¶ added in v1.0.0
func (m *MockpostSetupProvider) PrepareInitializer(ctx context.Context, opts PostSetupOpts, id types.NodeID) error
PrepareInitializer mocks base method.
func (*MockpostSetupProvider) Reset ¶ added in v1.0.0
func (m *MockpostSetupProvider) Reset() error
Reset mocks base method.
func (*MockpostSetupProvider) StartSession ¶ added in v1.0.0
StartSession mocks base method.
func (*MockpostSetupProvider) Status ¶ added in v1.0.0
func (m *MockpostSetupProvider) Status() *PostSetupStatus
Status mocks base method.
type MockpostSetupProviderMockRecorder ¶ added in v1.0.0
type MockpostSetupProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockpostSetupProviderMockRecorder is the mock recorder for MockpostSetupProvider.
func (*MockpostSetupProviderMockRecorder) PrepareInitializer ¶ added in v1.0.0
func (mr *MockpostSetupProviderMockRecorder) PrepareInitializer(ctx, opts, id any) *MockpostSetupProviderPrepareInitializerCall
PrepareInitializer indicates an expected call of PrepareInitializer.
func (*MockpostSetupProviderMockRecorder) Reset ¶ added in v1.0.0
func (mr *MockpostSetupProviderMockRecorder) Reset() *MockpostSetupProviderResetCall
Reset indicates an expected call of Reset.
func (*MockpostSetupProviderMockRecorder) StartSession ¶ added in v1.0.0
func (mr *MockpostSetupProviderMockRecorder) StartSession(context, id any) *MockpostSetupProviderStartSessionCall
StartSession indicates an expected call of StartSession.
func (*MockpostSetupProviderMockRecorder) Status ¶ added in v1.0.0
func (mr *MockpostSetupProviderMockRecorder) Status() *MockpostSetupProviderStatusCall
Status indicates an expected call of Status.
type MockpostSetupProviderPrepareInitializerCall ¶ added in v1.4.0
MockpostSetupProviderPrepareInitializerCall wrap *gomock.Call
func (*MockpostSetupProviderPrepareInitializerCall) Do ¶ added in v1.4.0
func (c *MockpostSetupProviderPrepareInitializerCall) Do(f func(context.Context, PostSetupOpts, types.NodeID) error) *MockpostSetupProviderPrepareInitializerCall
Do rewrite *gomock.Call.Do
func (*MockpostSetupProviderPrepareInitializerCall) DoAndReturn ¶ added in v1.4.0
func (c *MockpostSetupProviderPrepareInitializerCall) DoAndReturn(f func(context.Context, PostSetupOpts, types.NodeID) error) *MockpostSetupProviderPrepareInitializerCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpostSetupProviderPrepareInitializerCall) Return ¶ added in v1.4.0
func (c *MockpostSetupProviderPrepareInitializerCall) Return(arg0 error) *MockpostSetupProviderPrepareInitializerCall
Return rewrite *gomock.Call.Return
type MockpostSetupProviderResetCall ¶ added in v1.4.0
MockpostSetupProviderResetCall wrap *gomock.Call
func (*MockpostSetupProviderResetCall) Do ¶ added in v1.4.0
func (c *MockpostSetupProviderResetCall) Do(f func() error) *MockpostSetupProviderResetCall
Do rewrite *gomock.Call.Do
func (*MockpostSetupProviderResetCall) DoAndReturn ¶ added in v1.4.0
func (c *MockpostSetupProviderResetCall) DoAndReturn(f func() error) *MockpostSetupProviderResetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpostSetupProviderResetCall) Return ¶ added in v1.4.0
func (c *MockpostSetupProviderResetCall) Return(arg0 error) *MockpostSetupProviderResetCall
Return rewrite *gomock.Call.Return
type MockpostSetupProviderStartSessionCall ¶ added in v1.4.0
MockpostSetupProviderStartSessionCall wrap *gomock.Call
func (*MockpostSetupProviderStartSessionCall) Do ¶ added in v1.4.0
func (c *MockpostSetupProviderStartSessionCall) Do(f func(context.Context, types.NodeID) error) *MockpostSetupProviderStartSessionCall
Do rewrite *gomock.Call.Do
func (*MockpostSetupProviderStartSessionCall) DoAndReturn ¶ added in v1.4.0
func (c *MockpostSetupProviderStartSessionCall) DoAndReturn(f func(context.Context, types.NodeID) error) *MockpostSetupProviderStartSessionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpostSetupProviderStartSessionCall) Return ¶ added in v1.4.0
func (c *MockpostSetupProviderStartSessionCall) Return(arg0 error) *MockpostSetupProviderStartSessionCall
Return rewrite *gomock.Call.Return
type MockpostSetupProviderStatusCall ¶ added in v1.4.0
MockpostSetupProviderStatusCall wrap *gomock.Call
func (*MockpostSetupProviderStatusCall) Do ¶ added in v1.4.0
func (c *MockpostSetupProviderStatusCall) Do(f func() *PostSetupStatus) *MockpostSetupProviderStatusCall
Do rewrite *gomock.Call.Do
func (*MockpostSetupProviderStatusCall) DoAndReturn ¶ added in v1.4.0
func (c *MockpostSetupProviderStatusCall) DoAndReturn(f func() *PostSetupStatus) *MockpostSetupProviderStatusCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockpostSetupProviderStatusCall) Return ¶ added in v1.4.0
func (c *MockpostSetupProviderStatusCall) Return(arg0 *PostSetupStatus) *MockpostSetupProviderStatusCall
Return rewrite *gomock.Call.Return
type Mockscaler ¶ added in v1.2.12
type Mockscaler struct {
// contains filtered or unexported fields
}
Mockscaler is a mock of scaler interface.
func NewMockscaler ¶ added in v1.2.12
func NewMockscaler(ctrl *gomock.Controller) *Mockscaler
NewMockscaler creates a new mock instance.
func (*Mockscaler) EXPECT ¶ added in v1.2.12
func (m *Mockscaler) EXPECT() *MockscalerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockscalerMockRecorder ¶ added in v1.2.12
type MockscalerMockRecorder struct {
// contains filtered or unexported fields
}
MockscalerMockRecorder is the mock recorder for Mockscaler.
type MockscalerscaleCall ¶ added in v1.4.0
MockscalerscaleCall wrap *gomock.Call
func (*MockscalerscaleCall) Do ¶ added in v1.4.0
func (c *MockscalerscaleCall) Do(f func(int)) *MockscalerscaleCall
Do rewrite *gomock.Call.Do
func (*MockscalerscaleCall) DoAndReturn ¶ added in v1.4.0
func (c *MockscalerscaleCall) DoAndReturn(f func(int)) *MockscalerscaleCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockscalerscaleCall) Return ¶ added in v1.4.0
func (c *MockscalerscaleCall) Return() *MockscalerscaleCall
Return rewrite *gomock.Call.Return
type Mocksyncer ¶ added in v1.0.0
type Mocksyncer struct {
// contains filtered or unexported fields
}
Mocksyncer is a mock of syncer interface.
func NewMocksyncer ¶ added in v1.0.0
func NewMocksyncer(ctrl *gomock.Controller) *Mocksyncer
NewMocksyncer creates a new mock instance.
func (*Mocksyncer) EXPECT ¶ added in v1.0.0
func (m *Mocksyncer) EXPECT() *MocksyncerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*Mocksyncer) RegisterForATXSynced ¶ added in v1.0.0
func (m *Mocksyncer) RegisterForATXSynced() <-chan struct{}
RegisterForATXSynced mocks base method.
type MocksyncerMockRecorder ¶ added in v1.0.0
type MocksyncerMockRecorder struct {
// contains filtered or unexported fields
}
MocksyncerMockRecorder is the mock recorder for Mocksyncer.
func (*MocksyncerMockRecorder) RegisterForATXSynced ¶ added in v1.0.0
func (mr *MocksyncerMockRecorder) RegisterForATXSynced() *MocksyncerRegisterForATXSyncedCall
RegisterForATXSynced indicates an expected call of RegisterForATXSynced.
type MocksyncerRegisterForATXSyncedCall ¶ added in v1.4.0
MocksyncerRegisterForATXSyncedCall wrap *gomock.Call
func (*MocksyncerRegisterForATXSyncedCall) Do ¶ added in v1.4.0
func (c *MocksyncerRegisterForATXSyncedCall) Do(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall
Do rewrite *gomock.Call.Do
func (*MocksyncerRegisterForATXSyncedCall) DoAndReturn ¶ added in v1.4.0
func (c *MocksyncerRegisterForATXSyncedCall) DoAndReturn(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MocksyncerRegisterForATXSyncedCall) Return ¶ added in v1.4.0
func (c *MocksyncerRegisterForATXSyncedCall) Return(arg0 <-chan struct{}) *MocksyncerRegisterForATXSyncedCall
Return rewrite *gomock.Call.Return
type NIPostBuilder ¶ added in v1.0.0
type NIPostBuilder struct {
// contains filtered or unexported fields
}
NIPostBuilder holds the required state and dependencies to create Non-Interactive Proofs of Space-Time (NIPost).
func NewNIPostBuilder ¶ added in v1.0.0
func NewNIPostBuilder( db *localsql.Database, postService postService, lg *zap.Logger, poetCfg PoetConfig, layerClock layerClock, validator nipostValidator, opts ...NIPostBuilderOption, ) (*NIPostBuilder, error)
NewNIPostBuilder returns a NIPostBuilder.
func (*NIPostBuilder) BuildNIPost ¶ added in v1.0.0
func (nb *NIPostBuilder) BuildNIPost( ctx context.Context, signer *signing.EdSigner, challenge types.Hash32, postChallenge *types.NIPostChallenge, ) (*nipost.NIPostState, error)
BuildNIPost uses the given challenge to build a NIPost. The process can take considerable time, because it includes waiting for the poet service to publish a proof - a process that takes about an epoch.
func (*NIPostBuilder) ResetState ¶ added in v1.4.0
func (nb *NIPostBuilder) ResetState(nodeId types.NodeID) error
type NIPostBuilderOption ¶ added in v1.0.3
type NIPostBuilderOption func(*NIPostBuilder)
func NipostbuilderWithPostStates ¶ added in v1.4.0
func NipostbuilderWithPostStates(ps PostStates) NIPostBuilderOption
func WithPoetServices ¶ added in v1.6.1
func WithPoetServices(clients ...PoetService) NIPostBuilderOption
type PoetClient ¶ added in v1.5.2
type PoetClient interface { Id() []byte Address() string PowParams(ctx context.Context) (*PoetPowParams, error) CertifierInfo(ctx context.Context) (*url.URL, []byte, error) Submit( ctx context.Context, deadline time.Time, prefix, challenge []byte, signature types.EdSignature, nodeID types.NodeID, auth PoetAuth, ) (*types.PoetRound, error) Proof(ctx context.Context, roundID string) (*types.PoetProofMessage, []types.Hash32, error) }
type PoetClientOpt ¶ added in v1.6.0
type PoetClientOpt func(*poetService)
func WithCertifier ¶ added in v1.6.0
func WithCertifier(certifier certifierService) PoetClientOpt
type PoetClientOpts ¶ added in v1.0.0
type PoetClientOpts func(*HTTPPoetClient)
func WithLogger ¶ added in v1.1.5
func WithLogger(logger *zap.Logger) PoetClientOpts
type PoetConfig ¶ added in v1.0.0
type PoetConfig struct { PhaseShift time.Duration `mapstructure:"phase-shift"` CycleGap time.Duration `mapstructure:"cycle-gap"` GracePeriod time.Duration `mapstructure:"grace-period"` RequestTimeout time.Duration `mapstructure:"poet-request-timeout"` RequestRetryDelay time.Duration `mapstructure:"retry-delay"` PositioningATXSelectionTimeout time.Duration `mapstructure:"positioning-atx-selection-timeout"` MaxRequestRetries int `mapstructure:"retry-max"` }
PoetConfig is the configuration to interact with the poet server.
func DefaultPoetConfig ¶ added in v1.0.0
func DefaultPoetConfig() PoetConfig
type PoetDb ¶
type PoetDb struct {
// contains filtered or unexported fields
}
PoetDb is a database for PoET proofs.
func (*PoetDb) GetProofMessage ¶
func (db *PoetDb) GetProofMessage(proofRef types.PoetProofRef) ([]byte, error)
GetProofMessage returns the originally received PoET proof message.
func (*PoetDb) GetProofRef ¶ added in v1.0.0
func (*PoetDb) HasProof ¶
func (db *PoetDb) HasProof(proofRef types.PoetProofRef) bool
HasProof returns true if the database contains a proof with the given reference, or false otherwise.
func (*PoetDb) ProofForRound ¶ added in v1.5.2
func (*PoetDb) StoreProof ¶ added in v1.0.0
func (db *PoetDb) StoreProof(ctx context.Context, ref types.PoetProofRef, proofMessage *types.PoetProofMessage) error
StoreProof saves the poet proof in local db.
func (*PoetDb) Validate ¶
func (db *PoetDb) Validate( root []byte, proof types.PoetProof, poetID []byte, roundID string, signature types.EdSignature, ) error
Validate validates a new PoET proof.
func (*PoetDb) ValidateAndStore ¶
ValidateAndStore validates and stores a new PoET proof.
type PoetPoW ¶ added in v1.0.0
type PoetPoW struct { Nonce uint64 Params PoetPowParams }
type PoetPowParams ¶ added in v1.0.0
type PoetService ¶ added in v1.6.1
type PoetService interface { Address() string // Submit registers a challenge in the proving service current open round. Submit( ctx context.Context, deadline time.Time, prefix, challenge []byte, signature types.EdSignature, nodeID types.NodeID, ) (*types.PoetRound, error) Certify(ctx context.Context, id types.NodeID) (*certifier.PoetCert, error) // Proof returns the proof for the given round ID. Proof(ctx context.Context, roundID string) (*types.PoetProof, []types.Hash32, error) }
PoetService servers as an interface to communicate with a PoET server. It is used to submit challenges and fetch proofs.
type PoetSvcUnstableError ¶ added in v1.0.0
type PoetSvcUnstableError struct {
// contains filtered or unexported fields
}
PoetSvcUnstableError means there was a problem communicating with a Poet service. It wraps the source error.
func (*PoetSvcUnstableError) Error ¶ added in v1.0.0
func (e *PoetSvcUnstableError) Error() string
func (*PoetSvcUnstableError) Is ¶ added in v1.0.0
func (e *PoetSvcUnstableError) Is(target error) bool
func (*PoetSvcUnstableError) Unwrap ¶ added in v1.0.0
func (e *PoetSvcUnstableError) Unwrap() error
type PostClient ¶
type PostConfig ¶ added in v1.0.0
type PostConfig struct { MinNumUnits uint32 `mapstructure:"post-min-numunits"` MaxNumUnits uint32 `mapstructure:"post-max-numunits"` LabelsPerUnit uint64 `mapstructure:"post-labels-per-unit"` K1 uint `mapstructure:"post-k1"` K2 uint `mapstructure:"post-k2"` // size of the subset of labels to verify in POST proofs // lower values will result in faster ATX verification but increase the risk // as the node must depend on malfeasance proofs to detect invalid ATXs K3 uint `mapstructure:"post-k3"` PowDifficulty PowDifficulty `mapstructure:"post-pow-difficulty"` }
PostConfig is the configuration of the Post protocol, used for data creation, proofs generation and validation.
func DefaultPostConfig ¶ added in v1.0.0
func DefaultPostConfig() PostConfig
DefaultPostConfig defines the default configuration for Post.
func (PostConfig) ToConfig ¶ added in v1.0.0
func (c PostConfig) ToConfig() config.Config
type PostPowFlags ¶ added in v1.3.0
func (*PostPowFlags) Set ¶ added in v1.3.0
func (f *PostPowFlags) Set(value string) error
Set implements pflag.Value.Set.
func (PostPowFlags) String ¶ added in v1.3.0
func (f PostPowFlags) String() string
String implements pflag.Value.String.
func (PostPowFlags) Type ¶ added in v1.3.0
func (PostPowFlags) Type() string
Type implements pflag.Value.Type.
func (*PostPowFlags) Value ¶ added in v1.3.0
func (f *PostPowFlags) Value() config.PowFlags
type PostProofVerifyingOpts ¶ added in v1.0.0
type PostProofVerifyingOpts struct { // Disable verifying POST proofs. Experimental. // Use with caution, only on private nodes with a trusted public peer that // validates the proofs. Disabled bool `mapstructure:"smeshing-opts-verifying-disable"` // Number of workers spawned to verify proofs. Workers int `mapstructure:"smeshing-opts-verifying-workers"` // The minimum number of verifying workers to keep // while POST is being generated in parallel. // // Caps at the value of `Workers` (then scaling is disabled). MinWorkers int `mapstructure:"smeshing-opts-verifying-min-workers"` // Flags used for the PoW verification. Flags PostPowFlags `mapstructure:"smeshing-opts-verifying-powflags"` }
PostProofVerifyingOpts are the options controlling POST proving process.
func DefaultPostVerifyingOpts ¶ added in v1.0.0
func DefaultPostVerifyingOpts() PostProofVerifyingOpts
type PostProviderID ¶ added in v1.1.0
type PostProviderID struct {
// contains filtered or unexported fields
}
func (*PostProviderID) Set ¶ added in v1.1.0
func (id *PostProviderID) Set(value string) error
Set implements pflag.Value.Set.
func (*PostProviderID) SetUint32 ¶ added in v1.3.0
func (id *PostProviderID) SetUint32(value uint32)
SetInt64 sets the value of the PostProviderID to the given int64.
func (PostProviderID) String ¶ added in v1.1.0
func (id PostProviderID) String() string
String implements pflag.Value.String.
func (PostProviderID) Type ¶ added in v1.1.0
func (PostProviderID) Type() string
Type implements pflag.Value.Type.
func (*PostProviderID) Value ¶ added in v1.1.0
func (id *PostProviderID) Value() *uint32
Value returns the value of the PostProviderID as a pointer to uint32.
type PostProvingOpts ¶ added in v1.0.0
type PostProvingOpts struct { // Number of threads used in POST proving process. Threads uint `mapstructure:"smeshing-opts-proving-threads"` // Number of nonces tried in parallel in POST proving process. Nonces uint `mapstructure:"smeshing-opts-proving-nonces"` // RandomXMode is the mode used for RandomX computations. RandomXMode PostRandomXMode `mapstructure:"smeshing-opts-proving-randomx-mode"` }
PostProvingOpts are the options controlling POST proving process.
func DefaultPostProvingOpts ¶ added in v1.0.0
func DefaultPostProvingOpts() PostProvingOpts
type PostRandomXMode ¶ added in v1.3.0
type PostRandomXMode string
const ( PostRandomXModeFast PostRandomXMode = "fast" PostRandomXModeLight PostRandomXMode = "light" )
func (*PostRandomXMode) Set ¶ added in v1.3.0
func (m *PostRandomXMode) Set(value string) error
Set implements pflag.Value.Set.
func (PostRandomXMode) String ¶ added in v1.3.0
func (m PostRandomXMode) String() string
String implements pflag.Value.String.
func (PostRandomXMode) Type ¶ added in v1.3.0
func (PostRandomXMode) Type() string
Type implements pflag.Value.Type.
type PostSetupManager ¶ added in v1.0.0
type PostSetupManager struct {
// contains filtered or unexported fields
}
PostSetupManager implements the PostProvider interface.
func NewPostSetupManager ¶ added in v1.0.0
func NewPostSetupManager( cfg PostConfig, logger *zap.Logger, db sql.Executor, atxsdata *atxsdata.Data, goldenATXID types.ATXID, syncer syncer, validator nipostValidator, opts ...PostSetupManagerOpt, ) (*PostSetupManager, error)
NewPostSetupManager creates a new instance of PostSetupManager.
func (*PostSetupManager) PrepareInitializer ¶ added in v1.0.0
func (mgr *PostSetupManager) PrepareInitializer(ctx context.Context, opts PostSetupOpts, id types.NodeID) error
PrepareInitializer prepares the initializer to begin the initialization process, it needs to be called before each call to StartSession. Having this function be separate from StartSession provides a means to understand if the post configuration is valid before kicking off a very long running task (StartSession can take days to complete). After the first call to this method subsequent calls to this method will return an error until StartSession has completed execution.
func (*PostSetupManager) Reset ¶ added in v1.0.0
func (mgr *PostSetupManager) Reset() error
Reset deletes the data file(s).
func (*PostSetupManager) StartSession ¶ added in v1.0.0
StartSession starts (or continues) a PoST session. It supports resuming a previously started session, and will return an error if a session is already in progress. It must be ensured that PrepareInitializer is called once before each call to StartSession and that the node is ATX synced.
func (*PostSetupManager) Status ¶ added in v1.0.0
func (mgr *PostSetupManager) Status() *PostSetupStatus
Status returns the setup current status.
type PostSetupManagerOpt ¶ added in v1.4.0
type PostSetupManagerOpt func(*PostSetupManager)
func PostValidityDelay ¶ added in v1.4.0
func PostValidityDelay(delay time.Duration) PostSetupManagerOpt
PostValidityDelay sets the delay before PoST in ATX is considered valid.
type PostSetupOpts ¶ added in v1.0.0
type PostSetupOpts struct { DataDir string `mapstructure:"smeshing-opts-datadir"` NumUnits uint32 `mapstructure:"smeshing-opts-numunits"` MaxFileSize uint64 `mapstructure:"smeshing-opts-maxfilesize"` ProviderID PostProviderID `mapstructure:"smeshing-opts-provider"` Throttle bool `mapstructure:"smeshing-opts-throttle"` Scrypt config.ScryptParams `mapstructure:"smeshing-opts-scrypt"` ComputeBatchSize uint64 `mapstructure:"smeshing-opts-compute-batch-size"` }
PostSetupOpts are the options used to initiate a Post setup data creation session, either via the public smesher API, or on node launch (via cmd args).
func DefaultPostSetupOpts ¶ added in v1.0.0
func DefaultPostSetupOpts() PostSetupOpts
DefaultPostSetupOpts defines the default options for Post setup.
func (PostSetupOpts) ToInitOpts ¶ added in v1.0.3
func (o PostSetupOpts) ToInitOpts() config.InitOpts
type PostSetupProvider ¶ added in v1.0.0
type PostSetupProvider initialization.Provider
PostSetupProvider represent a compute provider for Post setup data creation.
type PostSetupState ¶ added in v1.0.0
type PostSetupState int32
const ( PostSetupStateNotStarted PostSetupState = 1 + iota PostSetupStatePrepared PostSetupStateInProgress PostSetupStateStopped PostSetupStateComplete PostSetupStateError )
type PostSetupStatus ¶ added in v1.0.0
type PostSetupStatus struct { State PostSetupState NumLabelsWritten uint64 LastOpts *PostSetupOpts }
PostSetupStatus represents a status snapshot of the Post setup.
type PostStates ¶ added in v1.4.0
type PostSupervisor ¶ added in v1.3.0
type PostSupervisor struct {
// contains filtered or unexported fields
}
PostSupervisor manages a local post service.
func NewPostSupervisor ¶ added in v1.3.0
func NewPostSupervisor( logger *zap.Logger, postCfg PostConfig, provingOpts PostProvingOpts, postSetupProvider postSetupProvider, atxBuilder AtxBuilder, ) *PostSupervisor
NewPostSupervisor returns a new post service.
func (*PostSupervisor) Benchmark ¶ added in v1.3.0
func (*PostSupervisor) Benchmark(p PostSetupProvider) (int, error)
Benchmark runs a short benchmarking session for a given provider to evaluate its performance.
func (*PostSupervisor) Config ¶ added in v1.3.0
func (ps *PostSupervisor) Config() PostConfig
func (*PostSupervisor) Providers ¶ added in v1.3.0
func (*PostSupervisor) Providers() ([]PostSetupProvider, error)
Providers returns a list of available compute providers for Post setup.
func (*PostSupervisor) Start ¶ added in v1.3.0
func (ps *PostSupervisor) Start(cmdCfg PostSupervisorConfig, opts PostSetupOpts, sig *signing.EdSigner) error
func (*PostSupervisor) Status ¶ added in v1.3.0
func (ps *PostSupervisor) Status() *PostSetupStatus
func (*PostSupervisor) Stop ¶ added in v1.3.0
func (ps *PostSupervisor) Stop(deleteFiles bool) error
Stop stops the post service.
type PostSupervisorConfig ¶ added in v1.3.0
type PostSupervisorConfig struct { PostServiceCmd string NodeAddress string MaxRetries int CACert string Cert string Key string }
func DefaultPostServiceConfig ¶ added in v1.3.0
func DefaultPostServiceConfig() PostSupervisorConfig
DefaultPostServiceConfig returns the default config for post service.
func DefaultTestPostServiceConfig ¶ added in v1.3.0
func DefaultTestPostServiceConfig() PostSupervisorConfig
DefaultTestPostServiceConfig returns the default config for post service in tests.
type PostVerifier ¶ added in v1.0.0
type PostVerifier interface { io.Closer Verify(ctx context.Context, p *shared.Proof, m *shared.ProofMetadata, opts ...postVerifierOptionFunc) error }
func NewPostVerifier ¶ added in v1.0.0
func NewPostVerifier(cfg PostConfig, logger *zap.Logger, opts ...PostVerifierOpt) (PostVerifier, error)
NewPostVerifier creates a new post verifier.
type PostVerifierOpt ¶ added in v1.3.8
type PostVerifierOpt func(v *postVerifierOpts)
func WithAutoscaling ¶ added in v1.3.8
func WithAutoscaling(postStates postStatesGetter) PostVerifierOpt
func WithPrioritizedID ¶ added in v1.4.0
func WithPrioritizedID(id types.NodeID) PostVerifierOpt
func WithVerifyingOpts ¶ added in v1.3.8
func WithVerifyingOpts(opts PostProofVerifyingOpts) PostVerifierOpt
type PowDifficulty ¶ added in v1.0.0
type PowDifficulty [32]byte
func (*PowDifficulty) Set ¶ added in v1.0.0
func (f *PowDifficulty) Set(value string) error
Set implements pflag.Value.Set.
func (PowDifficulty) String ¶ added in v1.0.0
func (d PowDifficulty) String() string
func (PowDifficulty) Type ¶ added in v1.0.0
func (PowDifficulty) Type() string
Type implements pflag.Value.Type.
func (*PowDifficulty) UnmarshalText ¶ added in v1.0.0
func (d *PowDifficulty) UnmarshalText(text []byte) error
type ProofToCertify ¶ added in v1.6.0
type ProofToCertifyMetadata ¶ added in v1.6.0
type SmeshingProvider ¶ added in v1.0.0
type SmeshingProvider interface { Smeshing() bool StartSmeshing(types.Address) error StopSmeshing(bool) error SmesherIDs() []types.NodeID Coinbase() types.Address SetCoinbase(coinbase types.Address) }
SmeshingProvider defines the functionality required for the node's Smesher API.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator contains the dependencies required to validate NIPosts.
func NewValidator ¶
func NewValidator( db sql.Executor, poetDb poetDbAPI, cfg PostConfig, scrypt config.ScryptParams, postVerifier PostVerifier, ) *Validator
NewValidator returns a new NIPost validator.
func (*Validator) InitialNIPostChallengeV1 ¶ added in v1.6.0
func (*Validator) IsVerifyingFullPost ¶ added in v1.4.0
func (*Validator) LabelsPerUnit ¶ added in v1.6.0
func (*Validator) LabelsPerUnit(cfg *PostConfig, labelsPerUnit uint64) error
func (*Validator) NIPost ¶ added in v1.0.0
func (v *Validator) NIPost( ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, nipost *types.NIPost, poetChallenge types.Hash32, numUnits uint32, opts ...validatorOption, ) (uint64, error)
NIPost validates a NIPost, given a node id and expected challenge. It returns an error if the NIPost is invalid.
Some of the Post metadata fields validation values is ought to eventually be derived from consensus instead of local configuration. If so, their validation should be removed to contextual validation, while still syntactically-validate them here according to locally configured min/max values.
func (*Validator) NIPostChallengeV1 ¶ added in v1.6.0
func (*Validator) NIPostChallengeV1( challenge *wire.NIPostChallengeV1, prevATX *types.ActivationTx, nodeID types.NodeID, ) error
func (*Validator) NumUnits ¶ added in v1.0.0
func (*Validator) NumUnits(cfg *PostConfig, numUnits uint32) error
func (*Validator) PoetMembership ¶ added in v1.6.0
func (*Validator) PositioningAtx ¶ added in v1.0.0
func (*Validator) Post ¶ added in v1.0.0
func (v *Validator) Post( ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, post *types.Post, metadata *types.PostMetadata, numUnits uint32, opts ...validatorOption, ) error
Post validates a Proof of Space-Time (PoST). It returns nil if validation passed or an error indicating why validation failed.
func (*Validator) VRFNonceV2 ¶ added in v1.6.0
func (*Validator) VerifyChain ¶ added in v1.4.0
type VerifyChainOption ¶ added in v1.4.0
type VerifyChainOption func(*verifyChainOpts)