Skip to content

Commit 3a31be6

Browse files
authored
less verbose Electra aggregation bits logging (#7058)
1 parent c63974b commit 3a31be6

File tree

10 files changed

+15
-20
lines changed

10 files changed

+15
-20
lines changed

beacon_chain/consensus_object_pools/block_pools_types.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99

1010
import
1111
# Standard library
12-
std/[sets, tables, hashes],
12+
std/[tables, hashes],
1313
# Status libraries
1414
chronicles,
1515
# Internals
1616
../spec/[signatures_batch, forks, helpers],
17-
../spec/datatypes/[phase0, altair, bellatrix],
1817
".."/[beacon_chain_db, era_db],
1918
../validators/validator_monitor,
2019
./block_dag, block_pools_types_light_client

beacon_chain/consensus_object_pools/block_quarantine.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
{.push raises: [].}
99

1010
import
11+
std/tables,
1112
chronicles,
12-
std/[options, tables],
13-
stew/bitops2,
1413
../spec/forks
1514

1615
export tables, forks

beacon_chain/consensus_object_pools/spec_cache.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
{.push raises: [].}
99

1010
import
11-
std/sequtils,
1211
results,
1312
chronicles,
14-
../extras,
15-
../spec/[beaconstate, helpers, network, signatures, validator],
13+
../spec/[beaconstate, helpers, signatures, validator],
1614
../spec/datatypes/base,
1715
./block_pools_types, blockchain_dag
1816

17+
from std/sequtils import anyIt
1918
from ../spec/datatypes/electra import shortLog
19+
from ../spec/network import compute_subnet_for_attestation
2020

2121
export
22-
base, extras, block_pools_types, results
22+
base, block_pools_types, results
2323

2424
logScope: topics = "spec_cache"
2525

beacon_chain/era_db.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-2025 Status Research & Development GmbH
33
# Licensed and distributed under either of
44
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
55
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -12,7 +12,6 @@ import
1212
chronicles,
1313
results, snappy, taskpools,
1414
../ncli/era,
15-
./spec/datatypes/[altair, bellatrix, phase0],
1615
./spec/[beaconstate, forks, signatures_batch],
1716
./consensus_object_pools/block_dag # TODO move to somewhere else to avoid circular deps
1817

beacon_chain/spec/datatypes/electra.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,9 +977,12 @@ iterator getValidatorIndices*(
977977
continue
978978
yield validator_index
979979

980+
func shortLog*(v: ElectraCommitteeValidatorsBits): auto =
981+
$v.countOnes() & "/" & $v.len()
982+
980983
func shortLog*(v: electra.Attestation | electra.TrustedAttestation): auto =
981984
(
982-
aggregation_bits: v.aggregation_bits,
985+
aggregation_bits: shortLog(v.aggregation_bits),
983986
committee_bits: v.committee_bits,
984987
data: shortLog(v.data),
985988
signature: shortLog(v.signature)

beacon_chain/spec/eth2_apis/rest_beacon_calls.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-2025 Status Research & Development GmbH
33
# Licensed and distributed under either of
44
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
55
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -10,7 +10,6 @@
1010
import
1111
chronos, presto/client, chronicles,
1212
".."/".."/validators/slashing_protection_common,
13-
".."/datatypes/[phase0, altair, bellatrix],
1413
".."/mev/[bellatrix_mev, capella_mev],
1514
".."/[helpers, forks, keystore, eth2_ssz_serialization],
1615
"."/[rest_types, rest_common, eth2_rest_serialization]

beacon_chain/spec/eth2_apis/rest_debug_calls.nim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-2025 Status Research & Development GmbH
33
# Licensed and distributed under either of
44
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
55
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -9,7 +9,7 @@
99

1010
import
1111
chronos, presto/client,
12-
".."/[helpers, forks], ".."/datatypes/[phase0, altair],
12+
".."/[helpers, forks],
1313
"."/[rest_types, eth2_rest_serialization]
1414

1515
export chronos, client, rest_types, eth2_rest_serialization
@@ -19,7 +19,6 @@ proc getDebugChainHeadsV2*(): RestResponse[GetDebugChainHeadsV2Response] {.
1919
meth: MethodGet.}
2020
## https://ethereum.github.io/beacon-APIs/#/Beacon/getDebugChainHeadsV2
2121

22-
2322
proc getStateV2Plain*(state_id: StateIdent): RestPlainResponse {.
2423
rest, endpoint: "/eth/v2/debug/beacon/states/{state_id}",
2524
accept: preferSSZ,

beacon_chain/spec/eth2_apis/rest_keymanager_calls.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-2025 Status Research & Development GmbH
33
# Licensed and distributed under either of
44
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
55
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -10,7 +10,6 @@
1010
import
1111
presto/client, chronicles,
1212
".."/".."/validators/slashing_protection_common,
13-
".."/datatypes/[phase0, altair],
1413
".."/[helpers, forks, keystore, eth2_ssz_serialization],
1514
"."/[rest_types, rest_common, rest_keymanager_types, eth2_rest_serialization]
1615

beacon_chain/sync/sync_manager.nim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import std/[strutils, sequtils, algorithm]
1111
import stew/base10, chronos, chronicles, results
1212
import
13-
../spec/datatypes/[phase0, altair],
1413
../spec/eth2_apis/rest_types,
1514
../spec/[helpers, forks, network],
1615
../networking/[peer_pool, peer_scores, eth2_network],

beacon_chain/sync/sync_queue.nim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import std/[deques, heapqueue, tables, strutils, sequtils, math, typetraits]
1111
import stew/base10, chronos, chronicles, results
1212
import
13-
../spec/datatypes/[base, phase0, altair],
1413
../spec/[helpers, forks],
1514
../networking/[peer_pool, eth2_network],
1615
../gossip_processing/block_processor,

0 commit comments

Comments
 (0)