diff --git a/deploy/migrations/clickhouse/031_libp2p_trace.down.sql b/deploy/migrations/clickhouse/031_libp2p_trace.down.sql new file mode 100644 index 00000000..97fc99b8 --- /dev/null +++ b/deploy/migrations/clickhouse/031_libp2p_trace.down.sql @@ -0,0 +1,53 @@ +DROP TABLE IF EXISTS default.libp2p_recv_rpc; +DROP TABLE IF EXISTS default.libp2p_recv_rpc_local; + +DROP TABLE IF EXISTS default.libp2p_send_rpc; +DROP TABLE IF EXISTS default.libp2p_send_rpc_local; + +DROP TABLE IF EXISTS default.libp2p_drop_rpc; +DROP TABLE IF EXISTS default.libp2p_drop_rpc_local; + +DROP TABLE IF EXISTS default.libp2p_join; +DROP TABLE IF EXISTS default.libp2p_join_local; + +DROP TABLE IF EXISTS default.libp2p_deliver_message; +DROP TABLE IF EXISTS default.libp2p_deliver_message_local; + +DROP TABLE IF EXISTS default.libp2p_add_peer; +DROP TABLE IF EXISTS default.libp2p_add_peer_local; + +DROP TABLE IF EXISTS default.libp2p_remove_peer; +DROP TABLE IF EXISTS default.libp2p_remove_peer_local; + +DROP TABLE IF EXISTS default.libp2p_publish_message; +DROP TABLE IF EXISTS default.libp2p_publish_message_local; + +DROP TABLE IF EXISTS default.libp2p_reject_message; +DROP TABLE IF EXISTS default.libp2p_reject_message_local; + +DROP TABLE IF EXISTS default.libp2p_duplicate_message; +DROP TABLE IF EXISTS default.libp2p_duplicate_message_local; + +DROP TABLE IF EXISTS default.libp2p_leave; +DROP TABLE IF EXISTS default.libp2p_leave_local; + +DROP TABLE IF EXISTS default.libp2p_graft; +DROP TABLE IF EXISTS default.libp2p_graft_local; + +DROP TABLE IF EXISTS default.libp2p_prune; +DROP TABLE IF EXISTS default.libp2p_prune_local; + +DROP TABLE IF EXISTS default.libp2p_validate_message; +DROP TABLE IF EXISTS default.libp2p_validate_message_local; + +DROP TABLE IF EXISTS default.libp2p_throttle_peer; +DROP TABLE IF EXISTS default.libp2p_throttle_peer_local; + +DROP TABLE IF EXISTS default.libp2p_undeliverable_message; +DROP TABLE IF EXISTS default.libp2p_undeliverable_message_local; + +DROP TABLE IF EXISTS default.libp2p_connected; +DROP TABLE IF EXISTS default.libp2p_connected_local; + +DROP TABLE IF EXISTS default.libp2p_disconnected; +DROP TABLE IF EXISTS default.libp2p_disconnected_local; diff --git a/deploy/migrations/clickhouse/031_libp2p_trace.up.sql b/deploy/migrations/clickhouse/031_libp2p_trace.up.sql new file mode 100644 index 00000000..b1e40b70 --- /dev/null +++ b/deploy/migrations/clickhouse/031_libp2p_trace.up.sql @@ -0,0 +1,284 @@ +-- Creating local and distributed tables for libp2p_publish_message +CREATE TABLE default.libp2p_publish_message_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + message_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the message', + topic String CODEC(ZSTD(1)) COMMENT 'Topic associated with the message', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_publish_message AS default.libp2p_publish_message_local +ENGINE = Distributed('{cluster}', default, libp2p_publish_message_local, rand()); + +-- Creating local and distributed tables for libp2p_reject_message +CREATE TABLE default.libp2p_reject_message_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + message_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the message', + received_from String CODEC(ZSTD(1)) COMMENT 'Identifier of the sender', + reason String CODEC(ZSTD(1)) COMMENT 'Reason for message rejection', + topic String CODEC(ZSTD(1)) COMMENT 'Topic associated with the message', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_reject_message AS default.libp2p_reject_message_local +ENGINE = Distributed('{cluster}', default, libp2p_reject_message_local, rand()); + +-- Creating local and distributed tables for libp2p_duplicate_message +CREATE TABLE default.libp2p_duplicate_message_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + message_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the message', + received_from String CODEC(ZSTD(1)) COMMENT 'Identifier of the sender', + topic String CODEC(ZSTD(1)) COMMENT 'Topic associated with the message', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_duplicate_message AS default.libp2p_duplicate_message_local +ENGINE = Distributed('{cluster}', default, libp2p_duplicate_message_local, rand()); + +-- Creating local and distributed tables for libp2p_deliver_message +CREATE TABLE default.libp2p_deliver_message_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + message_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the message', + topic String CODEC(ZSTD(1)) COMMENT 'Topic associated with the message', + received_from String CODEC(ZSTD(1)) COMMENT 'Identifier of the sender', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_deliver_message AS default.libp2p_deliver_message_local +ENGINE = Distributed('{cluster}', default, libp2p_deliver_message_local, rand()); + +-- Creating local and distributed tables for libp2p_add_peer +CREATE TABLE default.libp2p_add_peer_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer', + proto String CODEC(ZSTD(1)) COMMENT 'Protocol used by the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_add_peer AS default.libp2p_add_peer_local +ENGINE = Distributed('{cluster}', default, libp2p_add_peer_local, rand()); + +-- Creating local and distributed tables for libp2p_remove_peer +CREATE TABLE default.libp2p_remove_peer_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_remove_peer AS default.libp2p_remove_peer_local +ENGINE = Distributed('{cluster}', default, libp2p_remove_peer_local, rand()); + +-- Creating local and distributed tables for libp2p_recv_rpc +CREATE TABLE default.libp2p_recv_rpc_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + received_from String CODEC(ZSTD(1)) COMMENT 'Identifier of the sender' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_recv_rpc AS default.libp2p_recv_rpc_local +ENGINE = Distributed('{cluster}', default, libp2p_recv_rpc_local, rand()); + +-- Creating local and distributed tables for libp2p_send_rpc +CREATE TABLE default.libp2p_send_rpc_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + send_to String CODEC(ZSTD(1)) COMMENT 'Identifier of the receiver' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_send_rpc AS default.libp2p_send_rpc_local +ENGINE = Distributed('{cluster}', default, libp2p_send_rpc_local, rand()); + +-- Creating local and distributed tables for libp2p_drop_rpc +CREATE TABLE default.libp2p_drop_rpc_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + send_to String CODEC(ZSTD(1)) COMMENT 'Identifier of the receiver' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_drop_rpc AS default.libp2p_drop_rpc_local +ENGINE = Distributed('{cluster}', default, libp2p_drop_rpc_local, rand()); + +-- Creating local and distributed tables for libp2p_join +CREATE TABLE default.libp2p_join_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + topic String CODEC(ZSTD(1)) COMMENT 'Topic involved in the join event' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_join AS default.libp2p_join_local +ENGINE = Distributed('{cluster}', default, libp2p_join_local, rand()); + +-- Creating local and distributed tables for libp2p_leave +CREATE TABLE default.libp2p_leave_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + topic String CODEC(ZSTD(1)) COMMENT 'Topic involved in the leave event' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_leave AS default.libp2p_leave_local +ENGINE = Distributed('{cluster}', default, libp2p_leave_local, rand()); + +-- Creating local and distributed tables for libp2p_graft +CREATE TABLE default.libp2p_graft_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer', + topic String CODEC(ZSTD(1)) COMMENT 'Topic involved in the graft event' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_graft AS default.libp2p_graft_local +ENGINE = Distributed('{cluster}', default, libp2p_graft_local, rand()); + +-- Creating local and distributed tables for libp2p_prune +CREATE TABLE default.libp2p_prune_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer', + topic String CODEC(ZSTD(1)) COMMENT 'Topic involved in the prune event' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_prune AS default.libp2p_prune_local +ENGINE = Distributed('{cluster}', default, libp2p_prune_local, rand()); + + +-- Creating local and distributed tables for libp2p_validate_message +CREATE TABLE default.libp2p_validate_message_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + message_id String CODEC(ZSTD(1)) COMMENT 'ID of the message', + topic String CODEC(ZSTD(1)) COMMENT 'Topic involved in the validate message event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer', + local Bool COMMENT 'Whether the message was local' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_validate_message AS default.libp2p_validate_message_local +ENGINE = Distributed('{cluster}', default, libp2p_validate_message_local, rand()); + +-- Creating local and distributed tables for libp2p_throttle_peer +CREATE TABLE default.libp2p_throttle_peer_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_throttle_peer AS default.libp2p_throttle_peer_local +ENGINE = Distributed('{cluster}', default, libp2p_throttle_peer_local, rand()); + +-- Creating local and distributed tables for libp2p_undeliverable_message +CREATE TABLE default.libp2p_undeliverable_message_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + message_id String CODEC(ZSTD(1)) COMMENT 'ID of the message', + topic String CODEC(ZSTD(1)) COMMENT 'Topic involved in the undeliverable message event', + peer_id String CODEC(ZSTD(1)) COMMENT 'Identifier of the peer', + local Bool COMMENT 'Whether the message was local' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_undeliverable_message AS default.libp2p_undeliverable_message_local +ENGINE = Distributed('{cluster}', default, libp2p_undeliverable_message_local, rand()); + +-- Creating local and distributed tables for libp2p_connected +CREATE TABLE default.libp2p_connected_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + remote_peer String CODEC(ZSTD(1)) COMMENT 'Remote peer identifier', + remote_maddrs String CODEC(ZSTD(1)) COMMENT 'Multiaddresses of the remote peer', + agent_version String CODEC(ZSTD(1)) COMMENT 'Agent version of the remote peer', + direction String CODEC(ZSTD(1)) COMMENT 'Connection direction', + opened DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the connection was opened', + transient Bool COMMENT 'Whether the connection is transient' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_connected AS default.libp2p_connected_local +ENGINE = Distributed('{cluster}', default, libp2p_connected_local, rand()); + +-- Creating local and distributed tables for libp2p_disconnected +CREATE TABLE default.libp2p_disconnected_local +( + unique_key Int64 COMMENT 'Unique identifier for each record', + updated_date_time DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the record was last updated', + event_date_time DateTime64(3) CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp of the event', + remote_peer String CODEC(ZSTD(1)) COMMENT 'Remote peer identifier', + remote_maddrs String CODEC(ZSTD(1)) COMMENT 'Multiaddresses of the remote peer', + agent_version String CODEC(ZSTD(1)) COMMENT 'Agent version of the remote peer', + direction String CODEC(ZSTD(1)) COMMENT 'Connection direction', + opened DateTime CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Timestamp when the connection was opened', + transient Bool COMMENT 'Whether the connection is transient' +) Engine = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time) +PARTITION BY toYYYYMM(event_date_time) +ORDER BY (event_date_time, unique_key); + +CREATE TABLE default.libp2p_disconnected AS default.libp2p_disconnected_local +ENGINE = Distributed('{cluster}', default, libp2p_disconnected_local, rand()); + diff --git a/pkg/clmimicry/event.go b/pkg/clmimicry/event.go new file mode 100644 index 00000000..69cb9841 --- /dev/null +++ b/pkg/clmimicry/event.go @@ -0,0 +1,762 @@ +package clmimicry + +import ( + "context" + "fmt" + + "github.com/ethpandaops/xatu/pkg/proto/libp2p" + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/google/uuid" + "github.com/pkg/errors" + "github.com/probe-lab/hermes/host" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +func (m *Mimicry) handleHermesEvent(ctx context.Context, event *host.TraceEvent) error { + if event == nil { + return errors.New("event is nil") + } + + // Cast the event type to our xatu Libp2p event types + typ := libp2p.EventTypeFromHermesEventType(event.Type) + if typ == libp2p.EventType_UNKNOWN { + return errors.Errorf("unknown event type: %v", event.Type) + } + + clientMeta, err := m.createNewClientMeta(ctx) + if err != nil { + return errors.Wrapf(err, "failed to create new client meta") + } + + traceMeta := &libp2p.TraceEventMetadata{ + PeerId: wrapperspb.String(event.PeerID.String()), + SessionStartDateTime: timestamppb.New(m.startupTime), + } + + switch typ { + case libp2p.EventType_ADD_PEER: + return m.handleAddPeerEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_PUBLISH_MESSAGE: + return m.handlePublishMessageEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_REJECT_MESSAGE: + return m.handleRejectMessageEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_DUPLICATE_MESSAGE: + return m.handleDuplicateMessageEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_DELIVER_MESSAGE: + return m.handleDeliverMessageEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_RECV_RPC: + return m.handleRecvRPCEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_SEND_RPC: + return m.handleSendRPCEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_CONNECTED: + return m.handleConnectedEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_DISCONNECTED: + return m.handleDisconnectedEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_REMOVE_PEER: + return m.handleRemovePeerEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_DROP_RPC: + return m.handleDropRPCEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_JOIN: + return m.handleJoinEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_LEAVE: + return m.handleLeaveEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_GRAFT: + return m.handleGraftEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_PRUNE: + return m.handlePruneEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_VALIDATE_MESSAGE: + return m.handleValidateMessageEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_THROTTLE_PEER: + return m.handleThrottlePeerEvent(ctx, clientMeta, traceMeta, event) + case libp2p.EventType_UNDELIVERABLE_MESSAGE: + return m.handleUndeliverableMessageEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_STREAM: + // return m.handleHandleStreamEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_STATUS: + // return m.handleHandleStatusEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_METADATA: + // return m.handleHandleMetadataEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_BLOB_SIDECARS_BY_RANGE: + // return m.handleHandleBlobSidecarsByRangeEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_BLOB_SIDECARS_BY_ROOT: + // return m.handleHandleBlobSidecarsByRootEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_PING: + // return m.handleHandlePingEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_GOODBYE: + // return m.handleHandleGoodbyeEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_BEACON_BLOCKS_BY_RANGE: + // return m.handleHandleBeaconBlocksByRangeEvent(ctx, clientMeta, traceMeta, event) + // case libp2p.EventType_HANDLE_BEACON_BLOCKS_BY_ROOT: + // return m.handleHandleBeaconBlocksByRootEvent(ctx, clientMeta, traceMeta, event) + default: + return errors.Errorf("unsupported event type: %v", typ) + } +} + +func (m *Mimicry) handleAddPeerEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToAddPeer(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to add_peer event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceAddPeer{ + Libp2PTraceAddPeer: &xatu.ClientMeta_AdditionalLibP2PTraceAddPeerData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_ADD_PEER, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceAddPeer{ + Libp2PTraceAddPeer: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handlePublishMessageEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToPublishMessage(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to publish message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTracePublishMessage{ + Libp2PTracePublishMessage: &xatu.ClientMeta_AdditionalLibP2PTracePublishMessageData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_PUBLISH_MESSAGE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTracePublishMessage{ + Libp2PTracePublishMessage: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleRejectMessageEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToRejectMessage(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to reject message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceRejectMessage{ + Libp2PTraceRejectMessage: &xatu.ClientMeta_AdditionalLibP2PTraceRejectMessageData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_REJECT_MESSAGE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceRejectMessage{ + Libp2PTraceRejectMessage: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleDuplicateMessageEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToDuplicateMessage(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to duplicate message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceDuplicateMessage{ + Libp2PTraceDuplicateMessage: &xatu.ClientMeta_AdditionalLibP2PTraceDuplicateMessageData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_DUPLICATE_MESSAGE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceDuplicateMessage{ + Libp2PTraceDuplicateMessage: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleDeliverMessageEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToDeliverMessage(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to deliver message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceDeliverMessage{ + Libp2PTraceDeliverMessage: &xatu.ClientMeta_AdditionalLibP2PTraceDeliverMessageData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_DELIVER_MESSAGE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceDeliverMessage{ + Libp2PTraceDeliverMessage: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleSendRPCEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToSendRPC(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to deliver message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceSendRpc{ + Libp2PTraceSendRpc: &xatu.ClientMeta_AdditionalLibP2PTraceSendRPCData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_SEND_RPC, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceSendRpc{ + Libp2PTraceSendRpc: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleRecvRPCEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToSendRPC(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to deliver message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceRecvRpc{ + Libp2PTraceRecvRpc: &xatu.ClientMeta_AdditionalLibP2PTraceRecvRPCData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_RECV_RPC, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceSendRpc{ + Libp2PTraceSendRpc: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleConnectedEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToConnected(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to connected event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceConnected{ + Libp2PTraceConnected: &xatu.ClientMeta_AdditionalLibP2PTraceConnectedData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_CONNECTED, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceConnected{ + Libp2PTraceConnected: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleDisconnectedEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToDisconnected(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to disconnected event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceDisconnected{ + Libp2PTraceDisconnected: &xatu.ClientMeta_AdditionalLibP2PTraceDisconnectedData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_DISCONNECTED, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceDisconnected{ + Libp2PTraceDisconnected: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleRemovePeerEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToRemovePeer(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to remove peer event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceRemovePeer{ + Libp2PTraceRemovePeer: &xatu.ClientMeta_AdditionalLibP2PTraceRemovePeerData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_REMOVE_PEER, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceRemovePeer{ + Libp2PTraceRemovePeer: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleDropRPCEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToDropRPC(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to drop rpc event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceDropRpc{ + Libp2PTraceDropRpc: &xatu.ClientMeta_AdditionalLibP2PTraceDropRPCData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_DROP_RPC, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceDropRpc{ + Libp2PTraceDropRpc: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleJoinEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToJoin(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to join event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceJoin{ + Libp2PTraceJoin: &xatu.ClientMeta_AdditionalLibP2PTraceJoinData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_JOIN, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceJoin{ + Libp2PTraceJoin: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleLeaveEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToLeave(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to leave event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceLeave{ + Libp2PTraceLeave: &xatu.ClientMeta_AdditionalLibP2PTraceLeaveData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_LEAVE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceLeave{ + Libp2PTraceLeave: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleGraftEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToGraft(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to graft event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceGraft{ + Libp2PTraceGraft: &xatu.ClientMeta_AdditionalLibP2PTraceGraftData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_GRAFT, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceGraft{ + Libp2PTraceGraft: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handlePruneEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToPrune(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to prune event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTracePrune{ + Libp2PTracePrune: &xatu.ClientMeta_AdditionalLibP2PTracePruneData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_PRUNE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTracePrune{ + Libp2PTracePrune: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleValidateMessageEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToValidateMessage(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to validate message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceValidateMessage{ + Libp2PTraceValidateMessage: &xatu.ClientMeta_AdditionalLibP2PTraceValidateMessageData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_VALIDATE_MESSAGE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceValidateMessage{ + Libp2PTraceValidateMessage: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleThrottlePeerEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToThrottlePeer(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to throttle peer event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceThrottlePeer{ + Libp2PTraceThrottlePeer: &xatu.ClientMeta_AdditionalLibP2PTraceThrottlePeerData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_THROTTLE_PEER, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceThrottlePeer{ + Libp2PTraceThrottlePeer: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} + +func (m *Mimicry) handleUndeliverableMessageEvent(ctx context.Context, + clientMeta *xatu.ClientMeta, + traceMeta *libp2p.TraceEventMetadata, + event *host.TraceEvent) error { + data, err := libp2p.TraceEventToUndeliverableMessage(event) + if err != nil { + return errors.Wrapf(err, "failed to convert event to undeliverable message event") + } + + metadata, ok := proto.Clone(clientMeta).(*xatu.ClientMeta) + if !ok { + return fmt.Errorf("failed to clone client metadata") + } + + metadata.AdditionalData = &xatu.ClientMeta_Libp2PTraceUndeliverableMessage{ + Libp2PTraceUndeliverableMessage: &xatu.ClientMeta_AdditionalLibP2PTraceUndeliverableMessageData{ + Metadata: traceMeta, + }, + } + + decoratedEvent := &xatu.DecoratedEvent{ + Event: &xatu.Event{ + Name: xatu.Event_LIBP2P_TRACE_UNDELIVERABLE_MESSAGE, + DateTime: timestamppb.New(event.Timestamp.Add(m.clockDrift)), + Id: uuid.New().String(), + }, + Meta: &xatu.Meta{ + Client: metadata, + }, + Data: &xatu.DecoratedEvent_Libp2PTraceUndeliverableMessage{ + Libp2PTraceUndeliverableMessage: data, + }, + } + + return m.handleNewDecoratedEvent(ctx, decoratedEvent) +} diff --git a/pkg/proto/libp2p/trace.go b/pkg/proto/libp2p/trace.go new file mode 100644 index 00000000..655bcb7c --- /dev/null +++ b/pkg/proto/libp2p/trace.go @@ -0,0 +1,600 @@ +package libp2p + +import ( + "encoding/hex" + "fmt" + "time" + + "github.com/libp2p/go-libp2p/core/peer" + "github.com/libp2p/go-libp2p/core/protocol" + ma "github.com/multiformats/go-multiaddr" + "github.com/probe-lab/hermes/host" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" +) + +func EventTypeFromHermesEventType(e host.EventType) EventType { + if val, ok := EventType_value[string(e)]; ok { + return EventType(val) + } + + return EventType(0) // Return an Unknown EventType if not found +} + +// Helper function to convert a Hermes TraceEvent to a libp2p PublishMessage +func TraceEventToPublishMessage(event *host.TraceEvent) (*PublishMessage, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for PublishMessage") + } + + messageID, ok := payload["MsgID"].(string) + if !ok { + return nil, fmt.Errorf("msgID is required for PublishMessage") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for PublishMessage") + } + + return &PublishMessage{ + MessageId: wrapperspb.String(messageID), + Topic: wrapperspb.String(topic), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p AddPeer +func TraceEventToAddPeer(event *host.TraceEvent) (*AddPeer, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for AddPeer") + } + + peerID, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for AddPeer") + } + + protoc, ok := payload["Protocol"].(protocol.ID) + if !ok { + return nil, fmt.Errorf("protocol is required for AddPeer") + } + + return &AddPeer{ + PeerId: wrapperspb.String(peerID.String()), + Protocol: wrapperspb.String(string(protoc)), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p RemovePeer +func TraceEventToRemovePeer(event *host.TraceEvent) (*RemovePeer, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for RemovePeer") + } + + peerID, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for RemovePeer") + } + + return &RemovePeer{ + PeerId: wrapperspb.String(peerID.String()), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p Join +func TraceEventToJoin(event *host.TraceEvent) (*Join, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for Join") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for Join") + } + + return &Join{ + Topic: wrapperspb.String(topic), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p Leave +func TraceEventToLeave(event *host.TraceEvent) (*Leave, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for Leave") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for Leave") + } + + return &Leave{ + Topic: wrapperspb.String(topic), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p Graft +func TraceEventToGraft(event *host.TraceEvent) (*Graft, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for Graft") + } + + peerID, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for Graft") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for Graft") + } + + return &Graft{ + PeerId: wrapperspb.String(peerID.String()), + Topic: wrapperspb.String(topic), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p Prune +func TraceEventToPrune(event *host.TraceEvent) (*Prune, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for Prune") + } + + peerID, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for Prune") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for Prune") + } + + return &Prune{ + PeerId: wrapperspb.String(peerID.String()), + Topic: wrapperspb.String(topic), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p DeliverMessage +func TraceEventToDeliverMessage(event *host.TraceEvent) (*DeliverMessage, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for DeliverMessage") + } + + messageID, ok := payload["MsgID"].(string) + if !ok { + return nil, fmt.Errorf("msgID is required for DeliverMessage") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for DeliverMessage") + } + + receivedFrom, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for DeliverMessage") + } + + return &DeliverMessage{ + MessageId: wrapperspb.String(messageID), + Topic: wrapperspb.String(topic), + PeerId: wrapperspb.String(receivedFrom.String()), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p RejectMessage +func TraceEventToRejectMessage(event *host.TraceEvent) (*RejectMessage, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for RejectMessage") + } + + messageID, ok := payload["MsgID"].(string) + if !ok { + return nil, fmt.Errorf("msgID is required for RejectMessage") + } + + receivedFrom, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for RejectMessage") + } + + reason, ok := payload["Reason"].(string) + if !ok { + return nil, fmt.Errorf("reason is required for RejectMessage") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for RejectMessage") + } + + msgSize, ok := payload["MsgSize"].(int) + if !ok { + return nil, fmt.Errorf("msgSize is required for RejectMessage") + } + + seqNo, ok := payload["SeqNo"].([]byte) + if !ok { + return nil, fmt.Errorf("seqNo is required for RejectMessage") + } + + return &RejectMessage{ + MessageId: wrapperspb.String(messageID), + ReceivedFrom: wrapperspb.String(receivedFrom.String()), + Reason: wrapperspb.String(reason), + Topic: wrapperspb.String(topic), + MsgSize: wrapperspb.UInt32(uint32(msgSize)), + SeqNo: wrapperspb.String(hex.EncodeToString(seqNo)), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p DuplicateMessage +func TraceEventToDuplicateMessage(event *host.TraceEvent) (*DuplicateMessage, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for DuplicateMessage") + } + + messageID, ok := payload["MsgID"].(string) + if !ok { + return nil, fmt.Errorf("msgID is required for DuplicateMessage") + } + + receivedFrom, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for DuplicateMessage") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for DuplicateMessage") + } + + local, ok := payload["Local"].(bool) + if !ok { + return nil, fmt.Errorf("local flag is required for DuplicateMessage") + } + + msgSize, ok := payload["MsgSize"].(int) + if !ok { + return nil, fmt.Errorf("msgSize is required for DuplicateMessage") + } + + seqNo, ok := payload["SeqNo"].([]byte) + if !ok { + return nil, fmt.Errorf("seqNo is required for DuplicateMessage") + } + + return &DuplicateMessage{ + MessageId: wrapperspb.String(messageID), + ReceivedFrom: wrapperspb.String(receivedFrom.String()), + Topic: wrapperspb.String(topic), + MsgSize: wrapperspb.UInt32(uint32(msgSize)), + SeqNo: wrapperspb.String(hex.EncodeToString(seqNo)), + Local: wrapperspb.Bool(local), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p ThrottlePeer +func TraceEventToThrottlePeer(event *host.TraceEvent) (*ThrottlePeer, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for ThrottlePeer") + } + + peerID, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("peerID is required for ThrottlePeer") + } + + return &ThrottlePeer{ + PeerId: wrapperspb.String(peerID.String()), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p UndeliverableMessage +func TraceEventToUndeliverableMessage(event *host.TraceEvent) (*UndeliverableMessage, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for UndeliverableMessage") + } + + messageID, ok := payload["MsgID"].(string) + if !ok { + return nil, fmt.Errorf("msgID is required for UndeliverableMessage") + } + + receivedFrom, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("PeerID is required for UndeliverableMessage") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for UndeliverableMessage") + } + + local, ok := payload["Local"].(bool) + if !ok { + return nil, fmt.Errorf("local flag is required for UndeliverableMessage") + } + + return &UndeliverableMessage{ + MessageId: wrapperspb.String(messageID), + PeerId: wrapperspb.String(receivedFrom.String()), + Topic: wrapperspb.String(topic), + Local: wrapperspb.Bool(local), + }, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p RecvRPC +func TraceEventToRecvRPC(event *host.TraceEvent) (*RecvRPC, error) { + payload, ok := event.Payload.(*host.RpcMeta) + if !ok { + return nil, fmt.Errorf("invalid payload type for rpc") + } + + r := &RecvRPC{ + ReceivedFrom: wrapperspb.String(payload.PeerID.String()), + Meta: &RPCMeta{ + PeerId: wrapperspb.String(payload.PeerID.String()), + Messages: convertRPCMessages(payload.Messages), + Subscriptions: convertRPCSubscriptions(payload.Subscriptions), + Control: convertRPCControl(payload.Control), + }, + } + + return r, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p SendRPC +func TraceEventToSendRPC(event *host.TraceEvent) (*SendRPC, error) { + payload, ok := event.Payload.(*host.RpcMeta) + if !ok { + return nil, fmt.Errorf("invalid payload type for rpc") + } + + r := &SendRPC{ + SendTo: wrapperspb.String(payload.PeerID.String()), + Meta: &RPCMeta{ + PeerId: wrapperspb.String(payload.PeerID.String()), + Messages: convertRPCMessages(payload.Messages), + Subscriptions: convertRPCSubscriptions(payload.Subscriptions), + Control: convertRPCControl(payload.Control), + }, + } + + return r, nil +} + +// Helper function to convert a Hermes TraceEvent to a libp2p RecvRPC +func TraceEventToDropRPC(event *host.TraceEvent) (*DropRPC, error) { + payload, ok := event.Payload.(*host.RpcMeta) + if !ok { + return nil, fmt.Errorf("invalid payload type for rpc") + } + + r := &DropRPC{ + SendTo: wrapperspb.String(payload.PeerID.String()), + Meta: &RPCMeta{ + PeerId: wrapperspb.String(payload.PeerID.String()), + Messages: convertRPCMessages(payload.Messages), + Subscriptions: convertRPCSubscriptions(payload.Subscriptions), + Control: convertRPCControl(payload.Control), + }, + } + + return r, nil +} + +func convertRPCMessages(messages []host.RpcMetaMsg) []*MessageMeta { + ourMessages := make([]*MessageMeta, len(messages)) + + for i, msg := range messages { + ourMessages[i] = convertRPCMetaMessage(msg) + } + + return ourMessages +} + +func convertRPCMetaMessage(msg host.RpcMetaMsg) *MessageMeta { + return &MessageMeta{ + MessageId: wrapperspb.String(msg.MsgID), + Topic: wrapperspb.String(msg.Topic), + } +} + +func convertRPCSubscriptions(subs []host.RpcMetaSub) []*SubMeta { + ourSubs := make([]*SubMeta, len(subs)) + + for i, sub := range subs { + ourSubs[i] = &SubMeta{ + Subscribe: wrapperspb.Bool(sub.Subscribe), + TopicId: wrapperspb.String(sub.TopicID), + } + } + + return ourSubs +} + +func convertRPCControl(ctrl *host.RpcMetaControl) *ControlMeta { + if ctrl == nil { + return nil + } + + return &ControlMeta{ + Ihave: convertControlIHaveMeta(ctrl.IHave), + Iwant: convertControlIWantMeta(ctrl.IWant), + Graft: convertControlGraftMeta(ctrl.Graft), + Prune: convertControlPruneMeta(ctrl.Prune), + } +} + +func convertControlIHaveMeta(ihave []host.RpcControlIHave) []*ControlIHaveMeta { + converted := make([]*ControlIHaveMeta, len(ihave)) + + for i, item := range ihave { + converted[i] = &ControlIHaveMeta{ + TopicId: wrapperspb.String(item.TopicID), + MessageIds: convertStringValues(item.MsgIDs), + } + } + + return converted +} + +func convertControlIWantMeta(iwant []host.RpcControlIWant) []*ControlIWantMeta { + converted := make([]*ControlIWantMeta, len(iwant)) + + for i, item := range iwant { + converted[i] = &ControlIWantMeta{ + MessageIds: convertStringValues(item.MsgIDs), + } + } + + return converted +} + +func convertControlGraftMeta(graft []host.RpcControlGraft) []*ControlGraftMeta { + converted := make([]*ControlGraftMeta, len(graft)) + + for i, item := range graft { + converted[i] = &ControlGraftMeta{ + TopicId: wrapperspb.String(item.TopicID), + } + } + + return converted +} + +func convertControlPruneMeta(prune []host.RpcControlPrune) []*ControlPruneMeta { + converted := make([]*ControlPruneMeta, len(prune)) + + for i, item := range prune { + peerIds := make([]string, len(prune)) + for _, peer := range item.PeerIDs { + peerIds = append(peerIds, peer.String()) + } + + converted[i] = &ControlPruneMeta{ + TopicId: wrapperspb.String(item.TopicID), + PeerIds: convertStringValues(peerIds), + } + } + + return converted +} + +func convertStringValues(strings []string) []*wrapperspb.StringValue { + converted := make([]*wrapperspb.StringValue, len(strings)) + + for i, s := range strings { + converted[i] = wrapperspb.String(s) + } + + return converted +} + +func TraceEventToConnected(event *host.TraceEvent) (*Connected, error) { + payload, ok := event.Payload.(struct { + RemotePeer string + RemoteMaddrs ma.Multiaddr + AgentVersion string + Direction string + Opened time.Time + Transient bool + }) + if !ok { + return nil, fmt.Errorf("invalid payload type for Connected") + } + + return &Connected{ + RemotePeer: wrapperspb.String(payload.RemotePeer), + RemoteMaddrs: wrapperspb.String(payload.RemoteMaddrs.String()), + AgentVersion: wrapperspb.String(payload.AgentVersion), + Direction: wrapperspb.String(payload.Direction), + Opened: timestamppb.New(payload.Opened), + Transient: wrapperspb.Bool(payload.Transient), + }, nil +} + +func TraceEventToDisconnected(event *host.TraceEvent) (*Disconnected, error) { + payload, ok := event.Payload.(struct { + RemotePeer string + RemoteMaddrs ma.Multiaddr + AgentVersion string + Direction string + Opened time.Time + Transient bool + }) + if !ok { + return nil, fmt.Errorf("invalid payload type for Disconnected") + } + + return &Disconnected{ + RemotePeer: wrapperspb.String(payload.RemotePeer), + RemoteMaddrs: wrapperspb.String(payload.RemoteMaddrs.String()), + AgentVersion: wrapperspb.String(payload.AgentVersion), + Direction: wrapperspb.String(payload.Direction), + Opened: timestamppb.New(payload.Opened), + Transient: wrapperspb.Bool(payload.Transient), + }, nil +} + +func TraceEventToValidateMessage(event *host.TraceEvent) (*ValidateMessage, error) { + payload, ok := event.Payload.(map[string]any) + if !ok { + return nil, fmt.Errorf("invalid payload type for ValidateMessage") + } + + messageID, ok := payload["MsgID"].(string) + if !ok { + return nil, fmt.Errorf("messageID is required for ValidateMessage") + } + + receivedFrom, ok := payload["PeerID"].(peer.ID) + if !ok { + return nil, fmt.Errorf("PeerID is required for ValidateMessage") + } + + topic, ok := payload["Topic"].(string) + if !ok { + return nil, fmt.Errorf("topic is required for ValidateMessage") + } + + local, ok := payload["Local"].(bool) + if !ok { + return nil, fmt.Errorf("local flag is required for ValidateMessage") + } + + msgSize, ok := payload["MsgSize"].(int) + if !ok { + return nil, fmt.Errorf("msgSize is required for ValidateMessage") + } + + seqNo, ok := payload["SeqNo"].([]byte) + if !ok { + return nil, fmt.Errorf("seqNo is required for ValidateMessage") + } + + return &ValidateMessage{ + MessageId: wrapperspb.String(messageID), + PeerId: wrapperspb.String(receivedFrom.String()), + Topic: wrapperspb.String(topic), + Local: wrapperspb.Bool(local), + MsgSize: wrapperspb.UInt32(uint32(msgSize)), + SeqNo: wrapperspb.String(hex.EncodeToString(seqNo)), + }, nil +} diff --git a/pkg/proto/libp2p/trace.pb.go b/pkg/proto/libp2p/trace.pb.go new file mode 100644 index 00000000..a4fb34ee --- /dev/null +++ b/pkg/proto/libp2p/trace.pb.go @@ -0,0 +1,2665 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.24.2 +// source: pkg/proto/libp2p/trace.proto + +package libp2p + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EventType int32 + +const ( + EventType_UNKNOWN EventType = 0 + EventType_CONNECTED EventType = 1 + EventType_DISCONNECTED EventType = 2 + EventType_ADD_PEER EventType = 3 + EventType_REMOVE_PEER EventType = 4 + EventType_PUBLISH_MESSAGE EventType = 5 + EventType_REJECT_MESSAGE EventType = 6 + EventType_DUPLICATE_MESSAGE EventType = 7 + EventType_DELIVER_MESSAGE EventType = 8 + EventType_RECV_RPC EventType = 9 + EventType_SEND_RPC EventType = 10 + EventType_DROP_RPC EventType = 11 + EventType_JOIN EventType = 12 + EventType_LEAVE EventType = 13 + EventType_GRAFT EventType = 14 + EventType_PRUNE EventType = 15 + EventType_VALIDATE_MESSAGE EventType = 16 + EventType_THROTTLE_PEER EventType = 17 + EventType_UNDELIVERABLE_MESSAGE EventType = 18 + EventType_HANDLE_STREAM EventType = 19 + EventType_HANDLE_STATUS EventType = 20 + EventType_HANDLE_METADATA EventType = 21 + EventType_HANDLE_BLOB_SIDECARS_BY_RANGE EventType = 22 + EventType_HANDLE_BLOB_SIDECARS_BY_ROOT EventType = 23 + EventType_HANDLE_PING EventType = 24 + EventType_HANDLE_GOODBYE EventType = 25 + EventType_HANDLE_BEACON_BLOCKS_BY_RANGE EventType = 26 + EventType_HANDLE_BEACON_BLOCKS_BY_ROOT EventType = 27 +) + +// Enum value maps for EventType. +var ( + EventType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CONNECTED", + 2: "DISCONNECTED", + 3: "ADD_PEER", + 4: "REMOVE_PEER", + 5: "PUBLISH_MESSAGE", + 6: "REJECT_MESSAGE", + 7: "DUPLICATE_MESSAGE", + 8: "DELIVER_MESSAGE", + 9: "RECV_RPC", + 10: "SEND_RPC", + 11: "DROP_RPC", + 12: "JOIN", + 13: "LEAVE", + 14: "GRAFT", + 15: "PRUNE", + 16: "VALIDATE_MESSAGE", + 17: "THROTTLE_PEER", + 18: "UNDELIVERABLE_MESSAGE", + 19: "HANDLE_STREAM", + 20: "HANDLE_STATUS", + 21: "HANDLE_METADATA", + 22: "HANDLE_BLOB_SIDECARS_BY_RANGE", + 23: "HANDLE_BLOB_SIDECARS_BY_ROOT", + 24: "HANDLE_PING", + 25: "HANDLE_GOODBYE", + 26: "HANDLE_BEACON_BLOCKS_BY_RANGE", + 27: "HANDLE_BEACON_BLOCKS_BY_ROOT", + } + EventType_value = map[string]int32{ + "UNKNOWN": 0, + "CONNECTED": 1, + "DISCONNECTED": 2, + "ADD_PEER": 3, + "REMOVE_PEER": 4, + "PUBLISH_MESSAGE": 5, + "REJECT_MESSAGE": 6, + "DUPLICATE_MESSAGE": 7, + "DELIVER_MESSAGE": 8, + "RECV_RPC": 9, + "SEND_RPC": 10, + "DROP_RPC": 11, + "JOIN": 12, + "LEAVE": 13, + "GRAFT": 14, + "PRUNE": 15, + "VALIDATE_MESSAGE": 16, + "THROTTLE_PEER": 17, + "UNDELIVERABLE_MESSAGE": 18, + "HANDLE_STREAM": 19, + "HANDLE_STATUS": 20, + "HANDLE_METADATA": 21, + "HANDLE_BLOB_SIDECARS_BY_RANGE": 22, + "HANDLE_BLOB_SIDECARS_BY_ROOT": 23, + "HANDLE_PING": 24, + "HANDLE_GOODBYE": 25, + "HANDLE_BEACON_BLOCKS_BY_RANGE": 26, + "HANDLE_BEACON_BLOCKS_BY_ROOT": 27, + } +) + +func (x EventType) Enum() *EventType { + p := new(EventType) + *p = x + return p +} + +func (x EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventType) Descriptor() protoreflect.EnumDescriptor { + return file_pkg_proto_libp2p_trace_proto_enumTypes[0].Descriptor() +} + +func (EventType) Type() protoreflect.EnumType { + return &file_pkg_proto_libp2p_trace_proto_enumTypes[0] +} + +func (x EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EventType.Descriptor instead. +func (EventType) EnumDescriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{0} +} + +type PublishMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *PublishMessage) Reset() { + *x = PublishMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishMessage) ProtoMessage() {} + +func (x *PublishMessage) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishMessage.ProtoReflect.Descriptor instead. +func (*PublishMessage) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{0} +} + +func (x *PublishMessage) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *PublishMessage) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +type RejectMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + ReceivedFrom *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=received_from,proto3" json:"received_from,omitempty"` + Reason *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=topic,proto3" json:"topic,omitempty"` + SeqNo *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=seq_no,proto3" json:"seq_no,omitempty"` + MsgSize *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=msg_size,proto3" json:"msg_size,omitempty"` +} + +func (x *RejectMessage) Reset() { + *x = RejectMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RejectMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RejectMessage) ProtoMessage() {} + +func (x *RejectMessage) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RejectMessage.ProtoReflect.Descriptor instead. +func (*RejectMessage) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{1} +} + +func (x *RejectMessage) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *RejectMessage) GetReceivedFrom() *wrapperspb.StringValue { + if x != nil { + return x.ReceivedFrom + } + return nil +} + +func (x *RejectMessage) GetReason() *wrapperspb.StringValue { + if x != nil { + return x.Reason + } + return nil +} + +func (x *RejectMessage) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +func (x *RejectMessage) GetSeqNo() *wrapperspb.StringValue { + if x != nil { + return x.SeqNo + } + return nil +} + +func (x *RejectMessage) GetMsgSize() *wrapperspb.UInt32Value { + if x != nil { + return x.MsgSize + } + return nil +} + +type DuplicateMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + ReceivedFrom *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=received_from,proto3" json:"received_from,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` + SeqNo *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=seq_no,proto3" json:"seq_no,omitempty"` + MsgSize *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=msg_size,proto3" json:"msg_size,omitempty"` + Local *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=local,proto3" json:"local,omitempty"` +} + +func (x *DuplicateMessage) Reset() { + *x = DuplicateMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DuplicateMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DuplicateMessage) ProtoMessage() {} + +func (x *DuplicateMessage) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DuplicateMessage.ProtoReflect.Descriptor instead. +func (*DuplicateMessage) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{2} +} + +func (x *DuplicateMessage) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *DuplicateMessage) GetReceivedFrom() *wrapperspb.StringValue { + if x != nil { + return x.ReceivedFrom + } + return nil +} + +func (x *DuplicateMessage) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +func (x *DuplicateMessage) GetSeqNo() *wrapperspb.StringValue { + if x != nil { + return x.SeqNo + } + return nil +} + +func (x *DuplicateMessage) GetMsgSize() *wrapperspb.UInt32Value { + if x != nil { + return x.MsgSize + } + return nil +} + +func (x *DuplicateMessage) GetLocal() *wrapperspb.BoolValue { + if x != nil { + return x.Local + } + return nil +} + +type DeliverMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` + PeerId *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + Local *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=local,proto3" json:"local,omitempty"` + SeqNo *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=seq_no,proto3" json:"seq_no,omitempty"` + MsgSize *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=msg_size,proto3" json:"msg_size,omitempty"` +} + +func (x *DeliverMessage) Reset() { + *x = DeliverMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeliverMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeliverMessage) ProtoMessage() {} + +func (x *DeliverMessage) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeliverMessage.ProtoReflect.Descriptor instead. +func (*DeliverMessage) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{3} +} + +func (x *DeliverMessage) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *DeliverMessage) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +func (x *DeliverMessage) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *DeliverMessage) GetLocal() *wrapperspb.BoolValue { + if x != nil { + return x.Local + } + return nil +} + +func (x *DeliverMessage) GetSeqNo() *wrapperspb.StringValue { + if x != nil { + return x.SeqNo + } + return nil +} + +func (x *DeliverMessage) GetMsgSize() *wrapperspb.UInt32Value { + if x != nil { + return x.MsgSize + } + return nil +} + +type ValidateMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` + PeerId *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + Local *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=local,proto3" json:"local,omitempty"` + SeqNo *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=seq_no,proto3" json:"seq_no,omitempty"` + MsgSize *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=msg_size,proto3" json:"msg_size,omitempty"` +} + +func (x *ValidateMessage) Reset() { + *x = ValidateMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateMessage) ProtoMessage() {} + +func (x *ValidateMessage) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateMessage.ProtoReflect.Descriptor instead. +func (*ValidateMessage) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{4} +} + +func (x *ValidateMessage) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *ValidateMessage) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +func (x *ValidateMessage) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *ValidateMessage) GetLocal() *wrapperspb.BoolValue { + if x != nil { + return x.Local + } + return nil +} + +func (x *ValidateMessage) GetSeqNo() *wrapperspb.StringValue { + if x != nil { + return x.SeqNo + } + return nil +} + +func (x *ValidateMessage) GetMsgSize() *wrapperspb.UInt32Value { + if x != nil { + return x.MsgSize + } + return nil +} + +type AddPeer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + Protocol *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` +} + +func (x *AddPeer) Reset() { + *x = AddPeer{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddPeer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPeer) ProtoMessage() {} + +func (x *AddPeer) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPeer.ProtoReflect.Descriptor instead. +func (*AddPeer) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{5} +} + +func (x *AddPeer) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *AddPeer) GetProtocol() *wrapperspb.StringValue { + if x != nil { + return x.Protocol + } + return nil +} + +type RemovePeer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=peer_id,proto3" json:"peer_id,omitempty"` +} + +func (x *RemovePeer) Reset() { + *x = RemovePeer{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemovePeer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePeer) ProtoMessage() {} + +func (x *RemovePeer) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePeer.ProtoReflect.Descriptor instead. +func (*RemovePeer) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{6} +} + +func (x *RemovePeer) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +type RecvRPC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReceivedFrom *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=received_from,proto3" json:"received_from,omitempty"` + Meta *RPCMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *RecvRPC) Reset() { + *x = RecvRPC{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecvRPC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecvRPC) ProtoMessage() {} + +func (x *RecvRPC) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecvRPC.ProtoReflect.Descriptor instead. +func (*RecvRPC) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{7} +} + +func (x *RecvRPC) GetReceivedFrom() *wrapperspb.StringValue { + if x != nil { + return x.ReceivedFrom + } + return nil +} + +func (x *RecvRPC) GetMeta() *RPCMeta { + if x != nil { + return x.Meta + } + return nil +} + +type SendRPC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SendTo *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=send_to,proto3" json:"send_to,omitempty"` + Meta *RPCMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *SendRPC) Reset() { + *x = SendRPC{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendRPC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendRPC) ProtoMessage() {} + +func (x *SendRPC) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendRPC.ProtoReflect.Descriptor instead. +func (*SendRPC) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{8} +} + +func (x *SendRPC) GetSendTo() *wrapperspb.StringValue { + if x != nil { + return x.SendTo + } + return nil +} + +func (x *SendRPC) GetMeta() *RPCMeta { + if x != nil { + return x.Meta + } + return nil +} + +type DropRPC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SendTo *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=send_to,proto3" json:"send_to,omitempty"` + Meta *RPCMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *DropRPC) Reset() { + *x = DropRPC{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DropRPC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DropRPC) ProtoMessage() {} + +func (x *DropRPC) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DropRPC.ProtoReflect.Descriptor instead. +func (*DropRPC) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{9} +} + +func (x *DropRPC) GetSendTo() *wrapperspb.StringValue { + if x != nil { + return x.SendTo + } + return nil +} + +func (x *DropRPC) GetMeta() *RPCMeta { + if x != nil { + return x.Meta + } + return nil +} + +type Join struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topic *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *Join) Reset() { + *x = Join{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Join) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Join) ProtoMessage() {} + +func (x *Join) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Join.ProtoReflect.Descriptor instead. +func (*Join) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{10} +} + +func (x *Join) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +type Leave struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *Leave) Reset() { + *x = Leave{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Leave) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Leave) ProtoMessage() {} + +func (x *Leave) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Leave.ProtoReflect.Descriptor instead. +func (*Leave) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{11} +} + +func (x *Leave) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +type Graft struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *Graft) Reset() { + *x = Graft{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Graft) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Graft) ProtoMessage() {} + +func (x *Graft) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Graft.ProtoReflect.Descriptor instead. +func (*Graft) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{12} +} + +func (x *Graft) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *Graft) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +type Prune struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *Prune) Reset() { + *x = Prune{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Prune) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Prune) ProtoMessage() {} + +func (x *Prune) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Prune.ProtoReflect.Descriptor instead. +func (*Prune) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{13} +} + +func (x *Prune) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *Prune) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +type ThrottlePeer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=peer_id,proto3" json:"peer_id,omitempty"` +} + +func (x *ThrottlePeer) Reset() { + *x = ThrottlePeer{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThrottlePeer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThrottlePeer) ProtoMessage() {} + +func (x *ThrottlePeer) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThrottlePeer.ProtoReflect.Descriptor instead. +func (*ThrottlePeer) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{14} +} + +func (x *ThrottlePeer) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +type UndeliverableMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` + PeerId *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + Local *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=local,proto3" json:"local,omitempty"` +} + +func (x *UndeliverableMessage) Reset() { + *x = UndeliverableMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UndeliverableMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UndeliverableMessage) ProtoMessage() {} + +func (x *UndeliverableMessage) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UndeliverableMessage.ProtoReflect.Descriptor instead. +func (*UndeliverableMessage) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{15} +} + +func (x *UndeliverableMessage) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *UndeliverableMessage) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +func (x *UndeliverableMessage) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *UndeliverableMessage) GetLocal() *wrapperspb.BoolValue { + if x != nil { + return x.Local + } + return nil +} + +type RPCMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*MessageMeta `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + Subscriptions []*SubMeta `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + Control *ControlMeta `protobuf:"bytes,3,opt,name=control,proto3" json:"control,omitempty"` + PeerId *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=peer_id,proto3" json:"peer_id,omitempty"` +} + +func (x *RPCMeta) Reset() { + *x = RPCMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RPCMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCMeta) ProtoMessage() {} + +func (x *RPCMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCMeta.ProtoReflect.Descriptor instead. +func (*RPCMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{16} +} + +func (x *RPCMeta) GetMessages() []*MessageMeta { + if x != nil { + return x.Messages + } + return nil +} + +func (x *RPCMeta) GetSubscriptions() []*SubMeta { + if x != nil { + return x.Subscriptions + } + return nil +} + +func (x *RPCMeta) GetControl() *ControlMeta { + if x != nil { + return x.Control + } + return nil +} + +func (x *RPCMeta) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +type MessageMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=message_id,proto3" json:"message_id,omitempty"` + Topic *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *MessageMeta) Reset() { + *x = MessageMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageMeta) ProtoMessage() {} + +func (x *MessageMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageMeta.ProtoReflect.Descriptor instead. +func (*MessageMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{17} +} + +func (x *MessageMeta) GetMessageId() *wrapperspb.StringValue { + if x != nil { + return x.MessageId + } + return nil +} + +func (x *MessageMeta) GetTopic() *wrapperspb.StringValue { + if x != nil { + return x.Topic + } + return nil +} + +type SubMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subscribe *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=subscribe,proto3" json:"subscribe,omitempty"` + TopicId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=topic_id,proto3" json:"topic_id,omitempty"` +} + +func (x *SubMeta) Reset() { + *x = SubMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubMeta) ProtoMessage() {} + +func (x *SubMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubMeta.ProtoReflect.Descriptor instead. +func (*SubMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{18} +} + +func (x *SubMeta) GetSubscribe() *wrapperspb.BoolValue { + if x != nil { + return x.Subscribe + } + return nil +} + +func (x *SubMeta) GetTopicId() *wrapperspb.StringValue { + if x != nil { + return x.TopicId + } + return nil +} + +type ControlMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ihave []*ControlIHaveMeta `protobuf:"bytes,1,rep,name=ihave,proto3" json:"ihave,omitempty"` + Iwant []*ControlIWantMeta `protobuf:"bytes,2,rep,name=iwant,proto3" json:"iwant,omitempty"` + Graft []*ControlGraftMeta `protobuf:"bytes,3,rep,name=graft,proto3" json:"graft,omitempty"` + Prune []*ControlPruneMeta `protobuf:"bytes,4,rep,name=prune,proto3" json:"prune,omitempty"` +} + +func (x *ControlMeta) Reset() { + *x = ControlMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlMeta) ProtoMessage() {} + +func (x *ControlMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlMeta.ProtoReflect.Descriptor instead. +func (*ControlMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{19} +} + +func (x *ControlMeta) GetIhave() []*ControlIHaveMeta { + if x != nil { + return x.Ihave + } + return nil +} + +func (x *ControlMeta) GetIwant() []*ControlIWantMeta { + if x != nil { + return x.Iwant + } + return nil +} + +func (x *ControlMeta) GetGraft() []*ControlGraftMeta { + if x != nil { + return x.Graft + } + return nil +} + +func (x *ControlMeta) GetPrune() []*ControlPruneMeta { + if x != nil { + return x.Prune + } + return nil +} + +type ControlIHaveMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TopicId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=topic_id,proto3" json:"topic_id,omitempty"` + MessageIds []*wrapperspb.StringValue `protobuf:"bytes,2,rep,name=message_ids,proto3" json:"message_ids,omitempty"` +} + +func (x *ControlIHaveMeta) Reset() { + *x = ControlIHaveMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlIHaveMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlIHaveMeta) ProtoMessage() {} + +func (x *ControlIHaveMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlIHaveMeta.ProtoReflect.Descriptor instead. +func (*ControlIHaveMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{20} +} + +func (x *ControlIHaveMeta) GetTopicId() *wrapperspb.StringValue { + if x != nil { + return x.TopicId + } + return nil +} + +func (x *ControlIHaveMeta) GetMessageIds() []*wrapperspb.StringValue { + if x != nil { + return x.MessageIds + } + return nil +} + +type ControlIWantMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageIds []*wrapperspb.StringValue `protobuf:"bytes,1,rep,name=message_ids,proto3" json:"message_ids,omitempty"` +} + +func (x *ControlIWantMeta) Reset() { + *x = ControlIWantMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlIWantMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlIWantMeta) ProtoMessage() {} + +func (x *ControlIWantMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlIWantMeta.ProtoReflect.Descriptor instead. +func (*ControlIWantMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{21} +} + +func (x *ControlIWantMeta) GetMessageIds() []*wrapperspb.StringValue { + if x != nil { + return x.MessageIds + } + return nil +} + +type ControlGraftMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TopicId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=topic_id,proto3" json:"topic_id,omitempty"` +} + +func (x *ControlGraftMeta) Reset() { + *x = ControlGraftMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlGraftMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlGraftMeta) ProtoMessage() {} + +func (x *ControlGraftMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlGraftMeta.ProtoReflect.Descriptor instead. +func (*ControlGraftMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{22} +} + +func (x *ControlGraftMeta) GetTopicId() *wrapperspb.StringValue { + if x != nil { + return x.TopicId + } + return nil +} + +type ControlPruneMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TopicId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=topic_id,proto3" json:"topic_id,omitempty"` + PeerIds []*wrapperspb.StringValue `protobuf:"bytes,2,rep,name=peer_ids,proto3" json:"peer_ids,omitempty"` +} + +func (x *ControlPruneMeta) Reset() { + *x = ControlPruneMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPruneMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPruneMeta) ProtoMessage() {} + +func (x *ControlPruneMeta) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPruneMeta.ProtoReflect.Descriptor instead. +func (*ControlPruneMeta) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{23} +} + +func (x *ControlPruneMeta) GetTopicId() *wrapperspb.StringValue { + if x != nil { + return x.TopicId + } + return nil +} + +func (x *ControlPruneMeta) GetPeerIds() []*wrapperspb.StringValue { + if x != nil { + return x.PeerIds + } + return nil +} + +type TraceEventMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=peer_id,proto3" json:"peer_id,omitempty"` + SessionStartDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=session_start_date_time,proto3" json:"session_start_date_time,omitempty"` +} + +func (x *TraceEventMetadata) Reset() { + *x = TraceEventMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceEventMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceEventMetadata) ProtoMessage() {} + +func (x *TraceEventMetadata) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TraceEventMetadata.ProtoReflect.Descriptor instead. +func (*TraceEventMetadata) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{24} +} + +func (x *TraceEventMetadata) GetPeerId() *wrapperspb.StringValue { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *TraceEventMetadata) GetSessionStartDateTime() *timestamppb.Timestamp { + if x != nil { + return x.SessionStartDateTime + } + return nil +} + +type Connected struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RemotePeer *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=remote_peer,proto3" json:"remote_peer,omitempty"` + RemoteMaddrs *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=remote_maddrs,proto3" json:"remote_maddrs,omitempty"` + AgentVersion *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=agent_version,proto3" json:"agent_version,omitempty"` + Direction *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` + Opened *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=opened,proto3" json:"opened,omitempty"` + Transient *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=transient,proto3" json:"transient,omitempty"` +} + +func (x *Connected) Reset() { + *x = Connected{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Connected) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Connected) ProtoMessage() {} + +func (x *Connected) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Connected.ProtoReflect.Descriptor instead. +func (*Connected) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{25} +} + +func (x *Connected) GetRemotePeer() *wrapperspb.StringValue { + if x != nil { + return x.RemotePeer + } + return nil +} + +func (x *Connected) GetRemoteMaddrs() *wrapperspb.StringValue { + if x != nil { + return x.RemoteMaddrs + } + return nil +} + +func (x *Connected) GetAgentVersion() *wrapperspb.StringValue { + if x != nil { + return x.AgentVersion + } + return nil +} + +func (x *Connected) GetDirection() *wrapperspb.StringValue { + if x != nil { + return x.Direction + } + return nil +} + +func (x *Connected) GetOpened() *timestamppb.Timestamp { + if x != nil { + return x.Opened + } + return nil +} + +func (x *Connected) GetTransient() *wrapperspb.BoolValue { + if x != nil { + return x.Transient + } + return nil +} + +type Disconnected struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RemotePeer *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=remote_peer,proto3" json:"remote_peer,omitempty"` + RemoteMaddrs *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=remote_maddrs,proto3" json:"remote_maddrs,omitempty"` + AgentVersion *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=agent_version,proto3" json:"agent_version,omitempty"` + Direction *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=direction,proto3" json:"direction,omitempty"` + Opened *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=opened,proto3" json:"opened,omitempty"` + Transient *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=transient,proto3" json:"transient,omitempty"` +} + +func (x *Disconnected) Reset() { + *x = Disconnected{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Disconnected) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Disconnected) ProtoMessage() {} + +func (x *Disconnected) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_libp2p_trace_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Disconnected.ProtoReflect.Descriptor instead. +func (*Disconnected) Descriptor() ([]byte, []int) { + return file_pkg_proto_libp2p_trace_proto_rawDescGZIP(), []int{26} +} + +func (x *Disconnected) GetRemotePeer() *wrapperspb.StringValue { + if x != nil { + return x.RemotePeer + } + return nil +} + +func (x *Disconnected) GetRemoteMaddrs() *wrapperspb.StringValue { + if x != nil { + return x.RemoteMaddrs + } + return nil +} + +func (x *Disconnected) GetAgentVersion() *wrapperspb.StringValue { + if x != nil { + return x.AgentVersion + } + return nil +} + +func (x *Disconnected) GetDirection() *wrapperspb.StringValue { + if x != nil { + return x.Direction + } + return nil +} + +func (x *Disconnected) GetOpened() *timestamppb.Timestamp { + if x != nil { + return x.Opened + } + return nil +} + +func (x *Disconnected) GetTransient() *wrapperspb.BoolValue { + if x != nil { + return x.Transient + } + return nil +} + +var File_pkg_proto_libp2p_trace_proto protoreflect.FileDescriptor + +var file_pkg_proto_libp2p_trace_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c, 0x69, 0x62, 0x70, + 0x32, 0x70, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, + 0x78, 0x61, 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x01, 0x0a, + 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x3c, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x32, 0x0a, + 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x22, 0xeb, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x72, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, + 0x34, 0x0a, 0x06, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, + 0x65, 0x71, 0x5f, 0x6e, 0x6f, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, + 0xea, 0x02, 0x0a, 0x10, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x66, + 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x65, + 0x71, 0x5f, 0x6e, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x6f, + 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0xdc, 0x02, 0x0a, + 0x0e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x3c, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x32, 0x0a, + 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x05, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x06, 0x73, + 0x65, 0x71, 0x5f, 0x6e, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x65, 0x71, 0x5f, 0x6e, + 0x6f, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xdd, 0x02, 0x0a, 0x0f, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x3c, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x32, 0x0a, + 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x05, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x06, 0x73, + 0x65, 0x71, 0x5f, 0x6e, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x65, 0x71, 0x5f, 0x6e, + 0x6f, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x7b, 0x0a, 0x07, 0x41, + 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x38, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x44, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x77, + 0x0a, 0x07, 0x52, 0x65, 0x63, 0x76, 0x52, 0x50, 0x43, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x28, 0x0a, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x78, 0x61, + 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x6b, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x52, + 0x50, 0x43, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, + 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, + 0x6d, 0x65, 0x74, 0x61, 0x22, 0x6b, 0x0a, 0x07, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x50, 0x43, 0x12, + 0x36, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, + 0x70, 0x32, 0x70, 0x2e, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x22, 0x3a, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x3b, 0x0a, + 0x05, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x73, 0x0a, 0x05, 0x47, 0x72, + 0x61, 0x66, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, + 0x73, 0x0a, 0x05, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x22, 0x46, 0x0a, 0x0c, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, + 0x50, 0x65, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0xf2, 0x01, 0x0a, + 0x14, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, + 0x30, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x22, 0xe7, 0x01, 0x0a, 0x07, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, + 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x78, 0x61, 0x74, + 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x32, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x7f, 0x0a, 0x0b, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0a, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x7d, 0x0a, 0x07, + 0x53, 0x75, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0b, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x05, 0x69, + 0x68, 0x61, 0x76, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x61, 0x74, + 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x49, 0x48, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x05, 0x69, 0x68, 0x61, 0x76, 0x65, + 0x12, 0x33, 0x0a, 0x05, 0x69, 0x77, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x49, 0x57, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x05, + 0x69, 0x77, 0x61, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x66, 0x74, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x61, 0x74, 0x75, 0x2e, 0x6c, 0x69, 0x62, 0x70, + 0x32, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x47, 0x72, 0x61, 0x66, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x05, 0x67, 0x72, 0x61, 0x66, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x70, 0x72, + 0x75, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x61, 0x74, 0x75, + 0x2e, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, + 0x72, 0x75, 0x6e, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x05, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x22, + 0x8c, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x49, 0x48, 0x61, 0x76, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x12, 0x3e, + 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x52, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x49, 0x57, 0x61, 0x6e, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x22, 0x4c, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x47, 0x72, 0x61, + 0x66, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, + 0x22, 0x86, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x72, 0x75, 0x6e, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x12, + 0x38, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x08, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x12, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x36, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x54, 0x0a, 0x17, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xfd, + 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x0b, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0d, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x64, 0x64, 0x72, 0x73, + 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x6f, 0x70, + 0x65, 0x6e, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x80, + 0x03, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, + 0x3e, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x12, + 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x64, 0x64, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x64, + 0x64, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x65, 0x6e, + 0x74, 0x2a, 0xb0, 0x04, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, + 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x44, + 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, + 0x08, 0x41, 0x44, 0x44, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x52, + 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, + 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, + 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, + 0x41, 0x47, 0x45, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, + 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, + 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x43, 0x56, 0x5f, 0x52, 0x50, 0x43, 0x10, 0x09, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x50, 0x43, 0x10, 0x0a, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x52, 0x50, 0x43, 0x10, 0x0b, 0x12, 0x08, 0x0a, 0x04, 0x4a, + 0x4f, 0x49, 0x4e, 0x10, 0x0c, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x0d, + 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x41, 0x46, 0x54, 0x10, 0x0e, 0x12, 0x09, 0x0a, 0x05, 0x50, + 0x52, 0x55, 0x4e, 0x45, 0x10, 0x0f, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, + 0x54, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, + 0x54, 0x48, 0x52, 0x4f, 0x54, 0x54, 0x4c, 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x10, 0x11, 0x12, + 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x41, 0x42, 0x4c, 0x45, + 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x12, 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x41, + 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x13, 0x12, 0x11, 0x0a, + 0x0d, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x14, + 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, + 0x41, 0x54, 0x41, 0x10, 0x15, 0x12, 0x21, 0x0a, 0x1d, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, + 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x43, 0x41, 0x52, 0x53, 0x5f, 0x42, 0x59, + 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x16, 0x12, 0x20, 0x0a, 0x1c, 0x48, 0x41, 0x4e, 0x44, + 0x4c, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x43, 0x41, 0x52, 0x53, + 0x5f, 0x42, 0x59, 0x5f, 0x52, 0x4f, 0x4f, 0x54, 0x10, 0x17, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x41, + 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x18, 0x12, 0x12, 0x0a, 0x0e, 0x48, + 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x47, 0x4f, 0x4f, 0x44, 0x42, 0x59, 0x45, 0x10, 0x19, 0x12, + 0x21, 0x0a, 0x1d, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, + 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x42, 0x59, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, + 0x10, 0x1a, 0x12, 0x20, 0x0a, 0x1c, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x42, 0x45, 0x41, + 0x43, 0x4f, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x5f, 0x42, 0x59, 0x5f, 0x52, 0x4f, + 0x4f, 0x54, 0x10, 0x1b, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x70, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x70, 0x73, 0x2f, 0x78, + 0x61, 0x74, 0x75, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c, 0x69, + 0x62, 0x70, 0x32, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pkg_proto_libp2p_trace_proto_rawDescOnce sync.Once + file_pkg_proto_libp2p_trace_proto_rawDescData = file_pkg_proto_libp2p_trace_proto_rawDesc +) + +func file_pkg_proto_libp2p_trace_proto_rawDescGZIP() []byte { + file_pkg_proto_libp2p_trace_proto_rawDescOnce.Do(func() { + file_pkg_proto_libp2p_trace_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_proto_libp2p_trace_proto_rawDescData) + }) + return file_pkg_proto_libp2p_trace_proto_rawDescData +} + +var file_pkg_proto_libp2p_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pkg_proto_libp2p_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_pkg_proto_libp2p_trace_proto_goTypes = []interface{}{ + (EventType)(0), // 0: xatu.libp2p.EventType + (*PublishMessage)(nil), // 1: xatu.libp2p.PublishMessage + (*RejectMessage)(nil), // 2: xatu.libp2p.RejectMessage + (*DuplicateMessage)(nil), // 3: xatu.libp2p.DuplicateMessage + (*DeliverMessage)(nil), // 4: xatu.libp2p.DeliverMessage + (*ValidateMessage)(nil), // 5: xatu.libp2p.ValidateMessage + (*AddPeer)(nil), // 6: xatu.libp2p.AddPeer + (*RemovePeer)(nil), // 7: xatu.libp2p.RemovePeer + (*RecvRPC)(nil), // 8: xatu.libp2p.RecvRPC + (*SendRPC)(nil), // 9: xatu.libp2p.SendRPC + (*DropRPC)(nil), // 10: xatu.libp2p.DropRPC + (*Join)(nil), // 11: xatu.libp2p.Join + (*Leave)(nil), // 12: xatu.libp2p.Leave + (*Graft)(nil), // 13: xatu.libp2p.Graft + (*Prune)(nil), // 14: xatu.libp2p.Prune + (*ThrottlePeer)(nil), // 15: xatu.libp2p.ThrottlePeer + (*UndeliverableMessage)(nil), // 16: xatu.libp2p.UndeliverableMessage + (*RPCMeta)(nil), // 17: xatu.libp2p.RPCMeta + (*MessageMeta)(nil), // 18: xatu.libp2p.MessageMeta + (*SubMeta)(nil), // 19: xatu.libp2p.SubMeta + (*ControlMeta)(nil), // 20: xatu.libp2p.ControlMeta + (*ControlIHaveMeta)(nil), // 21: xatu.libp2p.ControlIHaveMeta + (*ControlIWantMeta)(nil), // 22: xatu.libp2p.ControlIWantMeta + (*ControlGraftMeta)(nil), // 23: xatu.libp2p.ControlGraftMeta + (*ControlPruneMeta)(nil), // 24: xatu.libp2p.ControlPruneMeta + (*TraceEventMetadata)(nil), // 25: xatu.libp2p.TraceEventMetadata + (*Connected)(nil), // 26: xatu.libp2p.Connected + (*Disconnected)(nil), // 27: xatu.libp2p.Disconnected + (*wrapperspb.StringValue)(nil), // 28: google.protobuf.StringValue + (*wrapperspb.UInt32Value)(nil), // 29: google.protobuf.UInt32Value + (*wrapperspb.BoolValue)(nil), // 30: google.protobuf.BoolValue + (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp +} +var file_pkg_proto_libp2p_trace_proto_depIdxs = []int32{ + 28, // 0: xatu.libp2p.PublishMessage.message_id:type_name -> google.protobuf.StringValue + 28, // 1: xatu.libp2p.PublishMessage.topic:type_name -> google.protobuf.StringValue + 28, // 2: xatu.libp2p.RejectMessage.message_id:type_name -> google.protobuf.StringValue + 28, // 3: xatu.libp2p.RejectMessage.received_from:type_name -> google.protobuf.StringValue + 28, // 4: xatu.libp2p.RejectMessage.reason:type_name -> google.protobuf.StringValue + 28, // 5: xatu.libp2p.RejectMessage.topic:type_name -> google.protobuf.StringValue + 28, // 6: xatu.libp2p.RejectMessage.seq_no:type_name -> google.protobuf.StringValue + 29, // 7: xatu.libp2p.RejectMessage.msg_size:type_name -> google.protobuf.UInt32Value + 28, // 8: xatu.libp2p.DuplicateMessage.message_id:type_name -> google.protobuf.StringValue + 28, // 9: xatu.libp2p.DuplicateMessage.received_from:type_name -> google.protobuf.StringValue + 28, // 10: xatu.libp2p.DuplicateMessage.topic:type_name -> google.protobuf.StringValue + 28, // 11: xatu.libp2p.DuplicateMessage.seq_no:type_name -> google.protobuf.StringValue + 29, // 12: xatu.libp2p.DuplicateMessage.msg_size:type_name -> google.protobuf.UInt32Value + 30, // 13: xatu.libp2p.DuplicateMessage.local:type_name -> google.protobuf.BoolValue + 28, // 14: xatu.libp2p.DeliverMessage.message_id:type_name -> google.protobuf.StringValue + 28, // 15: xatu.libp2p.DeliverMessage.topic:type_name -> google.protobuf.StringValue + 28, // 16: xatu.libp2p.DeliverMessage.peer_id:type_name -> google.protobuf.StringValue + 30, // 17: xatu.libp2p.DeliverMessage.local:type_name -> google.protobuf.BoolValue + 28, // 18: xatu.libp2p.DeliverMessage.seq_no:type_name -> google.protobuf.StringValue + 29, // 19: xatu.libp2p.DeliverMessage.msg_size:type_name -> google.protobuf.UInt32Value + 28, // 20: xatu.libp2p.ValidateMessage.message_id:type_name -> google.protobuf.StringValue + 28, // 21: xatu.libp2p.ValidateMessage.topic:type_name -> google.protobuf.StringValue + 28, // 22: xatu.libp2p.ValidateMessage.peer_id:type_name -> google.protobuf.StringValue + 30, // 23: xatu.libp2p.ValidateMessage.local:type_name -> google.protobuf.BoolValue + 28, // 24: xatu.libp2p.ValidateMessage.seq_no:type_name -> google.protobuf.StringValue + 29, // 25: xatu.libp2p.ValidateMessage.msg_size:type_name -> google.protobuf.UInt32Value + 28, // 26: xatu.libp2p.AddPeer.peer_id:type_name -> google.protobuf.StringValue + 28, // 27: xatu.libp2p.AddPeer.protocol:type_name -> google.protobuf.StringValue + 28, // 28: xatu.libp2p.RemovePeer.peer_id:type_name -> google.protobuf.StringValue + 28, // 29: xatu.libp2p.RecvRPC.received_from:type_name -> google.protobuf.StringValue + 17, // 30: xatu.libp2p.RecvRPC.meta:type_name -> xatu.libp2p.RPCMeta + 28, // 31: xatu.libp2p.SendRPC.send_to:type_name -> google.protobuf.StringValue + 17, // 32: xatu.libp2p.SendRPC.meta:type_name -> xatu.libp2p.RPCMeta + 28, // 33: xatu.libp2p.DropRPC.send_to:type_name -> google.protobuf.StringValue + 17, // 34: xatu.libp2p.DropRPC.meta:type_name -> xatu.libp2p.RPCMeta + 28, // 35: xatu.libp2p.Join.topic:type_name -> google.protobuf.StringValue + 28, // 36: xatu.libp2p.Leave.topic:type_name -> google.protobuf.StringValue + 28, // 37: xatu.libp2p.Graft.peer_id:type_name -> google.protobuf.StringValue + 28, // 38: xatu.libp2p.Graft.topic:type_name -> google.protobuf.StringValue + 28, // 39: xatu.libp2p.Prune.peer_id:type_name -> google.protobuf.StringValue + 28, // 40: xatu.libp2p.Prune.topic:type_name -> google.protobuf.StringValue + 28, // 41: xatu.libp2p.ThrottlePeer.peer_id:type_name -> google.protobuf.StringValue + 28, // 42: xatu.libp2p.UndeliverableMessage.message_id:type_name -> google.protobuf.StringValue + 28, // 43: xatu.libp2p.UndeliverableMessage.topic:type_name -> google.protobuf.StringValue + 28, // 44: xatu.libp2p.UndeliverableMessage.peer_id:type_name -> google.protobuf.StringValue + 30, // 45: xatu.libp2p.UndeliverableMessage.local:type_name -> google.protobuf.BoolValue + 18, // 46: xatu.libp2p.RPCMeta.messages:type_name -> xatu.libp2p.MessageMeta + 19, // 47: xatu.libp2p.RPCMeta.subscriptions:type_name -> xatu.libp2p.SubMeta + 20, // 48: xatu.libp2p.RPCMeta.control:type_name -> xatu.libp2p.ControlMeta + 28, // 49: xatu.libp2p.RPCMeta.peer_id:type_name -> google.protobuf.StringValue + 28, // 50: xatu.libp2p.MessageMeta.message_id:type_name -> google.protobuf.StringValue + 28, // 51: xatu.libp2p.MessageMeta.topic:type_name -> google.protobuf.StringValue + 30, // 52: xatu.libp2p.SubMeta.subscribe:type_name -> google.protobuf.BoolValue + 28, // 53: xatu.libp2p.SubMeta.topic_id:type_name -> google.protobuf.StringValue + 21, // 54: xatu.libp2p.ControlMeta.ihave:type_name -> xatu.libp2p.ControlIHaveMeta + 22, // 55: xatu.libp2p.ControlMeta.iwant:type_name -> xatu.libp2p.ControlIWantMeta + 23, // 56: xatu.libp2p.ControlMeta.graft:type_name -> xatu.libp2p.ControlGraftMeta + 24, // 57: xatu.libp2p.ControlMeta.prune:type_name -> xatu.libp2p.ControlPruneMeta + 28, // 58: xatu.libp2p.ControlIHaveMeta.topic_id:type_name -> google.protobuf.StringValue + 28, // 59: xatu.libp2p.ControlIHaveMeta.message_ids:type_name -> google.protobuf.StringValue + 28, // 60: xatu.libp2p.ControlIWantMeta.message_ids:type_name -> google.protobuf.StringValue + 28, // 61: xatu.libp2p.ControlGraftMeta.topic_id:type_name -> google.protobuf.StringValue + 28, // 62: xatu.libp2p.ControlPruneMeta.topic_id:type_name -> google.protobuf.StringValue + 28, // 63: xatu.libp2p.ControlPruneMeta.peer_ids:type_name -> google.protobuf.StringValue + 28, // 64: xatu.libp2p.TraceEventMetadata.peer_id:type_name -> google.protobuf.StringValue + 31, // 65: xatu.libp2p.TraceEventMetadata.session_start_date_time:type_name -> google.protobuf.Timestamp + 28, // 66: xatu.libp2p.Connected.remote_peer:type_name -> google.protobuf.StringValue + 28, // 67: xatu.libp2p.Connected.remote_maddrs:type_name -> google.protobuf.StringValue + 28, // 68: xatu.libp2p.Connected.agent_version:type_name -> google.protobuf.StringValue + 28, // 69: xatu.libp2p.Connected.direction:type_name -> google.protobuf.StringValue + 31, // 70: xatu.libp2p.Connected.opened:type_name -> google.protobuf.Timestamp + 30, // 71: xatu.libp2p.Connected.transient:type_name -> google.protobuf.BoolValue + 28, // 72: xatu.libp2p.Disconnected.remote_peer:type_name -> google.protobuf.StringValue + 28, // 73: xatu.libp2p.Disconnected.remote_maddrs:type_name -> google.protobuf.StringValue + 28, // 74: xatu.libp2p.Disconnected.agent_version:type_name -> google.protobuf.StringValue + 28, // 75: xatu.libp2p.Disconnected.direction:type_name -> google.protobuf.StringValue + 31, // 76: xatu.libp2p.Disconnected.opened:type_name -> google.protobuf.Timestamp + 30, // 77: xatu.libp2p.Disconnected.transient:type_name -> google.protobuf.BoolValue + 78, // [78:78] is the sub-list for method output_type + 78, // [78:78] is the sub-list for method input_type + 78, // [78:78] is the sub-list for extension type_name + 78, // [78:78] is the sub-list for extension extendee + 0, // [0:78] is the sub-list for field type_name +} + +func init() { file_pkg_proto_libp2p_trace_proto_init() } +func file_pkg_proto_libp2p_trace_proto_init() { + if File_pkg_proto_libp2p_trace_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pkg_proto_libp2p_trace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublishMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RejectMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DuplicateMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeliverMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddPeer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemovePeer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecvRPC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendRPC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DropRPC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Join); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Leave); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Graft); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Prune); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThrottlePeer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UndeliverableMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPCMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlIHaveMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlIWantMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlGraftMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlPruneMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TraceEventMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Connected); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_libp2p_trace_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Disconnected); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pkg_proto_libp2p_trace_proto_rawDesc, + NumEnums: 1, + NumMessages: 27, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pkg_proto_libp2p_trace_proto_goTypes, + DependencyIndexes: file_pkg_proto_libp2p_trace_proto_depIdxs, + EnumInfos: file_pkg_proto_libp2p_trace_proto_enumTypes, + MessageInfos: file_pkg_proto_libp2p_trace_proto_msgTypes, + }.Build() + File_pkg_proto_libp2p_trace_proto = out.File + file_pkg_proto_libp2p_trace_proto_rawDesc = nil + file_pkg_proto_libp2p_trace_proto_goTypes = nil + file_pkg_proto_libp2p_trace_proto_depIdxs = nil +} diff --git a/pkg/proto/libp2p/trace.proto b/pkg/proto/libp2p/trace.proto new file mode 100644 index 00000000..bc40ddb0 --- /dev/null +++ b/pkg/proto/libp2p/trace.proto @@ -0,0 +1,198 @@ +syntax = "proto3"; + +package xatu.libp2p; + +option go_package = "github.com/ethpandaops/xatu/pkg/proto/libp2p"; + +import "google/protobuf/wrappers.proto"; +import "google/protobuf/timestamp.proto"; + +enum EventType { + UNKNOWN = 0; + CONNECTED = 1; + DISCONNECTED = 2; + ADD_PEER = 3; + REMOVE_PEER = 4; + PUBLISH_MESSAGE = 5; + REJECT_MESSAGE = 6; + DUPLICATE_MESSAGE = 7; + DELIVER_MESSAGE = 8; + RECV_RPC = 9; + SEND_RPC = 10; + DROP_RPC = 11; + JOIN = 12; + LEAVE = 13; + GRAFT = 14; + PRUNE = 15; + VALIDATE_MESSAGE = 16; + THROTTLE_PEER = 17; + UNDELIVERABLE_MESSAGE = 18; + HANDLE_STREAM = 19; + HANDLE_STATUS = 20; + HANDLE_METADATA = 21; + HANDLE_BLOB_SIDECARS_BY_RANGE = 22; + HANDLE_BLOB_SIDECARS_BY_ROOT = 23; + HANDLE_PING = 24; + HANDLE_GOODBYE = 25; + HANDLE_BEACON_BLOCKS_BY_RANGE = 26; + HANDLE_BEACON_BLOCKS_BY_ROOT = 27; +} + +message PublishMessage { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue topic = 2; +} + +message RejectMessage { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue received_from = 2 [json_name = "received_from"]; + google.protobuf.StringValue reason = 3; + google.protobuf.StringValue topic = 4; + google.protobuf.StringValue seq_no = 5 [json_name = "seq_no"]; + google.protobuf.UInt32Value msg_size = 6 [json_name = "msg_size"]; +} + +message DuplicateMessage { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue received_from = 2 [json_name = "received_from"]; + google.protobuf.StringValue topic = 3; + google.protobuf.StringValue seq_no = 4 [json_name = "seq_no"]; + google.protobuf.UInt32Value msg_size = 5 [json_name = "msg_size"]; + google.protobuf.BoolValue local = 6; +} + +message DeliverMessage { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue topic = 2; + google.protobuf.StringValue peer_id = 3 [json_name = "peer_id"]; + google.protobuf.BoolValue local = 4; + google.protobuf.StringValue seq_no = 5 [json_name = "seq_no"]; + google.protobuf.UInt32Value msg_size = 6 [json_name = "msg_size"]; +} + +message ValidateMessage { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue topic = 2; + google.protobuf.StringValue peer_id = 3 [json_name = "peer_id"]; + google.protobuf.BoolValue local = 4; + google.protobuf.StringValue seq_no = 5 [json_name = "seq_no"]; + google.protobuf.UInt32Value msg_size = 6 [json_name = "msg_size"]; +} + +message AddPeer { + google.protobuf.StringValue peer_id = 1 [json_name = "peer_id"]; + google.protobuf.StringValue protocol = 2; +} + +message RemovePeer { + google.protobuf.StringValue peer_id = 1 [json_name = "peer_id"]; +} + +message RecvRPC { + google.protobuf.StringValue received_from = 1 [json_name = "received_from"]; + RPCMeta meta = 2; +} + +message SendRPC { + google.protobuf.StringValue send_to = 1 [json_name = "send_to"]; + RPCMeta meta = 2; +} + +message DropRPC { + google.protobuf.StringValue send_to = 1 [json_name = "send_to"]; + RPCMeta meta = 2; +} + +message Join { + google.protobuf.StringValue topic = 1; +} + +message Leave { + google.protobuf.StringValue topic = 2; +} + +message Graft { + google.protobuf.StringValue peer_id = 1 [json_name = "peer_id"]; + google.protobuf.StringValue topic = 2; +} + +message Prune { + google.protobuf.StringValue peer_id = 1 [json_name = "peer_id"]; + google.protobuf.StringValue topic = 2; +} + +message ThrottlePeer { + google.protobuf.StringValue peer_id = 1 [json_name = "peer_id"]; +} + +message UndeliverableMessage { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue topic = 2; + google.protobuf.StringValue peer_id = 3 [json_name = "peer_id"]; + google.protobuf.BoolValue local = 4 [json_name = "local"]; +} + +message RPCMeta { + repeated MessageMeta messages = 1; + repeated SubMeta subscriptions = 2; + ControlMeta control = 3; + google.protobuf.StringValue peer_id = 4 [json_name = "peer_id"]; +} + +message MessageMeta { + google.protobuf.StringValue message_id = 1 [json_name = "message_id"]; + google.protobuf.StringValue topic = 2; +} + +message SubMeta { + google.protobuf.BoolValue subscribe = 1 [json_name = "subscribe"]; + google.protobuf.StringValue topic_id = 2 [json_name = "topic_id"]; +} + +message ControlMeta { + repeated ControlIHaveMeta ihave = 1; + repeated ControlIWantMeta iwant = 2; + repeated ControlGraftMeta graft = 3; + repeated ControlPruneMeta prune = 4; +} + +message ControlIHaveMeta { + google.protobuf.StringValue topic_id = 1 [json_name = "topic_id"]; + repeated google.protobuf.StringValue message_ids = 2 [json_name = "message_ids"]; +} + +message ControlIWantMeta { + repeated google.protobuf.StringValue message_ids = 1 [json_name = "message_ids"]; +} + +message ControlGraftMeta { + google.protobuf.StringValue topic_id = 1 [json_name = "topic_id"]; +} + +message ControlPruneMeta { + google.protobuf.StringValue topic_id = 1 [json_name = "topic_id"]; + repeated google.protobuf.StringValue peer_ids = 2 [json_name = "peer_ids"]; +} + +message TraceEventMetadata { + google.protobuf.StringValue peer_id = 1 [json_name = "peer_id"]; + google.protobuf.Timestamp session_start_date_time = 2 [ json_name = "session_start_date_time" ]; +} + +message Connected { + google.protobuf.StringValue remote_peer = 1 [json_name = "remote_peer"]; + google.protobuf.StringValue remote_maddrs = 2 [json_name = "remote_maddrs"]; + google.protobuf.StringValue agent_version = 3 [json_name = "agent_version"]; + google.protobuf.StringValue direction = 4 [json_name = "direction"]; + google.protobuf.Timestamp opened = 5 [ json_name = "opened" ]; + google.protobuf.BoolValue transient = 6 [json_name = "transient"]; +} + +message Disconnected { + google.protobuf.StringValue remote_peer = 1 [json_name = "remote_peer"]; + google.protobuf.StringValue remote_maddrs = 2 [json_name = "remote_maddrs"]; + google.protobuf.StringValue agent_version = 3 [json_name = "agent_version"]; + google.protobuf.StringValue direction = 4 [json_name = "direction"]; + google.protobuf.Timestamp opened = 5 [ json_name = "opened" ]; + google.protobuf.BoolValue transient = 6 [json_name = "transient"]; +} \ No newline at end of file diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_add_peer.go b/pkg/server/service/event-ingester/event/libp2p/trace_add_peer.go new file mode 100644 index 00000000..ebb3765d --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_add_peer.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceAddPeerType = xatu.Event_LIBP2P_TRACE_ADD_PEER.String() +) + +type TraceAddPeer struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceAddPeer(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceAddPeer { + return &TraceAddPeer{ + log: log.WithField("event", TraceAddPeerType), + event: event, + } +} + +func (tap *TraceAddPeer) Type() string { + return TraceAddPeerType +} + +func (tap *TraceAddPeer) Validate(ctx context.Context) error { + _, ok := tap.event.Data.(*xatu.DecoratedEvent_Libp2PTraceAddPeer) + if !ok { + return errors.New("failed to cast event data to TraceAddPeer") + } + + return nil +} + +func (tap *TraceAddPeer) Filter(ctx context.Context) bool { + return false +} + +func (tap *TraceAddPeer) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_connected.go b/pkg/server/service/event-ingester/event/libp2p/trace_connected.go new file mode 100644 index 00000000..1d8b43a1 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_connected.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceConnectedType = xatu.Event_LIBP2P_TRACE_CONNECTED.String() +) + +type TraceConnected struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceConnected(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceConnected { + return &TraceConnected{ + log: log.WithField("event", TraceConnectedType), + event: event, + } +} + +func (tc *TraceConnected) Type() string { + return TraceConnectedType +} + +func (tc *TraceConnected) Validate(ctx context.Context) error { + _, ok := tc.event.Data.(*xatu.DecoratedEvent_Libp2PTraceConnected) + if !ok { + return errors.New("failed to cast event data to TraceConnected") + } + + return nil +} + +func (tc *TraceConnected) Filter(ctx context.Context) bool { + return false +} + +func (tc *TraceConnected) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_delivery_message.go b/pkg/server/service/event-ingester/event/libp2p/trace_delivery_message.go new file mode 100644 index 00000000..99437250 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_delivery_message.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceDeliverMessageType = xatu.Event_LIBP2P_TRACE_DELIVER_MESSAGE.String() +) + +type TraceDeliverMessage struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceDeliverMessage(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceDeliverMessage { + return &TraceDeliverMessage{ + log: log.WithField("event", TraceDeliverMessageType), + event: event, + } +} + +func (tdm *TraceDeliverMessage) Type() string { + return TraceDeliverMessageType +} + +func (tdm *TraceDeliverMessage) Validate(ctx context.Context) error { + _, ok := tdm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceDeliverMessage) + if !ok { + return errors.New("failed to cast event data to TraceDeliverMessage") + } + + return nil +} + +func (tdm *TraceDeliverMessage) Filter(ctx context.Context) bool { + return false +} + +func (tdm *TraceDeliverMessage) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_disconnected.go b/pkg/server/service/event-ingester/event/libp2p/trace_disconnected.go new file mode 100644 index 00000000..824e0dad --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_disconnected.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceDisconnectedType = xatu.Event_LIBP2P_TRACE_DISCONNECTED.String() +) + +type TraceDisconnected struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceDisconnected(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceDisconnected { + return &TraceDisconnected{ + log: log.WithField("event", TraceDisconnectedType), + event: event, + } +} + +func (td *TraceDisconnected) Type() string { + return TraceDisconnectedType +} + +func (td *TraceDisconnected) Validate(ctx context.Context) error { + _, ok := td.event.Data.(*xatu.DecoratedEvent_Libp2PTraceDisconnected) + if !ok { + return errors.New("failed to cast event data to TraceDisconnected") + } + + return nil +} + +func (td *TraceDisconnected) Filter(ctx context.Context) bool { + return false +} + +func (td *TraceDisconnected) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_drop_rpc.go b/pkg/server/service/event-ingester/event/libp2p/trace_drop_rpc.go new file mode 100644 index 00000000..65a4c97f --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_drop_rpc.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceDropRPCType = xatu.Event_LIBP2P_TRACE_DROP_RPC.String() +) + +type TraceDropRPC struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceDropRPC(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceDropRPC { + return &TraceDropRPC{ + log: log.WithField("event", TraceDropRPCType), + event: event, + } +} + +func (tdr *TraceDropRPC) Type() string { + return TraceDropRPCType +} + +func (tdr *TraceDropRPC) Validate(ctx context.Context) error { + _, ok := tdr.event.Data.(*xatu.DecoratedEvent_Libp2PTraceDropRpc) + if !ok { + return errors.New("failed to cast event data to TraceDropRPC") + } + + return nil +} + +func (tdr *TraceDropRPC) Filter(ctx context.Context) bool { + return false +} + +func (tdr *TraceDropRPC) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_duplicate_message.go b/pkg/server/service/event-ingester/event/libp2p/trace_duplicate_message.go new file mode 100644 index 00000000..edbdab62 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_duplicate_message.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceDuplicateMessageType = xatu.Event_LIBP2P_TRACE_DUPLICATE_MESSAGE.String() +) + +type TraceDuplicateMessage struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceDuplicateMessage(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceDuplicateMessage { + return &TraceDuplicateMessage{ + log: log.WithField("event", TraceDuplicateMessageType), + event: event, + } +} + +func (tdm *TraceDuplicateMessage) Type() string { + return TraceDuplicateMessageType +} + +func (tdm *TraceDuplicateMessage) Validate(ctx context.Context) error { + _, ok := tdm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceDuplicateMessage) + if !ok { + return errors.New("failed to cast event data to TraceDuplicateMessage") + } + + return nil +} + +func (tdm *TraceDuplicateMessage) Filter(ctx context.Context) bool { + return false +} + +func (tdm *TraceDuplicateMessage) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_graft.go b/pkg/server/service/event-ingester/event/libp2p/trace_graft.go new file mode 100644 index 00000000..14c9bec5 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_graft.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceGraftType = xatu.Event_LIBP2P_TRACE_GRAFT.String() +) + +type TraceGraft struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceGraft(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceGraft { + return &TraceGraft{ + log: log.WithField("event", TraceGraftType), + event: event, + } +} + +func (tgm *TraceGraft) Type() string { + return TraceGraftType +} + +func (tgm *TraceGraft) Validate(ctx context.Context) error { + _, ok := tgm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceGraft) + if !ok { + return errors.New("failed to cast event data to TraceGraft") + } + + return nil +} + +func (tgm *TraceGraft) Filter(ctx context.Context) bool { + return false +} + +func (tgm *TraceGraft) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_join.go b/pkg/server/service/event-ingester/event/libp2p/trace_join.go new file mode 100644 index 00000000..a9958bfc --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_join.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceJoinType = xatu.Event_LIBP2P_TRACE_JOIN.String() +) + +type TraceJoin struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceJoin(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceJoin { + return &TraceJoin{ + log: log.WithField("event", TraceJoinType), + event: event, + } +} + +func (tjm *TraceJoin) Type() string { + return TraceJoinType +} + +func (tjm *TraceJoin) Validate(ctx context.Context) error { + _, ok := tjm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceJoin) + if !ok { + return errors.New("failed to cast event data to TraceJoin") + } + + return nil +} + +func (tjm *TraceJoin) Filter(ctx context.Context) bool { + return false +} + +func (tjm *TraceJoin) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_leave.go b/pkg/server/service/event-ingester/event/libp2p/trace_leave.go new file mode 100644 index 00000000..b8205482 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_leave.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceLeaveType = xatu.Event_LIBP2P_TRACE_LEAVE.String() +) + +type TraceLeave struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceLeave(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceLeave { + return &TraceLeave{ + log: log.WithField("event", TraceLeaveType), + event: event, + } +} + +func (tlm *TraceLeave) Type() string { + return TraceLeaveType +} + +func (tlm *TraceLeave) Validate(ctx context.Context) error { + _, ok := tlm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceLeave) + if !ok { + return errors.New("failed to cast event data to TraceLeave") + } + + return nil +} + +func (tlm *TraceLeave) Filter(ctx context.Context) bool { + return false +} + +func (tlm *TraceLeave) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_prune.go b/pkg/server/service/event-ingester/event/libp2p/trace_prune.go new file mode 100644 index 00000000..ffd544bb --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_prune.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TracePruneType = xatu.Event_LIBP2P_TRACE_PRUNE.String() +) + +type TracePrune struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTracePrune(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TracePrune { + return &TracePrune{ + log: log.WithField("event", TracePruneType), + event: event, + } +} + +func (tpm *TracePrune) Type() string { + return TracePruneType +} + +func (tpm *TracePrune) Validate(ctx context.Context) error { + _, ok := tpm.event.Data.(*xatu.DecoratedEvent_Libp2PTracePrune) + if !ok { + return errors.New("failed to cast event data to TracePrune") + } + + return nil +} + +func (tpm *TracePrune) Filter(ctx context.Context) bool { + return false +} + +func (tpm *TracePrune) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_publish_message.go b/pkg/server/service/event-ingester/event/libp2p/trace_publish_message.go new file mode 100644 index 00000000..06ae3c8e --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_publish_message.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TracePublishMessageType = xatu.Event_LIBP2P_TRACE_PUBLISH_MESSAGE.String() +) + +type TracePublishMessage struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTracePublishMessage(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TracePublishMessage { + return &TracePublishMessage{ + log: log.WithField("event", TracePublishMessageType), + event: event, + } +} + +func (tpm *TracePublishMessage) Type() string { + return TracePublishMessageType +} + +func (tpm *TracePublishMessage) Validate(ctx context.Context) error { + _, ok := tpm.event.Data.(*xatu.DecoratedEvent_Libp2PTracePublishMessage) + if !ok { + return errors.New("failed to cast event data to TracePublishMessage") + } + + return nil +} + +func (tpm *TracePublishMessage) Filter(ctx context.Context) bool { + return false +} + +func (tpm *TracePublishMessage) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_recv_rpc.go b/pkg/server/service/event-ingester/event/libp2p/trace_recv_rpc.go new file mode 100644 index 00000000..918c9911 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_recv_rpc.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceRecvRPCType = xatu.Event_LIBP2P_TRACE_RECV_RPC.String() +) + +type TraceRecvRPC struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceRecvRPC(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceRecvRPC { + return &TraceRecvRPC{ + log: log.WithField("event", TraceRecvRPCType), + event: event, + } +} + +func (trr *TraceRecvRPC) Type() string { + return TraceRecvRPCType +} + +func (trr *TraceRecvRPC) Validate(ctx context.Context) error { + _, ok := trr.event.Data.(*xatu.DecoratedEvent_Libp2PTraceRecvRpc) + if !ok { + return errors.New("failed to cast event data to TraceRecvRPC") + } + + return nil +} + +func (trr *TraceRecvRPC) Filter(ctx context.Context) bool { + return false +} + +func (trr *TraceRecvRPC) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_reject_message.go b/pkg/server/service/event-ingester/event/libp2p/trace_reject_message.go new file mode 100644 index 00000000..bc1beee8 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_reject_message.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceRejectMessageType = xatu.Event_LIBP2P_TRACE_REJECT_MESSAGE.String() +) + +type TraceRejectMessage struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceRejectMessage(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceRejectMessage { + return &TraceRejectMessage{ + log: log.WithField("event", TraceRejectMessageType), + event: event, + } +} + +func (trm *TraceRejectMessage) Type() string { + return TraceRejectMessageType +} + +func (trm *TraceRejectMessage) Validate(ctx context.Context) error { + _, ok := trm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceRejectMessage) + if !ok { + return errors.New("failed to cast event data to TraceRejectMessage") + } + + return nil +} + +func (trm *TraceRejectMessage) Filter(ctx context.Context) bool { + return false +} + +func (trm *TraceRejectMessage) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_remove_peer.go b/pkg/server/service/event-ingester/event/libp2p/trace_remove_peer.go new file mode 100644 index 00000000..8caba4a7 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_remove_peer.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceRemovePeerType = xatu.Event_LIBP2P_TRACE_REMOVE_PEER.String() +) + +type TraceRemovePeer struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceRemovePeer(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceRemovePeer { + return &TraceRemovePeer{ + log: log.WithField("event", TraceRemovePeerType), + event: event, + } +} + +func (trp *TraceRemovePeer) Type() string { + return TraceRemovePeerType +} + +func (trp *TraceRemovePeer) Validate(ctx context.Context) error { + _, ok := trp.event.Data.(*xatu.DecoratedEvent_Libp2PTraceRemovePeer) + if !ok { + return errors.New("failed to cast event data to TraceRemovePeer") + } + + return nil +} + +func (trp *TraceRemovePeer) Filter(ctx context.Context) bool { + return false +} + +func (trp *TraceRemovePeer) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_send_rpc.go b/pkg/server/service/event-ingester/event/libp2p/trace_send_rpc.go new file mode 100644 index 00000000..9a7d5d6e --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_send_rpc.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceSendRPCType = xatu.Event_LIBP2P_TRACE_SEND_RPC.String() +) + +type TraceSendRPC struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceSendRPC(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceSendRPC { + return &TraceSendRPC{ + log: log.WithField("event", TraceSendRPCType), + event: event, + } +} + +func (trr *TraceSendRPC) Type() string { + return TraceSendRPCType +} + +func (trr *TraceSendRPC) Validate(ctx context.Context) error { + _, ok := trr.event.Data.(*xatu.DecoratedEvent_Libp2PTraceSendRpc) + if !ok { + return errors.New("failed to cast event data to TraceSendRPC") + } + + return nil +} + +func (trr *TraceSendRPC) Filter(ctx context.Context) bool { + return false +} + +func (trr *TraceSendRPC) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_throttle_peer.go b/pkg/server/service/event-ingester/event/libp2p/trace_throttle_peer.go new file mode 100644 index 00000000..78eab4e7 --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_throttle_peer.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceThrottlePeerType = xatu.Event_LIBP2P_TRACE_THROTTLE_PEER.String() +) + +type TraceThrottlePeer struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceThrottlePeer(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceThrottlePeer { + return &TraceThrottlePeer{ + log: log.WithField("event", TraceThrottlePeerType), + event: event, + } +} + +func (ttp *TraceThrottlePeer) Type() string { + return TraceThrottlePeerType +} + +func (ttp *TraceThrottlePeer) Validate(ctx context.Context) error { + _, ok := ttp.event.Data.(*xatu.DecoratedEvent_Libp2PTraceThrottlePeer) + if !ok { + return errors.New("failed to cast event data to TraceThrottlePeer") + } + + return nil +} + +func (ttp *TraceThrottlePeer) Filter(ctx context.Context) bool { + return false +} + +func (ttp *TraceThrottlePeer) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_undeliverable_message.go b/pkg/server/service/event-ingester/event/libp2p/trace_undeliverable_message.go new file mode 100644 index 00000000..e2a934cb --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_undeliverable_message.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceUndeliverableMessageType = xatu.Event_LIBP2P_TRACE_UNDELIVERABLE_MESSAGE.String() +) + +type TraceUndeliverableMessage struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceUndeliverableMessage(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceUndeliverableMessage { + return &TraceUndeliverableMessage{ + log: log.WithField("event", TraceUndeliverableMessageType), + event: event, + } +} + +func (tum *TraceUndeliverableMessage) Type() string { + return TraceUndeliverableMessageType +} + +func (tum *TraceUndeliverableMessage) Validate(ctx context.Context) error { + _, ok := tum.event.Data.(*xatu.DecoratedEvent_Libp2PTraceUndeliverableMessage) + if !ok { + return errors.New("failed to cast event data to TraceUndeliverableMessage") + } + + return nil +} + +func (tum *TraceUndeliverableMessage) Filter(ctx context.Context) bool { + return false +} + +func (tum *TraceUndeliverableMessage) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +} diff --git a/pkg/server/service/event-ingester/event/libp2p/trace_validate_message.go b/pkg/server/service/event-ingester/event/libp2p/trace_validate_message.go new file mode 100644 index 00000000..8bf0418a --- /dev/null +++ b/pkg/server/service/event-ingester/event/libp2p/trace_validate_message.go @@ -0,0 +1,46 @@ +package libp2p + +import ( + "context" + "errors" + + "github.com/ethpandaops/xatu/pkg/proto/xatu" + "github.com/sirupsen/logrus" +) + +var ( + TraceValidateMessageType = xatu.Event_LIBP2P_TRACE_VALIDATE_MESSAGE.String() +) + +type TraceValidateMessage struct { + log logrus.FieldLogger + event *xatu.DecoratedEvent +} + +func NewTraceValidateMessage(log logrus.FieldLogger, event *xatu.DecoratedEvent) *TraceValidateMessage { + return &TraceValidateMessage{ + log: log.WithField("event", TraceValidateMessageType), + event: event, + } +} + +func (tvm *TraceValidateMessage) Type() string { + return TraceValidateMessageType +} + +func (tvm *TraceValidateMessage) Validate(ctx context.Context) error { + _, ok := tvm.event.Data.(*xatu.DecoratedEvent_Libp2PTraceValidateMessage) + if !ok { + return errors.New("failed to cast event data to TraceValidateMessage") + } + + return nil +} + +func (tvm *TraceValidateMessage) Filter(ctx context.Context) bool { + return false +} + +func (tvm *TraceValidateMessage) AppendServerMeta(ctx context.Context, meta *xatu.ServerMeta) *xatu.ServerMeta { + return meta +}