Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Transaction Resubmit Policy #40

Closed
gakonst opened this issue Jun 25, 2020 · 1 comment · Fixed by #81
Closed

Transaction Resubmit Policy #40

gakonst opened this issue Jun 25, 2020 · 1 comment · Fixed by #81
Labels
enhancement New feature or request

Comments

@gakonst
Copy link
Owner

gakonst commented Jun 25, 2020

Is your feature request related to a problem? Please describe.

Currently if a transaction gets submitted with too low gas price, it can potentially get stuck in the mempool. It would be nice if we could work around that by automatically bumping its fee according to some policy which is defined by the caller.

Describe the solution you'd like

A similar implementation to PendingTransaction which takes the re-submission policy as a constructor argument. Its Future implementation would then try to get the receipt, and if the receipt returns an error, instead of directly queuing up the receipt check, it'd first re-submit the transaction with a new gas price, according to the policy.

Note: h/t @stonecoldpat the tx hash will change for every bump so you have to adjust it after each submission

@gakonst gakonst added the enhancement New feature or request label Jun 25, 2020
@gakonst
Copy link
Owner Author

gakonst commented Sep 25, 2020

This can probably be implemented as a GasEscalatorMiddleware which maintains state about all pending transactions and re-submits them

meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this issue Mar 21, 2022
this will let use parallelize work between improving the compilation pipeline from the evm/test runner side
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant