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

EIP-7732 current fork spectests #3854

Open
wants to merge 67 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
714db1e
refactor genesis state for eip7732
potuz Jul 15, 2024
0ae49b0
Revert "Disable eip7732 tests like whisk-style"
potuz Jul 4, 2024
2be168c
Fixes some more python tests
potuz Aug 21, 2024
7e092f6
deal with new get_head reply
potuz Jul 4, 2024
800b27f
skip electra tests with a payload
potuz Jul 5, 2024
f45e829
run_execution_payload_processing post eip-7732
potuz Jul 5, 2024
de7bf8d
construct the header correctly
potuz Jul 5, 2024
5bb0dd8
get sample sidecars for eip 7732
potuz Jul 8, 2024
62f4cd2
use right sidecar proofs in tests
potuz Jul 8, 2024
0731099
fixed gindex
potuz Jul 8, 2024
ebeed79
keep deprecated kzg
potuz Jul 8, 2024
fa5cc0a
fix merkle proof tester
potuz Jul 8, 2024
4ee4805
fix validate_merge_block
potuz Jul 8, 2024
b9644a6
fix test_config_invariants
potuz Jul 8, 2024
8caa39e
use full latest block for genesis
potuz Jul 8, 2024
789322f
fix test_process_execution_payload
potuz Jul 8, 2024
43e9f2d
skip invalid withdrawal tests
potuz Jul 9, 2024
f5d61ce
skip invalid bellatrix tests
potuz Jul 9, 2024
5b22ff3
skip more invalid tests
potuz Jul 9, 2024
7f52e6d
skip some more tests and fix bellatrix execution_payload
potuz Jul 9, 2024
ab221ff
skip several more tests
potuz Aug 21, 2024
3de46b7
fix deneb process_execution_payload
potuz Jul 9, 2024
f7d7e1a
fix get_head
potuz Jul 9, 2024
e94a337
Fix execution payload testing in 7732
potuz Jul 15, 2024
f3238a0
Use full nodes
potuz Jul 15, 2024
ba8bb95
some forkchoice fixes
potuz Jul 15, 2024
7c84a5d
linter
potuz Jul 15, 2024
34a21f4
fix test_networking
potuz Jul 16, 2024
6c5f1cb
fix test_discard_equivocations_on_attester_slashing
potuz Jul 16, 2024
936a3d6
test_on_block_finalized_skip_slots
potuz Jul 16, 2024
6c50e26
fix test_discard_equivocations_slashed_validator_censoring
potuz Jul 16, 2024
ef4659b
bad state in test_filtered_block_tree
potuz Jul 16, 2024
3906e58
more head checks
potuz Jul 16, 2024
81009f6
skip honest reorg tests
potuz Jul 17, 2024
341da17
fix test_invalid_parent_from_same_slot
potuz Jul 17, 2024
d698023
fix payload transitions in test_reorg.py
potuz Jul 17, 2024
f9408f5
fix payload transition in test_voting_source_beyond_two_epoch
potuz Jul 17, 2024
54b9f10
Remove state from payload_state_transition
potuz Jul 22, 2024
04eae5b
fix test_on_block
potuz Jul 22, 2024
5aae7f2
add more fixes to test_on_block.py
potuz Jul 22, 2024
c7e2b5c
fix test_justification_withholding_reverse_order
potuz Jul 22, 2024
35a1a34
more payload transition additions
potuz Jul 22, 2024
5889859
fix test_justified_update_monotonic
potuz Jul 22, 2024
5e353b6
fix test_justified_update_not_realized_finality
potuz Jul 22, 2024
7c74ab2
fix test_filtered_block_tree
potuz Jul 22, 2024
49e68f2
fix attestation helpers
potuz Jul 22, 2024
9a923c2
get_store_full_state helper
potuz Jul 22, 2024
7df5538
fix test_proposer_boost_is_first_block
potuz Jul 22, 2024
2855395
fix test_justification_withholding_reverse_order
potuz Jul 22, 2024
8df692e
fix test_proposer_boost
potuz Jul 22, 2024
89d2764
fix test_justification_withholding
potuz Jul 23, 2024
3330025
fix test_on_block_checkpoints
potuz Jul 23, 2024
6e1797e
fix _run_include_votes_of_another_empty_chain
potuz Jul 23, 2024
eeb7097
Fix test_simple_attempted_reorg_without_enough_ffg_votes
potuz Jul 23, 2024
b315909
some small fixes
potuz Jul 23, 2024
ed33cbe
fix test_withholding_attack_unviable_honest_chain
potuz Jul 24, 2024
f31f5a2
fix test_withholding_attack
potuz Jul 24, 2024
3046c99
fix previous forks tests
potuz Jul 24, 2024
97f309c
doctoc
potuz Jul 24, 2024
4acbaca
fix some capella and bellatrix tests
potuz Jul 24, 2024
89a79cc
fix deneb tests
potuz Jul 24, 2024
e482735
fix electra tests
potuz Jul 24, 2024
2f3db22
fix linter
potuz Jul 24, 2024
6408770
enable 7732 in circleci
potuz Jul 24, 2024
9df37db
Update CircleCI image to Python3.12.4
hwwhww Aug 22, 2024
ecbb5c5
Merge remote-tracking branch 'upstream/dev' into epbs_fix_tests
jtraglia Feb 10, 2025
17c50ee
Delete trailing whitespace
jtraglia Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix deneb tests
potuz committed Aug 22, 2024
commit 89a79cc3bec9926cfc1caa85b0b30e9a4fbbf80b
Original file line number Diff line number Diff line change
@@ -56,18 +56,13 @@ def run_execution_payload_processing(spec, state, execution_payload, blob_kzg_co
message=envelope,
signature=signature,
)
body = spec.BeaconBlockBody()
else:
body = spec.BeaconBlockBody(
blob_kzg_commitments=blob_kzg_commitments,
execution_payload=execution_payload,
)

# Before Deneb, only `body.execution_payload` matters. `BeaconBlockBody` is just a wrapper.
body = spec.BeaconBlockBody()
if not is_post_eip7732(spec):
body.blob_kzg_commitments = blob_kzg_commitments
body.execution_payload = execution_payload

yield 'pre', state
yield 'execution', {'execution_valid': execution_valid}
yield 'body', body
@@ -127,7 +122,10 @@ def test_incorrect_blob_tx_type(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash

yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -145,7 +143,9 @@ def test_incorrect_transaction_length_1_extra_byte(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -163,7 +163,9 @@ def test_incorrect_transaction_length_1_byte_short(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -181,7 +183,9 @@ def test_incorrect_transaction_length_empty(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -199,7 +203,10 @@ def test_incorrect_transaction_length_32_extra_bytes(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash

## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -216,7 +223,9 @@ def test_no_transactions_with_commitments(spec, state):
execution_payload.transactions = []
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -234,7 +243,9 @@ def test_incorrect_commitment(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -252,7 +263,9 @@ def test_incorrect_commitments_order(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -267,7 +280,9 @@ def test_incorrect_block_hash(spec, state):
execution_payload.block_hash = b'\x12' * 32 # incorrect block hash

# CL itself doesn't verify EL block hash
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -285,7 +300,9 @@ def test_zeroed_commitment(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments)


@@ -302,7 +319,9 @@ def test_invalid_correct_input__execution_invalid(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments,
valid=False, execution_valid=False)

@@ -317,5 +336,7 @@ def test_invalid_exceed_max_blobs_per_block(spec, state):
execution_payload.transactions = [opaque_tx]
execution_payload.block_hash = compute_el_block_hash(spec, execution_payload, state)

state.latest_execution_payload_header.block_hash = execution_payload.block_hash
## Make the first block full in EIP-7732
if is_post_eip7732(spec):
state.latest_execution_payload_header.block_hash = execution_payload.block_hash
yield from run_execution_payload_processing(spec, state, execution_payload, blob_kzg_commitments, valid=False)
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def _get_sample_sidecars(spec, state, rng):
else:
block.body.blob_kzg_commitments = blob_kzg_commitments_1 + blob_kzg_commitments_2
block.body.execution_payload.transactions = [opaque_tx_1, opaque_tx_2]
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload)
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload, state)

blobs = blobs_1 + blobs_2
proofs = proofs_1 + proofs_2