Skip to content

Commit 1ea5f0f

Browse files
committed
chore: refactor to committeeValidatorIndex
1 parent 7d3d255 commit 1ea5f0f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/beacon-node/src/api/impl/beacon/pool/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ export function getBeaconPoolApi({
9999
// when a validator is configured with multiple beacon node urls, this attestation data may come from another beacon node
100100
// and the block hasn't been in our forkchoice since we haven't seen / processing that block
101101
// see https://github.com/ChainSafe/lodestar/issues/5098
102-
const {indexedAttestation, subnet, attDataRootHex, committeeIndex, participationIndex} =
102+
const {indexedAttestation, subnet, attDataRootHex, committeeIndex, committeeValidatorIndex} =
103103
await validateGossipFnRetryUnknownRoot(validateFn, network, chain, slot, beaconBlockRoot);
104104

105105
if (network.shouldAggregate(subnet, slot)) {
106106
const insertOutcome = chain.attestationPool.add(
107107
committeeIndex,
108-
participationIndex,
108+
committeeValidatorIndex,
109109
attestation,
110110
attDataRootHex
111111
);

packages/beacon-node/src/chain/opPools/attestationPool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class AttestationPool {
107107
*/
108108
add(
109109
committeeIndex: CommitteeIndex,
110-
participationIndex: number,
110+
committeeValidatorIndex: number,
111111
attestation: Attestation,
112112
attDataRootHex: RootHex
113113
): InsertOutcome {
@@ -149,7 +149,7 @@ export class AttestationPool {
149149
const aggregate = aggregateByIndex.get(committeeIndex);
150150
if (aggregate) {
151151
// Aggregate mutating
152-
return aggregateAttestationInto(aggregate, attestation, participationIndex);
152+
return aggregateAttestationInto(aggregate, attestation, committeeValidatorIndex);
153153
}
154154
// Create new aggregate
155155
aggregateByIndex.set(committeeIndex, attestationToAggregate(attestation));

packages/beacon-node/src/chain/validation/attestation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export type AttestationValidationResult = {
6161
subnet: number;
6262
attDataRootHex: RootHex;
6363
committeeIndex: CommitteeIndex;
64-
participationIndex: number;
64+
committeeValidatorIndex: number;
6565
};
6666

6767
export type AttestationOrBytes = ApiAttestation | GossipAttestation;
@@ -506,7 +506,7 @@ async function validateAttestationNoSignatureCheck(
506506
signatureSet,
507507
validatorIndex,
508508
committeeIndex,
509-
participationIndex: bitIndex,
509+
committeeValidatorIndex: bitIndex,
510510
};
511511
}
512512

packages/beacon-node/src/network/processor/gossipHandlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ function getBatchHandlers(modules: ValidatorFnsModules, options: GossipHandlerOp
633633
results.push(null);
634634

635635
// Handler
636-
const {indexedAttestation, attDataRootHex, attestation, committeeIndex, participationIndex} =
636+
const {indexedAttestation, attDataRootHex, attestation, committeeIndex, committeeValidatorIndex} =
637637
validationResult.result;
638638
metrics?.registerGossipUnaggregatedAttestation(gossipHandlerParams[i].seenTimestampSec, indexedAttestation);
639639

@@ -643,7 +643,7 @@ function getBatchHandlers(modules: ValidatorFnsModules, options: GossipHandlerOp
643643
if (aggregatorTracker.shouldAggregate(subnet, indexedAttestation.data.slot)) {
644644
const insertOutcome = chain.attestationPool.add(
645645
committeeIndex,
646-
participationIndex,
646+
committeeValidatorIndex,
647647
attestation,
648648
attDataRootHex
649649
);

0 commit comments

Comments
 (0)