methods

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_REQUEST_BLOCKS_BY_ROOT = 1024

Variables

View Source
var BlocksByRangeRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/beacon_blocks_by_range/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec((*BlocksByRangeReqV1)(nil)),
	ResponseChunkCodec:        reqresp.NewSSZCodec((*SignedBeaconBlock)(nil)),
	DefaultResponseChunkCount: 20,
}
View Source
var BlocksByRootRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/beacon_blocks_by_root/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec((*BlocksByRootReq)(nil)),
	ResponseChunkCodec:        reqresp.NewSSZCodec((*SignedBeaconBlock)(nil)),
	DefaultResponseChunkCount: 20,
}
View Source
var GoodbyeRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/goodbye/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec((*Goodbye)(nil)),
	ResponseChunkCodec:        reqresp.NewSSZCodec((*Goodbye)(nil)),
	DefaultResponseChunkCount: 0,
}
View Source
var MetaDataRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/metadata/1/ssz",
	RequestCodec:              (*reqresp.SSZCodec)(nil),
	ResponseChunkCodec:        reqresp.NewSSZCodec((*MetaData)(nil)),
	DefaultResponseChunkCount: 1,
}
View Source
var MetaDataSSZ = zssz.GetSSZ((*MetaData)(nil))
View Source
var PingRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/ping/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec((*Ping)(nil)),
	ResponseChunkCodec:        reqresp.NewSSZCodec((*Pong)(nil)),
	DefaultResponseChunkCount: 1,
}
View Source
var StatusRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/status/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec((*Status)(nil)),
	ResponseChunkCodec:        reqresp.NewSSZCodec((*Status)(nil)),
	DefaultResponseChunkCount: 1,
}
View Source
var StatusSSZ = zssz.GetSSZ((*Status)(nil))

Functions

This section is empty.

Types

type BLSSignature

type BLSSignature = beacon.BLSSignature

type BeaconBlock

type BeaconBlock struct {
	Slot          Slot
	ProposerIndex ValidatorIndex
	ParentRoot    Root
	StateRoot     Root
	Body          BeaconBlockBodyRaw
}

type BeaconBlockBodyRaw

type BeaconBlockBodyRaw []byte

instead of parsing the whole body, we can just leave it as bytes.

func (*BeaconBlockBodyRaw) Limit

func (b *BeaconBlockBodyRaw) Limit() uint64

type BlocksByRangeReqV1

type BlocksByRangeReqV1 struct {
	StartSlot Slot
	Count     uint64
	Step      uint64
}

func (*BlocksByRangeReqV1) Data

func (r *BlocksByRangeReqV1) Data() map[string]interface{}

func (*BlocksByRangeReqV1) String

func (r *BlocksByRangeReqV1) String() string

type BlocksByRootReq

type BlocksByRootReq []Root

func (BlocksByRootReq) Data

func (r BlocksByRootReq) Data() []string

func (*BlocksByRootReq) Limit

func (*BlocksByRootReq) Limit() uint64

func (BlocksByRootReq) String

func (r BlocksByRootReq) String() string

type Epoch

type Epoch = beacon.Epoch

type ForkDigest

type ForkDigest = beacon.ForkDigest

type ForkVersion

type ForkVersion = beacon.Version

type Goodbye

type Goodbye uint64

func (Goodbye) String

func (r Goodbye) String() string

type MetaData

type MetaData struct {
	SeqNumber SeqNr            `json:"seq_number"`
	Attnets   types.AttnetBits `json:"attnets"`
}

func (*MetaData) Data

func (m *MetaData) Data() map[string]interface{}

func (*MetaData) String

func (m *MetaData) String() string

type Ping

type Ping SeqNr

func (Ping) String

func (r Ping) String() string

type Pong

type Pong SeqNr

func (Pong) String

func (r Pong) String() string

type Root

type Root = beacon.Root

type SeqNr

type SeqNr uint64

func (SeqNr) String

func (r SeqNr) String() string

type SignedBeaconBlock

type SignedBeaconBlock struct {
	Message   BeaconBlock
	Signature BLSSignature
}

type Slot

type Slot = beacon.Slot

type Status

type Status struct {
	ForkDigest     ForkDigest `json:"fork_digest"`
	FinalizedRoot  Root       `json:"finalized_root"`
	FinalizedEpoch Epoch      `json:"finalized_epoch"`
	HeadRoot       Root       `json:"head_root"`
	HeadSlot       Slot       `json:"head_slot"`
}

func (*Status) Data

func (s *Status) Data() map[string]interface{}

func (*Status) String

func (s *Status) String() string

type ValidatorIndex

type ValidatorIndex = beacon.ValidatorIndex

Jump to

Keyboard shortcuts

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