mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
1edf1f4c87
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
51 lines
2.3 KiB
Go
51 lines
2.3 KiB
Go
// Package beacon defines a gRPC beacon service implementation, providing
|
|
// useful endpoints for checking fetching chain-specific data such as
|
|
// blocks, committees, validators, assignments, and more.
|
|
package beacon
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache"
|
|
blockfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/block"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed/operation"
|
|
statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/slashings"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/powchain"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/sync"
|
|
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
|
|
)
|
|
|
|
// Server defines a server implementation of the gRPC Beacon Chain service,
|
|
// providing RPC endpoints to access data relevant to the Ethereum beacon chain.
|
|
type Server struct {
|
|
BeaconDB db.ReadOnlyDatabase
|
|
Ctx context.Context
|
|
ChainStartFetcher powchain.ChainStartFetcher
|
|
HeadFetcher blockchain.HeadFetcher
|
|
CanonicalFetcher blockchain.CanonicalFetcher
|
|
FinalizationFetcher blockchain.FinalizationFetcher
|
|
DepositFetcher depositcache.DepositFetcher
|
|
BlockFetcher powchain.POWBlockFetcher
|
|
GenesisTimeFetcher blockchain.TimeFetcher
|
|
StateNotifier statefeed.Notifier
|
|
BlockNotifier blockfeed.Notifier
|
|
AttestationNotifier operation.Notifier
|
|
Broadcaster p2p.Broadcaster
|
|
AttestationsPool attestations.Pool
|
|
SlashingsPool slashings.PoolManager
|
|
CanonicalStateChan chan *pbp2p.BeaconState
|
|
ChainStartChan chan time.Time
|
|
ReceivedAttestationsBuffer chan *ethpb.Attestation
|
|
CollectedAttestationsBuffer chan []*ethpb.Attestation
|
|
StateGen stategen.StateManager
|
|
SyncChecker sync.Checker
|
|
}
|