-
Notifications
You must be signed in to change notification settings - Fork 658
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
Unsigned transaction execution failure when interacting with blockchain node #2019
Comments
Hi @RedCuckoo, Thanks for such a detailed analysis. As you say the counter limits are the source of the problem here. We have done a modification to the way we use our executor not to take into account these limits for unsigned transactions (limits will be applied anyway, but they will be much bigger). |
I'm having some connections issues while doing testing |
Hello, @ToniRamirezM Version Request
Version Reply
Not working request
Reply
The versions of our nodes have been updated to latest and the issue is reproducible still with other endpoints. There has already been created duplicate issue for the same problem by other users #2238 |
Can confirm, we from the Beamer bridge team are seeing this as well. Can something be done to prioritise this? |
System information
zkEVM Node version:
v0.0.3-RC36
OS & Version:
Linux
Commit hash : latest released tag
Network:
Mainnet
Expected behaviour
When executing unsigned transactions, I am successfully getting a response by calling read functions of the contract deployed on the mainnet.
Actual behaviour
Some of the unsigned transactions are not executing successfully.
Steps to reproduce the behaviour
Option 1:
Execute eth_call, calling tokenURI function on the contract Top ERC721 transfers on Polygonscan. Worth noting, that I have tried multiple popular rpc endpoints and directly various running prod nodes.
curl --location --request POST 'https://rpc.ankr.com/polygon_zkevm' --header 'Content-Type: application/json' --data-raw '[{ "jsonrpc":"2.0", "method":"eth_call", "params":[{ "from": "0x0000000000000000000000000000000000000000", "to": "0xd8e1e7009802c914b0d39b31fc1759a865b727b1", "data": "0xc87b56dd0000000000000000000000000000000000000000000000000000000000000001" }, "latest"], "id":1 }]'
Then receive error:
[{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"failed to execute the unsigned transaction"}}]
Option 2:
Go to zkEVM PolygonScan: https://zkevm.polygonscan.com/address/0xd8e1e7009802c914b0d39b31fc1759a865b727b1#readContract
Go to tokenURI(tokenId uint256) func and enter any tokenID, for example 1.
Receive
string Error: Returned error: failed to execute the unsigned transaction
Option 3:
Run prod node locally following this guide.
Send response from the Option 1, but to the local node (http://localhost:8545).
Receive the same error from Option 1.
Attempts and Debugging Details
Attempt 1
Checking if forking the blockchain locally will produce the same error. It was done to eliminate contract code error.
ganache-cli --fork https://rpc.ankr.com/polygon_zkevm
And then executing the same request, finally got me the wanted result, but not in the wanted way.
[{"id":1,"jsonrpc":"2.0","result":"0x00..00"}]
The resulting returned string is 27642 characters long, not including it here.
So the problem is with zkEVM infrastructure itself.
Attempt 2
Run prod node locally following this guide.
When executing
curl --location --request POST 'http://localhost:8545' --header 'Content-Type: application/json' --data-raw '[{ "jsonrpc":"2.0", "method":"eth_call", "params":[{ "from": "0x0000000000000000000000000000000000000000", "to": "0xd8e1e7009802c914b0d39b31fc1759a865b727b1", "data": "0xc87b56dd0000000000000000000000000000000000000000000000000000000000000001" }, "latest"], "id":1 }]'
I have received
[{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"failed to execute the unsigned transaction"}}]
error. NOTING, it's the same errors got from mainnet blockchain.In the zkevm-node container, I have such error message for this request:
As we see, we get a bit bigger error message
failed to execute the unsigned transaction:not enough keccak counters to continue the execution
. To investigate which service returns this error, I have put down zkevm-node docker container and have run zkevm-node locally. It lead me to the executor service on line https://github.com/0xPolygonHermez/zkevm-node/blob/v0.0.3-RC36/state/state.go#L1313It's getting error ROM_ERROR_OUT_OF_COUNTERS_STEP, which returns keccak error, which is declared here
Looking for the code of this error in the logs. Found it here.
Next step is looking for logs of zkevm-prover, where executor service is running. The error code for this error is "OOCS" (got from utils.zkasm). Getting next error logs message in zkevm-prover container:
What was tried, is increasing
as offered in issue #1930
It didn't help much, the problem persisted.
So I decided to bring up zkevm-prover locally, but unfortunately I didn't success as building project was using up all available RAM and swap on my laptop. I couldn't figure out how to do it correctly.
Another thing I did was looking for steps amount of zkevm-prover to increase it, but it is locked in the constants file, so it is not possible to config it for docker image.
Attempt 3
The steps executed in Attempt 2 was also run again latest available version v0.0.5-RC4, the behavior was the same.
Attempt 4
Checking if such behavior doesn't repeat for all such contracts.
Running the exact same request over another contract results in the expected behavior.
Returns
Possible solutions
Taking into account the research above, it seems that max counter amount or some other counter amounts needs to be modified to comply with some heavy (?) transaction requirements.
Reason for Duplicating Issue
This issue duplicates #1930
It was done to provide a more in-depth investigation of the error and to gather all the relevant information in one place, as the request in the referenced issue is not reproducible anymore and its offered solution (workaround) is not working. This issue have to be fixed for proper utilization of the blockchain.
The text was updated successfully, but these errors were encountered: