chore: fix lints, types and unit tests in peerDAS#7707
chore: fix lints, types and unit tests in peerDAS#7707matthewkeil merged 5 commits intoChainSafe:mkeil/peerDAS-lintfrom
Conversation
| // cgc is big ending but since 1 bytes suffices for now so its the same | ||
| const cgc = Math.max(config.CUSTODY_REQUIREMENT, config.NODE_CUSTODY_REQUIREMENT); | ||
| enr.set("cgc", intToBytes(cgc, Math.ceil(Math.log2(cgc + 1) / 8), "be")); |
There was a problem hiding this comment.
This was causing the test for persisting the ENR to disk to fail -- it was undefined on first write, then defined to this on second write.
I don't think this is needed here anyway, since the CGC value is already set through the custody config, which flows through the MetadataController into the discV5 ENR. Additionally, even if we wanted to propagate the most recent CGC value to the ENR disk file whenever it changes, I don't think we'd have the context to do it from here.
There was a problem hiding this comment.
I tend to agree. I don't think we need to persist cgc to disk at all because its dynamic now.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## mkeil/peerDAS-lint #7707 +/- ##
=====================================================
Coverage ? 42.59%
=====================================================
Files ? 732
Lines ? 52680
Branches ? 2263
=====================================================
Hits ? 22440
Misses ? 30198
Partials ? 42 🚀 New features to boost your workflow:
|
|
LGTM!!! 🚀 Going to merge this to a branch in the base repo so we can deploy to a feature group on our infra to double check everything went smoothly. |
52531a3
into
ChainSafe:mkeil/peerDAS-lint
|
deployed to |
Motivation
It'd be nice to get tests and lints passing on the peerDAS branch, both to get it ready to merge into unstable and so we can check PRs into the peerDAS branch.
Description
The only intended functional change is to
initPeerIdAndEnr, will add a comment on that change. It might be easier to review commit by commit, to more easily view the lint fixes separately from the unit test fixes.