Skip to content

Add -mempoolreplacement=feerate option#275

Open
kwsantiago wants to merge 3 commits intobitcoinknots:29.x-knotsfrom
privkeyio:feature-rbf-feerate-mode
Open

Add -mempoolreplacement=feerate option#275
kwsantiago wants to merge 3 commits intobitcoinknots:29.x-knotsfrom
privkeyio:feature-rbf-feerate-mode

Conversation

@kwsantiago
Copy link
Copy Markdown

Adds feerate mode: skip Rule 3 (absolute fee), keep Rule 4 (relay bandwidth), require feerate diagram improvement.

Closes #114

@kwsantiago kwsantiago force-pushed the feature-rbf-feerate-mode branch from d3e585a to 72ccdd5 Compare March 5, 2026 15:37
Comment thread src/kernel/mempool_options.h Outdated
Add rbf_feerate_mode as a separate boolean flag rather than a standalone
RBFPolicy enum value. This allows feerate-based RBF to combine with both
OptIn and Always modes:

  -mempoolreplacement=feerate,optin  (respect BIP125 signaling)
  -mempoolreplacement=feerate,-optin (full RBF + feerate rules)

In feerate mode, Rule 3 (absolute fee check) is skipped and Rule 4 is
relaxed to only require the replacement covers its own relay cost.
Feerate diagram improvement is still required.
@kwsantiago kwsantiago force-pushed the feature-rbf-feerate-mode branch from 72ccdd5 to c5f4c87 Compare March 6, 2026 13:58
Comment thread src/rpc/mempool.cpp Outdated
Comment thread src/rpc/mempool.cpp
case RBFPolicy::OptIn : ret.pushKV("rbf_policy", "optin"); break;
case RBFPolicy::Always : ret.pushKV("rbf_policy", "always"); break;
}
ret.pushKV("rbf_feerate", pool.m_opts.rbf_feerate_mode);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is the way to go... Maybe rbf_policy should be deprecated and replaced with a config-compatible mempoolreplacement? Or maybe not... idk

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to rename or restructure this, do you have a preference between exposing it as a separate bool vs folding it into a combined mempoolreplacement string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace-by-fee-rate support

3 participants