ethereum / execution-specs

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

Consistent type hints in `fork_types.py` #898

Open DistributedDoge opened 4 months ago

DistributedDoge commented 4 months ago

What was wrong?

Some type annotations in fork_types.py for each fork use bytes type, and some use Bytes alias imported from ..base_types.

fork_types.py

class Transaction:
    ...
    data: Bytes

class Account:
    ...
    code: bytes

class Log:
    ...
    data: bytes

Issue #752 suggests that spec would be more consistent if Bytes alias was applied everywhere to match surrounding code.

This change should not result in any functional difference as Bytes is alias for bytes.

How was it fixed?

For every Log.data and Account.code in src/ethereum/$fork_name/fork_types.py replaced type annotation like so: bytes => Bytes.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->