-
Notifications
You must be signed in to change notification settings - Fork 141
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
Eth JSON-RPC API: "latest" block does not include logs or state updates because of deferred execution #1222
Comments
Latest generally refers to the latest tipset, and we execute that tipset on-demand. That should "just work" and the logs should exist. |
Ahh ok - so what I'm seeing is not intended behavior. To be fair, I haven't verified state updates so this could just be happening with logs. And could also be related to this issue: |
@jaeaster is right here.
There are basic expectations to respect here:
|
@jaeaster I don't see the need to introduce a third enum param ( |
Agreed about the lack of need for adding |
Tracked in #1135, and fixed in filecoin-project/lotus#9837. |
Because Filecoin tipsets do not execute messages until the next tipset, you cannot view logs or view state updates in the "latest" block.
There's a core assumption with many EVM tools and applications that "latest" implies latest mined + executed block. There are many issues and edge cases that could arise when an application believes it is reading the latest state, when in fact the state it's reading could be stale. Moreover, if you are fetching logs for each block as the block is reported by the RPC, you will actually never see any logs.
I think it would be wise to hide this detail of deferred execution from users so that existing applications and tools will work as they do with other EVM implementations.
I propose 2 changes:
Add another special string value to refer to latest-but-not-executed, perhaps "pending-execution"
"latest" = block is produced and executed
"pending-execution" = block is produced but not executed
"pending" = mempool or equivalent
"earliest" = origin block
eth_blockNumber
should return "latest" as defined aboveThe text was updated successfully, but these errors were encountered: