Documentation ¶
Index ¶
- Variables
- type BlobStore
- type CachedDB
- func (db *CachedDB) CacheMalfeasanceProof(id types.NodeID, proof []byte)
- func (db *CachedDB) GetAtx(id types.ATXID) (*types.ActivationTx, error)
- func (db *CachedDB) IterateMalfeasanceProofs(iter func(types.NodeID, []byte) error) error
- func (db *CachedDB) MalfeasanceCacheSize() int
- func (db *CachedDB) MalfeasanceProof(id types.NodeID) ([]byte, error)
- func (db *CachedDB) MaxHeightAtx() (types.ATXID, error)
- func (db *CachedDB) Previous(id types.ATXID) ([]types.ATXID, error)
- func (db *CachedDB) VRFNonce(id types.NodeID, epoch types.EpochID) (types.VRFPostIndex, error)
- type Config
- type Hint
- type Opt
- type VrfNonceKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
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.
func (*BlobStore) GetBlobSizes ¶ added in v1.4.1
GetBlobSizes returns the sizes of the blobs corresponding to the specified ids. For non-existent objects, the corresponding items are set to -1.
type CachedDB ¶
CachedDB is simply a database injected with cache.
func NewCachedDB ¶
NewCachedDB create an instance of a CachedDB.
func (*CachedDB) CacheMalfeasanceProof ¶
func (*CachedDB) GetAtx ¶ added in v1.6.0
GetAtx returns the ATX 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) IterateMalfeasanceProofs ¶ added in v1.1.0
func (*CachedDB) MalfeasanceCacheSize ¶
func (*CachedDB) MalfeasanceProof ¶ added in v1.7.0
GetMalfeasanceProof gets the malfeasance proof associated with the NodeID.
type Config ¶ added in v1.1.2
type Config struct { // ATXSize must be larger than the sum of all ATXs in last 2 epochs to be effective ATXSize int `mapstructure:"atx-size"` MalfeasanceSize int `mapstructure:"malfeasance-size"` }
func DefaultConfig ¶ added in v1.1.2
func DefaultConfig() Config
type Opt ¶ added in v1.1.2
type Opt func(*cacheOpts)
func WithConfig ¶ added in v1.1.2
func WithConsensusCache ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.