Skip to content

Commit d00450b

Browse files
committed
Add note on why validator pubkey used as key instead of index
1 parent b6ae0bd commit d00450b

File tree

1 file changed

+5
-0
lines changed
  • packages/beacon-node/src/execution/builder

1 file changed

+5
-0
lines changed

packages/beacon-node/src/execution/builder/cache.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ export type ValidatorRegistration = {
1010
};
1111

1212
export class ValidatorRegistrationCache {
13+
/**
14+
* Map to track registrations by validator pubkey which is used here instead of
15+
* validator index as `bellatrix.ValidatorRegistrationV1` does not contain the index
16+
* and builder flow in general prefers to use pubkey over index.
17+
*/
1318
private readonly registrationByValidatorPubkey: Map<string, ValidatorRegistration>;
1419
constructor() {
1520
this.registrationByValidatorPubkey = new Map();

0 commit comments

Comments
 (0)