Files
linea-besu/ethereum/evmtool
Danno Ferrin 0810b73ee3 Refactor BlockHashOperation block height check into Operation (#8091)
* Refactor BlockHashOperation block height check into Operation

Refactor the 4 different places block height is checked across Besu into
the BlockHashOperation. Add support to make the lookback range
configurable in the BlockHashLookup interface, but default it to 256.

Signed-off-by: Danno Ferrin <danno@numisight.com>

* spotless

Signed-off-by: Danno Ferrin <danno@numisight.com>

* javadoc

Signed-off-by: Danno Ferrin <danno@numisight.com>

* Update Unit Tests to use the operation.

Signed-off-by: Danno Ferrin <danno@numisight.com>

* Update Unit Tests to use the operation.

Signed-off-by: Danno Ferrin <danno@numisight.com>

---------

Signed-off-by: Danno Ferrin <danno@numisight.com>
2025-01-13 15:51:11 +00:00
..
2024-06-28 12:37:16 +00:00
2023-07-27 12:51:37 -07:00

EVM Tool

EVM Tool is a stand alone EVM executor and test execution tool. The principal purpose of the tool is for testing and validation of the EVM and enclosing data structures.

Using EVM Tool in execution-specification-tests

Building Execution Tests on macOS

Current as of 26 Jun 2024.

MacOS users will typically encounter two problems,one relating to the version of Python used and one relating to zsh.

Homebrew will only install the most recent version of Python as python3, and that is 3.11. The execution tests require 3.10. The solution is to use a 3.10 version of python to set up the virtual environment.

python3.10 -m venv ./venv/

Zsh requires braces to be escaped in the command line, so the step to install python packages needs to escape the brackets

pip install -e .\[docs,lint,test\]

An all-in-one script, using homebrew, would look like

brew install ethereum solidity
git clone https://github.com/ethereum/execution-spec-tests
cd execution-spec-tests
python3 -m venv ./venv/
source ./venv/bin/activate
pip install -e .\[docs,lint,test\]

Building EvmTool on macOS

First you need a Java 21+ JDK installed, if not already installed.

It is recommended you install SDKMAN to manage the jvm install.

sdk install java 21.0.3-tem 
sdk use java 21.0.3-tem

Once a JVM is installed you use the gradle target:

./gradlew installDist -x test

The resulting binary is build/install/besu/bin/evmtool

If the testing repository and besu are installed in the same parent directory, the command to run the execution tests is

fill -v tests --evm-bin ../besu/build/install/besu/bin/evmtool 

Assuming homebrew and SDKMan are both installed, the complete script is

sdk install java 21.0.3-tem 
sdk use java 21.0.3-tem
git clone https://github.com/hyperledger/besu
cd besu
./gradlew installDist -x test
cd ..

brew install ethereum solidity
solc-select install latest
solc-select use latest
git clone https://github.com/ethereum/execution-spec-tests
cd execution-spec-tests
python3 -m venv ./venv/
source ./venv/bin/activate
pip install -e .\[docs,lint,test\]

fill -v tests --evm-bin ../besu/build/install/besu/bin/evmtool