proposer

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	BeaconDB               db.Database
	HeadFetcher            blockchain.HeadFetcher
	BlockReceiver          blockchain.BlockReceiver
	MockEth1Votes          bool
	ChainStartFetcher      powchain.ChainStartFetcher
	Eth1InfoFetcher        powchain.ChainInfoFetcher
	Eth1BlockFetcher       powchain.POWBlockFetcher
	Pool                   operations.Pool
	CanonicalStateChan     chan *pbp2p.BeaconState
	DepositFetcher         depositcache.DepositFetcher
	PendingDepositsFetcher depositcache.PendingDepositsFetcher
	SyncChecker            sync.Checker
}

Server defines a server implementation of the gRPC Proposer service, providing RPC endpoints for computing state transitions and state roots, proposing beacon blocks to a beacon node, and more.

func (*Server) ProposeBlock

func (ps *Server) ProposeBlock(ctx context.Context, blk *ethpb.BeaconBlock) (*pb.ProposeResponse, error)

ProposeBlock is called by a proposer during its assigned slot to create a block in an attempt to get it processed by the beacon node as the canonical head.

func (*Server) RequestBlock

func (ps *Server) RequestBlock(ctx context.Context, req *pb.BlockRequest) (*ethpb.BeaconBlock, error)

RequestBlock is called by a proposer during its assigned slot to request a block to sign by passing in the slot and the signed randao reveal of the slot.

Jump to

Keyboard shortcuts

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