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

P2P: move seed nodes to config #306

Merged
merged 2 commits into from
Oct 7, 2024
Merged

P2P: move seed nodes to config #306

merged 2 commits into from
Oct 7, 2024

Conversation

Boog900
Copy link
Member

@Boog900 Boog900 commented Oct 7, 2024

What

Moves the seed nodes to the config + removes a few unused constants

Why

Seeds nodes depend on the network.

@github-actions github-actions bot added A-p2p Related to P2P. A-test-utils Related to test-utils. labels Oct 7, 2024
seeds.len() != 0,
"No seed nodes available to get peers from"
);
assert_ne!(seeds.len(), 0, "No seed nodes available to get peers from");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: https://rust-lang.github.io/rust-clippy/master/index.html#/len_zero

Suggested change
assert_ne!(seeds.len(), 0, "No seed nodes available to get peers from");
assert!(!seeds.is_empty(), "No seed nodes available to get peers from");

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines -56 to -64
const SEEDS: &'static [Self::Addr] = &[
ip_v4(176, 9, 0, 187, 18080),
ip_v4(88, 198, 163, 90, 18080),
ip_v4(66, 85, 74, 134, 18080),
ip_v4(51, 79, 173, 165, 18080),
ip_v4(192, 99, 8, 110, 18080),
ip_v4(37, 187, 74, 171, 18080),
ip_v4(77, 172, 183, 193, 18080),
];
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't removing this mean users will have to manually provide seed nodes?

Will there eventually be default seed nodes added to the P2PConfig?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't removing this mean users will have to manually provide seed nodes?

Users as in devs using cuprate-p2p? yes.

Users as in people using cuprated? no.

Will there eventually be default seed nodes added to the P2PConfig?

in #304 I am creating the config that will be exposed to cuprated users in there there will be default seed nodes

@Boog900 Boog900 merged commit ca88251 into main Oct 7, 2024
12 checks passed
@Boog900 Boog900 deleted the p2p-config-changes branch October 7, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-p2p Related to P2P. A-test-utils Related to test-utils.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants