Documentation
¶
Index ¶
- Constants
- Variables
- func NewDecryptionKeysP2pValidatorEx(logger log.Logger, config Config, sc SlotCalculator, et EonTracker) pubsub.ValidatorEx
- type BeaconChainSlotCalculator
- type BlockEvent
- type BlockListener
- type Config
- type DecryptionKeysListener
- type DecryptionKeysProcessor
- type DecryptionKeysValidator
- type Eon
- type EonIndex
- type EonTracker
- type KsmEonTracker
- type P2pConfig
- type Pool
- type SlotCalculator
Constants ¶
View Source
const ( ProtocolVersion = "/shutter/0.1.0" DecryptionKeysTopic = "decryptionKeys" )
Variables ¶
View Source
var ( ErrInstanceIdMismatch = errors.New("instance id mismatch") ErrMissingGnosisExtraData = errors.New("missing gnosis extra data") ErrSlotTooLarge = errors.New("slot too large") ErrSlotInThePast = errors.New("slot in the past") ErrSlotInTheFuture = errors.New("slot in the future") ErrTxPointerTooLarge = errors.New("tx pointer too large") ErrEonTooLarge = errors.New("eon too large") ErrEonInThePast = errors.New("eon in the past") ErrEonInTheFuture = errors.New("eon in the future") ErrEmptyKeys = errors.New("empty keys") ErrTooManyKeys = errors.New("too many keys") ErrIgnoreMsg = errors.New("ignoring msg") )
View Source
var ErrTimestampBeforeGenesis = errors.New("timestamp before genesis")
Functions ¶
func NewDecryptionKeysP2pValidatorEx ¶
func NewDecryptionKeysP2pValidatorEx(logger log.Logger, config Config, sc SlotCalculator, et EonTracker) pubsub.ValidatorEx
Types ¶
type BeaconChainSlotCalculator ¶
type BeaconChainSlotCalculator struct {
// contains filtered or unexported fields
}
func NewBeaconChainSlotCalculator ¶
func NewBeaconChainSlotCalculator(genesisTimestamp uint64, secondsPerSlot uint64) BeaconChainSlotCalculator
func (BeaconChainSlotCalculator) CalcCurrentSlot ¶
func (sc BeaconChainSlotCalculator) CalcCurrentSlot() uint64
func (BeaconChainSlotCalculator) CalcSlot ¶
func (sc BeaconChainSlotCalculator) CalcSlot(timestamp uint64) (uint64, error)
func (BeaconChainSlotCalculator) CalcSlotAge ¶
func (sc BeaconChainSlotCalculator) CalcSlotAge(slot uint64) time.Duration
type BlockEvent ¶
type BlockListener ¶
type BlockListener struct {
// contains filtered or unexported fields
}
func NewBlockListener ¶
func NewBlockListener(logger log.Logger, stateChangesClient stateChangesClient) BlockListener
func (BlockListener) RegisterObserver ¶
func (bl BlockListener) RegisterObserver(o event.Observer[BlockEvent]) event.UnregisterFunc
type Config ¶
type Config struct { P2pConfig Enabled bool InstanceId uint64 BeaconChainGenesisTimestamp uint64 SecondsPerSlot uint64 SequencerContractAddress string ValidatorRegistryContractAddress string KeyBroadcastContractAddress string KeyperSetManagerContractAddress string MaxNumKeysPerMessage uint64 MaxRecentEons int }
func ConfigByChainName ¶
type DecryptionKeysListener ¶
type DecryptionKeysListener struct {
// contains filtered or unexported fields
}
func NewDecryptionKeysListener ¶
func NewDecryptionKeysListener(logger log.Logger, config Config, sc SlotCalculator, et EonTracker) DecryptionKeysListener
func (DecryptionKeysListener) RegisterObserver ¶
func (dkl DecryptionKeysListener) RegisterObserver(observer event.Observer[*proto.DecryptionKeys]) event.UnregisterFunc
type DecryptionKeysProcessor ¶
type DecryptionKeysProcessor struct {
// contains filtered or unexported fields
}
func NewDecryptionKeysProcessor ¶
func NewDecryptionKeysProcessor(logger log.Logger) DecryptionKeysProcessor
func (DecryptionKeysProcessor) Enqueue ¶
func (dkp DecryptionKeysProcessor) Enqueue(msg *proto.DecryptionKeys)
type DecryptionKeysValidator ¶
type DecryptionKeysValidator struct {
// contains filtered or unexported fields
}
func NewDecryptionKeysValidator ¶
func NewDecryptionKeysValidator(config Config, sc SlotCalculator, et EonTracker) DecryptionKeysValidator
func (DecryptionKeysValidator) Validate ¶
func (v DecryptionKeysValidator) Validate(msg *proto.DecryptionKeys) error
type EonTracker ¶
type KsmEonTracker ¶
type KsmEonTracker struct {
// contains filtered or unexported fields
}
func NewKsmEonTracker ¶
func NewKsmEonTracker(config Config, blockListener BlockListener, contractBackend bind.ContractBackend) *KsmEonTracker
func (*KsmEonTracker) CurrentEon ¶
func (et *KsmEonTracker) CurrentEon() (Eon, bool)
type P2pConfig ¶
type P2pConfig struct { PrivateKey *ecdsa.PrivateKey ListenPort uint64 BootstrapNodes []string }
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewPool ¶
func NewPool( logger log.Logger, config Config, secondaryTxnProvider txnprovider.TxnProvider, contractBackend bind.ContractBackend, stateChangesClient stateChangesClient, ) *Pool
func (Pool) ProvideTxns ¶
func (p Pool) ProvideTxns(ctx context.Context, opts ...txnprovider.ProvideOption) ([]types.Transaction, error)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
testhelpers
Package testhelpers is a generated GoMock package.
|
Package testhelpers is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.