Skip to content

Commit

Permalink
Merge pull request #290 from spencer-tb/update-error-names
Browse files Browse the repository at this point in the history
tests/cancun/eip4844_blobs: Update error naming
  • Loading branch information
spencer-tb authored Sep 13, 2023
2 parents 2c7abda + 66e7d0a commit 0ef22d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions tests/cancun/eip4844_blobs/test_blob_txs.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def test_insufficient_balance_blob_tx(
all_valid_blob_combinations(),
)
@pytest.mark.parametrize("account_balance_modifier", [-1], ids=["exact_balance_minus_1"])
@pytest.mark.parametrize("tx_error", ["insufficient_account_balance"], ids=[""])
@pytest.mark.parametrize("tx_error", ["insufficient account balance"], ids=[""])
@pytest.mark.valid_from("Cancun")
def test_insufficient_balance_blob_tx_combinations(
blockchain_test: BlockchainTestFiller,
Expand All @@ -668,8 +668,8 @@ def test_insufficient_balance_blob_tx_combinations(
@pytest.mark.parametrize(
"blobs_per_tx,tx_error,block_error",
[
([0], "zero_blob_tx", "zero_blob_tx"),
([SpecHelpers.max_blobs_per_block() + 1], None, "too_many_blobs"),
([0], "zero blob tx", "zero blob tx"),
([SpecHelpers.max_blobs_per_block() + 1], None, "too many blobs"),
],
ids=["too_few_blobs", "too_many_blobs"],
)
Expand Down Expand Up @@ -737,7 +737,7 @@ def test_invalid_tx_blob_count(
"multiple_txs_multiple_blobs_single_bad_hash_2",
],
)
@pytest.mark.parametrize("tx_error", ["invalid_versioned_hash"], ids=[""])
@pytest.mark.parametrize("tx_error", ["invalid blob versioned hash"], ids=[""])
@pytest.mark.valid_from("Cancun")
def test_invalid_blob_hash_versioning(
blockchain_test: BlockchainTestFiller,
Expand Down Expand Up @@ -1010,8 +1010,8 @@ def test_blob_tx_attribute_gasprice_opcode(
"engine_api_error_code",
],
[
([0], None, 1, "Invalid params", EngineAPIError.InvalidParams),
([1], None, 1, "Invalid params", EngineAPIError.InvalidParams),
([0], None, 1, "tx type 3 not allowed pre-Cancun", EngineAPIError.InvalidParams),
([1], None, 1, "tx type 3 not allowed pre-Cancun", EngineAPIError.InvalidParams),
],
ids=["no_blob_tx", "one_blob_tx"],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ def test_invalid_pre_fork_block_with_blob_fields(
Block(
timestamp=(FORK_TIMESTAMP - 1),
rlp_modifier=header_modifier,
exception="Invalid params",
exception="invalid pre fork blob fields",
engine_api_error_code=EngineAPIError.InvalidParams,
)
],
genesis_environment=env,
tag="invalid_pre_fork_excess_blob_gas",
tag="invalid_pre_fork_blob_fields",
)


Expand Down Expand Up @@ -213,12 +213,12 @@ def test_invalid_post_fork_block_without_blob_fields(
Block(
timestamp=FORK_TIMESTAMP,
rlp_modifier=header_modifier,
exception="Invalid params",
exception="blob fields missing post fork",
engine_api_error_code=EngineAPIError.InvalidParams,
)
],
genesis_environment=env,
tag="excess_blob_gas_missing_post_fork",
tag="blob_fields_missing_post_fork",
)


Expand Down

0 comments on commit 0ef22d8

Please sign in to comment.