Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 12 additions & 29 deletions bins/revme/src/cmd/blockchaintest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,19 @@ fn fork_to_spec_id(fork: ForkSpec) -> SpecId {

/// Check if a test should be skipped based on its filename
fn skip_test(path: &Path) -> bool {
let name = path.file_name().unwrap().to_str().unwrap();
let path_str = path.to_str().unwrap_or_default();
// blobs excess gas calculation is not supported or osaka BPO configuration
if path_str.contains("paris/eip7610_create_collision")
|| path_str.contains("cancun/eip4844_blobs")
|| path_str.contains("prague/eip7251_consolidations")
|| path_str.contains("prague/eip7685_general_purpose_el_requests")
|| path_str.contains("prague/eip7002_el_triggerable_withdrawals")
|| path_str.contains("osaka/eip7918_blob_reserve_price")
{
return true;
}

let name = path.file_name().unwrap().to_str().unwrap();
// Add any problematic tests here that should be skipped
matches!(
name,
Expand Down Expand Up @@ -1021,36 +1032,8 @@ fn skip_test(path: &Path) -> bool {
| "correct_increasing_blob_gas_costs.json"
| "correct_decreasing_blob_gas_costs.json"

// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_negative_excess_blob_gas.json
| "invalid_negative_excess_blob_gas.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_excess_blob_gas_change.json
| "invalid_excess_blob_gas_change.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_static_excess_blob_gas.json
| "invalid_static_excess_blob_gas.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_excess_blob_gas_target_blobs_increase_from_zero.json
| "invalid_excess_blob_gas_target_blobs_increase_from_zero.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_zero_excess_blob_gas_in_header.json
| "invalid_zero_excess_blob_gas_in_header.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_excess_blob_gas_above_target_change.json
| "invalid_excess_blob_gas_above_target_change.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_non_multiple_excess_blob_gas.json
| "invalid_non_multiple_excess_blob_gas.json"
// test-fixtures/main/develop/blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_static_excess_blob_gas_from_zero_on_blobs_above_target.json
| "invalid_static_excess_blob_gas_from_zero_on_blobs_above_target.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip7251_consolidations/modified_consolidation_contract/system_contract_errors.json
| "system_contract_errors.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json
| "consolidation_requests.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history.json
| "block_hashes_history.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip7685_general_purpose_el_requests/multi_type_requests/valid_multi_type_request_from_same_tx.json
| "valid_multi_type_request_from_same_tx.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip7685_general_purpose_el_requests/multi_type_requests/valid_multi_type_requests.json
| "valid_multi_type_requests.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip7002_el_triggerable_withdrawals/modified_withdrawal_contract/system_contract_errors.json
//| "system_contract_errors.json"
// test-fixtures/main/develop/blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests/withdrawal_requests.json
| "withdrawal_requests.json"
)
}

Expand Down
13 changes: 9 additions & 4 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ pub fn find_all_json_tests(path: &Path) -> Vec<PathBuf> {
/// Check if a test should be skipped based on its filename
/// Some tests are known to be problematic or take too long
fn skip_test(path: &Path) -> bool {
let Some(name) = path.file_name().and_then(|s| s.to_str()) else {
// Non-UTF file names or missing file name: do not skip by default.
return false;
};
let path_str = path.to_str().unwrap_or_default();

// Skip tets that have storage for newly created account.
if path_str.contains("paris/eip7610_create_collision") {
return true;
}

let name = path.file_name().unwrap().to_str().unwrap_or_default();

matches!(
name,
Expand All @@ -107,6 +111,7 @@ fn skip_test(path: &Path) -> bool {
| "create2collisionStorageParis.json"
| "InitCollision.json"
| "InitCollisionParis.json"
| "test_init_collision_create_opcode.json"

// Malformed value.
| "ValueOverflow.json"
Expand Down
19 changes: 5 additions & 14 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ set -eo pipefail
# Usage: ./scripts/run-tests.sh --help

# Version for the execution spec tests
MAIN_VERSION="v4.5.0"
DEVNET_VERSION="fusaka-devnet-5@v1.1.0"
MAIN_VERSION="v5.3.0"
DEVNET_VERSION="fusaka-devnet-5@v2.1.0"

### Directories ###
FIXTURES_DIR="test-fixtures"

MAIN_DIR="$FIXTURES_DIR/main"
MAIN_STABLE_DIR="$MAIN_DIR/stable"
MAIN_DEVELOP_DIR="$MAIN_DIR/develop"
MAIN_STATIC_DIR="$MAIN_DIR/static"

DEVNET_DIR="$FIXTURES_DIR/devnet"
DEVNET_DEVELOP_DIR="$DEVNET_DIR/develop"
Expand All @@ -25,7 +24,6 @@ FIXTURES_URL="https://github.com/ethereum/execution-spec-tests/releases/download

MAIN_STABLE_TAR="fixtures_stable.tar.gz"
MAIN_DEVELOP_TAR="fixtures_develop.tar.gz"
MAIN_STATIC_TAR="fixtures_static.tar.gz"

DEVNET_TAR="fixtures_fusaka-devnet-5.tar.gz"

Expand Down Expand Up @@ -74,7 +72,7 @@ clean() {

# Check if all required fixture directories exist
check_fixtures() {
if [ -d "$MAIN_STABLE_DIR" ] && [ -d "$MAIN_DEVELOP_DIR" ] && [ -d "$MAIN_STATIC_DIR" ] && [ -d "$DEVNET_DIR" ] && [ -d "$LEGACY_DIR" ]; then
if [ -d "$MAIN_STABLE_DIR" ] && [ -d "$MAIN_DEVELOP_DIR" ] && [ -d "$DEVNET_DIR" ] && [ -d "$LEGACY_DIR" ]; then
return 0
else
return 1
Expand Down Expand Up @@ -102,15 +100,14 @@ download_and_extract() {
# Download all fixtures
download_fixtures() {
echo "Creating fixtures directory structure..."
mkdir -p "$MAIN_STABLE_DIR" "$MAIN_DEVELOP_DIR" "$MAIN_STATIC_DIR" "$DEVNET_DIR" "$LEGACY_DIR"
mkdir -p "$MAIN_STABLE_DIR" "$MAIN_DEVELOP_DIR" "$DEVNET_DIR" "$LEGACY_DIR"

download_and_extract "$MAIN_STABLE_DIR" "$MAIN_STABLE_TAR" "main stable" "$MAIN_VERSION"
download_and_extract "$MAIN_DEVELOP_DIR" "$MAIN_DEVELOP_TAR" "main develop" "$MAIN_VERSION"
download_and_extract "$MAIN_STATIC_DIR" "$MAIN_STATIC_TAR" "main static" "$MAIN_VERSION"
download_and_extract "$DEVNET_DIR" "$DEVNET_TAR" "devnet" "$DEVNET_VERSION"

echo "Cleaning up tar files..."
rm "${FIXTURES_DIR}/${MAIN_STABLE_TAR}" "${FIXTURES_DIR}/${MAIN_DEVELOP_TAR}" "${FIXTURES_DIR}/${MAIN_STATIC_TAR}" "${FIXTURES_DIR}/${DEVNET_TAR}"
rm "${FIXTURES_DIR}/${MAIN_STABLE_TAR}" "${FIXTURES_DIR}/${MAIN_DEVELOP_TAR}" "${FIXTURES_DIR}/${DEVNET_TAR}"

# Clone legacytests repository
echo "Cloning legacytests repository..."
Expand Down Expand Up @@ -147,9 +144,6 @@ run_tests() {

echo "Running main develop statetests..."
$RUST_RUNNER run $CARGO_OPTS -p revme -- statetest "$MAIN_DEVELOP_DIR/state_tests"

echo "Running main static statetests..."
$RUST_RUNNER run $CARGO_OPTS -p revme -- statetest "$MAIN_STATIC_DIR/state_tests"

echo "Running devnet statetests..."
$RUST_RUNNER run $CARGO_OPTS -p revme -- statetest "$DEVNET_DIR/state_tests"
Expand All @@ -160,9 +154,6 @@ run_tests() {
echo "Running main develop blockchain tests..."
$RUST_RUNNER run $CARGO_OPTS -p revme -- btest "$MAIN_DEVELOP_DIR/blockchain_tests"

echo "Running main static blockchain tests..."
$RUST_RUNNER run $CARGO_OPTS -p revme -- btest "$MAIN_STATIC_DIR/blockchain_tests"

echo "Running main stable blockchain tests..."
$RUST_RUNNER run $CARGO_OPTS -p revme -- btest "$MAIN_STABLE_DIR/blockchain_tests"
}
Expand Down
Loading