-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use SubnetID
type from CL spec instead of number
#7298
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7298 +/- ##
=========================================
Coverage 48.75% 48.75%
=========================================
Files 601 601
Lines 40222 40222
Branches 2061 2061
=========================================
Hits 19609 19609
Misses 20575 20575
Partials 38 38 |
48f6c94
to
67075e9
Compare
57b4614
to
cabb2aa
Compare
Performance Report✔️ no performance regression detected Full benchmark results
|
packages/beacon-node/src/chain/opPools/syncCommitteeMessagePool.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just need more discussion on type representing subnet id in sync aggregate.
@@ -762,7 +763,7 @@ export function getCommitteeIndices( | |||
/** | |||
* Compute the correct subnet for a slot/committee index | |||
*/ | |||
export function computeSubnetForSlot(shuffling: EpochShuffling, slot: number, committeeIndex: number): number { | |||
export function computeSubnetForSlot(shuffling: EpochShuffling, slot: number, committeeIndex: number): SubnetID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized computeSubnetForSlot
here and computeSubnetForCommitteesAtSlot
in packages/beacon-node/src/api/impl/validator/utils.ts
can probably be just one function instead. Can combine them at a later PR
Motivation
Makes it easier to compare our implementation against CL spec
Description
Use
SubnetID
type from CL spec instead ofnumber
From specs/phase0/p2p-interface.md?plain=1#L182
SubnetID
uint64
Depends on #7297