blockstorage

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolVersion = primitives.ProtocolVersion(1)
)

Variables

View Source
var LogTag = log.Service("block-storage")

Functions

This section is empty.

Types

type Service added in v1.2.1

type Service struct {
	govnr.TreeSupervisor
	// contains filtered or unexported fields
}

func NewBlockStorage

func NewBlockStorage(ctx context.Context, config config.BlockStorageConfig, persistence adapter.BlockPersistence, gossip gossiptopics.BlockSync,
	parentLogger log.Logger, metricFactory metric.Factory, blockPairReceivers []servicesync.BlockPairCommitter) *Service

func (*Service) CommitBlock added in v1.2.1

func (*Service) GenerateReceiptProof added in v1.2.1

func (*Service) GetBlockPair added in v1.2.1

func (*Service) GetBlockSlice added in v1.2.1

Returns a slice of blocks containing first and last TODO kill this method signature or use a larger page size without returning too many blocks

func (*Service) GetLastCommittedBlockHeight added in v1.2.1

func (*Service) GetResultsBlockHeader added in v1.2.1

func (s *Service) GetResultsBlockHeader(ctx context.Context, input *services.GetResultsBlockHeaderInput) (result *services.GetResultsBlockHeaderOutput, err error)

func (*Service) GetTransactionReceipt added in v1.2.1

func (*Service) GetTransactionsBlockHeader added in v1.2.1

func (s *Service) GetTransactionsBlockHeader(ctx context.Context, input *services.GetTransactionsBlockHeaderInput) (result *services.GetTransactionsBlockHeaderOutput, err error)

func (*Service) HandleBlockAvailabilityRequest added in v1.2.1

func (s *Service) HandleBlockAvailabilityRequest(ctx context.Context, input *gossiptopics.BlockAvailabilityRequestInput) (*gossiptopics.EmptyOutput, error)

func (*Service) HandleBlockAvailabilityResponse added in v1.2.1

func (s *Service) HandleBlockAvailabilityResponse(ctx context.Context, input *gossiptopics.BlockAvailabilityResponseInput) (*gossiptopics.EmptyOutput, error)

func (*Service) HandleBlockSyncRequest added in v1.2.1

func (s *Service) HandleBlockSyncRequest(ctx context.Context, input *gossiptopics.BlockSyncRequestInput) (*gossiptopics.EmptyOutput, error)

func (*Service) HandleBlockSyncResponse added in v1.2.1

func (s *Service) HandleBlockSyncResponse(ctx context.Context, input *gossiptopics.BlockSyncResponseInput) (*gossiptopics.EmptyOutput, error)

func (*Service) NodeSyncCommitBlock added in v1.2.1

func (s *Service) NodeSyncCommitBlock(ctx context.Context, input *services.CommitBlockInput) (*services.CommitBlockOutput, error)

func (*Service) RegisterConsensusBlocksHandler added in v1.2.1

func (s *Service) RegisterConsensusBlocksHandler(handler handlers.ConsensusBlocksHandler)

func (*Service) UpdateConsensusAlgosAboutLastCommittedBlockInLocalPersistence added in v1.2.1

func (s *Service) UpdateConsensusAlgosAboutLastCommittedBlockInLocalPersistence(ctx context.Context)

TODO(v1): this function should return an error

func (*Service) ValidateBlockForCommit added in v1.2.1

TODO Implement optimization for full structural validation here (https://github.com/orbs-network/orbs-network-go/issues/684)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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