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

Feature: RBF #831

Open
wants to merge 13 commits into
base: v2
Choose a base branch
from
Open

Feature: RBF #831

wants to merge 13 commits into from

Conversation

borislav-itskov
Copy link
Member

Change log:

  • when 15 minutes pass and the txn is still BroadcastButNotConfirmed, switch it to BroadcastButStuck. Before, it was switched to Rejected
  • create a getNotConfirmedOpIfAny in activity.ts. For SA, it checks the last BroadcastButNotConfirmed/BroadcastButStuck txn's nonce and compares. For EOAs, it gets all the BroadcastButNotConfirmed/BroadcastButStuck txns for the EOA + all the SA as the EOA could've broadcast a txn there. It returns the op with the highest nonce
  • it disregards 4337 broadcasts as they shouldn't have an RBF (bundler should always broadcast)
  • in the case of RBF, in signAccountOp.ts it uses the gas estimation from the stuck account op increased by 12.5% OR the new estimation, whichever is higher
  • upon broadcast, if the broadcast fails with "replacement fee too low", the signedAccountOp's gas fee payment is taken, increased by 12.5% and used for estimation IF the provided estimation from estimate.ts is lower than it. This repeats until a successful broadcast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants