2021-07-22 17:13:18 +00:00
|
|
|
// Package beacon defines a gRPC beacon service implementation,
|
2021-08-19 18:00:57 +00:00
|
|
|
// following the official API standards https://ethereum.github.io/beacon-apis/#/.
|
2020-10-05 00:15:27 +00:00
|
|
|
// This package includes the beacon and config endpoints.
|
2021-07-02 15:54:52 +00:00
|
|
|
package beacon
|
2020-10-05 00:15:27 +00:00
|
|
|
|
|
|
|
import (
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/blockchain"
|
|
|
|
blockfeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/block"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/operation"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/db"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/execution"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/operations/attestations"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/operations/slashings"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/operations/voluntaryexits"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/p2p"
|
|
|
|
v1alpha1validator "github.com/prysmaticlabs/prysm/v3/beacon-chain/rpc/prysm/v1alpha1/validator"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/rpc/statefetcher"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/state/stategen"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/beacon-chain/sync"
|
2020-10-05 00:15:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Server defines a server implementation of the gRPC Beacon Chain service,
|
2021-06-26 19:00:33 +00:00
|
|
|
// providing RPC endpoints to access data relevant to the Ethereum Beacon Chain.
|
2020-10-05 00:15:27 +00:00
|
|
|
type Server struct {
|
2022-07-13 17:18:30 +00:00
|
|
|
BeaconDB db.ReadOnlyDatabase
|
|
|
|
ChainInfoFetcher blockchain.ChainInfoFetcher
|
|
|
|
GenesisTimeFetcher blockchain.TimeFetcher
|
|
|
|
BlockReceiver blockchain.BlockReceiver
|
|
|
|
BlockNotifier blockfeed.Notifier
|
|
|
|
OperationNotifier operation.Notifier
|
|
|
|
Broadcaster p2p.Broadcaster
|
|
|
|
AttestationsPool attestations.Pool
|
|
|
|
SlashingsPool slashings.PoolManager
|
|
|
|
VoluntaryExitsPool voluntaryexits.PoolManager
|
|
|
|
StateGenService stategen.StateManager
|
|
|
|
StateFetcher statefetcher.Fetcher
|
|
|
|
HeadFetcher blockchain.HeadFetcher
|
|
|
|
OptimisticModeFetcher blockchain.OptimisticModeFetcher
|
|
|
|
V1Alpha1ValidatorServer *v1alpha1validator.Server
|
|
|
|
SyncChecker sync.Checker
|
|
|
|
CanonicalHistory *stategen.CanonicalHistory
|
|
|
|
HeadUpdater blockchain.HeadUpdater
|
2022-08-01 14:43:47 +00:00
|
|
|
ExecutionPayloadReconstructor execution.ExecutionPayloadReconstructor
|
2020-10-05 00:15:27 +00:00
|
|
|
}
|