Skip to content

Commit f546618

Browse files
committed
roll back gloas-specific changes while keeping the fork
1 parent 80a0dd7 commit f546618

30 files changed

+95
-4262
lines changed

AllTests-mainnet.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,6 @@ AllTests-mainnet
612612
+ Roundtrip engine RPC V2 and capella ExecutionPayload representations OK
613613
+ Roundtrip engine RPC V3 and deneb ExecutionPayload representations OK
614614
```
615-
## Envelope Quarantine
616-
```diff
617-
+ Add missing OK
618-
+ Add orphan OK
619-
+ Clean up orphans OK
620-
+ Pop orphan OK
621-
```
622615
## Eth1 monitor
623616
```diff
624617
+ Rewrite URLs OK
@@ -889,16 +882,6 @@ AllTests-mainnet
889882
```diff
890883
+ pre-1.1.0 OK
891884
```
892-
## Payload attestation pool [Preset: mainnet]
893-
```diff
894-
+ Can add and retrieve payload attestations [Preset: mainnet] OK
895-
+ Can get payload attestations for block production [Preset: mainnet] OK
896-
+ Different payload presence values [Preset: mainnet] OK
897-
+ Duplicate validator in PTC - multiple signatures [Preset: mainnet] OK
898-
+ Multiple validators in PTC can attest [Preset: mainnet] OK
899-
+ Payload attestations get pruned [Preset: mainnet] OK
900-
+ get_ptc with ShufflingRef matches StateCache version [Preset: mainnet] OK
901-
```
902885
## PeerPool testing suite
903886
```diff
904887
+ Access peers by key test OK

ConsensusSpecPreset-mainnet.md

Lines changed: 0 additions & 833 deletions
Large diffs are not rendered by default.

ConsensusSpecPreset-minimal.md

Lines changed: 0 additions & 899 deletions
Large diffs are not rendered by default.

beacon_chain/beacon_chain_db_immutable.nim

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -559,15 +559,14 @@ type
559559
finalized_checkpoint*: Checkpoint
560560

561561
# Inactivity
562-
inactivity_scores*: InactivityScores
562+
inactivity_scores*: HashList[uint64, Limit VALIDATOR_REGISTRY_LIMIT]
563563

564564
# Light client sync committees
565565
current_sync_committee*: SyncCommittee
566566
next_sync_committee*: SyncCommittee
567567

568568
# Execution
569-
latest_execution_payload_bid*: gloas.ExecutionPayloadBid
570-
## [Modified in Gloas:EIP7732]
569+
latest_execution_payload_header*: deneb.ExecutionPayloadHeader
571570

572571
# Withdrawals
573572
next_withdrawal_index*: WithdrawalIndex
@@ -591,25 +590,8 @@ type
591590
HashList[PendingPartialWithdrawal, Limit PENDING_PARTIAL_WITHDRAWALS_LIMIT]
592591
pending_consolidations*:
593592
HashList[PendingConsolidation, Limit PENDING_CONSOLIDATIONS_LIMIT]
593+
## [New in Electra:EIP7251]
594594

595595
# [New in Fulu:EIP7917]
596596
proposer_lookahead*:
597597
HashArray[Limit ((MIN_SEED_LOOKAHEAD + 1) * SLOTS_PER_EPOCH), uint64]
598-
599-
# [New in Gloas:EIP7732]
600-
builders*: HashList[Builder, Limit BUILDER_REGISTRY_LIMIT]
601-
# [New in Gloas:EIP7732]
602-
next_withdrawal_builder_index*: uint64
603-
# [New in Gloas:EIP7732]
604-
execution_payload_availability*: BitArray[int(SLOTS_PER_HISTORICAL_ROOT)]
605-
# [New in Gloas:EIP7732]
606-
builder_pending_payments*:
607-
HashArray[Limit 2 * SLOTS_PER_EPOCH, BuilderPendingPayment]
608-
# [New in Gloas:EIP7732]
609-
builder_pending_withdrawals*:
610-
HashList[BuilderPendingWithdrawal, Limit BUILDER_PENDING_WITHDRAWALS_LIMIT]
611-
# [New in Gloas:EIP7732]
612-
latest_block_hash*: Eth2Digest
613-
# [New in Gloas:EIP7732]
614-
payload_expected_withdrawals*:
615-
HashList[Withdrawal, Limit MAX_WITHDRAWALS_PER_PAYLOAD]

beacon_chain/consensus_object_pools/block_dag.nim

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,12 @@ func init*(
8383
capella.SomeBeaconBlock | capella.TrustedBeaconBlock |
8484
deneb.SomeBeaconBlock | deneb.TrustedBeaconBlock |
8585
electra.SomeBeaconBlock | electra.TrustedBeaconBlock |
86-
fulu.SomeBeaconBlock | fulu.TrustedBeaconBlock): BlockRef =
86+
fulu.SomeBeaconBlock | fulu.TrustedBeaconBlock |
87+
gloas.SomeBeaconBlock | gloas.TrustedBeaconBlock): BlockRef =
8788
BlockRef.init(
8889
root, Opt.some blck.body.execution_payload.block_hash, optimisticStatus, blck.slot
8990
)
9091

91-
func init*(
92-
T: type BlockRef, root: Eth2Digest, optimisticStatus: OptimisticStatus,
93-
blck: gloas.SomeBeaconBlock | gloas.TrustedBeaconBlock): BlockRef =
94-
BlockRef.init(
95-
root,
96-
Opt.some blck.body.signed_execution_payload_bid.message.block_hash,
97-
if optimisticStatus == OptimisticStatus.valid or
98-
blck.body.signed_execution_payload_bid.message.block_hash.isZero:
99-
OptimisticStatus.valid
100-
else:
101-
optimisticStatus,
102-
blck.slot,
103-
)
104-
10592
func parent*(bs: BlockSlot): BlockSlot =
10693
## Return a blockslot representing the previous slot, using the parent block
10794
## if the current slot had a block

beacon_chain/consensus_object_pools/blockchain_dag.nim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,9 +2283,7 @@ proc loadExecutionBlockHash*(dag: ChainDAGRef, bid: BlockId): Opt[Eth2Digest] =
22832283
return Opt.none(Eth2Digest)
22842284

22852285
withBlck(blockData):
2286-
when consensusFork >= ConsensusFork.Gloas:
2287-
Opt.some forkyBlck.message.body.signed_execution_payload_bid.message.block_hash
2288-
elif consensusFork >= ConsensusFork.Bellatrix:
2286+
when consensusFork >= ConsensusFork.Bellatrix:
22892287
Opt.some forkyBlck.message.body.execution_payload.block_hash
22902288
else:
22912289
Opt.some ZERO_HASH

beacon_chain/consensus_object_pools/envelope_quarantine.nim

Lines changed: 0 additions & 76 deletions
This file was deleted.

beacon_chain/gossip_processing/eth2_processor.nim

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import
1717
../spec/[helpers, forks],
1818
../consensus_object_pools/[
1919
attestation_pool, blob_quarantine, block_clearance, block_quarantine,
20-
blockchain_dag, envelope_quarantine, execution_payload_pool,
20+
blockchain_dag, execution_payload_pool,
2121
payload_attestation_pool, light_client_pool,
2222
sync_committee_msg_pool, validator_change_pool],
2323
../validators/validator_pool,
@@ -174,8 +174,6 @@ type
174174

175175
dataColumnQuarantine*: ref ColumnQuarantine
176176

177-
envelopeQuarantine*: ref EnvelopeQuarantine
178-
179177
# Application-provided current time provider (to facilitate testing)
180178
getCurrentBeaconTime*: GetBeaconTimeFn
181179

@@ -318,37 +316,6 @@ proc processSignedBeaconBlock*(
318316

319317
ok()
320318

321-
proc processExecutionPayloadEnvelope*(
322-
self: var Eth2Processor, src: MsgSource,
323-
signedEnvelope: SignedExecutionPayloadEnvelope): ValidationRes =
324-
let
325-
wallTime = self.getCurrentBeaconTime()
326-
(afterGenesis, wallSlot) = wallTime.toSlot(self.dag.timeParams)
327-
328-
logScope:
329-
blockRoot = shortLog(signedEnvelope.message.beacon_block_root)
330-
envelope = shortLog(signedEnvelope.message)
331-
wallSlot
332-
333-
if not afterGenesis:
334-
notice "Execution payload envelope before genesis"
335-
return errIgnore("Execution payload envelope before genesis")
336-
337-
let delay = wallTime -
338-
signedEnvelope.message.slot.start_beacon_time(self.dag.timeParams)
339-
340-
self.dag.validateExecutionPayload(
341-
self.quarantine, self.envelopeQuarantine, signedEnvelope).isOkOr:
342-
execution_payload_envelopes_dropped.inc(1, [$error[0]])
343-
return err(error)
344-
345-
debugGloasComment("process execution payload")
346-
347-
execution_payload_envelopes_received.inc()
348-
execution_payload_envelope_delay.observe(delay.toFloatSeconds())
349-
350-
ok()
351-
352319
proc processBlobSidecar*(
353320
self: var Eth2Processor, src: MsgSource,
354321
blobSidecar: deneb.BlobSidecar, subnet_id: BlobId): ValidationRes =
@@ -550,7 +517,7 @@ proc processAttestation*(
550517
return errIgnore("Attestation before genesis")
551518

552519
# Potential under/overflows are fine; would just create odd metrics and logs
553-
let
520+
let
554521
consensusFork =
555522
self.dag.cfg.consensusForkAtEpoch(attestation.data.slot.epoch)
556523
delay = wallTime - attestation.data.slot.attestation_deadline(

0 commit comments

Comments
 (0)