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

EELS failing to generate test with access list transaction and chainid = 0 #1214

Open
winsvega opened this issue Feb 13, 2025 · 1 comment
Open
Labels
scope:fill Scope: fill command type:bug Something isn't working

Comments

@winsvega
Copy link
Contributor

@pytest.mark.valid_from("Berlin")
def test_unit_test(state_test: StateTestFiller, pre: Alloc):
    """bug"""
    env = Environment(
        fee_recipient="0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
        difficulty=0x20000,
        gas_limit=10000000000,
        number=1,
        timestamp=1000,
    )

    pre2 = {
        0x1000000000000000000000000000000000000000: Account(code="0x4660015500"),
        "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": Account(balance=1000000000000000000000),
    }

    tx = Transaction(
        ty=0x1,
        chain_id=0x0,
        nonce=0,
        to="0x1000000000000000000000000000000000000000",
        gas_limit=100000000,
        gas_price=10,
        access_list=[
            AccessList(
                address=0x1234,
                storage_keys=[0, 1],
            )
        ],
    )

    post = {
        "0x1000000000000000000000000000000000000000": Account(
            code="0x4660015500", storage={"0x01": "0x01"}
        ),
    }

    state_test(env=env, pre=pre2, post=post, tx=tx)

fails with:
"error": "Failed transaction: InvalidBlock()"

if I put chainid = 0 it fails with this error. although it should generate test with any chain id no?

@winsvega winsvega added type:bug Something isn't working scope:fill Scope: fill command labels Feb 13, 2025
@marioevz
Copy link
Member

marioevz commented Feb 13, 2025

There's no support (I think) in t8n at the moment for multiple chain IDs.

If there was, I don't think we should infer the environment's chain id from the transaction.

So, at the very least, along with the chain_id=0x0 in the transaction, there should be a chain_id=0x0 specified for the execution context somewhere, and this value should be passed to t8n for it configure itself to a different chain id and to accept txs with chain ID != 1.

Also the value should end up in the FixtureConfig after filling the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fill Scope: fill command type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants