mpool

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0, MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFilesystemJournal

func OpenFilesystemJournal(lr repo.Repo) (journal.Journal, error)

Types

type MessagePoolAPI

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

MessagePoolAPI messsage pool api implement

func (*MessagePoolAPI) GasBatchEstimateMessageGas added in v0.9.7

func (a *MessagePoolAPI) GasBatchEstimateMessageGas(ctx context.Context, estimateMessages []*types.EstimateMessage, fromNonce uint64, tsk types.TipSetKey) ([]*types.EstimateResult, error)

func (*MessagePoolAPI) GasEstimateFeeCap

func (a *MessagePoolAPI) GasEstimateFeeCap(ctx context.Context, msg *types.Message, maxqueueblks int64, tsk types.TipSetKey) (big.Int, error)

GasEstimateFeeCap estimates gas fee cap

func (*MessagePoolAPI) GasEstimateGasLimit added in v0.9.6

func (a *MessagePoolAPI) GasEstimateGasLimit(ctx context.Context, msgIn *types.Message, tsk types.TipSetKey) (int64, error)

func (*MessagePoolAPI) GasEstimateGasPremium

func (a *MessagePoolAPI) GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (big.Int, error)

GasEstimateGasPremium estimates what gas price should be used for a message to have high likelihood of inclusion in `nblocksincl` epochs.

func (*MessagePoolAPI) GasEstimateMessageGas

func (a *MessagePoolAPI) GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *types.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)

GasEstimateMessageGas estimates gas values for unset message gas fields

func (*MessagePoolAPI) MpoolBatchPush

func (a *MessagePoolAPI) MpoolBatchPush(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error)

MpoolBatchPush batch pushes a unsigned message to mempool.

func (*MessagePoolAPI) MpoolBatchPushMessage

func (a *MessagePoolAPI) MpoolBatchPushMessage(ctx context.Context, msgs []*types.Message, spec *types.MessageSendSpec) ([]*types.SignedMessage, error)

MpoolBatchPushMessage batch pushes a unsigned message to mempool.

func (*MessagePoolAPI) MpoolBatchPushUntrusted

func (a *MessagePoolAPI) MpoolBatchPushUntrusted(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error)

MpoolBatchPushUntrusted batch pushes a signed message to mempool from untrusted sources.

func (*MessagePoolAPI) MpoolCheckMessages added in v0.9.7

func (a *MessagePoolAPI) MpoolCheckMessages(ctx context.Context, protos []*types.MessagePrototype) ([][]types.MessageCheckStatus, error)

func (*MessagePoolAPI) MpoolCheckPendingMessages added in v0.9.7

func (a *MessagePoolAPI) MpoolCheckPendingMessages(ctx context.Context, addr address.Address) ([][]types.MessageCheckStatus, error)

func (*MessagePoolAPI) MpoolCheckReplaceMessages added in v0.9.7

func (a *MessagePoolAPI) MpoolCheckReplaceMessages(ctx context.Context, msg []*types.Message) ([][]types.MessageCheckStatus, error)

func (*MessagePoolAPI) MpoolClear

func (a *MessagePoolAPI) MpoolClear(ctx context.Context, local bool) error

MpoolClear clears pending messages from the mpool

func (*MessagePoolAPI) MpoolDeleteByAdress added in v0.9.7

func (a *MessagePoolAPI) MpoolDeleteByAdress(ctx context.Context, addr address.Address) error

MpoolDeleteByAdress delete msg in mpool of addr

func (*MessagePoolAPI) MpoolGetConfig

func (a *MessagePoolAPI) MpoolGetConfig(context.Context) (*types.MpoolConfig, error)

MpoolGetConfig returns (a copy of) the current mpool config

func (*MessagePoolAPI) MpoolGetNonce

func (a *MessagePoolAPI) MpoolGetNonce(ctx context.Context, addr address.Address) (uint64, error)

MpoolGetNonce gets next nonce for the specified sender. Note that this method may not be atomic. Use MpoolPushMessage instead.

func (*MessagePoolAPI) MpoolPending

func (a *MessagePoolAPI) MpoolPending(ctx context.Context, tsk types.TipSetKey) ([]*types.SignedMessage, error)

MpoolPending returns pending mempool messages.

func (*MessagePoolAPI) MpoolPublishByAddr added in v0.9.6

func (a *MessagePoolAPI) MpoolPublishByAddr(ctx context.Context, addr address.Address) error

MpoolPublishByAddr publish message of address

func (*MessagePoolAPI) MpoolPublishMessage added in v0.9.6

func (a *MessagePoolAPI) MpoolPublishMessage(ctx context.Context, smsg *types.SignedMessage) error

func (*MessagePoolAPI) MpoolPush

func (a *MessagePoolAPI) MpoolPush(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error)

MpoolPush pushes a signed message to mempool.

func (*MessagePoolAPI) MpoolPushMessage

func (a *MessagePoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message, spec *types.MessageSendSpec) (*types.SignedMessage, error)

MpoolPushMessage atomically assigns a nonce, signs, and pushes a message to mempool. maxFee is only used when GasFeeCap/GasPremium fields aren't specified

When maxFee is set to 0, MpoolPushMessage will guess appropriate fee based on current chain conditions

func (*MessagePoolAPI) MpoolPushUntrusted

func (a *MessagePoolAPI) MpoolPushUntrusted(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error)

MpoolPushUntrusted pushes a signed message to mempool from untrusted sources.

func (*MessagePoolAPI) MpoolSelect

func (a *MessagePoolAPI) MpoolSelect(ctx context.Context, tsk types.TipSetKey, ticketQuality float64) ([]*types.SignedMessage, error)

MpoolSelect returns a list of pending messages for inclusion in the next block

func (*MessagePoolAPI) MpoolSelects added in v0.9.4

func (a *MessagePoolAPI) MpoolSelects(ctx context.Context, tsk types.TipSetKey, ticketQualitys []float64) ([][]*types.SignedMessage, error)

MpoolSelects The batch selection message is used when multiple blocks need to select messages at the same time

func (*MessagePoolAPI) MpoolSetConfig

func (a *MessagePoolAPI) MpoolSetConfig(ctx context.Context, cfg *types.MpoolConfig) error

MpoolSetConfig sets the mpool config to (a copy of) the supplied config

func (*MessagePoolAPI) MpoolSub

func (a *MessagePoolAPI) MpoolSub(ctx context.Context) (<-chan types.MpoolUpdate, error)

type MessagePoolSubmodule

type MessagePoolSubmodule struct {
	// Network Fields
	MessageSub *pubsub.Subscription

	MPool *messagepool.MessagePool
	// contains filtered or unexported fields
}

MessagingSubmodule enhances the `Node` with internal message capabilities.

func NewMpoolSubmodule

func NewMpoolSubmodule(ctx context.Context,
	cfg messagepoolConfig,
	network *network.NetworkSubmodule,
	chain *chain.ChainSubmodule,
	wallet *wallet.WalletSubmodule,
) (*MessagePoolSubmodule, error)

func (*MessagePoolSubmodule) API

API create a new mpool api implement

func (*MessagePoolSubmodule) Start

func (mp *MessagePoolSubmodule) Start(ctx context.Context) error

Start to the message pubsub topic to learn about messages to mine into blocks.

func (*MessagePoolSubmodule) Stop

func (mp *MessagePoolSubmodule) Stop(ctx context.Context)

func (*MessagePoolSubmodule) V0API added in v0.9.7

func (*MessagePoolSubmodule) Validate added in v1.2.0

Jump to

Keyboard shortcuts

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