From 5608a803d73df7cc2e3ae3ee0e23d539e94373dc Mon Sep 17 00:00:00 2001 From: tersec Date: Fri, 11 Oct 2024 13:39:45 +0000 Subject: [PATCH] update beacon_validators to be more Nim 2.2-compatible (#6637) --- beacon_chain/gossip_processing/gossip_validation.nim | 1 - beacon_chain/spec/beaconstate.nim | 1 - beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim | 2 -- beacon_chain/validators/beacon_validators.nim | 2 +- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index db1590fb0..121736a77 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -849,7 +849,6 @@ proc validateAttestation*( Future[Result[ tuple[attesting_index: ValidatorIndex, sig: CookedSig], ValidationError]] {.async: (raises: [CancelledError]).} = - debugComment "should reject a bunch" # [REJECT] The attestation's epoch matches its target -- i.e. # attestation.data.target.epoch == # compute_epoch_at_slot(attestation.data.slot) diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index eba73b77f..7d205efd1 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -985,7 +985,6 @@ proc check_attestation*( when on_chain: var participants_count = 0'u64 - debugComment "cache doesn't know about forks" for index in attestation.committee_bits.oneIndices: if not (index.uint64 < get_committee_count_per_slot( state, data.target.epoch, cache)): diff --git a/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim b/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim index 38dd3f8eb..375f032f9 100644 --- a/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim +++ b/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim @@ -1941,8 +1941,6 @@ proc writeValue*(writer: var JsonWriter[RestJson], proc writeValue*( writer: var JsonWriter[RestJson], value: Web3SignerRequest ) {.raises: [IOError].} = - debugComment "electra web3signer needs some EIP-7549 changes" - writer.beginRecord() case value.kind of Web3SignerRequestKind.AggregationSlot: diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 154e95415..4f814835a 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -487,7 +487,7 @@ proc makeBeaconBlockForHeadAndSlot*( withState(state[]): when consensusFork >= ConsensusFork.Capella and PayloadType.kind >= ConsensusFork.Capella: - let withdrawals = List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]( + let withdrawals = List[capella.Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]( get_expected_withdrawals(forkyState.data)) if withdrawals_root.isNone or hash_tree_root(withdrawals) != withdrawals_root.get: