diff --git a/eth/node_config.go b/eth/node_config.go index 4f23900..1a8fcc9 100644 --- a/eth/node_config.go +++ b/eth/node_config.go @@ -381,7 +381,6 @@ func desiredPubSubBaseTopics() []string { // we unfortunatelly can't validate the messages (yet) // thus, better not to forward invalid messages // p2p.GossipExitMessage, - p2p.GossipExitMessage, p2p.GossipAttesterSlashingMessage, p2p.GossipProposerSlashingMessage, p2p.GossipContributionAndProofMessage, diff --git a/eth/pubsub.go b/eth/pubsub.go index 265c963..0760b7f 100644 --- a/eth/pubsub.go +++ b/eth/pubsub.go @@ -110,8 +110,6 @@ func (p *PubSub) Serve(ctx context.Context) error { func (p *PubSub) mapPubSubTopicWithHandlers(topic string) host.TopicHandler { switch { // Ensure hotter topics are at the top of the switch statement. - case strings.Contains(topic, p2p.GossipAttestationMessage): - return p.handleBeaconAttestation case strings.Contains(topic, p2p.GossipDataColumnSidecarMessage): return p.handleBeaconDataColumnSidecar case strings.Contains(topic, p2p.GossipBlockMessage): @@ -157,37 +155,6 @@ func (n *Node) FilterIncomingSubscriptions(id peer.ID, subs []*pubsubpb.RPC_SubO return pubsub.FilterSubscriptions(subs, n.CanSubscribe), nil } -func (p *PubSub) handleBeaconAttestation(ctx context.Context, msg *pubsub.Message) error { - now := time.Now() - - attestation := ðtypes.Attestation{} - if err := p.cfg.Encoder.DecodeGossip(msg.Data, attestation); err != nil { - return fmt.Errorf("error decoding phase0 attestation gossip message: %w", err) - } - - evt := &host.TraceEvent{ - Type: "HANDLE_MESSAGE", - PeerID: p.host.ID(), - Timestamp: now, - Payload: map[string]any{ - "PeerID": msg.ReceivedFrom.String(), - "MsgID": hex.EncodeToString([]byte(msg.ID)), - "MsgSize": len(msg.Data), - "Topic": msg.GetTopic(), - "Seq": msg.GetSeqno(), - "Attestation": attestation, - "Timestamp": now, - }, - } - - if err := p.cfg.DataStream.PutRecord(ctx, evt); err != nil { - slog.Warn("failed putting topic handler event", tele.LogAttrError(err)) - } - - return nil - -} - func (p *PubSub) handleBeaconDataColumnSidecar(ctx context.Context, msg *pubsub.Message) error { now := time.Now()