Skip to content

Commit

Permalink
Merge pull request #3885 from etan-status/bf-emptytxspec
Browse files Browse the repository at this point in the history
Synchronously check all `transactions` to have non-zero length
  • Loading branch information
jtraglia authored Nov 20, 2024
2 parents ec9460d + 0f964b0 commit abbfef5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions specs/bellatrix/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,17 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
"""
Return ``True`` if and only if ``new_payload_request`` is valid with respect to ``self.execution_state``.
"""
if not self.is_valid_block_hash(new_payload_request.execution_payload):
execution_payload = new_payload_request.execution_payload

if b'' in execution_payload.transactions:
return False
if not self.notify_new_payload(new_payload_request.execution_payload):

if not self.is_valid_block_hash(execution_payload):
return False

if not self.notify_new_payload(execution_payload):
return False

return True
```

Expand Down
5 changes: 4 additions & 1 deletion specs/deneb/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,10 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
Return ``True`` if and only if ``new_payload_request`` is valid with respect to ``self.execution_state``.
"""
execution_payload = new_payload_request.execution_payload
parent_beacon_block_root = new_payload_request.parent_beacon_block_root
parent_beacon_block_root = new_payload_request.parent_beacon_block_root # [New in Deneb:EIP4788]

if b'' in execution_payload.transactions:
return False

# [Modified in Deneb:EIP4788]
if not self.is_valid_block_hash(execution_payload, parent_beacon_block_root):
Expand Down
3 changes: 3 additions & 0 deletions specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,9 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
parent_beacon_block_root = new_payload_request.parent_beacon_block_root
execution_requests_list = get_execution_requests_list(new_payload_request.execution_requests) # [New in Electra]

if b'' in execution_payload.transactions:
return False

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

Expand Down

0 comments on commit abbfef5

Please sign in to comment.