-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Fix deserializeEnrSubnets #3956
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3956 +/- ##
==========================================
- Coverage 36.33% 36.26% -0.07%
==========================================
Files 324 324
Lines 9063 9099 +36
Branches 1455 1465 +10
==========================================
+ Hits 3293 3300 +7
- Misses 5597 5626 +29
Partials 173 173 |
Performance Report✔️ no performance regression detected Full benchmark results
|
const bytesBuf = Buffer.from(bytes, "hex"); | ||
it(`Deserialize attnet ${bytes}`, () => { | ||
expect( | ||
deserializeEnrSubnets(bytesBuf, ATTESTATION_SUBNET_COUNT).slice(0, ATTESTATION_SUBNET_COUNT) |
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.
seeing this has already been merged, this is more of a question...is the slice
needed in the test? I removed it, that is:
expect(deserializeEnrSubnets(bytesBuf, ATTESTATION_SUBNET_COUNT)).to.deep.equal(bools)
and the tests still passed alright.
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.
yaah it's not really needed, it's only needed for sync committee, the test above I guess. However the test overall still serves our purpose.
Motivation
Lodestar node is not able to connect to an attestation subnet peer because
deserializeEnrSubnets
always return an empty arrayDescription
Fix
deserializeEnrSubnets
closes #3940