Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): add a test to check that a contract creating blob tx is invalid #330

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Oct 12, 2023

πŸ—’οΈ Description

Adds a test that a type 3 transaction that sets the tx to field to nil is invalid.

t8n tool: marioevz/go-ethereum@86b482b

πŸ”— Related Issues

N/A

βœ… Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@danceratopz danceratopz added type:test Type: Test type:feat type: Feature labels Oct 12, 2023
Copy link
Member Author

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a start, not confident this generating a valid fixture yet! Feel free to pick this up.

@pytest.mark.parametrize("destination_account", [None], ids=[""])
@pytest.mark.parametrize("tx_calldata", [Initcode(deploy_code=Op.SSTORE(0, 1))], ids=[""])
@pytest.mark.parametrize("tx_gas", [100_000], ids=[""])
@pytest.mark.parametrize("tx_error", ["contract creation not possible in blob tx"], ids=[""])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just made up this tx_error message (didn't find one). But, it could be that it's not checked/used due to the if in L279:

https://github.com/danceratopz/execution-spec-tests/blob/a9f31ffd803502b13043227589d517aaa128b0a3/tests/cancun/eip4844_blobs/test_blob_txs.py#L251-L279

@danceratopz
Copy link
Member Author

Closing as maintaining our own custom version of geth that bypasses transaction marshalling, cf marioevz/go-ethereum@86b482b is not really a feasible long-term solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feat type: Feature type:test Type: Test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant