-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Improve aleth-vm tool interface #4613
Comments
I'll do it! |
@chfast Mind if I run with this issue? |
@AnthonyBroadCrawford if you still interested, yes. |
@chfast Actually, I am. I've been super busy lately but I have a nice month where I have the capacity to complete this. I'll provide another update by the end of the week. Thank you so much for the nudge. |
@chfast quite confused, should this be an |
This is about |
@chfast okay, I would love to work on this, but where could I ask some questions, if I'm stuck on something. The description above is basically the feature to add in |
@josephnicholas Feel free to reach us at https://gitter.im/ethereum/aleth (better tag either me or @chfast, otherwise we might miss it) These features I think are already present in some form in aleth-vm (maybe except |
@gumb0 I started on this yesterday, I tried to compare So, to ask once again on the coverage of this task, should I just implement Maybe I can assume |
Update from my side:
This is what we use to do fuzzing, and is easier to use as a canonical representation of a prestate than trying to provide each client with a custom genesis, code etc. |
the option One important aspect is that the execution should not hold on to the data during the entire execution, and spit it out as a json array. Instead, it should output |
@josephnicholas Yes, please start with anything. If it gets too big of a change, it's better to finish first some subset of requirements in the description.
You don't need to consult with geth code for that. |
@holiman Thanks for the input, I'd say running a state test would be another, somewhat more complicated task. It's the same format as the tests in https://github.com/ethereum/tests/tree/develop/GeneralStateTests, right? This issue is more about normalizing the interface of existing functionality of aleth-vm. |
Yes. An example testcase and the output from geth and parity respectively can be found here: https://github.com/holiman/goevmlab/tree/master/evms/testdata |
@josephnicholas Actually aleth-vm already does that, just not with |
@gumb0 Thanks, I will prioritize |
Hey @josephnicholas do you still plan to work on this? |
@gumb0 yes.. went on vacation will continue working on this when I get back |
After the changes in #5839 the output from |
@gumb0 my apologies on not giving anything on what I promised, there is no excuse but I have been really busy with my day job. :( |
@gumb0 awesome! |
@holiman Looks like aleth-vm is not part of the docker image. I can fix this soon. We can also make a snapshot release so binaries will be available on GitHub. |
I actually did manage to build it. However:
git version |
The stdout contains non-jsonl
It's not a biggie, I can easily ignore that, just FYI |
@holiman sorry about confusion, for aleth-vm the command line is actually like this:
It doesn't have summary lines in the end, and it still accumulates all lines before printing, unlike in testeth. |
Thanks, but that's fine, |
Good day @gumb0 and @chfast so based on the original list how many are done and are open for development?
Pleas correct me if I am wrong on the list, but the remaining stuff to worked on are the remaining unchecked ones correct? Thanks. |
Just fyi, that from my end, I'm happy about the current implementation via |
@josephnicholas We think it's not worth to spend more time on this, as further changes are not really needed by anyone. So we'll close this. |
From @holiman:
It's here: ethereum/tests#249 (comment) . But I'll add my tldr; (which also became quite long):
Input
The
evm
should take the following inputs:--code <code>
- code to be executed.--codeFile <file>
- file containing code to be executed. Sometimes really large chunks of input cannot be passed through bash.--gas <int>
--price <int>
--sender <address>
- address ofORIGIN
--receiver <address
- address ofADDRESS
--input <code>
:CALLDATA
--value <int>
--json
- boolean flag, output json output for each opcode or not (it's useful to disable json when benchmarking)--nomemory
- disable showing the full memory output for each op--create
- if specified, it's executed as initcode--prestate
- a chain specification, the same one that the client normally would use.Basically, the
evm
should be able to run things very simply, like so:But it should also be able to reconstruct an actual on-chain transaction, with complex options including prestate, where no
code
is passed, since it's already been showed into theprestate
:Output
The
evm
should output ajson
object for each operation. Example:Required:
pc
,op
,gas
,stack
,depth
Optional:
opName
,gasCost
,error
The
stack
,memory
andmemSize
are the values before execution of the op.At the end of execution, some summarical info is good, e.g.
When errors occur, geth and parity handles them differently.
Minor changes to how things work is ok, we can handle discrepancies in format and minor quirks.
The text was updated successfully, but these errors were encountered: