Skip to content

add gas to txOverrides #477

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

Merged
merged 6 commits into from
Apr 19, 2024
Merged

add gas to txOverrides #477

merged 6 commits into from
Apr 19, 2024

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 3, 2024

PR-Codex overview

This PR introduces gas-related enhancements to transaction processing, including gas limit overrides and gas price adjustments.

Detailed summary

  • Added gas field to transaction overrides
  • Included gas, maxFeePerGas, and maxPriorityFeePerGas in transaction schema
  • Updated transaction preparation in write.ts to include gas-related overrides
  • Modified queueTx function to accept txOverrides with gas-related fields
  • Implemented gas limit and gas price overrides in processTx.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

zeet-co bot commented Apr 3, 2024

We're building your pull request over on Zeet.
Click me for more info about your build and deployment.
Once built, this branch can be tested at: https://web3-api-akbv-joaquim-gas.chainsaw-dev.zeet.app before merging 😉

arcoraven
arcoraven previously approved these changes Apr 3, 2024
Copy link

This PR is stale because it has been open for 7 days with no activity. Remove stale label or comment or this PR will be closed in 3 days.

@farhanW3
Copy link
Contributor

This PR needs more work.

We only updated the Ingest to take in the gas value on txOverride input, but we also need to make sure to store the gas-values on DB when queueing, and update the processTx flow to check if the gas-values fields are populated on DB and use it for the transaction otherwise use getDefaultGasOverrides().

@arcoraven @joaquim-verges

@farhanW3 farhanW3 added the do not merge Do not merge the branch label Apr 12, 2024
@arcoraven arcoraven dismissed their stale review April 12, 2024 20:17

This isn't setting the DB variable. LMK if this is needed, this one is a bit more involved.

farhanW3 and others added 2 commits April 18, 2024 19:52
* CICD for beta-nightly image (#481)

* Updated Packages + UserOp Confirmation flow updated (#479)

* Updated Packages + UserOp Confirmation flow updated

* wallets sdk updated

* fix: missing querystring + description upd (#486)

* Added querystring to fastify route (#487)

* fix: reject deprecated chains (#488)

* chore: Allow cancelling txs that already errored (#491)

* chore: Allow cancelling txs that already errored

* clean up response

* naming

* update cancelledAt

* fix: Cancel tx if populating a tx to retry fails (#493)

* fix: Cancel tx if populating a tx to retry fails

* ensure cancel uses high enough gas

* fix build

* combine prepare + send flows again

* updates to GH flow, to use branch (#484)

* updates to GH flow, to use branch

* removed prelease incorrect tag

* upds

* got back tag creation check

* upds

* comments updated

* final upds to handle the flow

* Updated to use release::create for CI/CD image build/push flow

* Updates to GH workflow to not push to  if not release not from main (#495)

* feat(experimental): Keypair auth (#494)

* reorganize helper file

* wip

* support keypair auth

* fix unit tests

* return error messages for keypair auth errors

* Don't catch JsonWebToken errors

* catch access token

* move public keys to db

* fix: add crud endpoints

* wip

* add algorithm

* add feature envvar

* handle each jwt type separately

* rename

* remove expiration limit

* Fix: Deploy Published Contract Flow (#499)

* Updated Deploy Published Contract Flow + ProcessTx

* removed commented lines

* Updates

* chore: add updated template for the railway (#490)

* chore: add updated template for the railway

Signed-off-by: Waren Gonzaga <opensource@warengonzaga.com>

* chore: remove referral code

Signed-off-by: Waren Gonzaga <opensource@warengonzaga.com>

---------

Signed-off-by: Waren Gonzaga <opensource@warengonzaga.com>

* Build fixes (#500)

* Fix for Issue 502 (#505)

* Added tx overrides for EOA + AA

---------

Signed-off-by: Waren Gonzaga <opensource@warengonzaga.com>
Co-authored-by: Phillip Ho <arcoraven@gmail.com>
Co-authored-by: Waren Gonzaga <github@warengonzaga.com>
Comment on lines +177 to +183
} else {
// TODO: We need to target specific cases
// Bump gas limit to avoid occasional out of gas errors
txRequest.gasLimit = txRequest.gasLimit
? BigNumber.from(txRequest.gasLimit).mul(120).div(100)
: undefined;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else {
// TODO: We need to target specific cases
// Bump gas limit to avoid occasional out of gas errors
txRequest.gasLimit = txRequest.gasLimit
? BigNumber.from(txRequest.gasLimit).mul(120).div(100)
: undefined;
}
} else if (txRequest.gasLimit) {
// Use +20% gas limit to prevent occasional gas errors.
txRequest.gasLimit = BigNumber.from(txRequest.gasLimit).mul(120).div(100)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this was added for shield (ran into issues running out of gas on airdrops). We could remove it and see if it returns?

@farhanW3 farhanW3 merged commit 0fb1556 into main Apr 19, 2024
3 of 4 checks passed
@farhanW3 farhanW3 deleted the joaquim/gas branch April 19, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge the branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants