Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature of Replace-by-fee for tx-pool #4108

Merged
merged 63 commits into from
Aug 18, 2023
Merged

Conversation

chenyukang
Copy link
Collaborator

@chenyukang chenyukang commented Aug 17, 2023

Code review is in #4079

What problem does this PR solve?

Add feature of Replace-by-fee for tx-pool.

Fixes #3734

Problem Summary:

What is changed and how it works?

What's Changed:

This RBF feature enables users to replace a transaction with a higher fee rate when pending in tx-pool, which is useful when the transaction is stuck in the tx-pool:

  • Add min_rbf_rate in ckb.toml with default value 1500, which means the minimum extra fee rate for RBF, the unit is shannons/KB
  • Add fields fee and min_replace_fee in get_transaction, which means the the minimal fee need to pay for RBF for a specific transaction
  • min_replace_fee = sum(replaced_tx_fee) + (min_rbf_rate * size)
  • The replaced transaction will be removed from tx-pool and with the status Rejected.

Related changes

  • PR to update owner/repo:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

Title Only: Include only the PR title in the release note.
Note: Add a note under the PR title in the release note.

@chenyukang chenyukang requested a review from a team as a code owner August 17, 2023 13:02
@chenyukang chenyukang requested review from quake and removed request for a team August 17, 2023 13:02
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.

Support Replace-by-fee in memory pool
4 participants