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

Convert int/hash values from context into js object #23108

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

williamberman
Copy link
Contributor

@williamberman williamberman commented Jun 24, 2021

The tracer context now has int and Hash types. They need to be converted before they're pushed on the js stack.

jst.vm.PushInt(val)

case common.Hash:
jst.vm.PushString(val.Hex())
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, wondering if this should be similar to the common.Address part:

			ptr := jst.vm.PushFixedBuffer(32)
			copy(makeSlice(ptr, 32), val[:])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe karalabe merged commit 948a600 into ethereum:master Jun 25, 2021
@karalabe karalabe added this to the 1.10.5 milestone Jul 12, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
…ereum#23108)

* Convert int/hash values from context into js object

* Use js fixed buffer

Co-authored-by: William <william.berman@coinbase.com>
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.

2 participants