block

package
v0.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	// contains filtered or unexported fields
}

Block represents the entirety of a Block in the Celestia network. It contains the erasure coded block data as well as its ExtendedHeader.

func (*Block) Commit

func (b *Block) Commit() *core.Commit

Commit returns the commit of the Block.

func (*Block) Data

func (b *Block) Data() *ExtendedBlockData

Data returns the erasure coded data of the Block.

func (*Block) DataSize

func (b *Block) DataSize() uint

DataSize returns the width of the ExtendedBlockData.

func (*Block) Header

func (b *Block) Header() *header.ExtendedHeader

Header returns the ExtendedHeader of the Block.

type ExtendedBlockData

type ExtendedBlockData = rsmt2d.ExtendedDataSquare

ExtendedBlockData is an alias to rsmt2d's ExtendedDataSquare type.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service represents the Block service that can be started / stopped on a `Full` node. Its main function is to reconstruct full blocks from shares.

func NewBlockService

func NewBlockService(store ipld.DAGService) *Service

NewBlockService creates a new instance of block Service.

func (*Service) GetBlockData

func (s *Service) GetBlockData(ctx context.Context, dah *da.DataAvailabilityHeader) (*ExtendedBlockData, error)

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Start starts the block Service.

func (*Service) Stop

func (s *Service) Stop(ctx context.Context) error

Stop stops the block Service.

func (*Service) StoreBlockData

func (s *Service) StoreBlockData(ctx context.Context, data *ExtendedBlockData) error

Jump to

Keyboard shortcuts

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