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

Stack/MessageOptions not converting hex integers to Uint256 #32

Closed
mratsim opened this issue May 16, 2018 · 1 comment
Closed

Stack/MessageOptions not converting hex integers to Uint256 #32

mratsim opened this issue May 16, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@mratsim
Copy link
Contributor

mratsim commented May 16, 2018

The message option type is not converting hex string to Uint256:

https://github.com/status-im/nimbus/blob/43797485e5c50d94fef5a4b9afba858632190896/src/vm/message.nim#L42-L48

This leads to several test failures

vmTestsboolean.json
test_helpers.nim(48)     test_vm_json
computation.nim(278)     testFixture
computation.nim(272)     :anonymous
context.nim(27)          caller
stack.nim(67)            push
validation.nim(48)       validateStackItem

    Unhandled exception: Invalid stack item: expected 32 bytes, got 42: value is 0xcd1722f3947def4cf144679da39c4c32bdc35681
  [FAILED] tests/fixtures/VMTests/vmTests/boolean.json
vmTestssuicide.json
test_helpers.nim(48)     test_vm_json
computation.nim(278)     testFixture
computation.nim(272)     :anonymous
context.nim(27)          caller
stack.nim(67)            push
validation.nim(48)       validateStackItem

    Unhandled exception: Invalid stack item: expected 32 bytes, got 42: value is 0xcd1722f3947def4cf144679da39c4c32bdc35681
  [FAILED] tests/fixtures/VMTests/vmTests/suicide.json
vmTestsmktx.json
test_helpers.nim(48)     test_vm_json
computation.nim(278)     testFixture
computation.nim(272)     :anonymous
context.nim(27)          caller
stack.nim(67)            push
validation.nim(48)       validateStackItem

    Unhandled exception: Invalid stack item: expected 32 bytes, got 42: value is 0xcd1722f3947def4cf144679da39c4c32bdc35681

https://github.com/status-im/nimbus/blob/43797485e5c50d94fef5a4b9afba858632190896/tests/fixtures/VMTests/vmTests/boolean.json#L17-L26
I didn't find any mention of MessageOptions type in Py-EVM, Go-Ethereum, Parity codebases even in past commits besides Go Protobuf.

@alehander92
Copy link
Contributor

MessageOptions was basically just a typed version of the optional py-evm args being passed to newMessage, it's not a meaningful type otherwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants