abci

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainPrepareLanes

func ChainPrepareLanes(chain ...block.Lane) block.PrepareLanesHandler

ChainPrepareLanes chains together the proposal preparation logic from each lane into a single function. The first lane in the chain is the first lane to be prepared and the last lane in the chain is the last lane to be prepared.

In the case where any of the lanes fail to prepare the partial proposal, the lane that failed will be skipped and the next lane in the chain will be called to prepare the proposal.

func ChainProcessLanes

func ChainProcessLanes(chain ...block.Lane) block.ProcessLanesHandler

ChainProcessLanes chains together the proposal verification logic from each lane into a single function. The first lane in the chain is the first lane to be verified and the last lane in the chain is the last lane to be verified.

Types

type ProposalHandler

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

ProposalHandler is a wrapper around the ABCI++ PrepareProposal and ProcessProposal handlers.

func NewProposalHandler

func NewProposalHandler(logger log.Logger, txDecoder sdk.TxDecoder, mempool block.Mempool) *ProposalHandler

NewProposalHandler returns a new abci++ proposal handler. This proposal handler will iteratively call each of the lanes in the chain to prepare and process the proposal.

func (*ProposalHandler) PrepareProposalHandler

func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler

PrepareProposalHandler prepares the proposal by selecting transactions from each lane according to each lane's selection logic. We select transactions in a greedy fashion. Note that each lane has an boundary on the number of bytes that can be included in the proposal. By default, the default lane will not have a boundary on the number of bytes that can be included in the proposal and will include all valid transactions in the proposal (up to MaxTxBytes).

func (*ProposalHandler) ProcessProposalHandler

func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler

ProcessProposalHandler processes the proposal by verifying all transactions in the proposal according to each lane's verification logic. We verify proposals in a greedy fashion. If a lane's portion of the proposal is invalid, we reject the proposal. After a lane's portion of the proposal is verified, we pass the remaining transactions to the next lane in the chain.

Jump to

Keyboard shortcuts

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