handler

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 67 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiHandler

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

func NewApiHandler

func NewApiHandler(
	logger log.Logger,
	netConfig *clparams.NetworkConfig,
	ethClock eth_clock.EthereumClock,
	beaconChainConfig *clparams.BeaconChainConfig,
	indiciesDB kv.RwDB,
	forkchoiceStore forkchoice.ForkChoiceStorage,
	operationsPool pool.OperationsPool,
	rcsn freezeblocks.BeaconSnapshotReader,
	syncedData synced_data.SyncedData,
	stateReader *historical_states_reader.HistoricalStatesReader,
	sentinel sentinel.SentinelClient,
	version string,
	routerCfg *beacon_router_configuration.RouterConfiguration,
	emitters *beaconevents.EventEmitter,
	blobStoage blob_storage.BlobStorage,
	caplinSnapshots *freezeblocks.CaplinSnapshots,
	validatorParams *validator_params.ValidatorParams,
	attestationProducer attestation_producer.AttestationDataProducer,
	engine execution_client.ExecutionEngine,
	syncMessagePool sync_contribution_pool.SyncContributionPool,
	committeeSub *committee_subscription.CommitteeSubscribeMgmt,
	aggregatePool aggregation.AggregationPool,
	syncCommitteeMessagesService services.SyncCommitteeMessagesService,
	syncContributionAndProofs services.SyncContributionService,
	aggregateAndProofs services.AggregateAndProofService,
	attestationService services.AttestationService,
	voluntaryExitService services.VoluntaryExitService,
	blsToExecutionChangeService services.BLSToExecutionChangeService,
	proposerSlashingService services.ProposerSlashingService,
	builderClient builder.BuilderClient,
	validatorMonitor monitor.ValidatorMonitor,
	enableMemoizedHeadState bool,
) *ApiHandler

func (*ApiHandler) EventSourceGetV1Events

func (a *ApiHandler) EventSourceGetV1Events(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEth1V1BuilderStatesExpectedWithdrawals

func (a *ApiHandler) GetEth1V1BuilderStatesExpectedWithdrawals(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconBlobSidecars

func (a *ApiHandler) GetEthV1BeaconBlobSidecars(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconBlock

func (a *ApiHandler) GetEthV1BeaconBlock(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconBlockAttestations

func (a *ApiHandler) GetEthV1BeaconBlockAttestations(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconBlockRoot

func (a *ApiHandler) GetEthV1BeaconBlockRoot(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconGenesis

func (a *ApiHandler) GetEthV1BeaconGenesis(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconLightClientBootstrap

func (a *ApiHandler) GetEthV1BeaconLightClientBootstrap(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconLightClientFinalityUpdate

func (a *ApiHandler) GetEthV1BeaconLightClientFinalityUpdate(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconLightClientOptimisticUpdate

func (a *ApiHandler) GetEthV1BeaconLightClientOptimisticUpdate(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconLightClientUpdates

func (a *ApiHandler) GetEthV1BeaconLightClientUpdates(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1BeaconPoolAttestations

func (a *ApiHandler) GetEthV1BeaconPoolAttestations(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconPoolAttesterSlashings

func (a *ApiHandler) GetEthV1BeaconPoolAttesterSlashings(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconPoolBLSExecutionChanges

func (a *ApiHandler) GetEthV1BeaconPoolBLSExecutionChanges(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconPoolProposerSlashings

func (a *ApiHandler) GetEthV1BeaconPoolProposerSlashings(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconPoolVoluntaryExits

func (a *ApiHandler) GetEthV1BeaconPoolVoluntaryExits(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconRewardsBlocks

func (a *ApiHandler) GetEthV1BeaconRewardsBlocks(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconStatesValidator

func (a *ApiHandler) GetEthV1BeaconStatesValidator(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1BeaconStatesValidators

func (a *ApiHandler) GetEthV1BeaconStatesValidators(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1BlindedBlock

func (a *ApiHandler) GetEthV1BlindedBlock(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1DebugBeaconForkChoice

func (a *ApiHandler) GetEthV1DebugBeaconForkChoice(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodeHealth

func (a *ApiHandler) GetEthV1NodeHealth(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodeIdentity

func (a *ApiHandler) GetEthV1NodeIdentity(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodePeerCount

func (a *ApiHandler) GetEthV1NodePeerCount(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodePeerInfos

func (a *ApiHandler) GetEthV1NodePeerInfos(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodePeersInfos

func (a *ApiHandler) GetEthV1NodePeersInfos(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodeSyncing

func (a *ApiHandler) GetEthV1NodeSyncing(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1NodeVersion

func (a *ApiHandler) GetEthV1NodeVersion(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) GetEthV1ValidatorAggregateAttestation

func (a *ApiHandler) GetEthV1ValidatorAggregateAttestation(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1ValidatorAttestationData

func (a *ApiHandler) GetEthV1ValidatorAttestationData(
	w http.ResponseWriter,
	r *http.Request,
) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV1ValidatorSyncCommitteeContribution

func (a *ApiHandler) GetEthV1ValidatorSyncCommitteeContribution(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV2DebugBeaconHeads

func (a *ApiHandler) GetEthV2DebugBeaconHeads(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetEthV3ValidatorBlock

func (a *ApiHandler) GetEthV3ValidatorBlock(
	w http.ResponseWriter,
	r *http.Request,
) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetLighthouseValidatorInclusion

func (a *ApiHandler) GetLighthouseValidatorInclusion(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) GetLighthouseValidatorInclusionGlobal

func (a *ApiHandler) GetLighthouseValidatorInclusionGlobal(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) Init

func (a *ApiHandler) Init()

func (*ApiHandler) PostEthV1BeaconBlocks

func (a *ApiHandler) PostEthV1BeaconBlocks(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) PostEthV1BeaconPoolAttestations

func (a *ApiHandler) PostEthV1BeaconPoolAttestations(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1BeaconPoolAttesterSlashings

func (a *ApiHandler) PostEthV1BeaconPoolAttesterSlashings(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1BeaconPoolBlsToExecutionChanges

func (a *ApiHandler) PostEthV1BeaconPoolBlsToExecutionChanges(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1BeaconPoolProposerSlashings

func (a *ApiHandler) PostEthV1BeaconPoolProposerSlashings(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1BeaconPoolSyncCommittees

func (a *ApiHandler) PostEthV1BeaconPoolSyncCommittees(w http.ResponseWriter, r *http.Request)

PostEthV1BeaconPoolSyncCommittees is a handler for POST /eth/v1/beacon/pool/sync_committees. it receives a list of sync committee messages and adds them to the sync committee pool.

func (*ApiHandler) PostEthV1BeaconPoolVoluntaryExits

func (a *ApiHandler) PostEthV1BeaconPoolVoluntaryExits(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1BeaconRewardsAttestations

func (a *ApiHandler) PostEthV1BeaconRewardsAttestations(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) PostEthV1BeaconRewardsSyncCommittees

func (a *ApiHandler) PostEthV1BeaconRewardsSyncCommittees(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) PostEthV1BeaconStatesValidators

func (a *ApiHandler) PostEthV1BeaconStatesValidators(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1BlindedBlocks

func (a *ApiHandler) PostEthV1BlindedBlocks(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) PostEthV1BuilderRegisterValidator

func (a *ApiHandler) PostEthV1BuilderRegisterValidator(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) PostEthV1ValidatorAggregatesAndProof

func (a *ApiHandler) PostEthV1ValidatorAggregatesAndProof(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1ValidatorBeaconCommitteeSubscription

func (a *ApiHandler) PostEthV1ValidatorBeaconCommitteeSubscription(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1ValidatorContributionsAndProofs

func (a *ApiHandler) PostEthV1ValidatorContributionsAndProofs(w http.ResponseWriter, r *http.Request)

PostEthV1ValidatorContributionsAndProofs is a handler for POST /eth/v1/validator/contributions_and_proofs. it receives a list of signed contributions and proofs and adds them to the sync committee pool.

func (*ApiHandler) PostEthV1ValidatorPrepareBeaconProposal

func (a *ApiHandler) PostEthV1ValidatorPrepareBeaconProposal(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV1ValidatorSyncCommitteeSubscriptions

func (a *ApiHandler) PostEthV1ValidatorSyncCommitteeSubscriptions(w http.ResponseWriter, r *http.Request)

func (*ApiHandler) PostEthV2BeaconBlocks

func (a *ApiHandler) PostEthV2BeaconBlocks(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) PostEthV2BlindedBlocks

func (a *ApiHandler) PostEthV2BlindedBlocks(w http.ResponseWriter, r *http.Request) (*beaconhttp.BeaconResponse, error)

func (*ApiHandler) ServeHTTP

func (a *ApiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type BlobBundle

type BlobBundle struct {
	Commitment common.Bytes48
	Blob       *cltypes.Blob
	KzgProof   common.Bytes48
}

type BlockPublishingValidation

type BlockPublishingValidation string
const (
	BlockPublishingValidationGossip                   BlockPublishingValidation = "gossip"
	BlockPublishingValidationConsensus                BlockPublishingValidation = "consensus"
	BlockPublishingValidationConsensusAndEquivocation BlockPublishingValidation = "consensus_and_equivocation"
)

type IdealReward

type IdealReward struct {
	EffectiveBalance int64 `json:"effective_balance,string"`
	Head             int64 `json:"head,string"`
	Target           int64 `json:"target,string"`
	Source           int64 `json:"source,string"`
	InclusionDelay   int64 `json:"inclusion_delay,string"`
	Inactivity       int64 `json:"inactivity,string"`
}

type LighthouseValidatorInclusion

type LighthouseValidatorInclusion struct {
	IsSlashed                        bool   `json:"is_slashed"`
	IsWithdrawableInCurrentEpoch     bool   `json:"is_withdrawable_in_current_epoch"`
	IsActiveUnslashedInCurrentEpoch  bool   `json:"is_active_unslashed_in_current_epoch"`
	IsActiveUnslashedInPreviousEpoch bool   `json:"is_active_unslashed_in_previous_epoch"`
	CurrentEpochEffectiveBalanceGwei uint64 `json:"current_epoch_effective_balance_gwei"`
	IsCurrentEpochTargetAttester     bool   `json:"is_current_epoch_target_attester"`
	IsPreviousEpochTargetAttester    bool   `json:"is_previous_epoch_target_attester"`
	IsPreviousEpochHeadAttester      bool   `json:"is_previous_epoch_head_attester"`
}

type LighthouseValidatorInclusionGlobal

type LighthouseValidatorInclusionGlobal struct {
	CurrentEpochActiveGwei           uint64 `json:"current_epoch_active_gwei"`
	PreviousEpochActiveGwei          uint64 `json:"previous_epoch_active_gwei"`
	CurrentEpochTargetAttestingGwei  uint64 `json:"current_epoch_target_attesting_gwei"`
	PreviousEpochTargetAttestingGwei uint64 `json:"previous_epoch_target_attesting_gwei"`
	PreviousEpochHeadAttestingGwei   uint64 `json:"previous_epoch_head_attesting_gwei"`
}

type TotalReward

type TotalReward struct {
	ValidatorIndex int64 `json:"validator_index,string"`
	Head           int64 `json:"head,string"`
	Target         int64 `json:"target,string"`
	Source         int64 `json:"source,string"`
	InclusionDelay int64 `json:"inclusion_delay,string"`
	Inactivity     int64 `json:"inactivity,string"`
}

type ValidatorPreparationPayload

type ValidatorPreparationPayload struct {
	ValidatorIndex uint64            `json:"validator_index,string"`
	FeeRecipient   libcommon.Address `json:"fee_recipient"`
}

type ValidatorSyncCommitteeSubscriptionsRequest

type ValidatorSyncCommitteeSubscriptionsRequest struct {
	ValidatorIndex        uint64   `json:"validator_index,string"`
	SyncCommitteeIndicies []string `json:"sync_committee_indices"`
	UntilEpoch            uint64   `json:"until_epoch,string"`

	DEBUG bool `json:"DEBUG,omitempty"`
}

Jump to

Keyboard shortcuts

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