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

RFQ/Submitter Fixes #2410

Closed
11 tasks done
trajan0x opened this issue Apr 1, 2024 · 1 comment
Closed
11 tasks done

RFQ/Submitter Fixes #2410

trajan0x opened this issue Apr 1, 2024 · 1 comment

Comments

@trajan0x
Copy link
Contributor

trajan0x commented Apr 1, 2024

Copy link

greptile-apps bot commented Jun 24, 2024

Implementation Steps:

  1. Unstick existing in submitter:

    • Investigate and resolve issues with transactions 0xdc and 0xdd in the submitter logic.
  2. Revert replace condition:

    • Revert changes related to the replace condition in the submitter logic.
  3. Change default bump from 5% to 10%:

    • Update DefaultGasBumpPercentage in config/config.go to 10.
    const DefaultGasBumpPercentage = 10
  4. Bump both priority fee and fee cap by max(current+10%, new suggested fee):

    • Modify bumpGasFromPrevTx in submitter.go to bump both GasFeeCap and GasTipCap by the maximum of the current value plus 10% or the new suggested fee.
    transactor.GasFeeCap = gas.BumpByPercent(core.CopyBigInt(prevTx.GasFeeCap()), bumpPct)
    transactor.GasTipCap = gas.BumpByPercent(core.CopyBigInt(prevTx.GasTipCap()), bumpPct)
  5. Start Fee cap lower than 10% and only bump by a minimum of 10%:

    • Ensure initial fee cap is set lower than 10% and bump by a minimum of 10% in applyGasFloor and applyGasCeil methods in submitter.go.
  6. Should not bump any transactions greater than the current pending nonce/submitting:

    • Add logic in SubmitTransaction to check the current pending nonce and avoid bumping transactions with a nonce greater than the current pending nonce.
  7. Not bump above current gas balance:

    • Ensure gas bumping logic in applyGasCeil does not exceed the current gas balance.
  8. Prometheus Metrics (pending count + longest pending):

    • Implement Prometheus metrics to track the pending transaction count and the longest pending transaction duration.
  9. Remove is_l2 as a config param:

    • Remove is_l2 parameter from the configuration in config/config.go and update related logic.
  10. Allow tx type to change in flight:

    • Ensure transaction type can change during submission in SubmitTransaction method.
  11. Add a periodic garbage collector for old txes to prevent db bloat:

    • Implement a periodic garbage collector in submitter.go to clean up old transactions from the database.

References

/ethergo/submitter/submitter.go
/ethergo/submitter/config/config.go
/ethergo/submitter
/ethergo/submitter/config
/ethergo/submitter/db

Ask Greptile

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

No branches or pull requests

1 participant