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

Engine API notify_new_payload #8937

Open
mehdi-aouadi opened this issue Dec 18, 2024 · 0 comments
Open

Engine API notify_new_payload #8937

mehdi-aouadi opened this issue Dec 18, 2024 · 0 comments

Comments

@mehdi-aouadi
Copy link
Contributor

mehdi-aouadi commented Dec 18, 2024

Modified verify_and_notify_new_payload

Note: The function verify_and_notify_new_payload is modified to pass the additional parameter il_transactions
when calling notify_new_payload in EIP-7805.

def verify_and_notify_new_payload(self: ExecutionEngine,
                                  new_payload_request: NewPayloadRequest) -> bool:
    """
    Return ``True`` if and only if ``new_payload_request`` is valid with respect to ``self.execution_state``.
    """
    execution_payload = new_payload_request.execution_payload
    execution_requests = new_payload_request.execution_requests
    parent_beacon_block_root = new_payload_request.parent_beacon_block_root
    il_transactions = new_payload_request.il_transactions # [New in EIP-7805]

    if not self.is_valid_block_hash(execution_payload, parent_beacon_block_root):
        return False

    if not self.is_valid_versioned_hashes(new_payload_request):
        return False

    # [Modified in EIP-7805]
    if not self.notify_new_payload(
            execution_payload, 
            execution_requests, 
            parent_beacon_block_root,
            il_transactions):
        return False

    return True
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