Documentation ¶
Overview ¶
Package kv includes a key-value store implementation of an attestation cache used to satisfy important use-cases such as aggregation in a beacon node runtime.
Index ¶
- type AttCaches
- func (c *AttCaches) DeleteForkchoiceAttestation(att *ethpb.Attestation) error
- func (c *AttCaches) ForkchoiceAttestationCount() int
- func (c *AttCaches) ForkchoiceAttestations() []*ethpb.Attestation
- func (c *AttCaches) SaveForkchoiceAttestation(att *ethpb.Attestation) error
- func (c *AttCaches) SaveForkchoiceAttestations(atts []*ethpb.Attestation) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttCaches ¶
type AttCaches struct {
// contains filtered or unexported fields
}
AttCaches defines the caches used to satisfy attestation pool interface. These caches are KV store for various attestations such are unaggregated, aggregated or attestations within a block.
func NewAttCaches ¶
func NewAttCaches() *AttCaches
NewAttCaches initializes a new attestation pool consists of multiple KV store in cache for various kind of attestations.
func (*AttCaches) DeleteForkchoiceAttestation ¶
func (c *AttCaches) DeleteForkchoiceAttestation(att *ethpb.Attestation) error
DeleteForkchoiceAttestation deletes a forkchoice attestation in cache.
func (*AttCaches) ForkchoiceAttestationCount ¶
ForkchoiceAttestationCount returns the number of fork choice attestations key in the pool.
func (*AttCaches) ForkchoiceAttestations ¶
func (c *AttCaches) ForkchoiceAttestations() []*ethpb.Attestation
ForkchoiceAttestations returns the forkchoice attestations in cache.
func (*AttCaches) SaveForkchoiceAttestation ¶
func (c *AttCaches) SaveForkchoiceAttestation(att *ethpb.Attestation) error
SaveForkchoiceAttestation saves an forkchoice attestation in cache.
func (*AttCaches) SaveForkchoiceAttestations ¶
func (c *AttCaches) SaveForkchoiceAttestations(atts []*ethpb.Attestation) error
SaveForkchoiceAttestations saves a list of forkchoice attestations in cache.