diff --git a/discojs/src/client/federated/messages.ts b/discojs/src/client/federated/messages.ts index b11281b10..a18dc1565 100644 --- a/discojs/src/client/federated/messages.ts +++ b/discojs/src/client/federated/messages.ts @@ -7,8 +7,6 @@ export type MessageFederated = ClientConnected | SendPayload | ReceiveServerPayload | - RequestServerStatistics | - ReceiveServerStatistics | ReceiveServerMetadata | AssignNodeID @@ -22,13 +20,6 @@ export interface ReceiveServerPayload { payload: weights.Encoded round: number } -export interface RequestServerStatistics { - type: type.RequestServerStatistics -} -export interface ReceiveServerStatistics { - type: type.ReceiveServerStatistics - statistics: Record -} export interface ReceiveServerMetadata { type: type.ReceiveServerMetadata nodeId: client.NodeID @@ -45,20 +36,12 @@ export function isMessageFederated (raw: unknown): raw is MessageFederated { switch (raw.type) { case type.ClientConnected: - return true case type.SendPayload: - return true case type.ReceiveServerPayload: - return true - case type.RequestServerStatistics: - return true - case type.ReceiveServerStatistics: - return true case type.ReceiveServerMetadata: - return true case type.AssignNodeID: return true - default: - return false } + + return false } diff --git a/discojs/src/client/messages.ts b/discojs/src/client/messages.ts index c505c7bf8..0cd163476 100644 --- a/discojs/src/client/messages.ts +++ b/discojs/src/client/messages.ts @@ -18,8 +18,6 @@ export enum type { SendPayload, ReceiveServerMetadata, ReceiveServerPayload, - RequestServerStatistics, - ReceiveServerStatistics, } export interface ClientConnected { diff --git a/server/src/router/federated/server.ts b/server/src/router/federated/server.ts index 3c4af2a55..7dc0715a1 100644 --- a/server/src/router/federated/server.ts +++ b/server/src/router/federated/server.ts @@ -200,21 +200,6 @@ export class Federated extends Server { console.info(`dropped contribution from client ${clientId} for round ${round}`) return // TODO what to answer? } - } else if (msg.type === MessageTypes.ReceiveServerStatistics) { - const statistics = this.informants - .get(task.id) - ?.getAllStatistics() - - const msg: messages.ReceiveServerStatistics = { - type: MessageTypes.ReceiveServerStatistics, - statistics: statistics ?? {} - } - - ws.send(msgpack.encode(msg)) - } else if (msg.type === MessageTypes.RequestServerStatistics) { - this.logsAppend(task.id, clientId, MessageTypes.ReceiveServerPayload, 0) - - this.createPromiseForWeights(task.id, aggregator, ws) } else if (msg.type === MessageTypes.ReceiveServerMetadata) { const { key, round } = msg