operator

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BatchDownloadTimeout    = 1 * time.Minute
	BatchDownloadMaxRetries = 3
	BatchDownloadRetryDelay = 5 * time.Second
)
View Source
const (
	MaxRetries    = 10
	RetryInterval = 10 * time.Second
)

Variables

This section is empty.

Functions

func RegisterOperator added in v0.1.5

func RegisterOperator(
	ctx context.Context,
	configuration *config.OperatorConfig,
	operatorToAvsRegistrationSigSalt [32]byte,
) error

RegisterOperator operator registers the operator with the given public key for the given quorum IDs. RegisterOperator registers a new operator with the given public key and socket with the provided quorum ids. If the operator is already registered with a given quorum id, the transaction will fail (noop) and an error will be returned.

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

	NewTaskCreatedChanV2 chan *servicemanager.ContractAlignedLayerServiceManagerNewBatchV2
	NewTaskCreatedChanV3 chan *servicemanager.ContractAlignedLayerServiceManagerNewBatchV3
	Logger               logging.Logger
	// contains filtered or unexported fields
}

func NewOperatorFromConfig

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

func (*Operator) ProcessNewBatchLogV2 added in v0.5.0

func (o *Operator) ProcessNewBatchLogV2(newBatchLog *servicemanager.ContractAlignedLayerServiceManagerNewBatchV2) error

func (*Operator) ProcessNewBatchLogV3 added in v0.7.0

func (o *Operator) ProcessNewBatchLogV3(newBatchLog *servicemanager.ContractAlignedLayerServiceManagerNewBatchV3) error

func (*Operator) SignTaskResponse

func (o *Operator) SignTaskResponse(batchIdentifierHash [32]byte) *bls.Signature

func (*Operator) Start

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

func (*Operator) SubscribeToNewTasksV2 added in v0.5.0

func (o *Operator) SubscribeToNewTasksV2() (chan error, error)

func (*Operator) SubscribeToNewTasksV3 added in v0.7.0

func (o *Operator) SubscribeToNewTasksV3() (chan error, error)

type VerificationData added in v0.1.2

type VerificationData struct {
	ProvingSystemId common.ProvingSystemId `json:"proving_system"`
	Proof           []byte                 `json:"proof"`
	PubInput        []byte                 `json:"pub_input"`
	VerificationKey []byte                 `json:"verification_key"`
	VmProgramCode   []byte                 `json:"vm_program_code"`
}

Jump to

Keyboard shortcuts

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