Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator interface {
// CollectResponseSignature collects the response signature from the operator
CollectResponseSignature(response *ResponseWithSignature, result chan<- ValidatedResponse) error
}
Aggregator defines the interface for signature collection and aggregation services in the distributed validation system. It handles the process of collecting signatures from operators and aggregating them into a single validated response.
type AggregatorConfig ¶
type AggregatorConfig struct {
AggregatorRPCServer string `json:"aggregator_rpc_server"`
OperatorResponseTimeout string `json:"operator_response_timeout"`
}
AggregatorConfig stores configuration settings for the aggregator service including network addresses and timeout values
func LoadConfig ¶
func LoadConfig(filePath string) (*AggregatorConfig, error)
LoadConfig loads and parses aggregator configuration from a JSON file. It reads the file at the given path, deserializes the JSON content, and returns the resulting configuration object.
func (*AggregatorConfig) GetOperatorResponseTimeout ¶
func (c *AggregatorConfig) GetOperatorResponseTimeout() (time.Duration, error)
GetOperatorResponseTimeout converts the string timeout value to a time.Duration. This allows the timeout value to be used directly in timing operations, parsing the string format into a proper duration object.
type ChainConfig ¶
type ChainConfig struct {
ChainID ChainID `json:"-"`
RPCURL string `json:"rpc_url"`
OperatorInfoProviderAddress common.Address `json:"operator_info_provider_address"`
OperatorKeyManagerAddress common.Address `json:"operator_key_manager_address"`
CentralSchedulerAddress common.Address `json:"central_scheduler_address"`
}
ChainConfig stores chain-specific configuration parameters including contract addresses and RPC endpoints
type ResponseWithSignature ¶
type ResponseWithSignature struct {
Data []byte
Digest [32]byte
Signature *bls.Signature
OperatorID [32]byte
RequestData avsitypes.DVSRequest
}
ResponseWithSignature encapsulates a response with its signature from an operator. It contains the original data, a cryptographic digest, the BLS signature, operator identification, and the original request that triggered this response.
type ValidatedResponse ¶
type ValidatedResponse struct {
Data []byte
Err *rpctypes.RPCError
Hash []byte
NonSignersPubkeysG1 []*bls.G1Point
GroupApksG1 []*bls.G1Point
SignersApkG2 *bls.G2Point
SignersAggSigG1 *bls.Signature
NonSignerGroupBitmapIndices []uint32
GroupApkIndices []uint32
TotalStakeIndices []uint32
NonSignerStakeIndices [][]uint32
}
ValidatedResponse represents the result of a successful signature aggregation. It contains the aggregated data, any errors encountered, cryptographic hash, public keys of non-signers, group aggregate public keys, signer information, and various bitmap indices used for on-chain verification.