kv

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 0

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

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

func (c *AttCaches) ForkchoiceAttestationCount() int

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.

Jump to

Keyboard shortcuts

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