lambdaclass / lambdaclass/lambda_ethereum_consensus

Unsubscribe from topics without leaving them

Open
#1,289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

attester P2 sync committees
Dominant language
Elixir
Stars
109
Forks
41
PR merge metrics
No merged PRs in 30d

Description

This was a TODO comment on attestations that impacts also sync_committees, right now to unsubscribe from a topi we need to leave an rejoin:

  @spec stop_collecting(non_neg_integer()) ::
          {:ok, list(Types.Attestation.t())} | {:error, String.t()}
  def stop_collecting(subnet_id) do
    topic = topic(subnet_id)
    Libp2pPort.leave_topic(topic)
    Libp2pPort.join_topic(topic)
    SyncSubnetInfo.stop_collecting(subnet_id)
  end

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 at stop_collecting/1 and inspect the Libp2pPort topic operations, then compare the attestation TODO with the corresponding sync_committees behavior. Confirm how the networking layer supports unsubscribing without leaving and rejoining; done means both paths stop collecting while remaining subscribed to their topics.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.