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 t8n execution log files #21373

Closed
winsvega opened this issue Jul 25, 2020 · 6 comments · Fixed by #21406
Closed

evm t8n execution log files #21373

winsvega opened this issue Jul 25, 2020 · 6 comments · Fixed by #21406
Assignees

Comments

@winsvega
Copy link
Contributor

winsvega commented Jul 25, 2020

the command I use to execute evm t8n:

/home/wins/.retesteth/t8ntool/start.sh --input.alloc /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/alloc.json --input.txs /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/txs.json --input.env /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/env.json --state.fork Istanbul --output.result /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/out.json --output.alloc /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/outAlloc.json

need to get the execution log from it running:

--trace   /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/trace.json
--trace.nomemory    /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/trace.json
--trace.nostack   /tmp/3d57a356-15f4-4ac4-9ed5-394c574debc3/trace.json

where trace.json contains tx execution log like

TXHASH: 
LOG

TXHASH: 
LOG

most cases we log only one transaction. so might need a selector argument:

--tracetxhash     (for already generated tests)
--tracetxindex    (when generating tests. tx hash is unknown)
@holiman
Copy link
Contributor

holiman commented Aug 3, 2020

This is a bit unclear to me. So here's how it works now. For each transaction, it spits out files like this: trace-0.jsonl, trace-1.jsonl etc.
I initially implemented trace-<hash>.jsonl, but realized that's not good.

  • A tx may be present twice in input, but the second one does not actually execute. However, the block inclusion index is unique per transaction.
  • The caller may not know the tx hash, so it' simpler to use inclusion number.

If you want trace with memory, just execute it again and specify that you want memory. Same with stack.

So as I see it, the only feature to add, would be to specify an output folder for the traces?

@holiman
Copy link
Contributor

holiman commented Aug 3, 2020

I propose that we use output.basedir, and put all output files into that directory when executing.

@winsvega
Copy link
Contributor Author

winsvega commented Aug 3, 2020

Yes like data dir is fine.

The thing with indexes is that it is easy to mix up the index compared to tx hash.

@holiman
Copy link
Contributor

holiman commented Aug 3, 2020 via email

@winsvega
Copy link
Contributor Author

winsvega commented Aug 3, 2020

seems good.
So

  1. output dir for the files.
  2. log names. index+hash

@winsvega
Copy link
Contributor Author

Merge?

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

Successfully merging a pull request may close this issue.

2 participants