From 176a5d227a105d0cf3a2d09a809a1514710d6bf6 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Fri, 22 Jul 2022 21:34:09 +0800 Subject: [PATCH] Move `merkle/single_proof` tests to `light_client/single_merkle_proof` --- .../test_single_merkle_proof.py} | 0 .../eth2spec/test/altair/merkle/__init__.py | 0 tests/formats/light_client/README.md | 1 + .../single_merkle_proof.md} | 0 tests/formats/merkle/README.md | 8 -------- tests/generators/light_client/main.py | 1 + tests/generators/merkle/README.md | 6 ------ tests/generators/merkle/__init__.py | 0 tests/generators/merkle/main.py | 16 ---------------- tests/generators/merkle/requirements.txt | 2 -- 10 files changed, 2 insertions(+), 32 deletions(-) rename tests/core/pyspec/eth2spec/test/altair/{merkle/test_single_proof.py => light_client/test_single_merkle_proof.py} (100%) delete mode 100644 tests/core/pyspec/eth2spec/test/altair/merkle/__init__.py rename tests/formats/{merkle/single_proof.md => light_client/single_merkle_proof.md} (100%) delete mode 100644 tests/formats/merkle/README.md delete mode 100644 tests/generators/merkle/README.md delete mode 100644 tests/generators/merkle/__init__.py delete mode 100644 tests/generators/merkle/main.py delete mode 100644 tests/generators/merkle/requirements.txt diff --git a/tests/core/pyspec/eth2spec/test/altair/merkle/test_single_proof.py b/tests/core/pyspec/eth2spec/test/altair/light_client/test_single_merkle_proof.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/altair/merkle/test_single_proof.py rename to tests/core/pyspec/eth2spec/test/altair/light_client/test_single_merkle_proof.py diff --git a/tests/core/pyspec/eth2spec/test/altair/merkle/__init__.py b/tests/core/pyspec/eth2spec/test/altair/merkle/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/formats/light_client/README.md b/tests/formats/light_client/README.md index 8c7571d4b..505b41601 100644 --- a/tests/formats/light_client/README.md +++ b/tests/formats/light_client/README.md @@ -3,5 +3,6 @@ This series of tests provides reference test vectors for the light client sync protocol spec. Handlers: +- `single_merkle_proof`: see [Single leaf merkle proof test format](./single_merkle_proof.md) - `sync`: see [Light client sync test format](./sync.md) - `update_ranking`: see [`LightClientUpdate` ranking test format](./update_ranking.md) diff --git a/tests/formats/merkle/single_proof.md b/tests/formats/light_client/single_merkle_proof.md similarity index 100% rename from tests/formats/merkle/single_proof.md rename to tests/formats/light_client/single_merkle_proof.md diff --git a/tests/formats/merkle/README.md b/tests/formats/merkle/README.md deleted file mode 100644 index c0f0a205b..000000000 --- a/tests/formats/merkle/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Merkle tests - -This series of tests provides reference test vectors for validating correct -generation and verification of merkle proofs based on static data. - -Handlers: -- `single_proof`: see [Single leaf proof test format](./single_proof.md) -- Different types of merkle proofs may be supported in the future. diff --git a/tests/generators/light_client/main.py b/tests/generators/light_client/main.py index ef6c2cbca..68a0da529 100644 --- a/tests/generators/light_client/main.py +++ b/tests/generators/light_client/main.py @@ -4,6 +4,7 @@ from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators if __name__ == "__main__": altair_mods = {key: 'eth2spec.test.altair.light_client.test_' + key for key in [ + 'single_merkle_proof', 'sync', 'update_ranking', ]} diff --git a/tests/generators/merkle/README.md b/tests/generators/merkle/README.md deleted file mode 100644 index a19a67d9e..000000000 --- a/tests/generators/merkle/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Merkle - -The purpose of this test-generator is to provide test-vectors for validating the -correct merkleization of objects and corresponding merkle proofs. - -Test-format documentation can be found [here](../../formats/merkle/README.md). diff --git a/tests/generators/merkle/__init__.py b/tests/generators/merkle/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/generators/merkle/main.py b/tests/generators/merkle/main.py deleted file mode 100644 index 5d07264ef..000000000 --- a/tests/generators/merkle/main.py +++ /dev/null @@ -1,16 +0,0 @@ -from eth2spec.test.helpers.constants import ALTAIR, BELLATRIX -from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators - - -if __name__ == "__main__": - altair_mods = {key: 'eth2spec.test.altair.merkle.test_' + key for key in [ - 'single_proof', - ]} - bellatrix_mods = altair_mods - - all_mods = { - ALTAIR: altair_mods, - BELLATRIX: bellatrix_mods, - } - - run_state_test_generators(runner_name="merkle", all_mods=all_mods) diff --git a/tests/generators/merkle/requirements.txt b/tests/generators/merkle/requirements.txt deleted file mode 100644 index 182248686..000000000 --- a/tests/generators/merkle/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pytest>=4.4 -../../../[generator]