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

feat: sidecar RBF management #1506

Open
wants to merge 3 commits into
base: feat/sidecar-manage-locktime
Choose a base branch
from

Conversation

Jiloc
Copy link
Contributor

@Jiloc Jiloc commented Mar 12, 2025

Description

Closes: #1268

This PR implements the Locktime Request Management feature to address the issue of pending requests remaining in the system indefinitely. The implementation focuses on automatically marking deposits as FAILED when they exceed their locktime without being fulfilled.

Changes

  • Added RBF transaction detection and processing to the DepositProcessor service:
    • Enhanced the deposit enrichment process to check for RBF replacements for unconfirmed transactions
    • Implemented process_rbf_transactions method to identify and handle RBF'd transactions
    • Added logic to group related RBF transactions into chains using the _group_rbf_transactions helper method
    • When a transaction in an RBF chain gets confirmed, all other unconfirmed transactions in the chain are marked as FAILED
  • Extended the EnrichedDepositInfo model to include rbf_txids field to track transaction replacements
  • Integrated RBF processing into the main deposit update workflow

Testing Information

  • Added unittest
  • uv run python -m unittest

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Jiloc Jiloc self-assigned this Mar 12, 2025
@Jiloc Jiloc requested review from matteojug and djordon March 12, 2025 16:30
@Jiloc Jiloc added this to the sBTC: Withdrawal fine tuning milestone Mar 12, 2025
@Jiloc Jiloc marked this pull request as ready for review March 12, 2025 19: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.

2 participants