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: Implement P2P Bucket data structure #329

Merged
merged 1 commit into from
Nov 2, 2024
Merged

p2p: Implement P2P Bucket data structure #329

merged 1 commit into from
Nov 2, 2024

Conversation

SyntheticBird45
Copy link
Member

What

See: #178

This PR implements a "Bucket" data structure that is a collection of data that discriminates its items into "buckets" (vector of size N) following a defined function.

  • Implements Bucket data structure and Bucketable trait
  • Implements Bucketable for Ipv4Addr
  • Added the crate to the workspace dependencies
  • Added arrayvec as a dependency

Why

The end goal is to use this structure to store diverse IPs of different /16 subnets.

@github-actions github-actions bot added A-p2p Related to P2P. A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-workspace Changes to a root workspace file or general repo file. labels Oct 28, 2024
@SyntheticBird45 SyntheticBird45 changed the title Implements P2P Bucket data structure p2p: Implement P2P Bucket data structure Oct 28, 2024
Cargo.toml Outdated Show resolved Hide resolved
p2p/bucket/Cargo.toml Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@hinto-janai hinto-janai left a comment

Choose a reason for hiding this comment

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

Cargo.toml Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
@github-actions github-actions bot added A-docs Related to documentation. A-books Related to Cuprate's books. A-book-architecture Related to the Architecture book. labels Nov 1, 2024
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
p2p/bucket/src/lib.rs Outdated Show resolved Hide resolved
This commit implements a "Bucket" data structure that is a collection
of data that discriminates its items into "buckets" (vector of size N)
following a defined function.

- Implements Bucket data structure and Bucketable trait
- Implements Bucketable for Ipv4Addr
- Added the crate to the workspace dependencies
- Added arrayvec as a dependency
@Boog900 Boog900 merged commit b6c4adc into main Nov 2, 2024
7 of 9 checks passed
@Boog900 Boog900 deleted the p2p_bucket branch November 2, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-book-architecture Related to the Architecture book. A-books Related to Cuprate's books. A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-docs Related to documentation. A-p2p Related to P2P. A-workspace Changes to a root workspace file or general repo file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants