operator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetries    = 10
	RetryInterval = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorRpcClient

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

AggregatorRpcClient is the client to communicate with the aggregator via RPC

func NewAggregatorRpcClient

func NewAggregatorRpcClient(aggregatorIpPortAddr string, logger logging.Logger) (*AggregatorRpcClient, error)

func (*AggregatorRpcClient) SendSignedTaskResponseToAggregator

func (c *AggregatorRpcClient) SendSignedTaskResponseToAggregator(signedTaskResponse *types.SignedTaskResponse)

SendSignedTaskResponseToAggregator is the method called by operators via RPC to send their signed task response.

type Operator

type Operator struct {
	Config     config.OperatorConfig
	Address    ethcommon.Address
	Socket     string
	Timeout    time.Duration
	PrivKey    *ecdsa.PrivateKey
	KeyPair    *bls.KeyPair
	OperatorId eigentypes.OperatorId

	NewTaskCreatedChan chan *servicemanager.ContractAlignedLayerServiceManagerNewTaskCreated
	Logger             logging.Logger
	// contains filtered or unexported fields
}

func NewOperatorFromConfig

func NewOperatorFromConfig(configuration config.OperatorConfig) (*Operator, error)

func (*Operator) ProcessNewTaskCreatedLog

Takes a NewTaskCreatedLog struct as input and returns a TaskResponseHeader struct. The TaskResponseHeader struct is the struct that is signed and sent to the contract as a task response.

func (*Operator) SignTaskResponse

func (o *Operator) SignTaskResponse(taskResponse *servicemanager.AlignedLayerServiceManagerTaskResponse) (*bls.Signature, error)

func (*Operator) Start

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

func (*Operator) SubscribeToNewTasks

func (o *Operator) SubscribeToNewTasks() event.Subscription

Jump to

Keyboard shortcuts

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