roothash

package
v0.2202.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package roothash implements the roothash application.

Index

Constants

View Source
const (
	// AppID is the unique application identifier.
	AppID uint8 = 0x02

	// AppName is the ABCI application name.
	AppName string = "999_roothash"

	// AppPriority is the base priority for the app's transactions.
	AppPriority int64 = 15000
)

Variables

View Source
var (
	// EventType is the ABCI event type for roothash events.
	EventType = api.EventTypeForApp(AppName)

	// QueryApp is a query for filtering transactions processed by the
	// roothash application.
	QueryApp = api.QueryForApp(AppName)
)

Functions

func New

func New() tmapi.Application

New constructs a new roothash application instance.

func QueryForRuntime

func QueryForRuntime(runtimeID common.Namespace) tmpubsub.Query

QueryForRuntime returns a query for filtering transactions processed by the roothash application limited to a specific runtime.

Types

type Query

type Query interface {
	LatestBlock(context.Context, common.Namespace) (*block.Block, error)
	GenesisBlock(context.Context, common.Namespace) (*block.Block, error)
	RuntimeState(context.Context, common.Namespace) (*roothash.RuntimeState, error)
	LastRoundResults(context.Context, common.Namespace) (*roothash.RoundResults, error)
	IncomingMessageQueueMeta(context.Context, common.Namespace) (*message.IncomingMessageQueueMeta, error)
	IncomingMessageQueue(ctx context.Context, id common.Namespace, offset uint64, limit uint32) ([]*message.IncomingMessage, error)
	Genesis(context.Context) (*roothash.Genesis, error)
	ConsensusParameters(context.Context) (*roothash.ConsensusParameters, error)
}

Query is the roothash query interface.

type QueryFactory

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

QueryFactory is the roothash query factory.

func NewQueryFactory

func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory

NewQueryFactory returns a new QueryFactory backed by the given state instance.

func (*QueryFactory) QueryAt

func (sf *QueryFactory) QueryAt(ctx context.Context, height int64) (Query, error)

QueryAt returns the roothash query interface for a specific height.

Directories

Path Synopsis
Package api defines the roothash application API for other applications.
Package api defines the roothash application API for other applications.

Jump to

Keyboard shortcuts

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