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

t8ntool / evm transaction structure unit test interface #23486

Closed
winsvega opened this issue Aug 28, 2021 · 0 comments · Fixed by #23494
Closed

t8ntool / evm transaction structure unit test interface #23486

winsvega opened this issue Aug 28, 2021 · 0 comments · Fixed by #23494
Assignees

Comments

@winsvega
Copy link
Contributor

a protocol/command to run transaction structure unit tests.
input: transaction rlp, fork rule
output: bool valid/invalid, recovered sender if any

Rationale

We have ttTransactionTests which are currently not maintained. the paradigm require a client opinion on whether provided transaction structure is valid or not.

By asking a client if it thinks the provided transaction rlp is good or not (hypothetically) without any state, env info, we can revive the ttTransaction tests that test transaction structure parsing.

Implementation

  • Geth accept transaction rlp
  • Checks the structure validity (number of fields for given transaction type, validity of RLP format)
  • Checks that fields are in allowed range (0...2 ** 256), max data length, 2 ** 64 for gasLimit (rules might be different depending on fork)
  • Checks that gasLimit cover intrinsic transaction price (intrinsic transaction price + data bytes price)
  • Recovers sender address
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