Documentation ¶
Index ¶
- Constants
- Variables
- type Service
- func (s *Service) CommitBlock(ctx context.Context, input *services.CommitBlockInput) (*services.CommitBlockOutput, error)
- func (s *Service) GenerateReceiptProof(ctx context.Context, input *services.GenerateReceiptProofInput) (*services.GenerateReceiptProofOutput, error)
- func (s *Service) GetBlockPair(ctx context.Context, input *services.GetBlockPairInput) (*services.GetBlockPairOutput, error)
- func (s *Service) GetBlockSlice(first primitives.BlockHeight, last primitives.BlockHeight) ([]*protocol.BlockPairContainer, primitives.BlockHeight, primitives.BlockHeight, ...)
- func (s *Service) GetLastCommittedBlockHeight(ctx context.Context, input *services.GetLastCommittedBlockHeightInput) (*services.GetLastCommittedBlockHeightOutput, error)
- func (s *Service) GetResultsBlockHeader(ctx context.Context, input *services.GetResultsBlockHeaderInput) (result *services.GetResultsBlockHeaderOutput, err error)
- func (s *Service) GetTransactionReceipt(ctx context.Context, input *services.GetTransactionReceiptInput) (*services.GetTransactionReceiptOutput, error)
- func (s *Service) GetTransactionsBlockHeader(ctx context.Context, input *services.GetTransactionsBlockHeaderInput) (result *services.GetTransactionsBlockHeaderOutput, err error)
- func (s *Service) HandleBlockAvailabilityRequest(ctx context.Context, input *gossiptopics.BlockAvailabilityRequestInput) (*gossiptopics.EmptyOutput, error)
- func (s *Service) HandleBlockAvailabilityResponse(ctx context.Context, input *gossiptopics.BlockAvailabilityResponseInput) (*gossiptopics.EmptyOutput, error)
- func (s *Service) HandleBlockSyncRequest(ctx context.Context, input *gossiptopics.BlockSyncRequestInput) (*gossiptopics.EmptyOutput, error)
- func (s *Service) HandleBlockSyncResponse(ctx context.Context, input *gossiptopics.BlockSyncResponseInput) (*gossiptopics.EmptyOutput, error)
- func (s *Service) NodeSyncCommitBlock(ctx context.Context, input *services.CommitBlockInput) (*services.CommitBlockOutput, error)
- func (s *Service) RegisterConsensusBlocksHandler(handler handlers.ConsensusBlocksHandler)
- func (s *Service) UpdateConsensusAlgosAboutLastCommittedBlockInLocalPersistence(ctx context.Context)
- func (s *Service) ValidateBlockForCommit(ctx context.Context, input *services.ValidateBlockForCommitInput) (*services.ValidateBlockForCommitOutput, error)
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 (s *Service) CommitBlock(ctx context.Context, input *services.CommitBlockInput) (*services.CommitBlockOutput, error)
func (*Service) GenerateReceiptProof ¶ added in v1.2.1
func (s *Service) GenerateReceiptProof(ctx context.Context, input *services.GenerateReceiptProofInput) (*services.GenerateReceiptProofOutput, error)
func (*Service) GetBlockPair ¶ added in v1.2.1
func (s *Service) GetBlockPair(ctx context.Context, input *services.GetBlockPairInput) (*services.GetBlockPairOutput, error)
func (*Service) GetBlockSlice ¶ added in v1.2.1
func (s *Service) GetBlockSlice(first primitives.BlockHeight, last primitives.BlockHeight) ([]*protocol.BlockPairContainer, primitives.BlockHeight, primitives.BlockHeight, error)
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 (s *Service) GetLastCommittedBlockHeight(ctx context.Context, input *services.GetLastCommittedBlockHeightInput) (*services.GetLastCommittedBlockHeightOutput, error)
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 (s *Service) GetTransactionReceipt(ctx context.Context, input *services.GetTransactionReceiptInput) (*services.GetTransactionReceiptOutput, error)
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
func (s *Service) ValidateBlockForCommit(ctx context.Context, input *services.ValidateBlockForCommitInput) (*services.ValidateBlockForCommitOutput, error)
TODO Implement optimization for full structural validation here (https://github.com/orbs-network/orbs-network-go/issues/684)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.