types

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 2,354

Documentation

Index

Constants

View Source
const (
	CodeTypeOK uint32 = 0
)

Variables

This section is empty.

Functions

func MarshalTxResults added in v0.38.0

func MarshalTxResults(r []*ExecTxResult) ([][]byte, error)

MarshalTxResults encodes the TxResults as a list of byte slices. It strips off the non-deterministic pieces of the TxResults so that the resulting data can be used for hash comparisons and used in Merkle proofs.

func ReadMessage

func ReadMessage(r io.Reader, msg proto.Message) error

ReadMessage reads a varint length-delimited protobuf message.

func RegisterABCIServer added in v0.38.0

func RegisterABCIServer(s grpc.Server, srv ABCIServiceServer)

func WriteMessage

func WriteMessage(msg proto.Message, w io.Writer) error

WriteMessage writes a varint length-delimited protobuf message.

Types

type ABCIServiceClient

type ABCIServiceClient = v1.ABCIServiceClient

func NewABCIClient added in v0.38.0

func NewABCIClient(cc grpc.ClientConn) ABCIServiceClient

type ABCIServiceServer

type ABCIServiceServer = v1.ABCIServiceServer

type Application

type Application interface {
	// Info/Query Connection
	Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error)    // Return application info
	Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error) // Query for state

	// Mempool Connection
	CheckTx(ctx context.Context, req *CheckTxRequest) (*CheckTxResponse, error) // Validate a tx for the mempool

	// Consensus Connection
	InitChain(ctx context.Context, req *InitChainRequest) (*InitChainResponse, error) // Initialize blockchain w validators/other info from CometBFT
	PrepareProposal(ctx context.Context, req *PrepareProposalRequest) (*PrepareProposalResponse, error)
	ProcessProposal(ctx context.Context, req *ProcessProposalRequest) (*ProcessProposalResponse, error)
	// Deliver the decided block with its txs to the Application
	FinalizeBlock(ctx context.Context, req *FinalizeBlockRequest) (*FinalizeBlockResponse, error)
	// Create application specific vote extension
	ExtendVote(ctx context.Context, req *ExtendVoteRequest) (*ExtendVoteResponse, error)
	// Verify application's vote extension data
	VerifyVoteExtension(ctx context.Context, req *VerifyVoteExtensionRequest) (*VerifyVoteExtensionResponse, error)
	// Commit the state and return the application Merkle root hash
	Commit(ctx context.Context, req *CommitRequest) (*CommitResponse, error)

	// State Sync Connection
	ListSnapshots(ctx context.Context, req *ListSnapshotsRequest) (*ListSnapshotsResponse, error)                // List available snapshots
	OfferSnapshot(ctx context.Context, req *OfferSnapshotRequest) (*OfferSnapshotResponse, error)                // Offer a snapshot to the application
	LoadSnapshotChunk(ctx context.Context, req *LoadSnapshotChunkRequest) (*LoadSnapshotChunkResponse, error)    // Load a snapshot chunk
	ApplySnapshotChunk(ctx context.Context, req *ApplySnapshotChunkRequest) (*ApplySnapshotChunkResponse, error) // Apply a snapshot chunk
}

Application is an interface that enables any finite, deterministic state machine to be driven by a blockchain-based replication engine via the ABCI.

type ApplySnapshotChunkRequest

type ApplySnapshotChunkRequest = v1.ApplySnapshotChunkRequest

type ApplySnapshotChunkResponse

type ApplySnapshotChunkResponse = v1.ApplySnapshotChunkResponse

type ApplySnapshotChunkResult

type ApplySnapshotChunkResult = v1.ApplySnapshotChunkResult
const (
	APPLY_SNAPSHOT_CHUNK_RESULT_UNKNOWN         ApplySnapshotChunkResult = v1.APPLY_SNAPSHOT_CHUNK_RESULT_UNKNOWN
	APPLY_SNAPSHOT_CHUNK_RESULT_ACCEPT          ApplySnapshotChunkResult = v1.APPLY_SNAPSHOT_CHUNK_RESULT_ACCEPT
	APPLY_SNAPSHOT_CHUNK_RESULT_ABORT           ApplySnapshotChunkResult = v1.APPLY_SNAPSHOT_CHUNK_RESULT_ABORT
	APPLY_SNAPSHOT_CHUNK_RESULT_RETRY           ApplySnapshotChunkResult = v1.APPLY_SNAPSHOT_CHUNK_RESULT_RETRY
	APPLY_SNAPSHOT_CHUNK_RESULT_RETRY_SNAPSHOT  ApplySnapshotChunkResult = v1.APPLY_SNAPSHOT_CHUNK_RESULT_RETRY_SNAPSHOT
	APPLY_SNAPSHOT_CHUNK_RESULT_REJECT_SNAPSHOT ApplySnapshotChunkResult = v1.APPLY_SNAPSHOT_CHUNK_RESULT_REJECT_SNAPSHOT
)

type BaseApplication

type BaseApplication struct{}

func NewBaseApplication

func NewBaseApplication() *BaseApplication

func (BaseApplication) CheckTx

func (BaseApplication) Commit

func (BaseApplication) ExtendVote added in v0.38.0

func (BaseApplication) FinalizeBlock added in v0.38.0

func (BaseApplication) Info

func (BaseApplication) InitChain

func (BaseApplication) ListSnapshots

func (BaseApplication) OfferSnapshot

func (BaseApplication) PrepareProposal

func (BaseApplication) Query

func (BaseApplication) VerifyVoteExtension added in v0.38.0

type CheckTxRequest

type CheckTxRequest = v1.CheckTxRequest

type CheckTxResponse

type CheckTxResponse = v1.CheckTxResponse

type CheckTxType

type CheckTxType = v1.CheckTxType
const (
	CHECK_TX_TYPE_UNKNOWN CheckTxType = v1.CHECK_TX_TYPE_UNKNOWN
	CHECK_TX_TYPE_CHECK   CheckTxType = v1.CHECK_TX_TYPE_CHECK
	CHECK_TX_TYPE_RECHECK CheckTxType = v1.CHECK_TX_TYPE_RECHECK
)

type CommitInfo

type CommitInfo = v1.CommitInfo

type CommitRequest

type CommitRequest = v1.CommitRequest

type CommitResponse

type CommitResponse = v1.CommitResponse

type EchoRequest

type EchoRequest = v1.EchoRequest

type EchoResponse

type EchoResponse = v1.EchoResponse

type Event

type Event = v1.Event

type EventAttribute

type EventAttribute = v1.EventAttribute

type ExceptionResponse

type ExceptionResponse = v1.ExceptionResponse

type ExecTxResult added in v0.38.0

type ExecTxResult = v1.ExecTxResult

func DeterministicExecTxResult

func DeterministicExecTxResult(response *ExecTxResult) *ExecTxResult

constructs a copy of response that omits non-deterministic fields. The input response is not modified.

type ExtendVoteRequest

type ExtendVoteRequest = v1.ExtendVoteRequest

type ExtendVoteResponse

type ExtendVoteResponse = v1.ExtendVoteResponse

type ExtendedCommitInfo

type ExtendedCommitInfo = v1.ExtendedCommitInfo

type ExtendedVoteInfo

type ExtendedVoteInfo = v1.ExtendedVoteInfo

type FinalizeBlockRequest

type FinalizeBlockRequest = v1.FinalizeBlockRequest

type FinalizeBlockResponse

type FinalizeBlockResponse = v1.FinalizeBlockResponse

type FlushRequest

type FlushRequest = v1.FlushRequest

type FlushResponse

type FlushResponse = v1.FlushResponse

type InfoRequest

type InfoRequest = v1.InfoRequest

type InfoResponse

type InfoResponse = v1.InfoResponse

type InitChainRequest

type InitChainRequest = v1.InitChainRequest

type InitChainResponse

type InitChainResponse = v1.InitChainResponse

type ListSnapshotsRequest

type ListSnapshotsRequest = v1.ListSnapshotsRequest

type ListSnapshotsResponse

type ListSnapshotsResponse = v1.ListSnapshotsResponse

type LoadSnapshotChunkRequest

type LoadSnapshotChunkRequest = v1.LoadSnapshotChunkRequest

type LoadSnapshotChunkResponse

type LoadSnapshotChunkResponse = v1.LoadSnapshotChunkResponse

type Misbehavior

type Misbehavior = v1.Misbehavior

type MisbehaviorType

type MisbehaviorType = v1.MisbehaviorType
const (
	MISBEHAVIOR_TYPE_UNKNOWN             MisbehaviorType = v1.MISBEHAVIOR_TYPE_UNKNOWN
	MISBEHAVIOR_TYPE_DUPLICATE_VOTE      MisbehaviorType = v1.MISBEHAVIOR_TYPE_DUPLICATE_VOTE
	MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK MisbehaviorType = v1.MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK
)

type OfferSnapshotRequest

type OfferSnapshotRequest = v1.OfferSnapshotRequest

type OfferSnapshotResponse

type OfferSnapshotResponse = v1.OfferSnapshotResponse

type OfferSnapshotResult

type OfferSnapshotResult = v1.OfferSnapshotResult
const (
	OFFER_SNAPSHOT_RESULT_UNKNOWN       OfferSnapshotResult = v1.OFFER_SNAPSHOT_RESULT_UNKNOWN
	OFFER_SNAPSHOT_RESULT_ACCEPT        OfferSnapshotResult = v1.OFFER_SNAPSHOT_RESULT_ACCEPT
	OFFER_SNAPSHOT_RESULT_ABORT         OfferSnapshotResult = v1.OFFER_SNAPSHOT_RESULT_ABORT
	OFFER_SNAPSHOT_RESULT_REJECT        OfferSnapshotResult = v1.OFFER_SNAPSHOT_RESULT_REJECT
	OFFER_SNAPSHOT_RESULT_REJECT_FORMAT OfferSnapshotResult = v1.OFFER_SNAPSHOT_RESULT_REJECT_FORMAT
	OFFER_SNAPSHOT_RESULT_REJECT_SENDER OfferSnapshotResult = v1.OFFER_SNAPSHOT_RESULT_REJECT_SENDER
)

type PrepareProposalRequest

type PrepareProposalRequest = v1.PrepareProposalRequest

type PrepareProposalResponse

type PrepareProposalResponse = v1.PrepareProposalResponse

type ProcessProposalRequest

type ProcessProposalRequest = v1.ProcessProposalRequest

type ProcessProposalResponse

type ProcessProposalResponse = v1.ProcessProposalResponse

type ProcessProposalStatus

type ProcessProposalStatus = v1.ProcessProposalStatus
const (
	PROCESS_PROPOSAL_STATUS_UNKNOWN ProcessProposalStatus = v1.PROCESS_PROPOSAL_STATUS_UNKNOWN
	PROCESS_PROPOSAL_STATUS_ACCEPT  ProcessProposalStatus = v1.PROCESS_PROPOSAL_STATUS_ACCEPT
	PROCESS_PROPOSAL_STATUS_REJECT  ProcessProposalStatus = v1.PROCESS_PROPOSAL_STATUS_REJECT
)

type QueryRequest

type QueryRequest = v1.QueryRequest

type QueryResponse

type QueryResponse = v1.QueryResponse

type Request

type Request = v1.Request

func ToApplySnapshotChunkRequest

func ToApplySnapshotChunkRequest(req *ApplySnapshotChunkRequest) *Request

func ToCheckTxRequest

func ToCheckTxRequest(req *CheckTxRequest) *Request

func ToCommitRequest

func ToCommitRequest() *Request

func ToEchoRequest

func ToEchoRequest(message string) *Request

func ToExtendVoteRequest

func ToExtendVoteRequest(req *ExtendVoteRequest) *Request

func ToFinalizeBlockRequest

func ToFinalizeBlockRequest(req *FinalizeBlockRequest) *Request

func ToFlushRequest

func ToFlushRequest() *Request

func ToInfoRequest

func ToInfoRequest(req *InfoRequest) *Request

func ToInitChainRequest

func ToInitChainRequest(req *InitChainRequest) *Request

func ToListSnapshotsRequest

func ToListSnapshotsRequest(req *ListSnapshotsRequest) *Request

func ToLoadSnapshotChunkRequest

func ToLoadSnapshotChunkRequest(req *LoadSnapshotChunkRequest) *Request

func ToOfferSnapshotRequest

func ToOfferSnapshotRequest(req *OfferSnapshotRequest) *Request

func ToPrepareProposalRequest

func ToPrepareProposalRequest(req *PrepareProposalRequest) *Request

func ToProcessProposalRequest

func ToProcessProposalRequest(req *ProcessProposalRequest) *Request

func ToQueryRequest

func ToQueryRequest(req *QueryRequest) *Request

func ToVerifyVoteExtensionRequest

func ToVerifyVoteExtensionRequest(req *VerifyVoteExtensionRequest) *Request

type Request_ApplySnapshotChunk

type Request_ApplySnapshotChunk = v1.Request_ApplySnapshotChunk

Discriminated Request variants are defined in the latest proto package.

type Request_CheckTx

type Request_CheckTx = v1.Request_CheckTx

Discriminated Request variants are defined in the latest proto package.

type Request_Commit

type Request_Commit = v1.Request_Commit

Discriminated Request variants are defined in the latest proto package.

type Request_Echo

type Request_Echo = v1.Request_Echo

Discriminated Request variants are defined in the latest proto package.

type Request_ExtendVote added in v0.38.0

type Request_ExtendVote = v1.Request_ExtendVote

Discriminated Request variants are defined in the latest proto package.

type Request_FinalizeBlock added in v0.38.0

type Request_FinalizeBlock = v1.Request_FinalizeBlock

Discriminated Request variants are defined in the latest proto package.

type Request_Flush

type Request_Flush = v1.Request_Flush

Discriminated Request variants are defined in the latest proto package.

type Request_Info

type Request_Info = v1.Request_Info

Discriminated Request variants are defined in the latest proto package.

type Request_InitChain

type Request_InitChain = v1.Request_InitChain

Discriminated Request variants are defined in the latest proto package.

type Request_ListSnapshots

type Request_ListSnapshots = v1.Request_ListSnapshots

Discriminated Request variants are defined in the latest proto package.

type Request_LoadSnapshotChunk

type Request_LoadSnapshotChunk = v1.Request_LoadSnapshotChunk

Discriminated Request variants are defined in the latest proto package.

type Request_OfferSnapshot

type Request_OfferSnapshot = v1.Request_OfferSnapshot

Discriminated Request variants are defined in the latest proto package.

type Request_PrepareProposal

type Request_PrepareProposal = v1.Request_PrepareProposal

Discriminated Request variants are defined in the latest proto package.

type Request_ProcessProposal

type Request_ProcessProposal = v1.Request_ProcessProposal

Discriminated Request variants are defined in the latest proto package.

type Request_Query

type Request_Query = v1.Request_Query

Discriminated Request variants are defined in the latest proto package.

type Request_VerifyVoteExtension added in v0.38.0

type Request_VerifyVoteExtension = v1.Request_VerifyVoteExtension

Discriminated Request variants are defined in the latest proto package.

type Response

type Response = v1.Response

func ToApplySnapshotChunkResponse

func ToApplySnapshotChunkResponse(res *ApplySnapshotChunkResponse) *Response

func ToCheckTxResponse

func ToCheckTxResponse(res *CheckTxResponse) *Response

func ToCommitResponse

func ToCommitResponse(res *CommitResponse) *Response

func ToEchoResponse

func ToEchoResponse(message string) *Response

func ToExceptionResponse

func ToExceptionResponse(errStr string) *Response

func ToExtendVoteResponse

func ToExtendVoteResponse(res *ExtendVoteResponse) *Response

func ToFinalizeBlockResponse

func ToFinalizeBlockResponse(res *FinalizeBlockResponse) *Response

func ToFlushResponse

func ToFlushResponse() *Response

func ToInfoResponse

func ToInfoResponse(res *InfoResponse) *Response

func ToInitChainResponse

func ToInitChainResponse(res *InitChainResponse) *Response

func ToListSnapshotsResponse

func ToListSnapshotsResponse(res *ListSnapshotsResponse) *Response

func ToLoadSnapshotChunkResponse

func ToLoadSnapshotChunkResponse(res *LoadSnapshotChunkResponse) *Response

func ToOfferSnapshotResponse

func ToOfferSnapshotResponse(res *OfferSnapshotResponse) *Response

func ToPrepareProposalResponse

func ToPrepareProposalResponse(res *PrepareProposalResponse) *Response

func ToProcessProposalResponse

func ToProcessProposalResponse(res *ProcessProposalResponse) *Response

func ToQueryResponse

func ToQueryResponse(res *QueryResponse) *Response

func ToVerifyVoteExtensionResponse

func ToVerifyVoteExtensionResponse(res *VerifyVoteExtensionResponse) *Response

type Response_ApplySnapshotChunk

type Response_ApplySnapshotChunk = v1.Response_ApplySnapshotChunk

Discriminated Response variants are defined in the latest proto package.

type Response_CheckTx

type Response_CheckTx = v1.Response_CheckTx

Discriminated Response variants are defined in the latest proto package.

type Response_Commit

type Response_Commit = v1.Response_Commit

Discriminated Response variants are defined in the latest proto package.

type Response_Echo

type Response_Echo = v1.Response_Echo

Discriminated Response variants are defined in the latest proto package.

type Response_Exception

type Response_Exception = v1.Response_Exception

Discriminated Response variants are defined in the latest proto package.

type Response_ExtendVote added in v0.38.0

type Response_ExtendVote = v1.Response_ExtendVote

Discriminated Response variants are defined in the latest proto package.

type Response_FinalizeBlock added in v0.38.0

type Response_FinalizeBlock = v1.Response_FinalizeBlock

Discriminated Response variants are defined in the latest proto package.

type Response_Flush

type Response_Flush = v1.Response_Flush

Discriminated Response variants are defined in the latest proto package.

type Response_Info

type Response_Info = v1.Response_Info

Discriminated Response variants are defined in the latest proto package.

type Response_InitChain

type Response_InitChain = v1.Response_InitChain

Discriminated Response variants are defined in the latest proto package.

type Response_ListSnapshots

type Response_ListSnapshots = v1.Response_ListSnapshots

Discriminated Response variants are defined in the latest proto package.

type Response_LoadSnapshotChunk

type Response_LoadSnapshotChunk = v1.Response_LoadSnapshotChunk

Discriminated Response variants are defined in the latest proto package.

type Response_OfferSnapshot

type Response_OfferSnapshot = v1.Response_OfferSnapshot

Discriminated Response variants are defined in the latest proto package.

type Response_PrepareProposal

type Response_PrepareProposal = v1.Response_PrepareProposal

Discriminated Response variants are defined in the latest proto package.

type Response_ProcessProposal

type Response_ProcessProposal = v1.Response_ProcessProposal

Discriminated Response variants are defined in the latest proto package.

type Response_Query

type Response_Query = v1.Response_Query

Discriminated Response variants are defined in the latest proto package.

type Response_VerifyVoteExtension added in v0.38.0

type Response_VerifyVoteExtension = v1.Response_VerifyVoteExtension

Discriminated Response variants are defined in the latest proto package.

type Snapshot

type Snapshot = v1.Snapshot

type TxResult

type TxResult = v1.TxResult

type Validator

type Validator = v1.Validator

type ValidatorUpdate

type ValidatorUpdate = v1.ValidatorUpdate

func Ed25519ValidatorUpdate

func Ed25519ValidatorUpdate(pk []byte, power int64) ValidatorUpdate

func UpdateValidator

func UpdateValidator(pk []byte, power int64, keyType string) ValidatorUpdate

type ValidatorUpdates

type ValidatorUpdates []ValidatorUpdate

ValidatorUpdates is a list of validators that implements the Sort interface.

func (ValidatorUpdates) Len

func (v ValidatorUpdates) Len() int

func (ValidatorUpdates) Less

func (v ValidatorUpdates) Less(i, j int) bool

XXX: doesn't distinguish same validator with different power.

func (ValidatorUpdates) Swap

func (v ValidatorUpdates) Swap(i, j int)

type VerifyVoteExtensionRequest

type VerifyVoteExtensionRequest = v1.VerifyVoteExtensionRequest

type VerifyVoteExtensionResponse

type VerifyVoteExtensionResponse = v1.VerifyVoteExtensionResponse

type VerifyVoteExtensionStatus

type VerifyVoteExtensionStatus = v1.VerifyVoteExtensionStatus
const (
	VERIFY_VOTE_EXTENSION_STATUS_UNKNOWN VerifyVoteExtensionStatus = v1.VERIFY_VOTE_EXTENSION_STATUS_UNKNOWN
	VERIFY_VOTE_EXTENSION_STATUS_ACCEPT  VerifyVoteExtensionStatus = v1.VERIFY_VOTE_EXTENSION_STATUS_ACCEPT
	VERIFY_VOTE_EXTENSION_STATUS_REJECT  VerifyVoteExtensionStatus = v1.VERIFY_VOTE_EXTENSION_STATUS_REJECT
)

type VoteInfo

type VoteInfo = v1.VoteInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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