Skip to content

Conversation

@holiman
Copy link
Contributor

@holiman holiman commented Nov 1, 2024

While updating goevmlab, I noticed that the way I invoked the executions, using the core/vm/runtime helpers, I didn't get any callbacks on the tx end. This PR fixes it by invoking them.

@holiman holiman requested a review from s1na November 1, 2024 10:31
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we could set more fields in the receipt than just the gasUsed e.g. Type, PostState, Status, ... but I don't know if thats really important. The only thing that might be is PostState imo, but that would require us to call Commit() on the passed statedb. That is something that I don't think we should do

@holiman
Copy link
Contributor Author

holiman commented Nov 4, 2024

LGTM, we could set more fields in the receipt than just the gasUsed e.g. Type, PostState, Status, ... but I don't know if thats really important.

It is not important. It's IMO a bit annoying that we need to even create this pretend-receipt. I'd rather just pass in nil, but it turns out that some tracers crash on nil-receipts.

@holiman holiman added this to the 1.14.12 milestone Nov 4, 2024
@holiman holiman merged commit 014e2b0 into ethereum:master Nov 4, 2024
3 checks passed
@holiman holiman deleted the runtime_nits branch November 4, 2024 10:39
@karalabe
Copy link
Member

karalabe commented Nov 4, 2024

In general IMO it's not the best idea to pass too much, too high level data to callbacks directly. It expands our API surface a lot and also locks them in, since all of a sudden all the types are API with guarantees; and it also makes optimizations harder because you cannot avoid computing something that a tracer depends on later.

@holiman
Copy link
Contributor Author

holiman commented Nov 4, 2024

Yep, I agree

holiman added a commit that referenced this pull request Nov 19, 2024
When using the `core/vm/runtime` helpers to execute code, callbacks for the tx end were not invoked. This change fixes it by invoking them.
jakub-freebit pushed a commit to fblch/go-ethereum that referenced this pull request Jul 3, 2025
When using the `core/vm/runtime` helpers to execute code, callbacks for the tx end were not invoked. This change fixes it by invoking them.
gballet pushed a commit to gballet/go-ethereum that referenced this pull request Sep 11, 2025
When using the `core/vm/runtime` helpers to execute code, callbacks for the tx end were not invoked. This change fixes it by invoking them.
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

Successfully merging this pull request may close these issues.

3 participants