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

EthTXManager invalid data for unpacking error #1818

Closed
ToniRamirezM opened this issue Mar 14, 2023 · 4 comments · Fixed by #1846
Closed

EthTXManager invalid data for unpacking error #1818

ToniRamirezM opened this issue Mar 14, 2023 · 4 comments · Fixed by #1846
Assignees
Labels
blue-berry bug Something isn't working

Comments

@ToniRamirezM
Copy link
Contributor

{"level":"error","ts":1678790171.9444094,"caller":"ethtxmanager/ethtxmanager.go:587","msg":"failed to get results by statuses from eth tx manager to monitored txs err: invalid data for unpacking%!(EXTRA string=\n/src/log/log.go:140 github.com/0xPolygonHermez/zkevm-node/log.appendStackTraceMaybeArgs()\n/src/log/log.go:249 github.com/0xPolygonHermez/zkevm-node/log.Errorf()\n/src/ethtxmanager/ethtxmanager.go:587 github.com/0xPolygonHermez/zkevm-node/ethtxmanager.(*Client).ProcessPendingMonitoredTxs()\n/src/sequencer/sequencesender.go:38 github.com/0xPolygonHermez/zkevm-node/sequencer.(*Sequencer).tryToSendSequence()\n/src/sequencer/sequencer.go:170 github.com/0xPolygonHermez/zkevm-node/sequencer.(*Sequencer).Start.func1()\n)","pid":1,"version":"v0.0.3-RC17-1-g2b35ef0c17d","stacktrace":"github.com/0xPolygonHermez/zkevm-node/ethtxmanager.(*Client).ProcessPendingMonitoredTxs\n\t/src/ethtxmanager/ethtxmanager.go:587\ngithub.com/0xPolygonHermez/zkevm-node/sequencer.(*Sequencer).tryToSendSequence\n\t/src/sequencer/sequencesender.go:38\ngithub.com/0xPolygonHermez/zkevm-node/sequencer.(*Sequencer).Start.func1\n\t/src/sequencer/sequencer.go:170"}

@ToniRamirezM ToniRamirezM added bug Something isn't working blue-berry labels Mar 14, 2023
@tclemos
Copy link
Contributor

tclemos commented Mar 14, 2023

After investigating all the transactions, I figured out this transaction 0xf66b056800a9af2f112a3284108448451912840e3bd719e02a572a8ce48daf74 was throwing the error described.

As we can see in Etherscan, this transaction was reverted: https://goerli.etherscan.io/tx/0xf66b056800a9af2f112a3284108448451912840e3bd719e02a572a8ce48daf74

But when we try to re-execute this transaction using the eth_call and creating a message with the same from, to, gas, value and data the transaction doesn't return an error and the code was expecting to get an error, since the receipt has a failed status.

The same code is being used for many other transactions and worked very well, this seems to be something related to this transaction specifically.

@arnaubennassar
Copy link
Member

So it turns out that the tx actually did an OOG in the internal tx and we're not detecting this. But since this shouldn't happen again after adding the offset, we could remove the blue-berry tag WDYT @agnusmor ?

@tclemos
Copy link
Contributor

tclemos commented Mar 16, 2023

We still need to improve the way we get the revert message because the EthTxManager relies on this message in order to be able to retry the tx with a refreshed nonce, gas limit, and gas price.

We basically need to add a fallback code to have a generic revert error returned when it's not possible to detect the rever error from the chain for specific cases like this.

@tclemos
Copy link
Contributor

tclemos commented Mar 16, 2023

I've opened the PR to help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blue-berry bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants