roothash

package
v0.2012.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 29 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"
)

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)

	// KeyRuntimeID is an ABCI event attribute key for specifying event
	// runtime (value is Base64-encoded runtime ID).
	KeyRuntimeID = []byte("runtime-id")
	// KeyExecutorCommitted is an ABCI event attribute key for executor
	// commit events (value is CBOR-serialized ValueExecutorCommitted).
	KeyExecutorCommitted = []byte("executor-commit")
	// KeyMergeCommitted is an ABCI event attribute key for merge
	// commit events (value is CBOR-serialized ValueMergeCommitted).
	KeyMergeCommitted = []byte("merge-commit")
	// KeyMergeDiscrepancyDetected is an ABCI event attribute key for
	// merge discrepancy detected events (value is a CBOR serialized
	// ValueMergeDiscrepancyDetected).
	KeyMergeDiscrepancyDetected = []byte("merge-discrepancy")
	// KeyExecutionDiscrepancyDetected is an ABCI event attribute key for
	// merge discrepancy detected events (value is a CBOR serialized
	// ValueExecutionDiscrepancyDetected).
	KeyExecutionDiscrepancyDetected = []byte("execution-discrepancy")
	// KeyFinalized is an ABCI event attribute key for finalized blocks
	// (value is a CBOR serialized ValueFinalized).
	KeyFinalized = []byte("finalized")
)

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.

func ValueRuntimeID

func ValueRuntimeID(runtimeID common.Namespace) []byte

ValueRuntimeID returns the value that should be stored under KeyRuntimeID.

Types

type Query

type Query interface {
	LatestBlock(context.Context, common.Namespace) (*block.Block, error)
	GenesisBlock(context.Context, common.Namespace) (*block.Block, error)
	Genesis(context.Context) (*roothash.Genesis, 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.

type ValueExecutionDiscrepancyDetected

type ValueExecutionDiscrepancyDetected struct {
	ID    common.Namespace                           `json:"id"`
	Event roothash.ExecutionDiscrepancyDetectedEvent `json:"event"`
}

ValueExecutionDiscrepancyDetected is the value component of a KeyMergeDiscrepancyDetected.

type ValueExecutorCommitted

type ValueExecutorCommitted struct {
	ID    common.Namespace                `json:"id"`
	Event roothash.ExecutorCommittedEvent `json:"event"`
}

ValueExecutorCommitted is the value component of a KeyExecutorCommitted.

type ValueFinalized

type ValueFinalized struct {
	ID    common.Namespace `json:"id"`
	Round uint64           `json:"round"`
}

ValueFinalized is the value component of a TagFinalized.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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