abci

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoVersionFound = errors.New("no version found")

ErrNoVersionFound is returned when no remote version is found for a given app version.

Functions

This section is empty.

Types

type ABCIClientVersion

type ABCIClientVersion int
const (
	ABCIClientVersion1 ABCIClientVersion = iota
	ABCIClientVersion2
)

func (ABCIClientVersion) String

func (v ABCIClientVersion) String() string

type Multiplexer

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

Multiplexer is responsible for managing multiple versions of applications and coordinating their lifecycle. It handles version switching between embedded and native applications. It manages configuration, connection setup, and cleanup functions for all associated services and resources.

func NewMultiplexer

func NewMultiplexer(svrCtx *server.Context, svrCfg serverconfig.Config, clientCtx client.Context, appCreator servertypes.AppCreator, versions Versions, chainID string, applicationVersion uint64) (*Multiplexer, error)

NewMultiplexer creates a new Multiplexer.

func (*Multiplexer) ApplySnapshotChunk

func (*Multiplexer) CheckTx

func (*Multiplexer) Cleanup

func (m *Multiplexer) Cleanup() error

Cleanup allows proper multiplexer termination.

func (*Multiplexer) Commit

func (*Multiplexer) ExtendVote

func (*Multiplexer) FinalizeBlock

func (*Multiplexer) Info

func (*Multiplexer) InitChain

func (*Multiplexer) ListSnapshots

func (*Multiplexer) LoadSnapshotChunk

func (*Multiplexer) OfferSnapshot

func (*Multiplexer) PrepareProposal

func (*Multiplexer) ProcessProposal

func (*Multiplexer) Query

func (*Multiplexer) Start

func (m *Multiplexer) Start() error

type RemoteABCIClientV1

type RemoteABCIClientV1 struct {
	abciv1.ABCIApplicationClient
	// contains filtered or unexported fields
}

func NewRemoteABCIClientV1

func NewRemoteABCIClientV1(conn *grpc.ClientConn, chainID string) *RemoteABCIClientV1

NewRemoteABCIClientV1 returns a new ABCI Client (using ABCI v1). The client behaves like Tendermint for the server side (the application side).

func (*RemoteABCIClientV1) ApplySnapshotChunk

ApplySnapshotChunk implements abciv2.ABCI

func (*RemoteABCIClientV1) CheckTx

CheckTx implements abciv2.ABCI

func (*RemoteABCIClientV1) Commit

Commit implements abciv2.ABCI

func (*RemoteABCIClientV1) ExtendVote

ExtendVote implements abciv2.ABCI

func (*RemoteABCIClientV1) FinalizeBlock

FinalizeBlock implements abciv2.ABCI

func (*RemoteABCIClientV1) Info

Info implements abciv2.ABCI

func (*RemoteABCIClientV1) InitChain

InitChain implements abciv2.ABCI

func (*RemoteABCIClientV1) ListSnapshots

ListSnapshots implements abciv2.ABCI

func (*RemoteABCIClientV1) LoadSnapshotChunk

LoadSnapshotChunk implements abciv2.ABCI

func (*RemoteABCIClientV1) OfferSnapshot

OfferSnapshot implements abciv2.ABCI

func (*RemoteABCIClientV1) PrepareProposal

PrepareProposal implements abciv2.ABCI

func (*RemoteABCIClientV1) ProcessProposal

ProcessProposal implements abciv2.ABCI

func (*RemoteABCIClientV1) Query

Query implements abciv2.ABCI

func (*RemoteABCIClientV1) VerifyVoteExtension

VerifyVoteExtension implements abciv2.ABCI

type RemoteABCIClientV2

type RemoteABCIClientV2 struct {
	abci.ABCIClient
}

func NewRemoteABCIClientV2

func NewRemoteABCIClientV2(conn *grpc.ClientConn) *RemoteABCIClientV2

NewRemoteABCIClientV2 returns a new ABCI Client (using ABCI v2). The client behaves like CometBFT for the server side (the application side).

func (*RemoteABCIClientV2) ApplySnapshotChunk

ApplySnapshotChunk implements abci.ABCI.

func (*RemoteABCIClientV2) CheckTx

CheckTx implements abci.ABCI.

func (*RemoteABCIClientV2) Commit

func (a *RemoteABCIClientV2) Commit() (*abci.ResponseCommit, error)

Commit implements abci.ABCI.

func (*RemoteABCIClientV2) ExtendVote

ExtendVote implements abci.ABCI.

func (*RemoteABCIClientV2) FinalizeBlock

FinalizeBlock implements abci.ABCI.

func (*RemoteABCIClientV2) Info

Info implements abci.ABCI.

func (*RemoteABCIClientV2) InitChain

InitChain implements abci.ABCI.

func (*RemoteABCIClientV2) ListSnapshots

ListSnapshots implements abci.ABCI.

func (*RemoteABCIClientV2) LoadSnapshotChunk

LoadSnapshotChunk implements abci.ABCI.

func (*RemoteABCIClientV2) OfferSnapshot

OfferSnapshot implements abci.ABCI.

func (*RemoteABCIClientV2) PrepareProposal

PrepareProposal implements abci.ABCI.

func (*RemoteABCIClientV2) ProcessProposal

ProcessProposal implements abci.ABCI.

func (*RemoteABCIClientV2) Query

Query implements abci.ABCI.

func (*RemoteABCIClientV2) VerifyVoteExtension

VerifyVoteExtension implements abci.ABCI.

type Version

type Version struct {
	AppVersion  uint64
	ABCIVersion ABCIClientVersion
	Appd        *appd.Appd
	PreHandlers []string // Commands to run before starting the app
	StartArgs   []string // Extra arguments to pass to the app
}

Version defines the configuration for remote apps.

func (Version) GetStartArgs

func (v Version) GetStartArgs(args []string) []string

GetStartArgs returns the appropriate args.

type Versions

type Versions []Version

func NewVersions

func NewVersions(v ...Version) (Versions, error)

NewVersions returns a list of versions sorted by app version.

func (Versions) GetForAppVersion

func (v Versions) GetForAppVersion(appVersion uint64) (Version, error)

GetForAppVersion returns the version for a given appVersion. if the app version specified is lower than the minimum app version, return the lowest version.

func (Versions) ShouldUseLatestApp

func (v Versions) ShouldUseLatestApp(appVersion uint64) bool

ShouldUseLatestApp returns true if there is no version found with the given appVersion.

func (Versions) Sorted

func (v Versions) Sorted() Versions

Sorted returns a sorted slice of Versions, sorted by AppVersion (ascending).

func (Versions) Validate

func (v Versions) Validate() error

Validate checks for duplicate app versions in a slice of Versions.

Jump to

Keyboard shortcuts

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