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 is extremely slow #5229

Open
winsvega opened this issue Mar 16, 2023 · 11 comments
Open

evm t8n is extremely slow #5229

winsvega opened this issue Mar 16, 2023 · 11 comments

Comments

@winsvega
Copy link

I can't batch execute tests on besu's evm cause it takes too long time. been running the whole day not even half the state tests finished.
is it because besu java is slow on deployment for each individual test?
in rpc mode was fast.

@shemnon
Copy link
Contributor

shemnon commented Mar 17, 2023

Java has a huge startup penalty, to JIT all the java classes. To address this I am working on getting GraalVM builds of the evmtool - #5192

@winsvega
Copy link
Author

ethereumjs implemented t8n as a service. they start it once and then listener accept http requests and writes response with t8n format to the filesystem

@shemnon
Copy link
Contributor

shemnon commented Mar 17, 2023

That can be done too. Can you point me to their interface requirements or what retesteth will need interface wise?

@winsvega
Copy link
Author

winsvega commented Mar 17, 2023

this is how I start the daemon

cd $ETHEREUMJS_PATH/packages/vm
npx ts-node test/retesteth/transition-cluster.ts &> /dev/null &

stop

killall node

and run a t8n request:

curl -X POST -d "${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20}" --silent http://localhost:3000/

Basically all the t8n flags go as $1 $2 args to the daemon.
This is what they gave me. btw. I think pyspecs can also work with this.

@shemnon
Copy link
Contributor

shemnon commented Mar 17, 2023

so are there only 2 args or are they quoted or newlined?

@winsvega
Copy link
Author

winsvega commented Mar 17, 2023

it will look like this if to open ${} bash args

curl -X POST -d "--state.fork ArrowGlacier --state.reward 0 --state.chainid 1 --input.alloc /dev/shm/e9bab9d9-8dc8-4812-91bd-4919b0f67552/alloc.json --input.txs /dev/shm/e9bab9d9-8dc8-4812-91bd-4919b0f67552/txs.rlp --input.env /dev/shm/e9bab9d9-8dc8-4812-91bd-4919b0f67552/env.json --output.basedir /dev/shm/e9bab9d9-8dc8-4812-91bd-4919b0f67552 --output.result out.json --output.alloc outAlloc.json" --silent http://localhost:3000/

@shemnon
Copy link
Contributor

shemnon commented Mar 17, 2023

So all inputs and outputs will be via files, and there is no streaming output from the HTTP, it's just CLI args one test per line?

@winsvega
Copy link
Author

winsvega commented Mar 17, 2023

in this case yes.
but since its a script. you can reply via curl and .sh script can write the files. so it can be a remote host too

@non-fungible-nelson
Copy link
Contributor

Hey @shemnon - any ideas on what to do with this ticket? or tracking progress in a PR elsewhere?

@winsvega
Copy link
Author

winsvega commented Apr 4, 2023

When you have time would be nice to have smth like ethereumjs do. Starting t8n as a daemon accepting requests without class reload.
Then I will be able to run all the tests we have in reasonable time.

@winsvega
Copy link
Author

I see besu t8n fails some tests for sure.
info: (ValidBlocks/bcExample/optionsTest_London, fork: London, block: 3) reported different stateRoot

but I can't check it all without the speed/daemon optimization.

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

No branches or pull requests

3 participants