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

Convert "want hints" into want bitfields #905

Closed
gmaclennan opened this issue Oct 17, 2024 · 1 comment
Closed

Convert "want hints" into want bitfields #905

gmaclennan opened this issue Oct 17, 2024 · 1 comment

Comments

@gmaclennan
Copy link
Member

gmaclennan commented Oct 17, 2024

A "want hint" is a list of filename filters for the blob hyperdrive(s), that is sent between peers.

A peer receiving a "want hint" should use the hyperdrive blobIndex to convert that want hint into a bitfield for the hyperdrive blob core.

This bitfield(s) can then be passed to the sync API.

@gmaclennan gmaclennan self-assigned this Oct 17, 2024
@gmaclennan gmaclennan assigned EvanHahn and unassigned gmaclennan Oct 29, 2024
EvanHahn added a commit that referenced this issue Nov 7, 2024
This is the bulk of the work required in [#905]. It takes incoming blob
filters and converts them to want bitfields.

It starts in `MapeoProject` and gets all the way down to `PeerState`.

[#905]: #905
@EvanHahn EvanHahn assigned gmaclennan and unassigned EvanHahn Nov 7, 2024
EvanHahn added a commit that referenced this issue Nov 12, 2024
This is the bulk of the work required in [#905]. It takes incoming blob
filters and converts them to want bitfields.

It starts in `MapeoProject` and gets all the way down to `PeerState`.

[#905]: #905
@EvanHahn EvanHahn assigned EvanHahn and unassigned gmaclennan Nov 12, 2024
EvanHahn added a commit that referenced this issue Nov 20, 2024
*You may wish to [review this squashed commit as separate commits][0].*

When you receive a blob filter from another peer, this updates their
sync states. For example, if you receive a blob filter that says "I only
want photo thumbnails", that peer's "wants" bitfield will be reduced.

Closes [#682] and [#905].

[0]: https://github.com/digidem/comapeo-core/pull/956/commits
[#682]: #682
[#905]: #905
@EvanHahn
Copy link
Contributor

Done in 3d1c94b.

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

No branches or pull requests

2 participants