-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
cmd/evm: transaction validation tool #23494
Conversation
this can be the behaviour on t8n when pre and env are not provided. |
I'm not sure. I think it may be better to have very well-specified one-job tools, instead of having implicit behaviour changes based on the presence/absence of inputs. |
I fhinished implementation on my side. One question. The transaction hash calculation would always stay the same as "hash of (bytespayload)" test example: |
I think so yes. Want me to add hash to output aswell?
|
the hash is just the hash of byte data that coming in? so even if rlp is invalid it is still being calculated. |
Yep, I agree
|
@winsvega hashes are now added. Please give it a spin and 👍 or 👎 |
doesn't compile
|
ok |
@winsvega fixed, PTAL |
Yes, it's good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
* cmd/evm: transaction validation tool * cmd/evm: add hash to t9n tool * cmd/evm: lint nits * cmd/evm: nitpicks
This is a tool to fix #23486, provide a tool for test-makers to validate transactions, based on a fork but no state.
Follow-up to #23507
The input is a json string, the contents of which must be a hex-encoded RLP list.
The elements in the RLP list can be anything -- a transaction or a
"hello world"
. If the input is not an RLP list, the input is considered invalid.For each element in the list, validation is performed as if it were a transaction, and each result is (for now) echoed on the output (subject to change -- it'll be json eventually).
Example input data :
Examples below no longer accurate, output format changed
On homestead:
On London:
cc @winsvega