Documentation
¶
Index ¶
- type KeyStore
- func (ks *KeyStore) Get(executorID string, anchor []byte, epoch int64) ([]byte, bool)
- func (ks *KeyStore) LatestDisclosed(executorID string, anchor []byte) (epoch int64, key []byte, ok bool)
- func (ks *KeyStore) PrintKeys()
- func (ks *KeyStore) Store(executorID string, anchor []byte, epoch int64, key []byte) error
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) 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.
Click to show internal directories.
Click to hide internal directories.