Skip to content

feat: clean up fulu peer connected event#8157

Merged
wemeetagain merged 6 commits into
peerDASfrom
mkeil/clean-up-fulu-peer-connected
Aug 11, 2025
Merged

feat: clean up fulu peer connected event#8157
wemeetagain merged 6 commits into
peerDASfrom
mkeil/clean-up-fulu-peer-connected

Conversation

@matthewkeil

Copy link
Copy Markdown
Member

Motivation

Addresses peerDAS PR comment
#6353 (comment)

Also clean up usage (emission and consumption) of the peer_connected event.

Add helper function to prettyPrintCustodyGroups

@matthewkeil matthewkeil requested a review from a team as a code owner August 8, 2025 20:54
Comment thread packages/utils/src/format.ts Outdated
return hex.startsWith("0x") ? hex.slice(2) : hex;
}

export function getCustodyGroupIncrements(custodyGroups: number[]): string[] {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is this in utils package? this seems beacon-node specific

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yea agree it can go under beacon-node/src/utils if you want

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

made it more generic so it works with any indices (sparse, unsorted, duplicated, etc) so we can use for slot ranges or others in all packages

Comment thread packages/utils/test/unit/format.test.ts Outdated

it("should handle full range 0-127", () => {
const fullRange = Array.from({length: 128}, (_, i) => i);
expect(getCustodyGroupIncrements(fullRange)).toEqual(["0-127"]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is nice, right now the log, especially for supernodes is way to verbose

@wemeetagain wemeetagain left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

generally lgtm

@wemeetagain wemeetagain merged commit 9013053 into peerDAS Aug 11, 2025
5 of 6 checks passed
@wemeetagain wemeetagain deleted the mkeil/clean-up-fulu-peer-connected branch August 11, 2025 15:55
@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.34.0 🎉

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.

3 participants