-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
debug_traceCall against "pending" uses empty state #24830
Comments
Repro:
|
Heh.. so what happens is that we do a tracing with the 'pending' block, with the following data;
The stateroot is
Which returns a statedb, no errors! Why? Because when opening a trie and resolving the root:
So it returns a totally empty statedb, since |
eth_call against "pending" also does NOT work right. I think it uses "latest" not "pending" state. At least it uses maxFeePerGas from latest not pending. |
My 5c is that we should either make it work, or explicitly reject it with an error. |
IMO we should take a holistic approach with all the RPC call types, and try to be consistent in handling |
It seems |
debug_traceCall against pending would be a life saver for me. |
Tracing on debug_traceTransaction already supports state overrides, the idea being that you can tell it "balance of X is Y, and storage slot A has value C". Sounds to me that what would be better in this particular usecase would be to extend the override capabilities, so you can, on top of If we add that, it would (I think) make the override-capability pretty much complete. And if we had that, then we could just legitimately return an error when trying to trace on |
Working on it. Thanks. |
I tested blockNumber and time and it works! |
Started to see a lot messages like these
Some transactions are going through such debug fine, but some don't. For example
first executed eth_call against pending |
This comment was marked as spam.
This comment was marked as spam.
Please provide the crash log, if you have it |
Node crashed again. I don't have log but node's last words were WARN this timeout error with duration = 3 hours and then "killed". I now restarted node with verbose 4 and will send log when it crashes. |
So node crashes like every 10 hours, there is not crash explanation in log started with verbose 4, log just stoped and in console message "killed".
The longer node works the higher duration= is, have seen one with duration=3 hours... |
Exactly how are you invoking this method? Are you doing it sequentially, or just massively in parallel, with every tx you can find? |
I am subscribed to pendingTransactions, when get new hash I get transaction from hash(await web3.eth.getTransaction), then make first test it by await web3.eth.call against pending, then make await web3.debug_traceCall |
So 99% of all transaction pass debug_traceCall against latest with overriding to pending. But not only.
|
Thanks for the feedback, indeed, this is reproducible. Fix incoming |
The issue is fixed now. It was a case of |
So far so good. |
Everything works fine! |
System information
Version: 1.10.17-stable
Git Commit: 25c9b49
Architecture: amd64
Go Version: go1.18
Expected behaviour
Expected to traceCall pending transaction in context of pending block. I know about double exectution problem, but still need to trace against pending.
Actual behaviour
Every transaction I try to debug_traceCall against "pending" fails with "tracing failed: insufficient funds for gas * price + value: address 0x.. have 0 want 7149415673190000". It's always have 0 even when address has a lot.
Steps to reproduce the behaviour
Get transaction from subscription to pendingTransactions, try to debug_traceCall against "pending".
debug_traceCall against "latest" works fine.
eth_call against "pending" also works fine.
but debug_traceCall against "pending" always fails.
Backtrace
When submitting logs: please submit them as text and not screenshots.
UPDATE:
eth_call against "pending" also does NOT work right. I think it uses "latest" not "pending" state. At least it uses maxFeePerGas from latest not pending
The text was updated successfully, but these errors were encountered: