remove block_number validation from CL

This commit is contained in:
Danny Ryan 2021-11-01 07:57:49 -06:00
parent 879bd2f3e9
commit 7e3ccb706d
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 3 additions and 18 deletions

View File

@ -348,11 +348,9 @@ def process_block(state: BeaconState, block: BeaconBlock) -> None:
```python
def process_execution_payload(state: BeaconState, payload: ExecutionPayload, execution_engine: ExecutionEngine) -> None:
# Verify consistency of the parent hash and block number
# with respect to the previous execution payload header
# Verify consistency of the parent hash with respect to the previous execution payload header
if is_merge_complete(state):
assert payload.parent_hash == state.latest_execution_payload_header.block_hash
assert payload.block_number == state.latest_execution_payload_header.block_number + uint64(1)
# Verify random
assert payload.random == get_randao_mix(state, get_current_epoch(state))
# Verify timestamp

View File

@ -172,20 +172,6 @@ def test_bad_random_regular_payload(spec, state):
yield from run_execution_payload_processing(spec, state, execution_payload, valid=False)
@with_merge_and_later
@spec_state_test
def test_bad_number_regular_payload(spec, state):
# pre-state
state = build_state_with_complete_transition(spec, state)
next_slot(spec, state)
# execution payload
execution_payload = build_empty_execution_payload(spec, state)
execution_payload.block_number = execution_payload.block_number + 1
yield from run_execution_payload_processing(spec, state, execution_payload, valid=False)
@with_merge_and_later
@spec_state_test
def test_bad_everything_regular_payload(spec, state):
@ -196,7 +182,8 @@ def test_bad_everything_regular_payload(spec, state):
# execution payload
execution_payload = build_empty_execution_payload(spec, state)
execution_payload.parent_hash = spec.Hash32()
execution_payload.block_number = execution_payload.block_number + 1
execution_payload.random = spec.Bytes32()
execution_payload.timestamp = 0
yield from run_execution_payload_processing(spec, state, execution_payload, valid=False)