Skip to content

eip2930: use alloy TxEip2930#10623

Merged
klkvr merged 19 commits intoparadigmxyz:mainfrom
tcoratger:TxEip2930
Sep 1, 2024
Merged

eip2930: use alloy TxEip2930#10623
klkvr merged 19 commits intoparadigmxyz:mainfrom
tcoratger:TxEip2930

Conversation

@tcoratger
Copy link
Contributor

@tcoratger tcoratger commented Aug 30, 2024

Related #9484

@tcoratger tcoratger marked this pull request as ready for review August 30, 2024 12:03
@klkvr klkvr mentioned this pull request Aug 30, 2024
1 task
@tcoratger
Copy link
Contributor Author

@klkvr Seems like we have an overflow issue here in the proptest, I imagine with the gas_limit. I've seen for example in the log

 transaction: Eip2930(
                TxEip2930 {
                    chain_id: 3291341489588165751,
                    nonce: 14906479109494292543,
                    gas_price: 55689700555394906303085696969414843071,
                    gas_limit: 318428246144358250530485492401114899755,
                    to: Create,
                    value: 66313936203721210645241833585571478386497671455018825453644050639460415969048,
                    access_list: AccessList(
                        [],
                    ),
                    input: 0x,
                },
            ),

I imagine that this is due to the proptest which generates a random u128 for the gas_limit but this cannot be converted to u64 then, I think it's the issue here...

On alloy side, do we really need the gas limit to be u128 or could we move to u64?

@klkvr
Copy link
Member

klkvr commented Aug 30, 2024

yeah, for now we've added workaround in Transaction arbitrary impl for handling this:

if let Self::Legacy(tx) = &mut tx {
it is not great but fine for now I think

On alloy side, do we really need the gas limit to be u128 or could we move to u64?

In alloy we've set gas limit to u128 everywhere on purpose and agreed that it makes sense at some point: alloy-rs/alloy#454

But given both reth and revm seem to handle it as u64 everywhere I am wondering if there's new context/convention we should follow in alloy as well @mattsse ?

Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

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

overall lgtm, couple notes on tests

@klkvr klkvr added this pull request to the merge queue Sep 1, 2024
Merged via the queue into paradigmxyz:main with commit 578b52a Sep 1, 2024
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

Successfully merging this pull request may close these issues.

3 participants