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

Extensible Ouroboros Network Diffusion Stack #5016

Merged
merged 12 commits into from
Feb 19, 2025
Merged

Conversation

bolt12
Copy link
Contributor

@bolt12 bolt12 commented Nov 27, 2024

Description

This PR refactors ouroboros-network in order to make diffusion layer general/polymorphic and extensible. This will allow us (or 3rd parties) to have access to a flexible network stack which can be extended/configured to ones needs.

For more details about this refactoring, see https://github.com/IntersectMBO/ouroboros-network/wiki/Reusable-Diffusion-Investigation

TODOs:

  • Better document PRP invariants and refactor/cleanup insertion functions
  • remove daBlockFetchMode
  • Consensus uses a entirely different project for Cardano Node consensus layer instantiation, decide what's the best approach for the networking code.

For next steps (e,.g. when developing mithril) this will be in the todo list:

  • Add tests for the general components: Churn, OG, etc..
  • Generalise peerChurnGovernor to only have one implementation and not 2
  • Redesign bootstrap peers as a concept to be general enough to be usable by third party users. Right now it is very cardano-node specific.
  • Create a sub library that holds all cardano-node specific types and functions, this will be better for organising dependencies and the code overall
  • Move Cardano specific things from cardano-node, we should think of moving some of the other things to ouroboros-network as well, e.g. topology file format for example. 3rd parties don't need to reimplement it from scratch.

@bolt12 bolt12 added the diffusion Issues / PRs related to diffusion layer label Nov 27, 2024
@bolt12 bolt12 self-assigned this Nov 27, 2024
@bolt12 bolt12 requested a review from a team as a code owner November 27, 2024 13:10
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 6 times, most recently from 3cdb9a3 to f00952f Compare November 27, 2024 16:53
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch from c14d5cb to 3b30f43 Compare December 2, 2024 16:42
@yihuang
Copy link

yihuang commented Dec 4, 2024

a step toward haskell blockchain sdk? 😄

@bolt12
Copy link
Contributor Author

bolt12 commented Dec 5, 2024

@yihuang as you can see from the PR description this is some interesting step towards a fully polymorphic diffusion that might be used by others to create their own overlay network! Thank you for noticing 😃

@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 6 times, most recently from f922210 to 3cdf98d Compare December 9, 2024 10:09
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 5 times, most recently from ce99e1d to 5400a7c Compare January 7, 2025 12:07
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

I reviewed the first two patches:

git hash commit title
bae4f75 Pull out Cardano specifics to different modules
cb0da21 Add extension points to Diffusion data structures

coot added 4 commits February 11, 2025 14:56
Also adhere to the convention: first `extraFlags`, then `extraPeers`
We can pass `PeerSelectionInterfaces` to `updateWithState` function to
get access to `readUseLedgerPeers`.
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch from 1e6f14a to 87bd453 Compare February 11, 2025 15:01
@coot coot force-pushed the bolt12/reusable-diffusion-3 branch from 98025d3 to d0f1f93 Compare February 12, 2025 14:03
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

LGTM

@coot coot self-requested a review February 14, 2025 10:58
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

Approved

@bolt12 bolt12 enabled auto-merge February 14, 2025 11:22
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 3 times, most recently from 52867c8 to 0f22264 Compare February 14, 2025 12:35
coot and others added 3 commits February 14, 2025 15:00
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch from 05512d2 to 36afb19 Compare February 18, 2025 10:56
@bolt12 bolt12 disabled auto-merge February 18, 2025 11:25
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 4 times, most recently from 79dd002 to 79955d2 Compare February 19, 2025 12:35
@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch from 79955d2 to e01e06e Compare February 19, 2025 12:56
@bolt12 bolt12 added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit 043280f Feb 19, 2025
12 checks passed
@bolt12 bolt12 deleted the bolt12/reusable-diffusion-3 branch February 19, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diffusion Issues / PRs related to diffusion layer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants