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

Successful transaction exceeds gasLimit #1267

Open
UrfinDeuce opened this issue Oct 3, 2024 · 7 comments
Open

Successful transaction exceeds gasLimit #1267

UrfinDeuce opened this issue Oct 3, 2024 · 7 comments

Comments

@UrfinDeuce
Copy link

UrfinDeuce commented Oct 3, 2024

System information

Erigon version: hermeznetwork/cdk-erigon:acceptance-2.0.0-beta18-18da74c-amd64
OS & Version: macOS Sonoma 14.4

Chain/Network: gasless rollup https://zonalvassilyostrich-rpc.eu-west-3.gateway.fm/
Blockscout: https://zonalvassilyostrich-blockscout.eu-west-3.gateway.fm/

Expected behaviour

Swap transactions with UniswapV3Pool contract have unexpected behaviour
Transaction must be reverted when gasLimit is exceeded

Actual behaviour

Transaction successful:
https://zonalvassilyostrich-blockscout.eu-west-3.gateway.fm/tx/0x810241ecb8abea38d307dcadc23989a7cab7007a0fa3a7c377ad59446d4c0a45

Steps to reproduce the behaviour

send swap transaction to the SwapRouter contract 0xFeFba1071f88447A5DF8E6B6e8a8b1AA0914EB25

@V-Staykov
Copy link
Collaborator

The tx gas limit is 30m so unless you've limited it manually, this should be an okay case. Maybe blockscout shows a wrong tx gas limit?

@UrfinDeuce
Copy link
Author

The tx gas limit estimated by the eth_EstimateGas call, eg.:
{
to: '0xFeFba1071f88447A5DF8E6B6e8a8b1AA0914EB25',
data: '0x414bf389000000000000000000000000d2ce5d6a6af1de092d991eb1cdfdfc5fa709b994000000000000000000000000f953572534327d13085fb9e8d02adec8a7703b8f0000000000000000000000000000000000000000000000000000000000000bb800000000000000000000000000320f0d6f2b5c0ef4b2c102a1144fda5f259539000000000000000000000000000000000000000000000000000000006704987b0000000000000000000000000000000000000000000000007ce66c50e284000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
from: '0x00320F0D6f2b5C0EF4b2C102a1144fDa5F259539',
nonce: 13,
gasLimit: 115855n,
chainId: 644213396n,
gasPrice: 193000000000n,
type: 0
}
I also checked gasUsed value via rpc calls and got same results as in the blockscout
And if I define gasLimit = 1000000000000000000n directly, my script just stuck

@V-Staykov
Copy link
Collaborator

I can't seem to reproduce this. If I set too low of a gas limit, I get transaction reverted, If I set enough gas the tx passes and if I set 1000000000000000000n I get overflow message

@UrfinDeuce
Copy link
Author

Did you try on this network https://zonalvassilyostrich-rpc.eu-west-3.gateway.fm/ ?
could you please check for example this tx via rpc: 0xe10cd73dee36381f8f69ca987149ee908b48a72853fcdfc055178c99dbf0620c ?
It was successful, but I see in the tx:
gasLimit: 115837n, and in the receipt:
gasUsed: 533820n

@UrfinDeuce
Copy link
Author

@V-Staykov Hi, sorry, are there any updates on this issue?

@V-Staykov
Copy link
Collaborator

I was unable to reproduce it with normal transactions, so the plan is to either get some access to this network or deploy an uniswap and some tokens locally so we can try to reproduce with closer conditions.

@UrfinDeuce
Copy link
Author

@V-Staykov One more update:
gas problem occurs only if I send several async transactions (10 in my case). So maybe this is a batch processing issue?

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

2 participants