From d8c486bcc5c9b21c87db50082b99fcc4301dc37a Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Tue, 7 May 2024 22:44:37 +0600 Subject: [PATCH] Rename DepositReceipt to DepositRequest --- presets/mainnet/electra.yaml | 4 +- presets/minimal/electra.yaml | 2 +- specs/electra/beacon-chain.md | 50 ++++---- specs/electra/fork.md | 4 +- specs/electra/validator.md | 2 +- .../test_process_deposit_receipt.py | 70 ++++++------ .../sanity/blocks/test_deposit_transition.py | 108 +++++++++--------- .../pyspec/eth2spec/test/helpers/deposits.py | 34 +++--- .../test/helpers/execution_payload.py | 38 +++--- .../pyspec/eth2spec/test/helpers/genesis.py | 8 +- tests/formats/operations/README.md | 2 +- tests/generators/operations/main.py | 2 +- 12 files changed, 162 insertions(+), 162 deletions(-) diff --git a/presets/mainnet/electra.yaml b/presets/mainnet/electra.yaml index 72c626ded2..6158219dff 100644 --- a/presets/mainnet/electra.yaml +++ b/presets/mainnet/electra.yaml @@ -34,8 +34,8 @@ MAX_CONSOLIDATIONS: 1 # Execution # --------------------------------------------------------------- -# 2**13 (= 8192) receipts -MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192 +# 2**13 (= 8192) deposit requests +MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 8192 # 2**4 (= 16) withdrawal requests MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16 diff --git a/presets/minimal/electra.yaml b/presets/minimal/electra.yaml index 11aa5e1f50..cf726e004b 100644 --- a/presets/minimal/electra.yaml +++ b/presets/minimal/electra.yaml @@ -35,7 +35,7 @@ MAX_CONSOLIDATIONS: 1 # Execution # --------------------------------------------------------------- # [customized] -MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4 +MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 4 # [customized] 2**1 (= 2) withdrawal requests MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 2 diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index 62da891146..e860394da0 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -24,7 +24,7 @@ - [Validator cycle](#validator-cycle) - [Containers](#containers) - [New containers](#new-containers) - - [`DepositReceipt`](#depositreceipt) + - [`DepositRequest`](#depositrequest) - [`PendingBalanceDeposit`](#pendingbalancedeposit) - [`PendingPartialWithdrawal`](#pendingpartialwithdrawal) - [`ExecutionLayerWithdrawalRequest`](#executionlayerwithdrawalrequest) @@ -92,8 +92,8 @@ - [Updated `process_voluntary_exit`](#updated-process_voluntary_exit) - [Execution layer withdrawal requests](#execution-layer-withdrawal-requests) - [New `process_execution_layer_withdrawal_request`](#new-process_execution_layer_withdrawal_request) - - [Deposit receipts](#deposit-receipts) - - [New `process_deposit_receipt`](#new-process_deposit_receipt) + - [Deposit requests](#deposit-requests) + - [New `process_deposit_request`](#new-process_deposit_request) - [Consolidations](#consolidations) - [New `process_consolidation`](#new-process_consolidation) - [Testing](#testing) @@ -119,7 +119,7 @@ The following values are (non-configurable) constants used throughout the specif | Name | Value | Description | | - | - | - | -| `UNSET_DEPOSIT_RECEIPTS_START_INDEX` | `uint64(2**64 - 1)` | *[New in Electra:EIP6110]* | +| `UNSET_DEPOSIT_REQUESTS_START_INDEX` | `uint64(2**64 - 1)` | *[New in Electra:EIP6110]* | | `FULL_EXIT_REQUEST_AMOUNT` | `uint64(0)` | *[New in Electra:EIP7002]* | ### Withdrawal prefixes @@ -170,7 +170,7 @@ The following values are (non-configurable) constants used throughout the specif | Name | Value | Description | | - | - | - | -| `MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD` | `uint64(2**13)` (= 8,192) | *[New in Electra:EIP6110]* Maximum number of deposit receipts allowed in each payload | +| `MAX_DEPOSIT_REQUESTS_PER_PAYLOAD` | `uint64(2**13)` (= 8,192) | *[New in Electra:EIP6110]* Maximum number of deposit requests allowed in each payload | | `MAX_ATTESTER_SLASHINGS_ELECTRA` | `2**0` (= 1) | *[New in Electra:EIP7549]* | | `MAX_ATTESTATIONS_ELECTRA` | `2**3` (= 8) | *[New in Electra:EIP7549]* | | `MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD` | `uint64(2**4)` (= 16)| *[New in Electra:EIP7002]* Maximum number of execution layer withdrawal requests in each payload | @@ -194,12 +194,12 @@ The following values are (non-configurable) constants used throughout the specif ### New containers -#### `DepositReceipt` +#### `DepositRequest` *Note*: The container is new in EIP6110. ```python -class DepositReceipt(Container): +class DepositRequest(Container): pubkey: BLSPubkey withdrawal_credentials: Bytes32 amount: Gwei @@ -345,7 +345,7 @@ class ExecutionPayload(Container): withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD] blob_gas_used: uint64 excess_blob_gas: uint64 - deposit_receipts: List[DepositReceipt, MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD] # [New in Electra:EIP6110] + deposit_requests: List[DepositRequest, MAX_DEPOSIT_REQUESTS_PER_PAYLOAD] # [New in Electra:EIP6110] # [New in Electra:EIP7002:EIP7251] withdrawal_requests: List[ExecutionLayerWithdrawalRequest, MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD] ``` @@ -373,7 +373,7 @@ class ExecutionPayloadHeader(Container): withdrawals_root: Root blob_gas_used: uint64 excess_blob_gas: uint64 - deposit_receipts_root: Root # [New in Electra:EIP6110] + deposit_requests_root: Root # [New in Electra:EIP6110] withdrawal_requests_root: Root # [New in Electra:EIP7002:EIP7251] ``` @@ -422,7 +422,7 @@ class BeaconState(Container): next_withdrawal_validator_index: ValidatorIndex # Deep history valid from Capella onwards historical_summaries: List[HistoricalSummary, HISTORICAL_ROOTS_LIMIT] - deposit_receipts_start_index: uint64 # [New in Electra:EIP6110] + deposit_requests_start_index: uint64 # [New in Electra:EIP6110] deposit_balance_to_consume: Gwei # [New in Electra:EIP7251] exit_balance_to_consume: Gwei # [New in Electra:EIP7251] earliest_exit_epoch: Epoch # [New in Electra:EIP7251] @@ -1011,7 +1011,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi withdrawals_root=hash_tree_root(payload.withdrawals), blob_gas_used=payload.blob_gas_used, excess_blob_gas=payload.excess_blob_gas, - deposit_receipts_root=hash_tree_root(payload.deposit_receipts), # [New in Electra:EIP6110] + deposit_requests_root=hash_tree_root(payload.deposit_requests), # [New in Electra:EIP6110] withdrawal_requests_root=hash_tree_root(payload.withdrawal_requests), # [New in Electra:EIP7002:EIP7251] ) ``` @@ -1026,7 +1026,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi def process_operations(state: BeaconState, body: BeaconBlockBody) -> None: # [Modified in Electra:EIP6110] # Disable former deposit mechanism once all prior deposits are processed - eth1_deposit_index_limit = min(state.eth1_data.deposit_count, state.deposit_receipts_start_index) + eth1_deposit_index_limit = min(state.eth1_data.deposit_count, state.deposit_requests_start_index) if state.eth1_deposit_index < eth1_deposit_index_limit: assert len(body.deposits) == min(MAX_DEPOSITS, eth1_deposit_index_limit - state.eth1_deposit_index) else: @@ -1044,7 +1044,7 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None: for_ops(body.bls_to_execution_changes, process_bls_to_execution_change) # [New in Electra:EIP7002:EIP7251] for_ops(body.execution_payload.withdrawal_requests, process_execution_layer_withdrawal_request) - for_ops(body.execution_payload.deposit_receipts, process_deposit_receipt) # [New in Electra:EIP6110] + for_ops(body.execution_payload.deposit_requests, process_deposit_request) # [New in Electra:EIP6110] for_ops(body.consolidations, process_consolidation) # [New in Electra:EIP7251] ``` @@ -1271,24 +1271,24 @@ def process_execution_layer_withdrawal_request( )) ``` -##### Deposit receipts +##### Deposit requests -###### New `process_deposit_receipt` +###### New `process_deposit_request` *Note*: This function is new in Electra:EIP6110. ```python -def process_deposit_receipt(state: BeaconState, deposit_receipt: DepositReceipt) -> None: - # Set deposit receipt start index - if state.deposit_receipts_start_index == UNSET_DEPOSIT_RECEIPTS_START_INDEX: - state.deposit_receipts_start_index = deposit_receipt.index +def process_deposit_request(state: BeaconState, deposit_request: DepositRequest) -> None: + # Set deposit request start index + if state.deposit_requests_start_index == UNSET_DEPOSIT_REQUESTS_START_INDEX: + state.deposit_requests_start_index = deposit_request.index apply_deposit( state=state, - pubkey=deposit_receipt.pubkey, - withdrawal_credentials=deposit_receipt.withdrawal_credentials, - amount=deposit_receipt.amount, - signature=deposit_receipt.signature, + pubkey=deposit_request.pubkey, + withdrawal_credentials=deposit_request.withdrawal_credentials, + amount=deposit_request.amount, + signature=deposit_request.signature, ) ``` @@ -1349,7 +1349,7 @@ def process_consolidation(state: BeaconState, signed_consolidation: SignedConsol Modifications include: 1. Use `ELECTRA_FORK_VERSION` as the previous and current fork version. 2. Utilize the Electra `BeaconBlockBody` when constructing the initial `latest_block_header`. -3. *[New in Electra:EIP6110]* Add `deposit_receipts_start_index` variable to the genesis state initialization. +3. *[New in Electra:EIP6110]* Add `deposit_requests_start_index` variable to the genesis state initialization. 4. *[New in Electra:EIP7251]* Initialize new fields to support increasing the maximum effective balance. ```python @@ -1369,7 +1369,7 @@ def initialize_beacon_state_from_eth1(eth1_block_hash: Hash32, eth1_data=Eth1Data(block_hash=eth1_block_hash, deposit_count=uint64(len(deposits))), latest_block_header=BeaconBlockHeader(body_root=hash_tree_root(BeaconBlockBody())), randao_mixes=[eth1_block_hash] * EPOCHS_PER_HISTORICAL_VECTOR, # Seed RANDAO with Eth1 entropy - deposit_receipts_start_index=UNSET_DEPOSIT_RECEIPTS_START_INDEX, # [New in Electra:EIP6110] + deposit_requests_start_index=UNSET_DEPOSIT_REQUESTS_START_INDEX, # [New in Electra:EIP6110] ) # Process deposits diff --git a/specs/electra/fork.md b/specs/electra/fork.md index ffd5f21571..12b03b210f 100644 --- a/specs/electra/fork.md +++ b/specs/electra/fork.md @@ -90,7 +90,7 @@ def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState: withdrawals_root=pre.latest_execution_payload_header.withdrawals_root, blob_gas_used=pre.latest_execution_payload_header.blob_gas_used, excess_blob_gas=pre.latest_execution_payload_header.excess_blob_gas, - deposit_receipts_root=Root(), # [New in Electra:EIP6110] + deposit_requests_root=Root(), # [New in Electra:EIP6110] withdrawal_requests_root=Root(), # [New in Electra:EIP7002], ) @@ -146,7 +146,7 @@ def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState: # Deep history valid from Capella onwards historical_summaries=pre.historical_summaries, # [New in Electra:EIP6110] - deposit_receipts_start_index=UNSET_DEPOSIT_RECEIPTS_START_INDEX, + deposit_requests_start_index=UNSET_DEPOSIT_REQUESTS_START_INDEX, # [New in Electra:EIP7251] deposit_balance_to_consume=0, exit_balance_to_consume=0, diff --git a/specs/electra/validator.md b/specs/electra/validator.md index 6b838c1260..8d006754ee 100644 --- a/specs/electra/validator.md +++ b/specs/electra/validator.md @@ -80,7 +80,7 @@ def compute_on_chain_aggregate(network_aggregates: Sequence[Attestation]) -> Att ```python def get_eth1_pending_deposit_count(state: BeaconState) -> uint64: - eth1_deposit_index_limit = min(state.eth1_data.deposit_count, state.deposit_receipts_start_index) + eth1_deposit_index_limit = min(state.eth1_data.deposit_count, state.deposit_requests_start_index) if state.eth1_deposit_index < eth1_deposit_index_limit: return min(MAX_DEPOSITS, eth1_deposit_index_limit - state.eth1_deposit_index) else: diff --git a/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_deposit_receipt.py b/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_deposit_receipt.py index 8b4271d6bb..4b96200e45 100644 --- a/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_deposit_receipt.py +++ b/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_deposit_receipt.py @@ -1,8 +1,8 @@ from eth2spec.test.context import spec_state_test, always_bls, with_electra_and_later from eth2spec.test.helpers.deposits import ( - prepare_deposit_receipt, - run_deposit_receipt_processing, - run_deposit_receipt_processing_with_specific_fork_version + prepare_deposit_request, + run_deposit_request_processing, + run_deposit_request_processing_with_specific_fork_version ) from eth2spec.test.helpers.state import next_epoch_via_block from eth2spec.test.helpers.withdrawals import set_validator_fully_withdrawable @@ -15,9 +15,9 @@ def test_new_deposit_under_max(spec, state): validator_index = len(state.validators) # effective balance will be 1 EFFECTIVE_BALANCE_INCREMENT smaller because of this small decrement. amount = spec.MAX_EFFECTIVE_BALANCE - 1 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -27,9 +27,9 @@ def test_new_deposit_max(spec, state): validator_index = len(state.validators) # effective balance will be exactly the same as balance. amount = spec.MAX_EFFECTIVE_BALANCE - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -39,9 +39,9 @@ def test_new_deposit_over_max(spec, state): validator_index = len(state.validators) # just 1 over the limit, effective balance should be set MAX_EFFECTIVE_BALANCE during processing amount = spec.MAX_EFFECTIVE_BALANCE + 1 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -55,7 +55,7 @@ def test_new_deposit_eth1_withdrawal_credentials(spec, state): + b'\x59' * 20 # a 20-byte eth1 address ) amount = spec.MAX_EFFECTIVE_BALANCE - deposit_receipt = prepare_deposit_receipt( + deposit_request = prepare_deposit_request( spec, validator_index, amount, @@ -63,7 +63,7 @@ def test_new_deposit_eth1_withdrawal_credentials(spec, state): signed=True, ) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -76,7 +76,7 @@ def test_new_deposit_non_versioned_withdrawal_credentials(spec, state): + b'\x02' * 31 # Garabage bytes ) amount = spec.MAX_EFFECTIVE_BALANCE - deposit_receipt = prepare_deposit_receipt( + deposit_request = prepare_deposit_request( spec, validator_index, amount, @@ -84,7 +84,7 @@ def test_new_deposit_non_versioned_withdrawal_credentials(spec, state): signed=True, ) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -95,8 +95,8 @@ def test_correct_sig_but_forked_state(spec, state): amount = spec.MAX_EFFECTIVE_BALANCE # deposits will always be valid, regardless of the current fork state.fork.current_version = spec.Version('0x1234abcd') - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -106,8 +106,8 @@ def test_incorrect_sig_new_deposit(spec, state): # fresh deposit = next validator index = validator appended to registry validator_index = len(state.validators) amount = spec.MAX_EFFECTIVE_BALANCE - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index, effective=False) + deposit_request = prepare_deposit_request(spec, validator_index, amount) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index, effective=False) @with_electra_and_later @@ -115,12 +115,12 @@ def test_incorrect_sig_new_deposit(spec, state): def test_top_up__max_effective_balance(spec, state): validator_index = 0 amount = spec.MAX_EFFECTIVE_BALANCE // 4 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) state.balances[validator_index] = spec.MAX_EFFECTIVE_BALANCE state.validators[validator_index].effective_balance = spec.MAX_EFFECTIVE_BALANCE - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) deposits_len = len(state.pending_balance_deposits) assert state.pending_balance_deposits[deposits_len - 1].amount == amount @@ -132,14 +132,14 @@ def test_top_up__max_effective_balance(spec, state): def test_top_up__less_effective_balance(spec, state): validator_index = 0 amount = spec.MAX_EFFECTIVE_BALANCE // 4 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) initial_balance = spec.MAX_EFFECTIVE_BALANCE - 1000 initial_effective_balance = spec.MAX_EFFECTIVE_BALANCE - spec.EFFECTIVE_BALANCE_INCREMENT state.balances[validator_index] = initial_balance state.validators[validator_index].effective_balance = initial_effective_balance - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) deposits_len = len(state.pending_balance_deposits) assert state.pending_balance_deposits[deposits_len - 1].amount == amount @@ -152,14 +152,14 @@ def test_top_up__less_effective_balance(spec, state): def test_top_up__zero_balance(spec, state): validator_index = 0 amount = spec.MAX_EFFECTIVE_BALANCE // 4 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, signed=True) initial_balance = 0 initial_effective_balance = 0 state.balances[validator_index] = initial_balance state.validators[validator_index].effective_balance = initial_effective_balance - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) deposits_len = len(state.pending_balance_deposits) assert state.pending_balance_deposits[deposits_len - 1].amount == amount @@ -173,10 +173,10 @@ def test_top_up__zero_balance(spec, state): def test_incorrect_sig_top_up(spec, state): validator_index = 0 amount = spec.MAX_EFFECTIVE_BALANCE // 4 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount) + deposit_request = prepare_deposit_request(spec, validator_index, amount) # invalid signatures, in top-ups, are allowed! - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -185,7 +185,7 @@ def test_incorrect_withdrawal_credentials_top_up(spec, state): validator_index = 0 amount = spec.MAX_EFFECTIVE_BALANCE // 4 withdrawal_credentials = spec.BLS_WITHDRAWAL_PREFIX + spec.hash(b"junk")[1:] - deposit_receipt = prepare_deposit_receipt( + deposit_request = prepare_deposit_request( spec, validator_index, amount, @@ -193,7 +193,7 @@ def test_incorrect_withdrawal_credentials_top_up(spec, state): ) # inconsistent withdrawal credentials, in top-ups, are allowed! - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -205,9 +205,9 @@ def test_key_validate_invalid_subgroup(spec, state): # All-zero pubkey would not pass `bls.KeyValidate`, but `process_deposit` would not throw exception. pubkey = b'\x00' * 48 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, pubkey=pubkey, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, pubkey=pubkey, signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -221,9 +221,9 @@ def test_key_validate_invalid_decompression(spec, state): pubkey_hex = 'c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' pubkey = bytes.fromhex(pubkey_hex) - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, pubkey=pubkey, signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, pubkey=pubkey, signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) @with_electra_and_later @@ -235,7 +235,7 @@ def test_ineffective_deposit_with_previous_fork_version(spec, state): # NOTE: it was effective in Altair. assert state.fork.previous_version != state.fork.current_version - yield from run_deposit_receipt_processing_with_specific_fork_version( + yield from run_deposit_request_processing_with_specific_fork_version( spec, state, fork_version=state.fork.previous_version, @@ -249,7 +249,7 @@ def test_ineffective_deposit_with_previous_fork_version(spec, state): def test_effective_deposit_with_genesis_fork_version(spec, state): assert spec.config.GENESIS_FORK_VERSION not in (state.fork.previous_version, state.fork.current_version) - yield from run_deposit_receipt_processing_with_specific_fork_version( + yield from run_deposit_request_processing_with_specific_fork_version( spec, state, fork_version=spec.config.GENESIS_FORK_VERSION, @@ -272,9 +272,9 @@ def test_success_top_up_to_withdrawn_validator(spec, state): # Make a top-up balance to validator amount = spec.MAX_EFFECTIVE_BALANCE // 4 - deposit_receipt = prepare_deposit_receipt(spec, validator_index, amount, len(state.validators), signed=True) + deposit_request = prepare_deposit_request(spec, validator_index, amount, len(state.validators), signed=True) - yield from run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index) + yield from run_deposit_request_processing(spec, state, deposit_request, validator_index) deposits_len = len(state.pending_balance_deposits) assert state.pending_balance_deposits[deposits_len - 1].amount == amount diff --git a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_deposit_transition.py b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_deposit_transition.py index a8d1832091..f253b6c60d 100644 --- a/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_deposit_transition.py +++ b/tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_deposit_transition.py @@ -9,7 +9,7 @@ from eth2spec.test.helpers.deposits import ( build_deposit_data, deposit_from_context, - prepare_deposit_receipt, + prepare_deposit_request, ) from eth2spec.test.helpers.execution_payload import ( compute_el_block_hash, @@ -38,8 +38,8 @@ def run_deposit_transition_block(spec, state, block, top_up_keys=[], valid=True) # Check that deposits are applied if valid: expected_pubkeys = [d.data.pubkey for d in block.body.deposits] - deposit_receipts = block.body.execution_payload.deposit_receipts - expected_pubkeys = expected_pubkeys + [d.pubkey for d in deposit_receipts if (d.pubkey not in top_up_keys)] + deposit_requests = block.body.execution_payload.deposit_requests + expected_pubkeys = expected_pubkeys + [d.pubkey for d in deposit_requests if (d.pubkey not in top_up_keys)] actual_pubkeys = [v.pubkey for v in state.validators[len(state.validators) - len(expected_pubkeys):]] assert actual_pubkeys == expected_pubkeys @@ -48,12 +48,12 @@ def run_deposit_transition_block(spec, state, block, top_up_keys=[], valid=True) def prepare_state_and_block(spec, state, deposit_cnt, - deposit_receipt_cnt, - first_deposit_receipt_index=0, - deposit_receipts_start_index=None, + deposit_request_cnt, + first_deposit_request_index=0, + deposit_requests_start_index=None, eth1_data_deposit_count=None): deposits = [] - deposit_receipts = [] + deposit_requests = [] keypair_index = len(state.validators) # Prepare deposits @@ -83,26 +83,26 @@ def prepare_state_and_block(spec, deposit_count=eth1_data_deposit_count, block_hash=state.eth1_data.block_hash) - # Prepare deposit receipts - for offset in range(deposit_receipt_cnt): - deposit_receipt = prepare_deposit_receipt(spec, + # Prepare deposit requests + for offset in range(deposit_request_cnt): + deposit_request = prepare_deposit_request(spec, keypair_index, # use max effective balance spec.MAX_EFFECTIVE_BALANCE, - first_deposit_receipt_index + offset, + first_deposit_request_index + offset, signed=True) - deposit_receipts.append(deposit_receipt) + deposit_requests.append(deposit_request) keypair_index += 1 # Set start index if defined - if deposit_receipts_start_index: - state.deposit_receipts_start_index = deposit_receipts_start_index + if deposit_requests_start_index: + state.deposit_requests_start_index = deposit_requests_start_index block = build_empty_block_for_next_slot(spec, state) - # Assign deposits and deposit receipts + # Assign deposits and deposit requests block.body.deposits = deposits - block.body.execution_payload.deposit_receipts = deposit_receipts + block.body.execution_payload.deposit_requests = deposit_requests block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload) return state, block @@ -111,27 +111,27 @@ def prepare_state_and_block(spec, @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__start_index_is_set(spec, state): - # 0 deposits, 2 deposit receipts, unset deposit_receipts_start_index + # 0 deposits, 2 deposit requests, unset deposit_requests_start_index state, block = prepare_state_and_block(spec, state, deposit_cnt=0, - deposit_receipt_cnt=2, - first_deposit_receipt_index=state.eth1_data.deposit_count + 11) + deposit_request_cnt=2, + first_deposit_request_index=state.eth1_data.deposit_count + 11) yield from run_deposit_transition_block(spec, state, block) - # deposit_receipts_start_index must be set to the index of the first receipt - assert state.deposit_receipts_start_index == block.body.execution_payload.deposit_receipts[0].index + # deposit_requests_start_index must be set to the index of the first request + assert state.deposit_requests_start_index == block.body.execution_payload.deposit_requests[0].index @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__process_eth1_deposits(spec, state): - # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.deposit_receipts_start_index + # 3 deposits, 1 deposit request, state.eth1_data.deposit_count < state.deposit_requests_start_index state, block = prepare_state_and_block(spec, state, deposit_cnt=3, - deposit_receipt_cnt=1, - first_deposit_receipt_index=11, - deposit_receipts_start_index=7) + deposit_request_cnt=1, + first_deposit_request_index=11, + deposit_requests_start_index=7) yield from run_deposit_transition_block(spec, state, block) @@ -139,13 +139,13 @@ def test_deposit_transition__process_eth1_deposits(spec, state): @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__process_max_eth1_deposits(spec, state): - # spec.MAX_DEPOSITS deposits, 1 deposit receipt, state.eth1_data.deposit_count > state.deposit_receipts_start_index - # state.deposit_receipts_start_index == spec.MAX_DEPOSITS + # spec.MAX_DEPOSITS deposits, 1 deposit request, state.eth1_data.deposit_count > state.deposit_requests_start_index + # state.deposit_requests_start_index == spec.MAX_DEPOSITS state, block = prepare_state_and_block(spec, state, deposit_cnt=spec.MAX_DEPOSITS, - deposit_receipt_cnt=1, - first_deposit_receipt_index=spec.MAX_DEPOSITS + 1, - deposit_receipts_start_index=spec.MAX_DEPOSITS, + deposit_request_cnt=1, + first_deposit_request_index=spec.MAX_DEPOSITS + 1, + deposit_requests_start_index=spec.MAX_DEPOSITS, eth1_data_deposit_count=23) yield from run_deposit_transition_block(spec, state, block) @@ -154,12 +154,12 @@ def test_deposit_transition__process_max_eth1_deposits(spec, state): @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__process_eth1_deposits_up_to_start_index(spec, state): - # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count == state.deposit_receipts_start_index + # 3 deposits, 1 deposit request, state.eth1_data.deposit_count == state.deposit_requests_start_index state, block = prepare_state_and_block(spec, state, deposit_cnt=3, - deposit_receipt_cnt=1, - first_deposit_receipt_index=7, - deposit_receipts_start_index=3) + deposit_request_cnt=1, + first_deposit_request_index=7, + deposit_requests_start_index=3) yield from run_deposit_transition_block(spec, state, block) @@ -167,12 +167,12 @@ def test_deposit_transition__process_eth1_deposits_up_to_start_index(spec, state @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__invalid_not_enough_eth1_deposits(spec, state): - # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.deposit_receipts_start_index + # 3 deposits, 1 deposit request, state.eth1_data.deposit_count < state.deposit_requests_start_index state, block = prepare_state_and_block(spec, state, deposit_cnt=3, - deposit_receipt_cnt=1, - first_deposit_receipt_index=29, - deposit_receipts_start_index=23, + deposit_request_cnt=1, + first_deposit_request_index=29, + deposit_requests_start_index=23, eth1_data_deposit_count=17) yield from run_deposit_transition_block(spec, state, block, valid=False) @@ -181,12 +181,12 @@ def test_deposit_transition__invalid_not_enough_eth1_deposits(spec, state): @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__invalid_too_many_eth1_deposits(spec, state): - # 3 deposits, 1 deposit receipt, state.eth1_data.deposit_count < state.eth1_data_index + # 3 deposits, 1 deposit request, state.eth1_data.deposit_count < state.eth1_data_index state, block = prepare_state_and_block(spec, state, deposit_cnt=3, - deposit_receipt_cnt=1, - first_deposit_receipt_index=11, - deposit_receipts_start_index=7, + deposit_request_cnt=1, + first_deposit_request_index=11, + deposit_requests_start_index=7, eth1_data_deposit_count=2) yield from run_deposit_transition_block(spec, state, block, valid=False) @@ -195,13 +195,13 @@ def test_deposit_transition__invalid_too_many_eth1_deposits(spec, state): @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__invalid_eth1_deposits_overlap_in_protocol_deposits(spec, state): - # spec.MAX_DEPOSITS deposits, 1 deposit receipt, state.eth1_data.deposit_count > state.deposit_receipts_start_index - # state.deposit_receipts_start_index == spec.MAX_DEPOSITS - 1 + # spec.MAX_DEPOSITS deposits, 1 deposit request, state.eth1_data.deposit_count > state.deposit_requests_start_index + # state.deposit_requests_start_index == spec.MAX_DEPOSITS - 1 state, block = prepare_state_and_block(spec, state, deposit_cnt=spec.MAX_DEPOSITS, - deposit_receipt_cnt=1, - first_deposit_receipt_index=spec.MAX_DEPOSITS, - deposit_receipts_start_index=spec.MAX_DEPOSITS - 1, + deposit_request_cnt=1, + first_deposit_request_index=spec.MAX_DEPOSITS, + deposit_requests_start_index=spec.MAX_DEPOSITS - 1, eth1_data_deposit_count=23) yield from run_deposit_transition_block(spec, state, block, valid=False) @@ -210,16 +210,16 @@ def test_deposit_transition__invalid_eth1_deposits_overlap_in_protocol_deposits( @with_phases([ELECTRA]) @spec_state_test def test_deposit_transition__deposit_and_top_up_same_block(spec, state): - # 1 deposit, 1 deposit receipt that top ups deposited validator + # 1 deposit, 1 deposit request that top ups deposited validator state, block = prepare_state_and_block(spec, state, deposit_cnt=1, - deposit_receipt_cnt=1, - first_deposit_receipt_index=11, - deposit_receipts_start_index=7) + deposit_request_cnt=1, + first_deposit_request_index=11, + deposit_requests_start_index=7) - # Artificially assign deposit's pubkey to a deposit receipt of the same block + # Artificially assign deposit's pubkey to a deposit request of the same block top_up_keys = [block.body.deposits[0].data.pubkey] - block.body.execution_payload.deposit_receipts[0].pubkey = top_up_keys[0] + block.body.execution_payload.deposit_requests[0].pubkey = top_up_keys[0] block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload) pre_pending_deposits = len(state.pending_balance_deposits) @@ -229,5 +229,5 @@ def test_deposit_transition__deposit_and_top_up_same_block(spec, state): # Check the top up assert len(state.pending_balance_deposits) == pre_pending_deposits + 2 assert state.pending_balance_deposits[pre_pending_deposits].amount == block.body.deposits[0].data.amount - amount_from_deposit = block.body.execution_payload.deposit_receipts[0].amount + amount_from_deposit = block.body.execution_payload.deposit_requests[0].amount assert state.pending_balance_deposits[pre_pending_deposits + 1].amount == amount_from_deposit diff --git a/tests/core/pyspec/eth2spec/test/helpers/deposits.py b/tests/core/pyspec/eth2spec/test/helpers/deposits.py index 031c1fcf7a..c8aa30313c 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/deposits.py +++ b/tests/core/pyspec/eth2spec/test/helpers/deposits.py @@ -171,7 +171,7 @@ def prepare_state_and_deposit(spec, state, validator_index, amount, return deposit -def build_deposit_receipt(spec, +def build_deposit_request(spec, index, pubkey, privkey, @@ -179,7 +179,7 @@ def build_deposit_receipt(spec, withdrawal_credentials, signed): deposit_data = build_deposit_data(spec, pubkey, privkey, amount, withdrawal_credentials, signed=signed) - return spec.DepositReceipt( + return spec.DepositRequest( pubkey=deposit_data.pubkey, withdrawal_credentials=deposit_data.withdrawal_credentials, amount=deposit_data.amount, @@ -187,14 +187,14 @@ def build_deposit_receipt(spec, index=index) -def prepare_deposit_receipt(spec, validator_index, amount, +def prepare_deposit_request(spec, validator_index, amount, index=None, pubkey=None, privkey=None, withdrawal_credentials=None, signed=False): """ - Create a deposit receipt for the given validator, depositing the given amount. + Create a deposit request for the given validator, depositing the given amount. """ if index is None: index = validator_index @@ -209,7 +209,7 @@ def prepare_deposit_receipt(spec, validator_index, amount, if withdrawal_credentials is None: withdrawal_credentials = spec.BLS_WITHDRAWAL_PREFIX + spec.hash(pubkey)[1:] - return build_deposit_receipt( + return build_deposit_request( spec, index, pubkey, @@ -320,11 +320,11 @@ def run_deposit_processing_with_specific_fork_version( yield from run_deposit_processing(spec, state, deposit, validator_index, valid=valid, effective=effective) -def run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index, valid=True, effective=True): +def run_deposit_request_processing(spec, state, deposit_request, validator_index, valid=True, effective=True): """ - Run ``process_deposit_receipt``, yielding: + Run ``process_deposit_request``, yielding: - pre-state ('pre') - - deposit_receipt ('deposit_receipt') + - deposit_request ('deposit_request') - post-state ('post'). If ``valid == False``, run expecting ``AssertionError`` """ @@ -340,18 +340,18 @@ def run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index pre_pending_deposits = len(state.pending_balance_deposits) yield 'pre', state - yield 'deposit_receipt', deposit_receipt + yield 'deposit_request', deposit_request if not valid: - expect_assertion_error(lambda: spec.process_deposit_receipt(state, deposit_receipt)) + expect_assertion_error(lambda: spec.process_deposit_request(state, deposit_request)) yield 'post', None return - spec.process_deposit_receipt(state, deposit_receipt) + spec.process_deposit_request(state, deposit_request) yield 'post', state - if not effective or not bls.KeyValidate(deposit_receipt.pubkey): + if not effective or not bls.KeyValidate(deposit_request.pubkey): assert len(state.validators) == pre_validator_count assert len(state.balances) == pre_validator_count if is_top_up: @@ -368,11 +368,11 @@ def run_deposit_receipt_processing(spec, state, deposit_receipt, validator_index assert len(state.balances) == pre_validator_count + 1 assert len(state.pending_balance_deposits) == pre_pending_deposits + 1 - assert state.pending_balance_deposits[pre_pending_deposits].amount == deposit_receipt.amount + assert state.pending_balance_deposits[pre_pending_deposits].amount == deposit_request.amount assert state.pending_balance_deposits[pre_pending_deposits].index == validator_index -def run_deposit_receipt_processing_with_specific_fork_version( +def run_deposit_request_processing_with_specific_fork_version( spec, state, fork_version, @@ -391,17 +391,17 @@ def run_deposit_receipt_processing_with_specific_fork_version( pubkey=pubkey, withdrawal_credentials=withdrawal_credentials, amount=amount, signature=bls.Sign(privkey, spec.compute_signing_root(deposit_message, domain)) ) - deposit_receipt = spec.DepositReceipt( + deposit_request = spec.DepositRequest( pubkey=deposit_data.pubkey, withdrawal_credentials=deposit_data.withdrawal_credentials, amount=deposit_data.amount, signature=deposit_data.signature, index=validator_index) - yield from run_deposit_receipt_processing( + yield from run_deposit_request_processing( spec, state, - deposit_receipt, + deposit_request, validator_index, valid=valid, effective=effective diff --git a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py index ef6e2f6442..36f2194578 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py @@ -35,7 +35,7 @@ def get_execution_payload_header(spec, execution_payload): payload_header.blob_gas_used = execution_payload.blob_gas_used payload_header.excess_blob_gas = execution_payload.excess_blob_gas if is_post_electra(spec): - payload_header.deposit_receipts_root = spec.hash_tree_root(execution_payload.deposit_receipts) + payload_header.deposit_requests_root = spec.hash_tree_root(execution_payload.deposit_requests) payload_header.withdrawal_requests_root = spec.hash_tree_root(execution_payload.withdrawal_requests) return payload_header @@ -58,7 +58,7 @@ def compute_el_header_block_hash(spec, payload_header, transactions_trie_root, withdrawals_trie_root=None, - deposit_receipts_trie_root=None, + deposit_requests_trie_root=None, withdrawal_requests_root=None): """ Computes the RLP execution block hash described by an `ExecutionPayloadHeader`. @@ -105,9 +105,9 @@ def compute_el_header_block_hash(spec, execution_payload_header_rlp.append((big_endian_int, payload_header.blob_gas_used)) execution_payload_header_rlp.append((big_endian_int, payload_header.excess_blob_gas)) if is_post_electra(spec): - # deposit_receipts_root - assert deposit_receipts_trie_root is not None - execution_payload_header_rlp.append((Binary(32, 32), deposit_receipts_trie_root)) + # deposit_requests_root + assert deposit_requests_trie_root is not None + execution_payload_header_rlp.append((Binary(32, 32), deposit_requests_trie_root)) # withdrawal requests root execution_payload_header_rlp.append((Binary(32, 32), withdrawal_requests_root)) @@ -150,22 +150,22 @@ def get_withdrawal_request_rlp(withdrawal_request): return encode(values, sedes) -def get_deposit_receipt_rlp(spec, deposit_receipt): - deposit_receipt_rlp = [ +def get_deposit_request_rlp(spec, deposit_request): + deposit_request_rlp = [ # pubkey - (Binary(48, 48), deposit_receipt.pubkey), + (Binary(48, 48), deposit_request.pubkey), # withdrawal_credentials - (Binary(32, 32), deposit_receipt.withdrawal_credentials), + (Binary(32, 32), deposit_request.withdrawal_credentials), # amount - (big_endian_int, deposit_receipt.amount), + (big_endian_int, deposit_request.amount), # pubkey - (Binary(96, 96), deposit_receipt.signature), + (Binary(96, 96), deposit_request.signature), # index - (big_endian_int, deposit_receipt.index), + (big_endian_int, deposit_request.index), ] - sedes = List([schema for schema, _ in deposit_receipt_rlp]) - values = [value for _, value in deposit_receipt_rlp] + sedes = List([schema for schema, _ in deposit_request_rlp]) + values = [value for _, value in deposit_request_rlp] return encode(values, sedes) @@ -173,15 +173,15 @@ def compute_el_block_hash(spec, payload): transactions_trie_root = compute_trie_root_from_indexed_data(payload.transactions) withdrawals_trie_root = None - deposit_receipts_trie_root = None + deposit_requests_trie_root = None withdrawal_requests_root = None if is_post_capella(spec): withdrawals_encoded = [get_withdrawal_rlp(withdrawal) for withdrawal in payload.withdrawals] withdrawals_trie_root = compute_trie_root_from_indexed_data(withdrawals_encoded) if is_post_electra(spec): - deposit_receipts_encoded = [get_deposit_receipt_rlp(spec, receipt) for receipt in payload.deposit_receipts] - deposit_receipts_trie_root = compute_trie_root_from_indexed_data(deposit_receipts_encoded) + deposit_requests_encoded = [get_deposit_request_rlp(spec, receipt) for receipt in payload.deposit_requests] + deposit_requests_trie_root = compute_trie_root_from_indexed_data(deposit_requests_encoded) withdrawal_requests_encoded = [get_withdrawal_request_rlp(request) for request in payload.withdrawal_requests] withdrawal_requests_root = compute_trie_root_from_indexed_data(withdrawal_requests_encoded) @@ -192,7 +192,7 @@ def compute_el_block_hash(spec, payload): payload_header, transactions_trie_root, withdrawals_trie_root, - deposit_receipts_trie_root, + deposit_requests_trie_root, withdrawal_requests_root, ) @@ -230,7 +230,7 @@ def build_empty_execution_payload(spec, state, randao_mix=None): payload.excess_blob_gas = 0 if is_post_electra(spec): # just to be clear - payload.deposit_receipts = [] + payload.deposit_requests = [] payload.block_hash = compute_el_block_hash(spec, payload) diff --git a/tests/core/pyspec/eth2spec/test/helpers/genesis.py b/tests/core/pyspec/eth2spec/test/helpers/genesis.py index 3896b41731..34ddd88ca2 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/genesis.py +++ b/tests/core/pyspec/eth2spec/test/helpers/genesis.py @@ -50,13 +50,13 @@ def get_sample_genesis_execution_payload_header(spec, transactions_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") withdrawals_trie_root = None - deposit_receipts_trie_root = None + deposit_requests_trie_root = None exits_trie_root = None if is_post_capella(spec): withdrawals_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") if is_post_electra(spec): - deposit_receipts_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + deposit_requests_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") exits_trie_root = bytes.fromhex("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") payload_header.block_hash = compute_el_header_block_hash( @@ -64,7 +64,7 @@ def get_sample_genesis_execution_payload_header(spec, payload_header, transactions_trie_root, withdrawals_trie_root, - deposit_receipts_trie_root, + deposit_requests_trie_root, exits_trie_root, ) return payload_header @@ -134,7 +134,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold): ) if is_post_electra(spec): - state.deposit_receipts_start_index = spec.UNSET_DEPOSIT_RECEIPTS_START_INDEX + state.deposit_requests_start_index = spec.UNSET_DEPOSIT_REQUESTS_START_INDEX if is_post_whisk(spec): vc = len(state.validators) diff --git a/tests/formats/operations/README.md b/tests/formats/operations/README.md index b020b5fd03..c87ce0e8b2 100644 --- a/tests/formats/operations/README.md +++ b/tests/formats/operations/README.md @@ -45,7 +45,7 @@ Operations: | `execution_payload` | `BeaconBlockBody` | **`body`** | `process_execution_payload(state, body)` (new in Bellatrix) | | `withdrawals` | `ExecutionPayload` | `execution_payload` | `process_withdrawals(state, execution_payload)` (new in Capella) | | `bls_to_execution_change` | `SignedBLSToExecutionChange` | `address_change` | `process_bls_to_execution_change(state, address_change)` (new in Capella) | -| `deposit_receipt` | `DepositReceipt` | `deposit_receipt` | `process_deposit_receipt(state, deposit_receipt)` (new in Electra) | +| `deposit_request` | `DepositRequest` | `deposit_request` | `process_deposit_request(state, deposit_request)` (new in Electra) | | `exits` | `ExecutionLayerExit` | `execution_layer_exit` | `process_execution_layer_exit(state, execution_layer_exit)` (new in Electra) | Note that `block_header` is not strictly an operation (and is a full `Block`), but processed in the same manner, and hence included here. diff --git a/tests/generators/operations/main.py b/tests/generators/operations/main.py index 0d203fca6f..c04952be84 100644 --- a/tests/generators/operations/main.py +++ b/tests/generators/operations/main.py @@ -46,7 +46,7 @@ _new_electra_mods = {key: 'eth2spec.test.electra.block_processing.test_process_' + key for key in [ 'attestation', 'consolidation', - 'deposit_receipt', + 'deposit_request', 'execution_layer_withdrawal_request', 'voluntary_exit' ]}