Skip to content

chore: fix lints, types and unit tests in peerDAS#7707

Merged
matthewkeil merged 5 commits intoChainSafe:mkeil/peerDAS-lintfrom
dguenther:peerDAS-fix-lint
Apr 17, 2025
Merged

chore: fix lints, types and unit tests in peerDAS#7707
matthewkeil merged 5 commits intoChainSafe:mkeil/peerDAS-lintfrom
dguenther:peerDAS-fix-lint

Conversation

@dguenther
Copy link
Contributor

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.

@dguenther dguenther requested a review from a team as a code owner April 16, 2025 04:39
Comment on lines -90 to -92
// 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"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree. I don't think we need to persist cgc to disk at all because its dynamic now.

@twoeths twoeths changed the title chore: Fix lints, types and unit tests in peerDAS chore: fix lints, types and unit tests in peerDAS Apr 16, 2025
@codecov
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 8.10811% with 68 lines in your changes missing coverage. Please review.

Please upload report for BASE (mkeil/peerDAS-lint@9d67a7e). Learn more about missing BASE report.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matthewkeil matthewkeil changed the base branch from peerDAS to mkeil/peerDAS-lint April 17, 2025 11:00
@matthewkeil
Copy link
Member

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.

@matthewkeil matthewkeil merged commit 52531a3 into ChainSafe:mkeil/peerDAS-lint Apr 17, 2025
16 of 19 checks passed
@matthewkeil
Copy link
Member

deployed to devnet-ax41-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants