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

refactor: move subscriptions directly to operations_collector #1052

Merged
merged 5 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/lambda_ethereum_consensus/beacon/beacon_node.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
LambdaEthereumConsensus.P2P.IncomingRequests,
LambdaEthereumConsensus.Beacon.PendingBlocks,
LambdaEthereumConsensus.Beacon.SyncBlocks,
LambdaEthereumConsensus.P2P.GossipSub,
LambdaEthereumConsensus.P2P.Gossip.Attestation,
LambdaEthereumConsensus.P2P.Gossip.BeaconBlock,
LambdaEthereumConsensus.P2P.Gossip.BlobSideCar
LambdaEthereumConsensus.P2P.Gossip.BlobSideCar,
LambdaEthereumConsensus.P2P.Gossip.OperationsCollector
] ++ validator_children

Supervisor.init(children, strategy: :one_for_all)
Expand Down
9 changes: 7 additions & 2 deletions lib/lambda_ethereum_consensus/beacon/sync_blocks.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,19 @@ defmodule LambdaEthereumConsensus.Beacon.SyncBlocks do

if Enum.empty?(chunks) do
Logger.info("[Optimistic Sync] Sync completed")
Gossip.BeaconBlock.start()
Gossip.BlobSideCar.start()
start_subscriptions()
else
Process.sleep(1000)
perform_sync(remaining_chunks)
end
end

defp start_subscriptions() do
Gossip.BeaconBlock.start()
Gossip.BlobSideCar.start()
Gossip.OperationsCollector.start()
end

@spec fetch_blocks_by_slot(Types.slot(), non_neg_integer()) ::
{:ok, [SignedBeaconBlock.t()]} | {:error, String.t()}
def fetch_blocks_by_slot(from, count) do
Expand Down
57 changes: 0 additions & 57 deletions lib/lambda_ethereum_consensus/p2p/gossip/consumer.ex

This file was deleted.

42 changes: 0 additions & 42 deletions lib/lambda_ethereum_consensus/p2p/gossip/gossipsub.ex

This file was deleted.

79 changes: 0 additions & 79 deletions lib/lambda_ethereum_consensus/p2p/gossip/handler.ex

This file was deleted.

Loading
Loading