ethereum / execution-specs

Specification for the Execution Layer. Tracking network upgrades.
Creative Commons Zero v1.0 Universal
806 stars 222 forks source link

Factor out a type from access lists #947

Open SamWilsn opened 1 month ago

SamWilsn commented 1 month ago

For example:

https://github.com/ethereum/execution-specs/blob/0f116b58173d3871c98dabec0163b216b463288e/src/ethereum/cancun/transactions.py#L62

Because it's repeated in several different transaction types, the Tuple[Address, Tuple[Bytes32, ...]] portion should be promoted to its own type. Something like:

@slotted_freezable
@dataclass
class Access:
    account: Address
    slots: Tuple[Bytes32, ...]
richardgreg commented 1 month ago

And this, too?

SamWilsn commented 1 month ago

Help is always appreciated, but this one might be a bit harder than I originally estimated because of the RLP encoding. Feel free to take a stab at it (and make a separate PR for Prague) if you want!

Redidacove commented 1 month ago

@SamWilsn I am curious to know how can I contribute to a specific fork Like forks/prague when I fork the repo and clone it to my VS Code and start coding how can I get code of a specific branch I know it maybe a beginner question but can you please clear my doubt.

SamWilsn commented 1 month ago

Most of the forks are just in the master branch (eg. src/ethereum/constantinople), but the "next" fork is in forks/prague.

richardgreg commented 3 weeks ago

I've opened a draft PR at #960. @SamWilsn, if it looks good, I can implement it for each branch's transactions.py.

@Redidacove if you're interested, then you can implement the same changes and open a PR against Prague