libp2p / libp2p/py-libp2p

Medley of `pubsub` improvements

Open
#283 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Python
Stars
624
Forks
256
Avg merge
1d 34m
Merged PRs (30d)
47

Description

Leaving this here while I'm reviewing the current pubsub packages...

  1. Don't serialize message sends, eg: https://github.com/libp2p/py-libp2p/blob/master/libp2p/pubsub/gossipsub.py#L172-L177
    Happens here and in floodsub as well -- this is a great place to use asyncio.gather

  2. "separate policy from mechanism" -- in the same place, we defer to the particular router to decide who to send new msgs to... and then do the sending in the router itself. as far as i can tell, we can pull out the sending part into the Pubsub class, relying on the router for what should be its only job -- determining peers for some action

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the pubsub packages, especially the referenced gossipsub.py section, the floodsub path, the Pubsub class, and the router behavior. Trace message-send flow and existing tests if available; done means sends are no longer serialized and routing policy is separated from the sending mechanism without changing intended peer selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.