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

transaction auto nonce calculation does now work when sender is used in auth tuples #1034

Open
winsvega opened this issue Dec 19, 2024 · 1 comment

Comments

@winsvega
Copy link
Contributor

Looks like nonce auto increment does not account for auth tuple coming from sender

@marioevz
Copy link
Member

marioevz commented Jan 7, 2025

This is because of the way how the authorization tuples are processed first before the Transaction initialization method is invoked:

sender = pre.fund_eoa()
Transaction(
        gas_limit=10_000_000,
        to=auth_signer_1,
        value=value,
        authorization_list=[
            AuthorizationTuple(
                address=set_code_to_address_1,
                nonce=1,
                signer=sender,
            ),
            AuthorizationTuple(
                address=set_code_to_address_2,
                nonce=2,
                signer=sender,
            ),
        ],
        sender=sender,
    )

In this example, if AuthorizationTuple bumped the nonce for sender, by the time Transaction started its process and read sender.nonce its value would be 2.

Furthermore, since both calls to AuthorizationTuple are processed first, the nonce for them would be 0 and 1 respectively, when they should be 1 and 2.

I'm not sure if there's a way to solve this but have not thought that much about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants