methods

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 8 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(common.Goodbye) }, 8, 8),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(common.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(common.MetaData) }, common.MetadataByteLen, common.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(common.Ping) }, 8, 8),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(common.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(common.Status) }, common.StatusByteLen, common.StatusByteLen),
	ResponseChunkCodec:        reqresp.NewSSZCodec(func() reqresp.SerDes { return new(common.Status) }, common.StatusByteLen, common.StatusByteLen),
	DefaultResponseChunkCount: 1,
}

Functions

func BlocksByRangeRPCv1

func BlocksByRangeRPCv1(spec *common.Spec, opcBlock beacon.OpaqueBlock) *reqresp.RPCMethod

func BlocksByRootRPCv1

func BlocksByRootRPCv1(spec *common.Spec, opcBlock beacon.OpaqueBlock) *reqresp.RPCMethod

Types

type BLSSignature

type BLSSignature = common.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

func (d BlocksByRangeReqV1) ByteLength() uint64

func (*BlocksByRangeReqV1) Data

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

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) Root

func (*BlocksByRangeReqV1) Serialize

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

func (*BlocksByRangeReqV1) String

func (r *BlocksByRangeReqV1) String() string

type BlocksByRootReq

type BlocksByRootReq []Root

func (BlocksByRootReq) ByteLength

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

func (BlocksByRootReq) Data

func (r BlocksByRootReq) Data() []string

func (*BlocksByRootReq) Deserialize

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

func (*BlocksByRootReq) FixedLength

func (a *BlocksByRootReq) FixedLength() uint64

func (BlocksByRootReq) Serialize

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

func (BlocksByRootReq) String

func (r BlocksByRootReq) String() string

type Epoch

type Epoch = common.Epoch

type ForkDigest

type ForkDigest = common.ForkDigest

type ForkVersion

type ForkVersion = common.Version

type Root

type Root = common.Root

type SignedBeaconBlock

type SignedBeaconBlock struct {
	Message   BeaconBlock
	Signature BLSSignature
}

type Slot

type Slot = common.Slot

type ValidatorIndex

type ValidatorIndex = common.ValidatorIndex

Jump to

Keyboard shortcuts

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