Skip to content

Add MpoolGetConfig RPC and use runtime RBF ratio in mpool replace --auto #7100

@coderabbitai

Description

@coderabbitai

Background

The mpool replace --auto command currently hardcodes REPLACE_BY_FEE_RATIO_DEFAULT when computing the RBF minimum premium floor via compute_rbf. If a node is configured with a non-default replace_by_fee_ratio, the auto replacement can underbid and be rejected with GasPriceTooLow.

Required work

  1. Implement MpoolGetConfig RPC — expose the node's mpool configuration (including replace_by_fee_ratio) over the API, matching the Lotus MpoolGetConfig interface.

  2. Use runtime RBF ratio in mpool replace --auto — in src/cli/subcommands/mpool_cmd.rs, retrieve the replace_by_fee_ratio from MpoolGetConfig before calling compute_rbf, and pass the runtime value instead of REPLACE_BY_FEE_RATIO_DEFAULT so the auto replacement floor matches the running node's mpool configuration.

References

/cc @sudo-shashank

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions