methods

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_REQUEST_BLOCKS_BY_ROOT = 1024

Variables

View Source
var GoodbyeRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/goodbye/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.Goodbye) }, 8, 8),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.Goodbye) }, 8, 8),
	DefaultResponseChunkCount: 0,
}
View Source
var MetaDataRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/metadata/1/ssz",
	RequestCodec:              (*reqresp.SSZCodec)(nil),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.MetaData) }, beacon.MetadataByteLen, beacon.MetadataByteLen),
	DefaultResponseChunkCount: 1,
}
View Source
var PingRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/ping/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.Ping) }, 8, 8),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.Ping) }, 8, 8),
	DefaultResponseChunkCount: 1,
}
View Source
var StatusRPCv1 = reqresp.RPCMethod{
	Protocol:                  "/eth2/beacon_chain/req/status/1/ssz",
	RequestCodec:              reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.Status) }, beacon.StatusByteLen, beacon.StatusByteLen),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(beacon.Status) }, beacon.StatusByteLen, beacon.StatusByteLen),
	DefaultResponseChunkCount: 1,
}

Functions

func BlocksByRangeRPCv1

func BlocksByRangeRPCv1(spec *beacon.Spec) *reqresp.RPCMethod

func BlocksByRootRPCv1

func BlocksByRootRPCv1(spec *beacon.Spec) *reqresp.RPCMethod

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     view.Uint64View
	Step      view.Uint64View
}

func (BlocksByRangeReqV1) ByteLength added in v0.3.0

func (d BlocksByRangeReqV1) ByteLength() uint64

func (*BlocksByRangeReqV1) Data

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

func (*BlocksByRangeReqV1) Deserialize added in v0.3.0

func (d *BlocksByRangeReqV1) Deserialize(dr *codec.DecodingReader) error

func (*BlocksByRangeReqV1) FixedLength added in v0.3.0

func (*BlocksByRangeReqV1) FixedLength() uint64

func (*BlocksByRangeReqV1) HashTreeRoot added in v0.3.0

func (d *BlocksByRangeReqV1) HashTreeRoot(hFn tree.HashFn) Root

func (*BlocksByRangeReqV1) Serialize added in v0.3.0

func (d *BlocksByRangeReqV1) Serialize(w *codec.EncodingWriter) error

func (*BlocksByRangeReqV1) String

func (r *BlocksByRangeReqV1) String() string

type BlocksByRootReq

type BlocksByRootReq []Root

func (BlocksByRootReq) ByteLength added in v0.3.0

func (a BlocksByRootReq) ByteLength() (out uint64)

func (BlocksByRootReq) Data

func (r BlocksByRootReq) Data() []string

func (*BlocksByRootReq) Deserialize added in v0.3.0

func (a *BlocksByRootReq) Deserialize(dr *codec.DecodingReader) error

func (*BlocksByRootReq) FixedLength added in v0.3.0

func (a *BlocksByRootReq) FixedLength() uint64

func (BlocksByRootReq) Serialize added in v0.3.0

func (a BlocksByRootReq) Serialize(w *codec.EncodingWriter) error

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 Root

type Root = beacon.Root

type SignedBeaconBlock

type SignedBeaconBlock struct {
	Message   BeaconBlock
	Signature BLSSignature
}

type Slot

type Slot = beacon.Slot

type ValidatorIndex

type ValidatorIndex = beacon.ValidatorIndex

Jump to

Keyboard shortcuts

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