Documentation ¶
Index ¶
- type BlobStore
- type CachedDB
- func (db *CachedDB) CacheMalfeasanceProof(id types.NodeID, proof *types.MalfeasanceProof)
- func (db *CachedDB) GetAtxHeader(id types.ATXID) (*types.ActivationTxHeader, error)
- func (db *CachedDB) GetEpochAtx(epoch types.EpochID, nodeID types.NodeID) (*types.ActivationTxHeader, error)
- func (db *CachedDB) GetEpochWeight(epoch types.EpochID) (uint64, []types.ATXID, error)
- func (db *CachedDB) GetFullAtx(id types.ATXID) (*types.VerifiedActivationTx, error)
- func (db *CachedDB) GetLastAtx(nodeID types.NodeID) (*types.ActivationTxHeader, error)
- func (db *CachedDB) GetMalfeasanceProof(id types.NodeID) (*types.MalfeasanceProof, error)
- func (db *CachedDB) IdentityExists(nodeID types.NodeID) (bool, error)
- func (db *CachedDB) IsMalicious(id types.NodeID) (bool, error)
- func (db *CachedDB) IterateEpochATXHeaders(epoch types.EpochID, iter func(*types.ActivationTxHeader) error) error
- func (db *CachedDB) IterateMalfeasanceProofs(iter func(types.NodeID, *types.MalfeasanceProof) error) error
- func (db *CachedDB) MalfeasanceCacheSize() int
- func (db *CachedDB) MaxHeightAtx() (types.ATXID, error)
- func (db *CachedDB) VRFNonce(id types.NodeID, epoch types.EpochID) (types.VRFPostIndex, error)
- type Hint
- type VrfNonceKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobStore ¶
BlobStore gets data as a blob to serve direct fetch requests.
func NewBlobStore ¶
NewBlobStore returns a BlobStore.
type CachedDB ¶
CachedDB is simply a database injected with cache.
func NewCachedDB ¶
NewCachedDB create an instance of a CachedDB.
func (*CachedDB) CacheMalfeasanceProof ¶
func (db *CachedDB) CacheMalfeasanceProof(id types.NodeID, proof *types.MalfeasanceProof)
func (*CachedDB) GetAtxHeader ¶
GetAtxHeader returns the ATX header by the given ID. This function is thread safe and will return an error if the ID is not found in the ATX DB.
func (*CachedDB) GetEpochAtx ¶
func (db *CachedDB) GetEpochAtx(epoch types.EpochID, nodeID types.NodeID) (*types.ActivationTxHeader, error)
GetEpochAtx gets the atx header of specified node ID published in the specified epoch.
func (*CachedDB) GetEpochWeight ¶
GetEpochWeight returns the total weight of ATXs targeting the given epochID.
func (*CachedDB) GetFullAtx ¶
GetFullAtx returns the full atx struct of the given atxId id, it returns an error if the full atx cannot be found in all databases.
func (*CachedDB) GetLastAtx ¶
GetLastAtx gets the last atx header of specified node ID.
func (*CachedDB) GetMalfeasanceProof ¶
GetMalfeasanceProof gets the malfeasance proof associated with the NodeID.
func (*CachedDB) IdentityExists ¶
IdentityExists returns true if this NodeID has published any ATX.
func (*CachedDB) IsMalicious ¶
IsMalicious returns true if the NodeID is malicious.
func (*CachedDB) IterateEpochATXHeaders ¶
func (db *CachedDB) IterateEpochATXHeaders(epoch types.EpochID, iter func(*types.ActivationTxHeader) error) error
IterateEpochATXHeaders iterates over ActivationTxs that target an epoch.