diff --git a/specrefs/.ethspecify.yml b/specrefs/.ethspecify.yml
index 59b98e1f2a2..50b9abd22ac 100644
--- a/specrefs/.ethspecify.yml
+++ b/specrefs/.ethspecify.yml
@@ -219,31 +219,6 @@ specrefs:
- upgrade_lc_store_to_gloas#gloas
- upgrade_lc_update_to_gloas#gloas
- # Still need to implement this for Electra
- - compute_weak_subjectivity_period#electra
-
- # Temporary exceptions: ignored until updated to alpha.8 spec
- - apply_parent_execution_payload#gloas
- - get_proposer_head#phase0
- - prepare_execution_payload#bellatrix
- - prepare_execution_payload#gloas
-
- # Will be fixed later
- - get_payload_due_ms#gloas
- - is_gas_limit_target_compatible#gloas
- - payload_data_availability#gloas
- - payload_timeliness#gloas
- - should_build_on_full#gloas
- - validate_beacon_aggregate_and_proof_gossip#deneb
- - validate_beacon_aggregate_and_proof_gossip#electra
- - validate_beacon_attestation_gossip#deneb
- - validate_beacon_attestation_gossip#electra
- - validate_beacon_block_gossip#deneb
- - validate_beacon_block_gossip#electra
- - validate_blob_sidecar_gossip#deneb
- - validate_blob_sidecar_gossip#electra
- - validate_voluntary_exit_gossip#deneb
-
# Not implemented: fast confirmation
- adjust_committee_weight_estimate_to_ensure_safety#phase0
- compute_adversarial_weight#phase0
@@ -315,11 +290,11 @@ specrefs:
- verify_partial_data_column_header_inclusion_proof#fulu
- verify_partial_data_column_sidecar_kzg_proofs#fulu
- # Not needed: gloas
+ # Not implemented: gloas
- get_proposer_dependent_root#gloas
- # Not implemented: gloas
- - compute_weak_subjectivity_period#gloas
+ # Will be fixed later: gloas
+ - get_payload_due_ms#gloas
# Not implemented: heze
- get_forkchoice_store#heze
diff --git a/specrefs/functions.yml b/specrefs/functions.yml
index e28106d3c42..5a218d15c8e 100644
--- a/specrefs/functions.yml
+++ b/specrefs/functions.yml
@@ -241,7 +241,9 @@
- name: apply_parent_execution_payload#gloas
- sources: []
+ sources:
+ - file: ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/gloas/block/BlockProcessorGloas.java
+ search: public void applyParentExecutionPayload(
spec: |
def apply_parent_execution_payload(
@@ -2086,7 +2088,9 @@
- name: compute_weak_subjectivity_period#electra
- sources: []
+ sources:
+ - file: ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/weaksubjectivity/WeakSubjectivityCalculatorElectra.java
+ search: public UInt64 computeWeakSubjectivityPeriod(
spec: |
--- phase0
@@ -2126,6 +2130,31 @@
+ return MIN_VALIDATOR_WITHDRAWABILITY_DELAY + epochs_for_validator_set_churn
+- name: compute_weak_subjectivity_period#gloas
+ sources:
+ - file: ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/gloas/weaksubjectivity/WeakSubjectivityCalculatorGloas.java
+ search: public UInt64 computeWeakSubjectivityPeriod(
+ spec: |
+
+ def compute_weak_subjectivity_period(state: BeaconState) -> uint64:
+ """
+ Returns the weak subjectivity period for the current ``state``.
+ This computation takes into account the effect of:
+ - exit churn (weighted 2/3)
+ - activation churn (weighted 1/3)
+ - consolidation churn (weighted 1)
+ """
+ t = get_total_active_balance(state)
+ # [Modified in Gloas:EIP8061]
+ delta = (
+ 2 * get_exit_churn_limit(state) // 3
+ + get_activation_churn_limit(state) // 3
+ + get_consolidation_churn_limit(state)
+ )
+ epochs_for_validator_set_churn = SAFETY_DECAY * t // (2 * delta * 100)
+ return MIN_VALIDATOR_WITHDRAWABILITY_DELAY + epochs_for_validator_set_churn
+
+
- name: construct_vanishing_polynomial#fulu
sources: []
spec: |
@@ -5634,7 +5663,9 @@
- name: get_proposer_head#phase0
- sources: []
+ sources:
+ - file: ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/util/ForkChoiceUtil.java
+ search: public ForkChoiceNode getProposerHead(
spec: |
def get_proposer_head(store: Store, head_root: Root, slot: Slot) -> Root:
@@ -7262,7 +7293,9 @@
- name: is_gas_limit_target_compatible#gloas
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/ExecutionPayloadBidGossipValidator.java
+ search: static boolean isGasLimitTargetCompatible(
spec: |
def is_gas_limit_target_compatible(
@@ -8750,7 +8783,9 @@
- name: payload_data_availability#gloas
- sources: []
+ sources:
+ - file: storage/src/main/java/tech/pegasys/teku/storage/protoarray/ForkChoiceModelGloas.java
+ search: private boolean payloadDataAvailability(
spec: |
def payload_data_availability(store: Store, root: Root, available: bool) -> bool:
@@ -8772,7 +8807,9 @@
- name: payload_timeliness#gloas
- sources: []
+ sources:
+ - file: storage/src/main/java/tech/pegasys/teku/storage/protoarray/ForkChoiceModelGloas.java
+ search: private boolean payloadTimeliness(
spec: |
def payload_timeliness(store: Store, root: Root, timely: bool) -> bool:
@@ -8808,7 +8845,16 @@
- name: prepare_execution_payload#bellatrix
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoiceUpdateData.java
+ search: final Optional terminalBlockHash) {
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ProposersDataManager.java
+ search: private SafeFuture> calculatePayloadBuildingAttributes(
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoiceUpdateData.java
+ search: public Optional> send(
+ - file: ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java
+ search: ^ SafeFuture engineForkChoiceUpdated\(
+ regex: true
spec: |
def prepare_execution_payload(
@@ -8925,7 +8971,11 @@
- name: prepare_execution_payload#gloas
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoice.java
+ search: private Optional resolveProposerHeadOverride(
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ProposersDataManager.java
+ search: private SafeFuture> calculatePayloadBuildingAttributes(
spec: |
def prepare_execution_payload(
@@ -11926,7 +11976,9 @@
- name: should_build_on_full#gloas
- sources: []
+ sources:
+ - file: storage/src/main/java/tech/pegasys/teku/storage/protoarray/ForkChoiceModelGloas.java
+ search: public boolean shouldBuildOnFull(
spec: |
def should_build_on_full(store: Store, head: ForkChoiceNode) -> bool:
@@ -13470,7 +13522,9 @@
- name: validate_beacon_aggregate_and_proof_gossip#deneb
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/AggregateAttestationValidator.java
+ search: validate(final ValidatableAttestation attestation)
spec: |
def validate_beacon_aggregate_and_proof_gossip(
@@ -13601,7 +13655,9 @@
- name: validate_beacon_aggregate_and_proof_gossip#electra
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/AggregateAttestationValidator.java
+ search: validate(final ValidatableAttestation attestation)
spec: |
def validate_beacon_aggregate_and_proof_gossip(
@@ -13835,7 +13891,9 @@
- name: validate_beacon_attestation_gossip#deneb
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/AttestationValidator.java
+ search: public SafeFuture validate(
spec: |
def validate_beacon_attestation_gossip(
@@ -13942,7 +14000,9 @@
- name: validate_beacon_attestation_gossip#electra
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/AttestationValidator.java
+ search: public SafeFuture validate(
spec: |
def validate_beacon_attestation_gossip(
@@ -14329,7 +14389,9 @@
- name: validate_beacon_block_gossip#deneb
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/BlockGossipValidator.java
+ search: public SafeFuture validate(
spec: |
def validate_beacon_block_gossip(
@@ -14428,7 +14490,9 @@
- name: validate_beacon_block_gossip#electra
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/BlockGossipValidator.java
+ search: public SafeFuture validate(
spec: |
def validate_beacon_block_gossip(
@@ -14527,7 +14591,9 @@
- name: validate_blob_sidecar_gossip#deneb
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/BlobSidecarGossipValidator.java
+ search: public SafeFuture validate(final BlobSidecar blobSidecar)
spec: |
def validate_blob_sidecar_gossip(
@@ -14622,7 +14688,9 @@
- name: validate_blob_sidecar_gossip#electra
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/BlobSidecarGossipValidator.java
+ search: public SafeFuture validate(final BlobSidecar blobSidecar)
spec: |
def validate_blob_sidecar_gossip(
@@ -15319,7 +15387,9 @@
- name: validate_voluntary_exit_gossip#deneb
- sources: []
+ sources:
+ - file: ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/validation/VoluntaryExitValidator.java
+ search: validateForGossip(final SignedVoluntaryExit exit)
spec: |
def validate_voluntary_exit_gossip(