pkg

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: 19 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator struct {
	AggregatorConfig   *config.AggregatorConfig
	NewTaskCreatedChan chan *servicemanager.ContractAlignedLayerServiceManagerNewTaskCreated

	OperatorTaskResponses map[uint32]*TaskResponsesWithStatus
	// contains filtered or unexported fields
}

func NewAggregator

func NewAggregator(aggregatorConfig config.AggregatorConfig) (*Aggregator, error)

func (*Aggregator) AddNewTask

func (agg *Aggregator) AddNewTask(index uint32, task servicemanager.AlignedLayerServiceManagerTask)

func (*Aggregator) ProcessOperatorSignedTaskResponse

func (agg *Aggregator) ProcessOperatorSignedTaskResponse(signedTaskResponse *types.SignedTaskResponse, reply *uint8) error

Aggregator Methods This is the list of methods that the Aggregator exposes to the Operator The Operator can call these methods to interact with the Aggregator This methods are automatically registered by the RPC server This takes a response an adds it to the internal. If reaching the quorum, it sends the aggregated signatures to ethereum Returns:

  • 0: Success
  • 1: Error

func (*Aggregator) ServeOperators

func (agg *Aggregator) ServeOperators() error

func (*Aggregator) ServerRunning

func (agg *Aggregator) ServerRunning(_ *struct{}, reply *int64) error

Dummy method to check if the server is running TODO: Remove this method in prod

func (*Aggregator) Start

func (agg *Aggregator) Start(ctx context.Context) error

func (*Aggregator) SubscribeToNewTasks

func (agg *Aggregator) SubscribeToNewTasks() error

type TaskResponsesWithStatus

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

Aggregator stores TaskResponse for a task here

Jump to

Keyboard shortcuts

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