system

package
v1.7.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveSetFetcher added in v1.1.5

type ActiveSetFetcher interface {
	GetActiveSet(context.Context, types.Hash32) error
}

ActiveSetFetcher defines an interface downloading active set.

type AtxFetcher

type AtxFetcher interface {
	GetAtxs(context.Context, []types.ATXID, ...GetAtxOpt) error
}

AtxFetcher defines an interface for fetching ATXs from remote peers.

type BallotFetcher

type BallotFetcher interface {
	GetBallots(context.Context, []types.BallotID) error
}

BallotFetcher defines an interface for fetching Ballot from remote peers.

type BeaconCollector

type BeaconCollector interface {
	ReportBeaconFromBallot(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)
}

BeaconCollector defines the interface that collect beacon values from Ballots.

type BeaconGetter

type BeaconGetter interface {
	GetBeacon(types.EpochID) (types.Beacon, error)
}

BeaconGetter gets a beacon value.

type BlockFetcher

type BlockFetcher interface {
	GetBlocks(context.Context, []types.BlockID) error
}

BlockFetcher defines an interface for fetching blocks from remote peers.

type Fetcher

Fetcher is a general interface that defines a component capable of fetching data from remote peers.

type GetAtxOpt added in v1.3.4

type GetAtxOpt func(*GetAtxOpts)

func WithATXCallback added in v1.7.9

func WithATXCallback(callback func(types.ATXID, error)) GetAtxOpt

WithATXCallback sets a callback function to be called after each ATX is downloaded, found locally or failed to download. The callback is guaranteed to be called exactly once for each ATX ID passed to GetAtxs. The callback is guaranteed not to be invoked after GetAtxs returns. The callback may be called concurrently from multiple goroutines. A non-nil error is passed in case the ATX cannot be found locally and failed to download.

func WithoutLimiting added in v1.3.4

func WithoutLimiting() GetAtxOpt

WithoutLimiting disables rate limiting when downloading ATXs.

type GetAtxOpts added in v1.3.4

type GetAtxOpts struct {
	LimitingOff bool
	Callback    func(types.ATXID, error)
}

type PeerTracker

type PeerTracker interface {
	RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash32)
}

PeerTracker defines an interface to track peer hashes.

type PoetProofFetcher

type PoetProofFetcher interface {
	GetPoetProof(context.Context, types.Hash32) error
}

PoetProofFetcher defines an interface for fetching PoET proofs from remote peers.

type ProposalFetcher

type ProposalFetcher interface {
	GetProposals(context.Context, []types.ProposalID) error
}

ProposalFetcher defines an interface for fetching Proposal from remote peers.

type SyncStateProvider

type SyncStateProvider interface {
	IsSynced(context.Context) bool
}

SyncStateProvider defines the interface that provides the node's sync state.

type Tortoise

type Tortoise interface {
	OnBlock(types.BlockHeader)
	OnHareOutput(types.LayerID, types.BlockID)
	OnWeakCoin(types.LayerID, bool)
	TallyVotes(types.LayerID)
	LatestComplete() types.LayerID
	Updates() []result.Layer
	OnApplied(types.LayerID, types.Hash32) bool
	OnMalfeasance(types.NodeID)
	OnAtx(types.EpochID, types.ATXID, *atxsdata.ATX)
	GetMissingActiveSet(types.EpochID, []types.ATXID) []types.ATXID
}

Tortoise is an interface provided by tortoise implementation.

type TxFetcher

type TxFetcher interface {
	GetBlockTxs(context.Context, []types.TransactionID) error
	GetProposalTxs(context.Context, []types.TransactionID) error
}

TxFetcher defines an interface for fetching transactions from remote peers.

type ValidationRequest

type ValidationRequest interface {
	Parse() (*types.TxHeader, error)
	Verify() bool
}

ValidationRequest parses transaction and verifies it.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL