Documentation ¶
Index ¶
- Constants
- func CreateVerifyFunc(ops Operators) func(id uint64, msg []byte, sig []byte) error
- func ParseAsError(msg []byte) (parsedErr, err error)
- func ValidatedOperatorData(ids []uint64, operators Operators) ([]*wire.Operator, error)
- func VerifyDepositData(depsitDataJson *DepositDataJson, withdrawCred []byte, owner common.Address, ...) error
- type CeremonySigs
- type Data
- type DepositDataJson
- type Initiator
- func (c *Initiator) GetAndCollect(op Operator, method string) ([]byte, error)
- func (c *Initiator) GetCeremonySigs(dkgResults []dkg.Result) (*CeremonySigs, error)
- func (c *Initiator) MakeMultiple(id [24]byte, allmsgs [][]byte) (*wire.MultipleSignedTransports, error)
- func (c *Initiator) Ping(ips []string) error
- func (c *Initiator) ProcessDKGResultResponse(dkgResults []dkg.Result) (sharePks []*bls.PublicKey, ...)
- func (c *Initiator) SendAndCollect(op Operator, method string, data []byte) ([]byte, error)
- func (c *Initiator) SendExchangeMsgs(exchangeMsgs [][]byte, id [24]byte, operators []*wire.Operator) ([][]byte, error)
- func (c *Initiator) SendInitMsg(init *wire.Init, id [24]byte, operators []*wire.Operator) ([][]byte, error)
- func (c *Initiator) SendKyberMsgs(kyberDeals [][]byte, id [24]byte, operators []*wire.Operator) ([][]byte, error)
- func (c *Initiator) SendPingMsg(ping *wire.Ping, operators []*wire.Operator) ([][]byte, error)
- func (c *Initiator) SendReshareMsg(reshare *wire.Reshare, id [24]byte, ops []*wire.Operator) ([][]byte, error)
- func (c *Initiator) SendToAll(method string, msg []byte, operatorsIDs []*wire.Operator) ([][]byte, error)
- func (c *Initiator) StartDKG(id [24]byte, withdraw []byte, ids []uint64, ...) (*DepositDataJson, *KeyShares, *CeremonySigs, error)
- func (c *Initiator) StartReshare(id [24]byte, newOpIDs []uint64, keysharesFile, ceremonySigs []byte, ...) (*KeyShares, *CeremonySigs, error)
- func (c *Initiator) VerifyAll(id [24]byte, allmsgs [][]byte) error
- type KeyShares
- type KeySign
- type Operator
- type OperatorData
- type OperatorDataJson
- type Operators
- type Payload
- type ShareData
Constants ¶
const DepositCliVersion = "2.7.0"
DepositCliVersion is last version accepted by launchpad
Variables ¶
This section is empty.
Functions ¶
func CreateVerifyFunc ¶ added in v1.1.0
CreateVerifyFunc creates function to verify each participating operator RSA signature for incoming to initiator messages
func ParseAsError ¶ added in v1.2.0
parseAsError parses the error from an operator
func ValidatedOperatorData ¶ added in v1.0.0
ValidatedOperatorData validates operators information data before starting a DKG ceremony
func VerifyDepositData ¶ added in v1.0.0
Types ¶
type CeremonySigs ¶ added in v1.2.0
type Data ¶
type Data struct { Payload Payload `json:"payload"` }
Data structure as a part of KeyShares representing BLS validator public key and information about validators
type DepositDataJson ¶
type DepositDataJson struct { PubKey string `json:"pubkey"` WithdrawalCredentials string `json:"withdrawal_credentials"` Amount phase0.Gwei `json:"amount"` Signature string `json:"signature"` DepositMessageRoot string `json:"deposit_message_root"` DepositDataRoot string `json:"deposit_data_root"` ForkVersion string `json:"fork_version"` NetworkName string `json:"network_name"` DepositCliVersion string `json:"deposit_cli_version"` }
DepositDataJson structure to create a resulting deposit data JSON file according to ETH2 protocol
type Initiator ¶
type Initiator struct { Logger *zap.Logger // logger Client *req.Client // http client Operators Operators // operators info mapping VerifyFunc func(id uint64, msg, sig []byte) error // function to verify signatures of incoming messages PrivateKey *rsa.PrivateKey // a unique initiator's RSA private key used for signing messages and identity Version []byte }
Initiator main structure for initiator
func (*Initiator) GetAndCollect ¶ added in v1.1.0
GetAndCollect request Get at operator route
func (*Initiator) GetCeremonySigs ¶ added in v1.2.0
func (c *Initiator) GetCeremonySigs(dkgResults []dkg.Result) (*CeremonySigs, error)
func (*Initiator) MakeMultiple ¶
func (c *Initiator) MakeMultiple(id [24]byte, allmsgs [][]byte) (*wire.MultipleSignedTransports, error)
MakeMultiple creates a one combined message from operators with initiator signature
func (*Initiator) ProcessDKGResultResponse ¶
func (c *Initiator) ProcessDKGResultResponse(dkgResults []dkg.Result) (sharePks []*bls.PublicKey, sigDepositShares, ssvContractOwnerNonceSigShares []*bls.Sign, err error)
ProcessDKGResultResponse deserializes incoming DKG result messages from operators
func (*Initiator) SendAndCollect ¶
SendAndCollect ssends http message to operator and read the response
func (*Initiator) SendExchangeMsgs ¶
func (c *Initiator) SendExchangeMsgs(exchangeMsgs [][]byte, id [24]byte, operators []*wire.Operator) ([][]byte, error)
SendExchangeMsgs sends combined exchange messages to each operator participating in DKG ceremony
func (*Initiator) SendInitMsg ¶
func (c *Initiator) SendInitMsg(init *wire.Init, id [24]byte, operators []*wire.Operator) ([][]byte, error)
SendInitMsg sends initial DKG ceremony message to participating operators from initiator
func (*Initiator) SendKyberMsgs ¶
func (c *Initiator) SendKyberMsgs(kyberDeals [][]byte, id [24]byte, operators []*wire.Operator) ([][]byte, error)
SendKyberMsgs sends combined kyber messages to each operator participating in DKG ceremony
func (*Initiator) SendPingMsg ¶ added in v1.1.0
func (*Initiator) SendReshareMsg ¶ added in v1.0.0
func (*Initiator) SendToAll ¶
func (c *Initiator) SendToAll(method string, msg []byte, operatorsIDs []*wire.Operator) ([][]byte, error)
SendToAll sends http messages to all operators. Makes sure that all responses are received
func (*Initiator) StartDKG ¶
func (c *Initiator) StartDKG(id [24]byte, withdraw []byte, ids []uint64, network eth2_key_manager_core.Network, owner common.Address, nonce uint64) (*DepositDataJson, *KeyShares, *CeremonySigs, error)
StartDKG starts DKG ceremony at initiator with requested parameters
func (*Initiator) StartReshare ¶ added in v1.0.0
type KeyShares ¶
type KeyShares struct {}
KeyShares structure to create an json file for ssv smart contract
func GenerateAggregatesKeyshares ¶ added in v1.1.0
type KeySign ¶
type KeySign struct { ValidatorPK ssvspec_types.ValidatorPK SigningRoot []byte }
type Operator ¶
type Operator struct { Addr string // ip:port ID uint64 // operators ID PubKey *rsa.PublicKey // operators RSA public key }
Operator structure represents operators info which is public
type OperatorData ¶
type OperatorData struct { ID uint64 `json:"id"` OperatorKey string `json:"operatorKey"` // encoded RSA public key }
OperatorData structure to represent information about operators participating in signing validator's duty
type OperatorDataJson ¶
type OperatorDataJson struct { Addr string `json:"ip"` ID uint64 `json:"id"` PubKey string `json:"public_key"` }
OperatorDataJson is used to store operators info ar JSON
type Operators ¶
Operators mapping storage for operator structs [ID]operator
func LoadOperatorsJson ¶
LoadOperatorsJson deserialize operators data from JSON