Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeForkDigest(version phase0.Version, genesisValidatorsRoot phase0.Root) ([4]byte, error)
- func Hash(data []byte) [32]byte
- func New(logger *zap.Logger, opt beaconprotocol.Options, ...) (beaconprotocol.BeaconNode, error)
- func ToBytes4(x []byte) [4]byte
- type Client
- type NodeClient
- type NodeClientProvider
Constants ¶
View Source
const DataVersionNil spec.DataVersion = math.MaxUint64
DataVersionNil is just a placeholder for a nil data version. Don't check for it, check for errors or nil data instead.
Variables ¶
Functions ¶
func ComputeForkDigest ¶ added in v0.4.0
ComputeForkDigest returns the fork for the current version and genesis validator root
Spec pseudocode definition:
def compute_fork_digest(current_version: Version, genesis_validators_root: Root) -> ForkDigest: """ Return the 4-byte fork digest for the ``current_version`` and ``genesis_validators_root``. This is a digest primarily used for domain separation on the p2p layer. 4-bytes suffices for practical separation of forks/chains. """ return ForkDigest(compute_fork_data_root(current_version, genesis_validators_root)[:4])
func Hash ¶ added in v0.4.0
Hash defines a function that returns the sha256 checksum of the data passed in. https://github.com/ethereum/consensus-specs/blob/v0.9.3/specs/core/0_beacon-chain.md#hash
func New ¶
func New(logger *zap.Logger, opt beaconprotocol.Options, operatorID spectypes.OperatorID, slotTicker slot_ticker.Ticker) (beaconprotocol.BeaconNode, error)
New init new client and go-client instance
Types ¶
type Client ¶ added in v0.4.0
type Client interface { eth2client.Service eth2client.NodeVersionProvider eth2client.NodeClientProvider eth2client.AttestationDataProvider eth2client.AggregateAttestationProvider eth2client.AggregateAttestationsSubmitter eth2client.AttestationDataProvider eth2client.AttestationsSubmitter eth2client.BeaconCommitteeSubscriptionsSubmitter eth2client.SyncCommitteeSubscriptionsSubmitter eth2client.AttesterDutiesProvider eth2client.ProposerDutiesProvider eth2client.SyncCommitteeDutiesProvider eth2client.NodeSyncingProvider eth2client.BeaconBlockProposalProvider eth2client.BeaconBlockSubmitter eth2client.BlindedBeaconBlockProposalProvider eth2client.BlindedBeaconBlockSubmitter eth2client.DomainProvider eth2client.BeaconBlockRootProvider eth2client.SyncCommitteeMessagesSubmitter eth2client.BeaconBlockRootProvider eth2client.SyncCommitteeContributionProvider eth2client.SyncCommitteeContributionsSubmitter eth2client.ValidatorsProvider eth2client.ProposalPreparationsSubmitter eth2client.EventsProvider eth2client.BlindedBeaconBlockProposalProvider eth2client.BlindedBeaconBlockSubmitter eth2client.ValidatorRegistrationsSubmitter }
Client defines all go-eth2-client interfaces used in ssv
type NodeClient ¶ added in v1.1.0
type NodeClient string
NodeClient is the type of the Beacon node.
const ( NodeLighthouse NodeClient = "lighthouse" NodePrysm NodeClient = "prysm" NodeUnknown NodeClient = "unknown" )
func ParseNodeClient ¶ added in v1.1.0
func ParseNodeClient(version string) NodeClient
ParseNodeClient derives the client from node's version string.
type NodeClientProvider ¶ added in v1.1.0
type NodeClientProvider interface {
NodeClient() NodeClient
}
Click to show internal directories.
Click to hide internal directories.