Skip to content

Commit f0ef76a

Browse files
committed
minor fixes
1 parent 6b69368 commit f0ef76a

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

specs/electra/beacon-chain.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,10 +1286,10 @@ def process_deposit_receipt(state: BeaconState, deposit_receipt: DepositReceipt)
12861286

12871287
##### Execution layer consolidation requests
12881288

1289-
###### New `process_execution_layer_consolidation_requests`
1289+
###### New `process_execution_layer_consolidation_request`
12901290

12911291
```python
1292-
def process_execution_layer_consolidation_requests(
1292+
def process_execution_layer_consolidation_request(
12931293
state: BeaconState,
12941294
execution_layer_consolidation_request: ExecutionLayerConsolidationRequest) -> None:
12951295
# If the pending consolidations queue is full, consolidation requests are ignored

tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_consolidation.py renamed to tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_consolidation_request.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_basic_consolidation_in_current_consolidation_epoch(spec, state):
4040
spec, state, source_index, address=source_address
4141
)
4242
# Make consolidation with source address
43-
consolidation = spec.ExecutionLayerConsolidation(
43+
consolidation = spec.ExecutionLayerConsolidationRequest(
4444
source_address=source_address,
4545
source_pubkey=state.validators[source_index].pubkey,
4646
target_pubkey=state.validators[target_index].pubkey,
@@ -89,7 +89,7 @@ def test_basic_consolidation_in_new_consolidation_epoch(spec, state):
8989
spec, state, source_index, address=source_address
9090
)
9191
# Make consolidation with source address
92-
consolidation = spec.ExecutionLayerConsolidation(
92+
consolidation = spec.ExecutionLayerConsolidationRequest(
9393
source_address=source_address,
9494
source_pubkey=state.validators[source_index].pubkey,
9595
target_pubkey=state.validators[target_index].pubkey,
@@ -132,7 +132,7 @@ def test_basic_consolidation_with_preexisting_churn(spec, state):
132132
spec, state, source_index, address=source_address
133133
)
134134
# Make consolidation with source address
135-
consolidation = spec.ExecutionLayerConsolidation(
135+
consolidation = spec.ExecutionLayerConsolidationRequest(
136136
source_address=source_address,
137137
source_pubkey=state.validators[source_index].pubkey,
138138
target_pubkey=state.validators[target_index].pubkey,
@@ -179,7 +179,7 @@ def test_basic_consolidation_with_insufficient_preexisting_churn(spec, state):
179179
spec, state, source_index, address=source_address
180180
)
181181
# Make consolidation with source address
182-
consolidation = spec.ExecutionLayerConsolidation(
182+
consolidation = spec.ExecutionLayerConsolidationRequest(
183183
source_address=source_address,
184184
source_pubkey=state.validators[source_index].pubkey,
185185
target_pubkey=state.validators[target_index].pubkey,
@@ -230,7 +230,7 @@ def test_basic_consolidation_with_compounding_credentials(spec, state):
230230
spec, state, source_index, address=source_address
231231
)
232232
# Make consolidation with source address
233-
consolidation = spec.ExecutionLayerConsolidation(
233+
consolidation = spec.ExecutionLayerConsolidationRequest(
234234
source_address=source_address,
235235
source_pubkey=state.validators[source_index].pubkey,
236236
target_pubkey=state.validators[target_index].pubkey,
@@ -276,7 +276,7 @@ def test_consolidation_churn_limit_balance(spec, state):
276276
spec, state, source_index, address=source_address
277277
)
278278
# Make consolidation with source address
279-
consolidation = spec.ExecutionLayerConsolidation(
279+
consolidation = spec.ExecutionLayerConsolidationRequest(
280280
source_address=source_address,
281281
source_pubkey=state.validators[source_index].pubkey,
282282
target_pubkey=state.validators[target_index].pubkey,
@@ -324,7 +324,7 @@ def test_consolidation_balance_larger_than_churn_limit(spec, state):
324324
spec, state, source_index, address=source_address
325325
)
326326
# Make consolidation with source address
327-
consolidation = spec.ExecutionLayerConsolidation(
327+
consolidation = spec.ExecutionLayerConsolidationRequest(
328328
source_address=source_address,
329329
source_pubkey=state.validators[source_index].pubkey,
330330
target_pubkey=state.validators[target_index].pubkey,
@@ -371,7 +371,7 @@ def test_consolidation_balance_through_two_churn_epochs(spec, state):
371371
spec, state, source_index, address=source_address
372372
)
373373
# Make consolidation with source address
374-
consolidation = spec.ExecutionLayerConsolidation(
374+
consolidation = spec.ExecutionLayerConsolidationRequest(
375375
source_address=source_address,
376376
source_pubkey=state.validators[source_index].pubkey,
377377
target_pubkey=state.validators[target_index].pubkey,
@@ -417,7 +417,7 @@ def test_invalid_source_equals_target(spec, state):
417417
spec, state, source_index, address=source_address
418418
)
419419
# Make consolidation from source to source
420-
consolidation = spec.ExecutionLayerConsolidation(
420+
consolidation = spec.ExecutionLayerConsolidationRequest(
421421
source_address=source_address,
422422
source_pubkey=state.validators[source_index].pubkey,
423423
target_pubkey=state.validators[source_index].pubkey,
@@ -449,7 +449,7 @@ def test_invalid_exceed_pending_consolidations_limit(spec, state):
449449
set_eth1_withdrawal_credential_with_balance(
450450
spec, state, source_index, address=source_address
451451
)
452-
consolidation = spec.ExecutionLayerConsolidation(
452+
consolidation = spec.ExecutionLayerConsolidationRequest(
453453
source_address=source_address,
454454
source_pubkey=state.validators[source_index].pubkey,
455455
target_pubkey=state.validators[target_index].pubkey,
@@ -478,7 +478,7 @@ def test_invalid_not_enough_consolidation_churn_available(spec, state):
478478
set_eth1_withdrawal_credential_with_balance(
479479
spec, state, source_index, address=source_address
480480
)
481-
consolidation = spec.ExecutionLayerConsolidation(
481+
consolidation = spec.ExecutionLayerConsolidationRequest(
482482
source_address=source_address,
483483
source_pubkey=state.validators[source_index].pubkey,
484484
target_pubkey=state.validators[target_index].pubkey,
@@ -506,7 +506,7 @@ def test_invalid_exited_source(spec, state):
506506
set_eth1_withdrawal_credential_with_balance(
507507
spec, state, source_index, address=source_address
508508
)
509-
consolidation = spec.ExecutionLayerConsolidation(
509+
consolidation = spec.ExecutionLayerConsolidationRequest(
510510
source_address=source_address,
511511
source_pubkey=state.validators[source_index].pubkey,
512512
target_pubkey=state.validators[target_index].pubkey,
@@ -538,7 +538,7 @@ def test_invalid_exited_target(spec, state):
538538
set_eth1_withdrawal_credential_with_balance(
539539
spec, state, source_index, address=source_address
540540
)
541-
consolidation = spec.ExecutionLayerConsolidation(
541+
consolidation = spec.ExecutionLayerConsolidationRequest(
542542
source_address=source_address,
543543
source_pubkey=state.validators[source_index].pubkey,
544544
target_pubkey=state.validators[target_index].pubkey,
@@ -568,7 +568,7 @@ def test_invalid_inactive_source(spec, state):
568568
set_eth1_withdrawal_credential_with_balance(
569569
spec, state, source_index, address=source_address
570570
)
571-
consolidation = spec.ExecutionLayerConsolidation(
571+
consolidation = spec.ExecutionLayerConsolidationRequest(
572572
source_address=source_address,
573573
source_pubkey=state.validators[source_index].pubkey,
574574
target_pubkey=state.validators[target_index].pubkey,
@@ -600,7 +600,7 @@ def test_invalid_inactive_target(spec, state):
600600
set_eth1_withdrawal_credential_with_balance(
601601
spec, state, source_index, address=source_address
602602
)
603-
consolidation = spec.ExecutionLayerConsolidation(
603+
consolidation = spec.ExecutionLayerConsolidationRequest(
604604
source_address=source_address,
605605
source_pubkey=state.validators[source_index].pubkey,
606606
target_pubkey=state.validators[target_index].pubkey,
@@ -629,7 +629,7 @@ def test_invalid_no_source_execution_withdrawal_credential(spec, state):
629629
source_index = spec.get_active_validator_indices(state, current_epoch)[0]
630630
target_index = spec.get_active_validator_indices(state, current_epoch)[1]
631631
source_address = b"\x22" * 20
632-
consolidation = spec.ExecutionLayerConsolidation(
632+
consolidation = spec.ExecutionLayerConsolidationRequest(
633633
source_address=source_address,
634634
source_pubkey=state.validators[source_index].pubkey,
635635
target_pubkey=state.validators[target_index].pubkey,
@@ -657,7 +657,7 @@ def test_invalid_no_target_execution_withdrawal_credential(spec, state):
657657
set_eth1_withdrawal_credential_with_balance(
658658
spec, state, source_index, address=source_address
659659
)
660-
consolidation = spec.ExecutionLayerConsolidation(
660+
consolidation = spec.ExecutionLayerConsolidationRequest(
661661
source_address=source_address,
662662
source_pubkey=state.validators[source_index].pubkey,
663663
target_pubkey=state.validators[target_index].pubkey,
@@ -684,7 +684,7 @@ def test_invalid_incorrect_source_address(spec, state):
684684
spec, state, source_index, address=source_address
685685
)
686686
# Make consolidation with different source address
687-
consolidation = spec.ExecutionLayerConsolidation(
687+
consolidation = spec.ExecutionLayerConsolidationRequest(
688688
source_address=b"\x33" * 20,
689689
source_pubkey=state.validators[source_index].pubkey,
690690
target_pubkey=state.validators[target_index].pubkey,
@@ -715,7 +715,7 @@ def test_invalid_unknown_source_pubkey(spec, state):
715715
spec, state, source_index, address=source_address
716716
)
717717
# Make consolidation with different source pubkey
718-
consolidation = spec.ExecutionLayerConsolidation(
718+
consolidation = spec.ExecutionLayerConsolidationRequest(
719719
source_address=source_address,
720720
source_pubkey=b"\x00" * 48,
721721
target_pubkey=state.validators[target_index].pubkey,
@@ -745,7 +745,7 @@ def test_invalid_unknown_target_pubkey(spec, state):
745745
spec, state, source_index, address=source_address
746746
)
747747
# Make consolidation with different target pubkey
748-
consolidation = spec.ExecutionLayerConsolidation(
748+
consolidation = spec.ExecutionLayerConsolidationRequest(
749749
source_address=b"\x33" * 20,
750750
source_pubkey=state.validators[source_index].pubkey,
751751
target_pubkey=b"\x00" * 48,
@@ -783,7 +783,7 @@ def run_consolidation_processing(spec, state, consolidation, success=True):
783783
yield 'pre', state
784784
yield 'consolidation', consolidation
785785

786-
spec.process_execution_layer_consolidation(state, consolidation)
786+
spec.process_execution_layer_consolidation_request(state, consolidation)
787787

788788
yield 'post', state
789789

0 commit comments

Comments
 (0)