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

[wip] feat: willow implementation #2231

Draft
wants to merge 207 commits into
base: main
Choose a base branch
from
Draft

[wip] feat: willow implementation #2231

wants to merge 207 commits into from

Conversation

Frando
Copy link
Member

@Frando Frando commented Apr 25, 2024

Description

Work in progress! Implementation of https://willowprotocol.org/ for iroh

Protocol

The protocol module contains the data structures and basic interactions as defined by the Willow specs. It is IO-less and not generic, all types are concrete.

Session

The session module contains the implementation of the WGPS protocol session.

  • Session setup
  • Private area intersection
  • Set reconciliation
  • Resource control
    • Binding resources
    • Freeing resources
    • Issue initial guarantees
    • Respect issued guarantees
    • Issue new guarantees
  • Live data mode between two peers
    • Subscribe to new inserts and send to active sessions
    • Only send entries for matcing shared areas of interest
  • Verified streaming for payloads with bao outboards embedded
  • Payload requests
  • Live data mode in a swarm setting

Net

The net module opens sessions over iroh-net QUIC connections.

Store

The store module contains backing stores for entries and keys

  • Store traits and generic functionality
    • Entry store trait
    • Key store trait
    • Use iroh-blobs for payload storage
    • Store capabilities by hash and do reference counting
    • Expose hook to prevent GC of payloads and/or do reference counting for payloads
  • PoC memory store
  • move store to own thread & sessions to local pools
  • redb store
    • port @rklaehn's redb PoC
    • figure out if the traits need to change for our delayed commit strategy
    • add commit to the store trait
  • subscriptions
    • reliable/persistent subscriptions

Engine

  • PeerManager (1 session peer peer only)
  • Intents
    • changing between ReconcileOnce and Live modes

Other

  •  How can builder APIs be done nicely over FFI

Breaking Changes

Once we integrate, this will be a very much breaking changes for everything around docs: This will break not only APIs, but also the protocol and the storage. We cannot offer automatic migration even, because signatures change. How exactly we deal with this situation is tbd. Likely we will offer an out-of-tree tool to migrate data from the old iroh-docs to the new willow iroh-docs.

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@Frando Frando marked this pull request as draft April 25, 2024 10:23
Frando and others added 30 commits August 28, 2024 14:41
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Purging `flume` as a dependency from `iroh-willow`.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

Well, there's the whole "make a last send in `impl Drop`" thing.
<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [x] Self-review.
- ~~[ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.~~
- ~~[ ] Tests if relevant.~~
- [x] All breaking changes documented.
Subspace capabilities were not created when creating owned namespaces.
Fixed that.
Also adds a test written by @Voronar, thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

4 participants