Documentation
¶
Index ¶
- Constants
- type AggregatorRPCClient
- type AggregatorRPCServer
- func (ra *AggregatorRPCServer) CollectResponseSignature(response *aggtypes.ResponseWithSignature, result *aggtypes.ValidatedResponse) error
- func (ra *AggregatorRPCServer) HealthCheck(_ struct{}, reply *bool) error
- func (ra *AggregatorRPCServer) IsRunning() bool
- func (ra *AggregatorRPCServer) OnStart() error
- func (ra *AggregatorRPCServer) OnStop()
- type OperatorStakeInfo
- type OperatorStateInfo
- type ResultDigest
- type Task
Constants ¶
const ( RPCHealthCheckMethod = "AggregatorRPCServer.HealthCheck" RPCServerAggregatorMethod = "AggregatorRPCServer.CollectResponseSignature" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatorRPCClient ¶ added in v0.4.0
type AggregatorRPCClient struct {
// contains filtered or unexported fields
}
AggregatorRPCClient provides a client implementation of the Aggregator interface communicating with the aggregator service over RPC
func NewAggregatorRPCClient ¶ added in v0.4.0
func NewAggregatorRPCClient(address string, logger log.Logger) (*AggregatorRPCClient, error)
NewAggregatorRPCClient creates a new client instance connected to the specified address establishing a connection to the aggregator RPC server
func (*AggregatorRPCClient) CollectResponseSignature ¶ added in v0.4.0
func (ra *AggregatorRPCClient) CollectResponseSignature(responseWithSignature *aggtypes.ResponseWithSignature, validatedResponseCh chan<- aggtypes.ValidatedResponse) error
CollectResponseSignature implements the Aggregator interface by forwarding the request to the RPC server and receiving the validated response
func (*AggregatorRPCClient) HealthCheck ¶ added in v0.4.0
func (ra *AggregatorRPCClient) HealthCheck() (bool, error)
HealthCheck performs a health check on the aggregator service
type AggregatorRPCServer ¶ added in v0.4.0
type AggregatorRPCServer struct { service.BaseService // contains filtered or unexported fields }
AggregatorRPCServer implements the Aggregator interface over RPC. It manages signature collection tasks, provides thread-safe access to shared resources, handles network communication, and coordinates the entire aggregation workflow for distributed validation requests.
func NewAggregatorGRPCServer ¶ added in v0.4.0
func NewAggregatorGRPCServer( ctx context.Context, aggConfig *aggcfg.AggregatorConfig, interactorConfig *interactorcfg.Config, cfg *config.Config, dvsReader reader.DVSReader, logger log.Logger, ) (*AggregatorRPCServer, error)
NewAggregatorGRPCServer creates a new instance of the RPC server aggregator initializing all required components and connections
func (*AggregatorRPCServer) CollectResponseSignature ¶ added in v0.4.0
func (ra *AggregatorRPCServer) CollectResponseSignature(response *aggtypes.ResponseWithSignature, result *aggtypes.ValidatedResponse) error
CollectResponseSignature processes operator signature submissions creating or updating tasks and managing the aggregation process
func (*AggregatorRPCServer) HealthCheck ¶ added in v0.4.0
func (ra *AggregatorRPCServer) HealthCheck(_ struct{}, reply *bool) error
HealthCheck provides a simple health check for the RPC server
func (*AggregatorRPCServer) IsRunning ¶ added in v0.4.0
func (ra *AggregatorRPCServer) IsRunning() bool
IsRunning checks if the server is currently running implementing the service interface requirement
func (*AggregatorRPCServer) OnStart ¶ added in v0.4.0
func (ra *AggregatorRPCServer) OnStart() error
OnStart initializes and starts the RPC server registering handlers and beginning to accept connections
func (*AggregatorRPCServer) OnStop ¶ added in v0.4.0
func (ra *AggregatorRPCServer) OnStop()
OnStop gracefully shuts down the RPC server closing the network listener
type OperatorStakeInfo ¶
type OperatorStakeInfo struct { Operator common.Address OperatorID types.OperatorID Stake *big.Int }
OperatorStakeInfo holds information about an operator's stake. It combines the operator's blockchain address, system identifier, and current stake amount for use in threshold calculations.
type OperatorStateInfo ¶
type OperatorStateInfo struct { Operators map[types.OperatorID]common.Address GroupStakes map[types.GroupNumber]*big.Int GroupOperatorMap map[types.GroupNumber][]OperatorStakeInfo }
OperatorStateInfo contains the current state of operators in the system. It tracks operator mappings, group stake totals, and the distribution of operators across validation groups for consensus determination.
type ResultDigest ¶
type ResultDigest [32]byte
ResultDigest represents a 32-byte hash of a response result. It serves as a unique identifier for operator response consensus and is used to group matching responses during aggregation.
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task represents an ongoing signature collection and aggregation job. It tracks operator responses, manages communication channels, and stores state information needed for the aggregation process including operator information, group mappings, and threshold requirements.