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

test: Check balance of an account sending a type-3 transaction mid-execution #385

Closed
marioevz opened this issue Jan 16, 2024 · 2 comments
Closed
Assignees
Labels
help wanted Extra attention is needed scope:tests Scope: Test cases type:test Type: Test

Comments

@marioevz
Copy link
Member

marioevz commented Jan 16, 2024

Add a test where we SSTORE the balance of the sender mid-execution when the transaction is a type-3 transaction:

contract_code = Op.SSTORE(0, Op.BALANCE(Op.ORIGIN))
...
tx = Transaction(
            ty=Spec.BLOB_TX_TYPE,
            nonce=tx_i,
            to=contract_address,
            value=tx_value,
            gas_limit=tx_gas,
            data=tx_calldata,
            max_fee_per_gas=tx_max_fee_per_gas,
            max_priority_fee_per_gas=tx_max_priority_fee_per_gas,
            max_fee_per_blob_gas=tx_max_fee_per_blob_gas,
            access_list=tx_access_list,
            blob_versioned_hashes=blob_hashes,
            error=tx_error if tx_i == (len(blob_hashes_per_tx) - 1) else None,
        )

Test using a similar parametrization to tests/cancun/eip4844_blobs/test_blob_txs.py::test_insufficient_balance_blob_tx.

This is to verify that all clients are subtracting the blob gas from the account before executing the transaction.

@marioevz marioevz added help wanted Extra attention is needed scope:tests Scope: Test cases type:test Type: Test labels Jan 16, 2024
@marioevz
Copy link
Member Author

Also add a case where the type-3 sender receives funds mid-execution.

@marioevz
Copy link
Member Author

Fixed by #407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed scope:tests Scope: Test cases type:test Type: Test
Projects
None yet
Development

No branches or pull requests

2 participants