Skip to content

Commit

Permalink
update beacon_validators to be more Nim 2.2-compatible (#6637)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored Oct 11, 2024
1 parent b4efaaa commit 5608a80
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion beacon_chain/gossip_processing/gossip_validation.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion beacon_chain/spec/beaconstate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down
2 changes: 0 additions & 2 deletions beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/validators/beacon_validators.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5608a80

Please sign in to comment.