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

feat(forks): payload attributes and forkchoice updated class methods #958

Open
spencer-tb opened this issue Nov 20, 2024 · 0 comments
Open
Assignees

Comments

@spencer-tb
Copy link
Collaborator

Description

We currently have the following class methods for engine new payload method by fork:

class Prague(Cancun):
    """
    Prague fork
    """
     ...
    @classmethod
    def engine_new_payload_requests(cls, block_number: int = 0, timestamp: int = 0) -> bool:
        """
        Starting at Prague, new payloads include the requests hash as a parameter.
        """
        return True
    ...
    @classmethod
    def engine_new_payload_version(
        cls, block_number: int = 0, timestamp: int = 0
    ) -> Optional[int]:
        """
        Starting at Prague, new payload calls must use version 4
        """
        return 4

For engine forkchoice updated we only have a class method that defines the version per fork.

As payload attributes used within fcu are changing for each fork, they should be added in similar fashion to that of engine new payload class methods, where we have true/false methods based on the fields within payload attributes.

For example, as parentBeaconBlockRoot was added to payload attributes in Cancun we would have:

class Cancun(Shanghai):
    """
    Cancun fork
    """
     ...
    @classmethod
    def engine_payload_attributes_beacon_block_root(cls, block_number: int = 0, timestamp: int = 0) -> bool:
        """
        Starting at Cancun, payload attributes include the the parent beacon block root.
        """
        return True
        ...

The latter should be addressed from Paris to Cancun, including the required changes for 7742 in Prague: ethereum/execution-apis#574

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

1 participant