methods

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_REQUEST_BLOCKS_BY_ROOT = 1024

Variables

View Source
var GoodbyeRPCv1 = reqresp.Method{
	Protocol:         "/eth2/beacon_chain/req/goodbye/1/ssz_snappy",
	RequestMinMax:    reqresp.MinMaxSize{Min: 8, Max: 8},
	Compression:      reqresp.SnappyCompression{},
	ReadContextBytes: NoContext(reqresp.MinMaxSize{Min: 8, Max: 8}),
}
View Source
var MetaDataRPCv1 = reqresp.Method{
	Protocol:         "/eth2/beacon_chain/req/metadata/1/ssz_snappy",
	RequestMinMax:    reqresp.MinMaxSize{0, 0},
	Compression:      reqresp.SnappyCompression{},
	ReadContextBytes: NoContext(reqresp.MinMaxSize{Min: common.MetadataByteLen, Max: common.MetadataByteLen}),
}
View Source
var PingRPCv1 = reqresp.Method{
	Protocol:         "/eth2/beacon_chain/req/ping/1/ssz_snappy",
	RequestMinMax:    reqresp.MinMaxSize{Min: 8, Max: 8},
	Compression:      reqresp.SnappyCompression{},
	ReadContextBytes: NoContext(reqresp.MinMaxSize{Min: 8, Max: 8}),
}
View Source
var StatusRPCv1 = reqresp.Method{
	Protocol:         "/eth2/beacon_chain/req/status/1/ssz_snappy",
	RequestMinMax:    reqresp.MinMaxSize{Min: common.StatusByteLen, Max: common.StatusByteLen},
	Compression:      reqresp.SnappyCompression{},
	ReadContextBytes: NoContext(reqresp.MinMaxSize{Min: common.StatusByteLen, Max: common.StatusByteLen}),
}

Functions

func BlocksByRangeRPCv1

func BlocksByRangeRPCv1(spec *common.Spec) *reqresp.Method

func BlocksByRangeRPCv2

func BlocksByRangeRPCv2(spec *common.Spec, blocksMinMax map[common.ForkDigest]reqresp.MinMaxSize) *reqresp.Method

func BlocksByRootRPCv1

func BlocksByRootRPCv1(spec *common.Spec) *reqresp.Method

func BlocksByRootRPCv2

func BlocksByRootRPCv2(spec *common.Spec, blocksMinMax map[common.ForkDigest]reqresp.MinMaxSize) *reqresp.Method

func BlocksContext

func BlocksContext(blocksMinMax map[common.ForkDigest]reqresp.MinMaxSize) reqresp.ReadContextFn

func NoContext

func NoContext(minMaxSize reqresp.MinMaxSize) reqresp.ReadContextFn

Types

type BlocksByRangeReqV1

type BlocksByRangeReqV1 struct {
	StartSlot common.Slot
	Count     view.Uint64View
	Step      view.Uint64View
}

func (BlocksByRangeReqV1) ByteLength

func (d BlocksByRangeReqV1) ByteLength() uint64

func (*BlocksByRangeReqV1) Deserialize

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

func (*BlocksByRangeReqV1) FixedLength

func (*BlocksByRangeReqV1) FixedLength() uint64

func (*BlocksByRangeReqV1) HashTreeRoot

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

func (*BlocksByRangeReqV1) Serialize

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

func (*BlocksByRangeReqV1) String

func (r *BlocksByRangeReqV1) String() string

type BlocksByRootReqV1

type BlocksByRootReqV1 []common.Root

func (BlocksByRootReqV1) ByteLength

func (a BlocksByRootReqV1) ByteLength() (out uint64)

func (BlocksByRootReqV1) Data

func (r BlocksByRootReqV1) Data() []string

func (*BlocksByRootReqV1) Deserialize

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

func (*BlocksByRootReqV1) FixedLength

func (a *BlocksByRootReqV1) FixedLength() uint64

func (BlocksByRootReqV1) Serialize

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

func (BlocksByRootReqV1) String

func (r BlocksByRootReqV1) String() string

Jump to

Keyboard shortcuts

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