Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

p2p checkpoint #141

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open

p2p checkpoint #141

wants to merge 48 commits into from

Conversation

chunningham
Copy link
Member

@chunningham chunningham commented Apr 5, 2023

Description

This PR introduces a lot of p2p-related boilerplate as a reviewable prelude to p2p replication, while keeping the complicated parts-to-come out. Notably, it:

  • reimplements the relay peer (superceding reimplement relay peers #133)
  • defines a builder pattern for all transport-related stuff (via the IntoTransport trait)
  • makes defining the available transports much easier
  • defines the base NetworkBehaviour that will be built upon
  • defines a builder patter for the relay peer and the orbit network behaviour
  • makes it very hard to misconfigure the relay or orbit behaviour
    • it goes pretty crazy with generics but by doing so makes the usage of these components pretty smooth
  • removes as much anyhow errors as possible from core library components
  • updates to the latest version of libp2p and takes care of all associated changes and deprecations
  • doesn't break any functionality but changes/implements a number of APIs

Further development does not necessarily require that this be merged, but by building upon this state further PRs will include these changes, so this PR can act as a checkpoint to distinguish the boilerplate from the actual replication code.

some TODOs

  • a proper relay test
  • doc comments

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

System Configuration

(Please delete options that are not relevant)
Runtime version(s):
Browser version(s):
Firmware version(s):
SDK version(s):

Diligence Checklist

(Please delete options that are not relevant)

  • This change requires a documentation update
  • I have included unit tests
  • I have updated and/or included new integration tests
  • I have updated and/or included new end-to-end tests
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@chunningham chunningham force-pushed the feat/p2p-checkpoint branch 3 times, most recently from 60fe854 to bff4ed0 Compare April 5, 2023 15:18
src/lib.rs Outdated Show resolved Hide resolved
src/routes/mod.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants