Skip to content

Implement replace tool to replace a message in the mempool #7086

Description

@sudo-shashank

Summary

Lotus provides lotus mpool replace to re-broadcast a pending message with higher gas (replace-by-fee), so messages stuck in the mempool (low GasFeeCap / GasPremium vs current base fee) can get mined.

Forest supports RBF in the message pool internally but has no CLI to replace a pending message. Users hitting stuck sends must work around it manually.

Background / Lotus reference
Command: lotus mpool replace

NAME:
   lotus mpool replace - replace a message in the mempool

USAGE:
   lotus mpool replace [command options] <from> <nonce> | <message-cid>

OPTIONS:
   --gas-feecap value   gas feecap for new message (burn and pay to miner, attoFIL/GasUnit)
   --gas-premium value  gas price for new message (pay to miner, attoFIL/GasUnit)
   --gas-limit value    gas limit for new message (GasUnit) (default: 0)
   --auto               automatically reprice the specified message (default: false)
   --fee-limit max-fee  Spend up to X FIL for this message in units of FIL. Previously when flag was max-fee units were in attoFIL. Applicable for auto mode
   --help, -h           show help

Completion Criteria

  • Replace by updates gas and pushes replacement; old pending message superseded via RBF also works using .
  • --auto reprices using RBF minimum + gas estimation; respects --fee-limit/max-fee when set
  • Integration test

Additional Links & Resources

Metadata

Metadata

Assignees

Labels

Type: TaskDiscrete task to implement

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions