From e2d5fd8e4f7b2c34dfd087a8ccc7fc8450f4b944 Mon Sep 17 00:00:00 2001 From: MariusVanDerWijden Date: Thu, 21 May 2026 16:16:13 +0200 Subject: [PATCH 1/2] tests: add BAL specific tests --- build/checksums.txt | 7 ++++++- build/ci.go | 20 +++++++++++++++++++- tests/block_test.go | 15 ++++++++++++--- tests/init_test.go | 23 ++++++++++++----------- 4 files changed, 49 insertions(+), 16 deletions(-) diff --git a/build/checksums.txt b/build/checksums.txt index e970236db0..87b9f8391a 100644 --- a/build/checksums.txt +++ b/build/checksums.txt @@ -1,10 +1,15 @@ # This file contains sha256 checksums of optional build dependencies. # version:spec-tests tests@v20.0.0 -# https://github.com/ethereum/execution-specs/releases +# https://github.com/ethereum/execution-spec-tests/releases # https://github.com/ethereum/execution-specs/releases/download/tests%40v20.0.0 b183702a5b447b465873865357ced9eb342315922e52e31b714e2de115dd0bb4 fixtures.tar.gz +# version:spec-tests-bal glamsterdam-devnet@v7.1.0 +# https://github.com/ethereum/execution-specs/releases +# https://github.com/ethereum/execution-specs/releases/download/tests-glamsterdam-devnet%40v7.1.0 +ba833a4c0a956bcc7d00118cd9aa817b8715ea4357ded9d3393d37ba89b182a9 fixtures_glamsterdam-devnet.tar.gz + # version:golang 1.25.12 # https://go.dev/dl/ f90dcee4bd023fa376374ea0a5a6ebe553537b39c426ffd8c689469b45519932 go1.25.12.src.tar.gz diff --git a/build/ci.go b/build/ci.go index 320e858e82..169a656f4e 100644 --- a/build/ci.go +++ b/build/ci.go @@ -160,6 +160,9 @@ var ( // This is where the tests should be unpacked. executionSpecTestsDir = "tests/spec-tests" + + // This is where the bal-specific release of the tests should be unpacked. + executionSpecTestsBALDir = "tests/spec-tests-bal" ) var GOBIN, _ = filepath.Abs(filepath.Join("build", "bin")) @@ -398,6 +401,7 @@ func doTest(cmdline []string) { // Get test fixtures. if !*short { downloadSpecTestFixtures(csdb, *cachedir) + downloadBALSpecTestFixtures(csdb, *cachedir) } // Configure the toolchain. @@ -452,7 +456,7 @@ func doTest(cmdline []string) { // downloadSpecTestFixtures downloads and extracts the execution-spec-tests fixtures. func downloadSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string { ext := ".tar.gz" - base := "fixtures" + base := "fixtures_develop" archivePath := filepath.Join(cachedir, base+ext) if err := csdb.DownloadFileFromKnownURL(archivePath); err != nil { log.Fatal(err) @@ -463,6 +467,20 @@ func downloadSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string return filepath.Join(cachedir, base) } +// downloadBALSpecTestFixtures downloads and extracts the bal-specific execution-spec-tests fixtures. +func downloadBALSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string { + ext := ".tar.gz" + base := "fixtures_glamsterdam-devnet" + archivePath := filepath.Join(cachedir, base+ext) + if err := csdb.DownloadFileFromKnownURL(archivePath); err != nil { + log.Fatal(err) + } + if err := build.ExtractArchive(archivePath, executionSpecTestsBALDir); err != nil { + log.Fatal(err) + } + return filepath.Join(cachedir, base) +} + // doCheckGenerate ensures that re-generating generated files does not cause // any mutations in the source file tree. func doCheckGenerate() { diff --git a/tests/block_test.go b/tests/block_test.go index a054e59e0f..5a1eec82a7 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -82,8 +82,17 @@ func TestBlockchain(t *testing.T) { // TestExecutionSpecBlocktests runs the test fixtures from execution-spec-tests. func TestExecutionSpecBlocktests(t *testing.T) { - if !common.FileExist(executionSpecBlockchainTestDir) { - t.Skipf("directory %s does not exist", executionSpecBlockchainTestDir) + testExecutionSpecBlocktests(t, executionSpecBlockchainTestDir) +} + +// TestExecutionSpecBlocktestsBAL runs the BAL release test fixtures from execution-spec-tests. +func TestExecutionSpecBlocktestsBAL(t *testing.T) { + testExecutionSpecBlocktests(t, executionSpecBALBlockchainTestDir) +} + +func testExecutionSpecBlocktests(t *testing.T, testDir string) { + if !common.FileExist(testDir) { + t.Skipf("directory %s does not exist", testDir) } bt := new(testMatcher) @@ -95,7 +104,7 @@ func TestExecutionSpecBlocktests(t *testing.T) { bt.skipLoad(`.*eip7610_create_collision/initcollision/.*`) bt.skipLoad(`.*eip7610_create_collision/revert_in_create/.*`) - bt.walk(t, executionSpecBlockchainTestDir, func(t *testing.T, name string, test *BlockTest) { + bt.walk(t, testDir, func(t *testing.T, name string, test *BlockTest) { execBlockTest(t, bt, test) }) } diff --git a/tests/init_test.go b/tests/init_test.go index b933c9808c..bd4dbcf1f4 100644 --- a/tests/init_test.go +++ b/tests/init_test.go @@ -34,17 +34,18 @@ import ( ) var ( - baseDir = filepath.Join(".", "testdata") - blockTestDir = filepath.Join(baseDir, "BlockchainTests") - stateTestDir = filepath.Join(baseDir, "GeneralStateTests") - legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests") - transactionTestDir = filepath.Join(baseDir, "TransactionTests") - rlpTestDir = filepath.Join(baseDir, "RLPTests") - difficultyTestDir = filepath.Join(baseDir, "BasicTests") - executionSpecBlockchainTestDir = filepath.Join(".", "spec-tests", "fixtures", "blockchain_tests") - executionSpecStateTestDir = filepath.Join(".", "spec-tests", "fixtures", "state_tests") - executionSpecTransactionTestDir = filepath.Join(".", "spec-tests", "fixtures", "transaction_tests") - benchmarksDir = filepath.Join(".", "evm-benchmarks", "benchmarks") + baseDir = filepath.Join(".", "testdata") + blockTestDir = filepath.Join(baseDir, "BlockchainTests") + stateTestDir = filepath.Join(baseDir, "GeneralStateTests") + legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests") + transactionTestDir = filepath.Join(baseDir, "TransactionTests") + rlpTestDir = filepath.Join(baseDir, "RLPTests") + difficultyTestDir = filepath.Join(baseDir, "BasicTests") + executionSpecBlockchainTestDir = filepath.Join(".", "spec-tests", "fixtures", "blockchain_tests") + executionSpecBALBlockchainTestDir = filepath.Join(".", "spec-tests-bal", "fixtures", "blockchain_tests") + executionSpecStateTestDir = filepath.Join(".", "spec-tests", "fixtures", "state_tests") + executionSpecTransactionTestDir = filepath.Join(".", "spec-tests", "fixtures", "transaction_tests") + benchmarksDir = filepath.Join(".", "evm-benchmarks", "benchmarks") ) func readJSON(reader io.Reader, value interface{}) error { From 475e75392612fc642610c9f39931ce883a5e245f Mon Sep 17 00:00:00 2001 From: MariusVanDerWijden Date: Thu, 16 Jul 2026 12:48:34 +0200 Subject: [PATCH 2/2] f --- build/checksums.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/checksums.txt b/build/checksums.txt index 87b9f8391a..51257365b4 100644 --- a/build/checksums.txt +++ b/build/checksums.txt @@ -1,7 +1,7 @@ # This file contains sha256 checksums of optional build dependencies. # version:spec-tests tests@v20.0.0 -# https://github.com/ethereum/execution-spec-tests/releases +# https://github.com/ethereum/execution-specs/releases # https://github.com/ethereum/execution-specs/releases/download/tests%40v20.0.0 b183702a5b447b465873865357ced9eb342315922e52e31b714e2de115dd0bb4 fixtures.tar.gz