Skip to content

Commit

Permalink
nano and info
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Feb 13, 2025
1 parent b506d4a commit 7ea43aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ public Function<BeaconBlockBodyBuilder, SafeFuture<Void>> createSelector(
return bodyBuilder -> {
final Eth1Data eth1Data = eth1DataCache.getEth1Vote(blockSlotState);

final long start = System.nanoTime();
final SszList<Attestation> attestations =
attestationPool.getAttestationsForBlock(
blockSlotState, new AttestationForkChecker(spec, blockSlotState));
System.out.println("getAttestationsForBlock: " + (System.nanoTime() - start) / 1_000_000 + "ms");


// Collect slashings to include
final Set<UInt64> exitedValidators = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ public synchronized SszList<Attestation> getAttestationsForBlock(
schemaDefinitions.getAttestationSchema().requiresCommitteeBits();

final AtomicInteger prevEpochCount = new AtomicInteger(0);

dataHashBySlot.descendingMap().forEach(
(slot, dataHashes) -> System.out.println("slot: " + slot + ", dataHashes: " + dataHashes.size()));

return dataHashBySlot
// We can immediately skip any attestations from the block slot or later
.headMap(stateAtBlockSlot.getSlot(), false)
Expand Down

0 comments on commit 7ea43aa

Please sign in to comment.