Skip to content

Commit

Permalink
Merge pull request #2 from marioevz/pytest-eip-4844-blobhash-tests
Browse files Browse the repository at this point in the history
Fixes to EIP 4844 blobhash PR
  • Loading branch information
spencer-tb committed Jun 6, 2023
2 parents 7b77648 + 9268288 commit 351c984
Show file tree
Hide file tree
Showing 7 changed files with 490 additions and 414 deletions.

Large diffs are not rendered by default.

This file was deleted.

2 changes: 1 addition & 1 deletion fillers/eips/eip4844/test_blobhash_opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
random_blob_hashes,
)

# TODO: uncomment post fork improvement merged
# TODO: un-comment post fork improvement merged
# pytestmark = pytest.mark.valid_from("Cancun")
pytestmark = pytest.mark.parametrize("fork", forks_from(Cancun))

Expand Down
2 changes: 1 addition & 1 deletion fillers/eips/eip4844/test_blobhash_opcode_contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from .util_blobhash import BlobhashContext, simple_blob_hashes

# TODO: uncomment post fork improvement merged
# TODO: un-comment post fork improvement merged
# pytestmark = pytest.mark.valid_from("Cancun")
pytestmark = pytest.mark.parametrize("fork", forks_from(Cancun))

Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ console_output_style = count
minversion = 7.0
python_files = *.py
testpaths = fillers/
norecursedirs = fillers/eips/eip4844
addopts =
-p pytest_plugins.latest_fork
-p pytest_plugins.spec_version_checker
Expand Down
4 changes: 3 additions & 1 deletion src/ethereum_test_tools/common/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ def to_hash(input: int | str) -> str:
return "0x" + to_hash_bytes(input).hex()


def add_kzg_version(b_hashes: List[bytes], kzg_version: int) -> List[bytes]:
def add_kzg_version(
b_hashes: List[bytes | int | str], kzg_version: int
) -> List[bytes]:
"""
Adds the Kzg Version to each blob hash.
"""
Expand Down
2 changes: 2 additions & 0 deletions whitelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ wd
wds
u256
utils
util
validator
vm
gwei
Expand Down Expand Up @@ -259,6 +260,7 @@ modifyitems
originalname
parametrized
param
params
parametrize
pytestmark
runtest
Expand Down

0 comments on commit 351c984

Please sign in to comment.