tag

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyStore

type KeyStore struct {
	// contains filtered or unexported fields
}

KeyStore stores disclosed TESLA keys for retroactive packet verification. Keys are indexed by (executor_id, chain anchor, epoch). An empty anchor is the chain of an executor that published none.

func NewKeyStore

func NewKeyStore() *KeyStore

func (*KeyStore) Get

func (ks *KeyStore) Get(executorID string, anchor []byte, epoch int64) ([]byte, bool)

Get retrieves a key disclosed on the chain with the given anchor.

func (*KeyStore) LatestDisclosed

func (ks *KeyStore) LatestDisclosed(executorID string, anchor []byte) (epoch int64, key []byte, ok bool)

LatestDisclosed returns the epoch index and key of the most recently disclosed key on the chain of executorID with the given anchor. ok is false if no key of that chain has been stored yet.

func (*KeyStore) PrintKeys

func (ks *KeyStore) PrintKeys()

func (*KeyStore) Store

func (ks *KeyStore) Store(executorID string, anchor []byte, epoch int64, key []byte) error

Store saves a key disclosed on the chain with the given anchor. If a key for this epoch of that chain is already stored it is a no-op (keys are immutable once disclosed).

Jump to

Keyboard shortcuts

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