Skip to content
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

Set custody subnets on tests #6382

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

ackintosh
Copy link
Member

@ackintosh ackintosh commented Sep 10, 2024

Issue Addressed

Closes #6319

Proposed Changes

  1. Update the __add_connected_peer_testing_only to set custody subnets
  2. Add an additional supernode in the sampling_with_retries test to ensure that the node can retry

@ackintosh ackintosh added work-in-progress PR is a work-in-progress das Data Availability Sampling labels Sep 10, 2024
let node_id = peer_id_to_node_id(&peer_id).expect("convert peer_id to node_id");
let subnets = DataColumnSubnetId::compute_custody_subnets::<E>(
node_id.raw(),
spec.custody_requirement + 4,
Copy link
Member Author

Choose a reason for hiding this comment

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

spec.custody_requirement did not fix the flakiness; the failure where cx.get_custodial_peers(self.column_index) returns only a supernode still occurs. Based on my testing, spec.custody_requirement + 4 (or more) seems to fix it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not have two supernodes in the retry test + set_custody_subnets in all tests for completeness?

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense to me💡 Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Yeah the random generated peer ids doesn’t guarantee that peers are distributed across all subnets evenly. we need to either depend on more super nodes or have deterministic node ids in the test. In practice, LH will need to continuously maintain peers across all subnets.

@ackintosh ackintosh marked this pull request as ready for review September 11, 2024 22:50
@ackintosh ackintosh added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Sep 11, 2024
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍 Thanks!

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 12, 2024
@jimmygchen
Copy link
Member

@mergify queue

Copy link

mergify bot commented Sep 12, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 351dd6c

mergify bot added a commit that referenced this pull request Sep 12, 2024
@mergify mergify bot merged commit 351dd6c into sigp:unstable Sep 12, 2024
28 checks passed
@ackintosh ackintosh deleted the set-custody-subnets-on-tests branch September 13, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants