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 (
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
|
|
|
blockfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/block"
|
2021-08-05 08:01:20 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed/operation"
|
2020-10-05 00:15:27 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/slashings"
|
2021-02-24 15:29:25 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/voluntaryexits"
|
2020-10-05 00:15:27 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
2021-09-02 16:54:53 +00:00
|
|
|
v1alpha1validator "github.com/prysmaticlabs/prysm/beacon-chain/rpc/prysm/v1alpha1/validator"
|
2021-03-22 15:19:38 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/rpc/statefetcher"
|
2020-10-05 00:15:27 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 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 {
|
2021-09-02 16:54:53 +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
|
|
|
|
V1Alpha1ValidatorServer *v1alpha1validator.Server
|
2020-10-05 00:15:27 +00:00
|
|
|
}
|