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

evm t9n should reject values greater than 256-bit for gasPrice and Value #23740

Closed
marioevz opened this issue Oct 14, 2021 · 3 comments · Fixed by #23743
Closed

evm t9n should reject values greater than 256-bit for gasPrice and Value #23740

marioevz opened this issue Oct 14, 2021 · 3 comments · Fixed by #23743

Comments

@marioevz
Copy link
Member

Currently, during transaction tests that attempt to overflow the gasPrice and Value fields using values equal to or greater than 2**256, the transactions are accepted as valid.

The suggested feature change is that t9n rejects values greater than or equal to 2**256 in these fields.

The impact of this change to block validation should be none since, in actuality, no account can have a balance greater than these values and the transactions should end up being rejected anyway, but the benefit of this change is for testing purposes only.

@holiman
Copy link
Contributor

holiman commented Oct 15, 2021

Reference transaction with high value:

rlpdump -hex f880806482520894d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0a1010000000000000000000000000000000000000000000000000000000000000001801ba0c16787a8e25e941d67691954642876c08f00996163ae7dfadbbfd6cd436f549da06180e5626cae31590f40641fe8f63734316c4bfeb4cdfab6714198c1044d2e28
[
  "",
  "d",
  5208,
  d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0,
  010000000000000000000000000000000000000000000000000000000000000001,
  "",
  1b,
  c16787a8e25e941d67691954642876c08f00996163ae7dfadbbfd6cd436f549d,
  6180e5626cae31590f40641fe8f63734316c4bfeb4cdfab6714198c1044d2e28,
]

@holiman
Copy link
Contributor

holiman commented Oct 15, 2021

@marioevz PTAL if #23743 does what you expect

@marioevz
Copy link
Member Author

It works great with value and gasPrice, I need to produce transaction tests for the other fields, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants