ethereum / retesteth

testeth via RPC. Test run, generation by t8ntool protocol
http://retesteth.ethdevops.io/
GNU General Public License v3.0
113 stars 75 forks source link

Calculate nonce for the test writer in a blockchain test #116

Closed qbzzt closed 3 years ago

qbzzt commented 3 years ago

Blockchain tests can contain multiple transactions. If we decide to add a transaction in the middle, we need to renumber all the nonce values, which is a pain.

It would be nice if when we don't specify a nonce retesteth would just figure it out for us. The initial nonce is already known (from the pre section), and retesteth knows exactly what transactions are being executed and at what order.

winsvega commented 3 years ago

hm, that would be a conflict with tests that put txs with wrong nonce to produce a transaction with invalid nonce. also with the tests that has transaction order. (multiple transactions in one block)

perhaps a keyword woul be a solution? like:

nonce: "auto"
qbzzt commented 3 years ago

perhaps a keyword woul be a solution? like:

nonce: "auto"

I like that solution. It might be less confusing than just omitting the nonce.

winsvega commented 3 years ago

check with latest develop branch if its working well

qbzzt commented 3 years ago

It didn't work when I did the docker build myself, but when I downloaded it from http://retesteth.ethdevops.io/dretesteth.tar it worked great. Thank you.

I should add it to the docs, probably later today.