operator

package
v0.0.0-...-28ca4d1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

Package operator AVS operator logic.

Index

Constants

View Source
const (
	AvsName = "preconfirmations"
	SemVer  = "0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorRPCClient

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

func NewAggregatorRPCClient

func NewAggregatorRPCClient(aggregatorIPPortAddr string, logger logging.Logger, metrics metrics.Metrics) (*AggregatorRPCClient, error)

func (*AggregatorRPCClient) SendSignedTaskResponseToAggregator

func (c *AggregatorRPCClient) SendSignedTaskResponseToAggregator(signedTaskResponse *aggregator.SignedTaskResponse)

SendSignedTaskResponseToAggregator sends a signed task response to the aggregator. it is meant to be ran inside a go thread, so doesn't return anything. this is because sending the signed task response to the aggregator is time sensitive, so there is no point in retrying if it fails for a few times. Currently hardcoded to retry sending the signed task response 5 times, waiting 2 seconds in between each attempt.

type AggregatorRPCClienter

type AggregatorRPCClienter interface {
	SendSignedTaskResponseToAggregator(signedTaskResponse *aggregator.SignedTaskResponse)
}

type Operator

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

func NewOperatorFromConfig

func NewOperatorFromConfig(c types.NodeConfig) (*Operator, error)

NewOperatorFromConfig the config in core (which is shared with aggregator and challenger)

func (*Operator) DepositIntoStrategy

func (o *Operator) DepositIntoStrategy(strategyAddr common.Address, amount *big.Int) error

func (*Operator) RegisterOperatorWithAvs

func (o *Operator) RegisterOperatorWithAvs(
	operatorEcdsaKeyPair *ecdsa.PrivateKey,
) error

RegisterOperatorWithAvs Registration specific functions

func (*Operator) RegisterOperatorWithEigenlayer

func (o *Operator) RegisterOperatorWithEigenlayer() error

func (*Operator) Start

func (o *Operator) Start(ctx context.Context) error

Directories

Path Synopsis
cmd
core
chainio
Package chainio contains the logic to interact with the AVS contracts onchain.
Package chainio contains the logic to interact with the AVS contracts onchain.
config
Package config contains the config types.
Package config contains the config types.
Package receiverapi contains the logic to receive preconfirmation callbacks.
Package receiverapi contains the logic to receive preconfirmation callbacks.
Package sse is the SSE Client for preconf-share
Package sse is the SSE Client for preconf-share
Package types contains the types used in the AVS JSON-RPC communication.
Package types contains the types used in the AVS JSON-RPC communication.

Jump to

Keyboard shortcuts

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