77
77
- [ Request data] ( #request-data )
78
78
- [ Modified ` NewPayloadRequest ` ] ( #modified-newpayloadrequest )
79
79
- [ Engine APIs] ( #engine-apis )
80
+ - [ Modified ` is_valid_block_hash ` ] ( #modified-is_valid_block_hash )
80
81
- [ Modified ` notify_new_payload ` ] ( #modified-notify_new_payload )
81
82
- [ Modified ` verify_and_notify_new_payload ` ] ( #modified-verify_and_notify_new_payload )
82
83
- [ Block processing] ( #block-processing )
@@ -983,6 +984,21 @@ class NewPayloadRequest(object):
983
984
984
985
#### Engine APIs
985
986
987
+ ##### Modified ` is_valid_block_hash `
988
+
989
+ * Note* : The function ` is_valid_block_hash ` is modified to include the additional ` execution_requests ` parameter in Electra.
990
+
991
+ ``` python
992
+ def is_valid_block_hash (self : ExecutionEngine,
993
+ execution_payload : ExecutionPayload,
994
+ parent_beacon_block_root : Root,
995
+ execution_requests : ExecutionRequests) -> bool :
996
+ """
997
+ Return ``True`` if and only if ``execution_payload.block_hash`` is computed correctly.
998
+ """
999
+ ...
1000
+ ```
1001
+
986
1002
##### Modified ` notify_new_payload `
987
1003
988
1004
* Note* : The function ` notify_new_payload ` is modified to include the additional ` execution_requests ` parameter in Electra.
@@ -993,7 +1009,7 @@ def notify_new_payload(self: ExecutionEngine,
993
1009
parent_beacon_block_root : Root,
994
1010
execution_requests : ExecutionRequests) -> bool :
995
1011
"""
996
- Return ``True`` if and only if ``execution_payload`` and ``execution_requests``
1012
+ Return ``True`` if and only if ``execution_payload`` and ``execution_requests``
997
1013
are valid with respect to ``self.execution_state``.
998
1014
"""
999
1015
...
@@ -1014,7 +1030,10 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
1014
1030
parent_beacon_block_root = new_payload_request.parent_beacon_block_root
1015
1031
execution_requests = new_payload_request.execution_requests # [New in Electra]
1016
1032
1017
- if not self .is_valid_block_hash(execution_payload, parent_beacon_block_root):
1033
+ if not self .is_valid_block_hash(
1034
+ execution_payload,
1035
+ parent_beacon_block_root,
1036
+ execution_requests):
1018
1037
return False
1019
1038
1020
1039
if not self .is_valid_versioned_hashes(new_payload_request):
0 commit comments