|
18 | 18 | helpers, network, signatures, peerdas_helpers], |
19 | 19 | ../consensus_object_pools/[ |
20 | 20 | attestation_pool, blockchain_dag, blob_quarantine, block_quarantine, |
21 | | - full_block_pool, light_client_pool, |
22 | | - spec_cache, sync_committee_msg_pool, |
| 21 | + light_client_pool, spec_cache, sync_committee_msg_pool, |
23 | 22 | validator_change_pool], |
24 | 23 | ".."/[beacon_clock], |
25 | 24 | ./batch_validation |
@@ -976,21 +975,32 @@ proc validateBeaconBlock*( |
976 | 975 |
|
977 | 976 | # https://github.com/ethereum/consensus-specs/blob/v1.6.0-beta.0/specs/gloas/p2p-interface.md#execution_payload |
978 | 977 | proc validateExecutionPayload*( |
979 | | - dag: ChainDAGRef, fullBlockPool: ref FullBlockPool, |
| 978 | + dag: ChainDAGRef, quarantine: ref Quarantine, |
980 | 979 | signed_execution_payload_envelope: SignedExecutionPayloadEnvelope): |
981 | 980 | Result[void, ValidationError] = |
982 | 981 | template envelope: untyped = signed_execution_payload_envelope.message |
983 | 982 |
|
984 | 983 | # [IGNORE] The envelope's block root envelope.block_root has been seen (via |
985 | 984 | # gossip or non-gossip sources) (a client MAY queue payload for processing |
986 | 985 | # once the block is retrieved). |
987 | | - if not fullBlockPool[].isBlockSeen(envelope.beacon_block_root): |
| 986 | + let blockSeen = |
| 987 | + block: |
| 988 | + var seen = |
| 989 | + envelope.beacon_block_root in quarantine.unviable or |
| 990 | + envelope.beacon_block_root in quarantine.missing or |
| 991 | + dag.getBlockRef(envelope.beacon_block_root).isSome() |
| 992 | + if not seen: |
| 993 | + for k, _ in quarantine.orphans: |
| 994 | + if k[0] == envelope.beacon_block_root: |
| 995 | + seen = true |
| 996 | + break |
| 997 | + seen |
| 998 | + if not blockSeen: |
988 | 999 | return errIgnore("ExecutionPayload: block not found") |
989 | 1000 |
|
990 | 1001 | # [IGNORE] The node has not seen another valid SignedExecutionPayloadEnvelope |
991 | 1002 | # for this block root from this builder. |
992 | | - if fullBlockPool[].isEnvelopeValid(signed_execution_payload_envelope): |
993 | | - return errIgnore("ExecutionPayload: already seen the envelope") |
| 1003 | + debugGloasComment("") |
994 | 1004 |
|
995 | 1005 | # [REJECT] block passes validation. |
996 | 1006 | let blck = |
|
0 commit comments