paradigmxyz / revm-inspectors

EVM Execution Hooks.
Apache License 2.0
183 stars 71 forks source link

Document and pin solc version for testdata #175

Closed bernard-wagner closed 2 months ago

bernard-wagner commented 2 months ago

Currently testdata/Counter.sol specifies pragma solidity ^0.8.13;. When recompiling with a more recent version of solc the bytecode of the contract in test_trace_printing differs. This hinders the development of new tests.

Recommend pinning to an exact version of solc to ensure the bytecode is reproducible. Also worth including the solc --version output alongside the command information already provided.

Happy to make the PR, but not sure what version of solc was used to generate the current bytecode version. Tried using solc-select and compiling with [0.8.13...0.8.26] and I wasn't able to reproduce the bytecode.

DaniPopes commented 2 months ago

It doesn't really matter, the bytecode is embedded into the binary, if you want to update the test contract with new functions then just recompile with anything, paste the bytecode in, and automatically update the test assertions