@streamr/trackerless-network 100.2.5-beta.1 → 101.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +6 -6
- package/dist/src/NetworkNode.js +1 -1
- package/dist/src/NetworkNode.js.map +1 -1
- package/dist/src/NetworkStack.d.ts +5 -5
- package/dist/src/NetworkStack.js +21 -21
- package/dist/src/NetworkStack.js.map +1 -1
- package/dist/src/exports.d.ts +2 -2
- package/dist/src/exports.js +2 -2
- package/dist/src/exports.js.map +1 -1
- package/dist/src/logic/ContentDeliveryLayerNode.d.ts +5 -5
- package/dist/src/logic/ContentDeliveryLayerNode.js +85 -85
- package/dist/src/logic/ContentDeliveryLayerNode.js.map +1 -1
- package/dist/src/logic/ContentDeliveryManager.d.ts +11 -12
- package/dist/src/logic/ContentDeliveryManager.js +65 -61
- package/dist/src/logic/ContentDeliveryManager.js.map +1 -1
- package/dist/src/logic/ContentDeliveryRpcLocal.d.ts +5 -5
- package/dist/src/logic/ContentDeliveryRpcLocal.js +9 -9
- package/dist/src/logic/ContentDeliveryRpcLocal.js.map +1 -1
- package/dist/src/logic/{Layer0Node.d.ts → ControlLayerNode.d.ts} +1 -1
- package/dist/src/logic/{Layer0Node.js → ControlLayerNode.js} +1 -1
- package/dist/src/logic/ControlLayerNode.js.map +1 -0
- package/dist/src/logic/{Layer1Node.d.ts → DiscoveryLayerNode.d.ts} +8 -8
- package/dist/src/logic/{Layer1Node.js → DiscoveryLayerNode.js} +1 -1
- package/dist/src/logic/DiscoveryLayerNode.js.map +1 -0
- package/dist/src/logic/PeerDescriptorStoreManager.d.ts +28 -0
- package/dist/src/logic/PeerDescriptorStoreManager.js +79 -0
- package/dist/src/logic/PeerDescriptorStoreManager.js.map +1 -0
- package/dist/src/logic/StreamPartNetworkSplitAvoidance.d.ts +5 -5
- package/dist/src/logic/StreamPartNetworkSplitAvoidance.js +8 -8
- package/dist/src/logic/StreamPartNetworkSplitAvoidance.js.map +1 -1
- package/dist/src/logic/StreamPartReconnect.d.ts +5 -5
- package/dist/src/logic/StreamPartReconnect.js +10 -10
- package/dist/src/logic/StreamPartReconnect.js.map +1 -1
- package/dist/src/logic/createContentDeliveryLayerNode.d.ts +3 -3
- package/dist/src/logic/createContentDeliveryLayerNode.js +34 -34
- package/dist/src/logic/createContentDeliveryLayerNode.js.map +1 -1
- package/dist/src/logic/inspect/InspectSession.d.ts +3 -3
- package/dist/src/logic/inspect/InspectSession.js +5 -5
- package/dist/src/logic/inspect/InspectSession.js.map +1 -1
- package/dist/src/logic/inspect/Inspector.d.ts +2 -2
- package/dist/src/logic/inspect/Inspector.js +8 -8
- package/dist/src/logic/inspect/Inspector.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/HandshakeRpcLocal.d.ts +4 -4
- package/dist/src/logic/neighbor-discovery/HandshakeRpcLocal.js +24 -24
- package/dist/src/logic/neighbor-discovery/HandshakeRpcLocal.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/HandshakeRpcRemote.d.ts +1 -1
- package/dist/src/logic/neighbor-discovery/HandshakeRpcRemote.js +4 -4
- package/dist/src/logic/neighbor-discovery/HandshakeRpcRemote.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/Handshaker.d.ts +3 -3
- package/dist/src/logic/neighbor-discovery/Handshaker.js +37 -37
- package/dist/src/logic/neighbor-discovery/Handshaker.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborFinder.d.ts +3 -3
- package/dist/src/logic/neighbor-discovery/NeighborFinder.js +9 -9
- package/dist/src/logic/neighbor-discovery/NeighborFinder.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborUpdateManager.d.ts +3 -3
- package/dist/src/logic/neighbor-discovery/NeighborUpdateManager.js +12 -12
- package/dist/src/logic/neighbor-discovery/NeighborUpdateManager.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.d.ts +3 -3
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.js +14 -14
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.js.map +1 -1
- package/dist/src/logic/proxy/ProxyClient.d.ts +3 -3
- package/dist/src/logic/proxy/ProxyClient.js +25 -25
- package/dist/src/logic/proxy/ProxyClient.js.map +1 -1
- package/dist/src/logic/proxy/ProxyConnectionRpcLocal.d.ts +3 -3
- package/dist/src/logic/proxy/ProxyConnectionRpcLocal.js +10 -10
- package/dist/src/logic/proxy/ProxyConnectionRpcLocal.js.map +1 -1
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcLocal.d.ts +3 -3
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcLocal.js +11 -11
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcLocal.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.d.ts +4 -4
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js +8 -8
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.d.ts +11 -3
- package/dist/src/proto/packages/dht/protos/DhtRpc.js +7 -5
- package/dist/src/proto/packages/dht/protos/DhtRpc.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.server.d.ts +2 -2
- package/dist/src/proto/packages/proto-rpc/protos/ProtoRpc.js +1 -1
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.client.js +1 -1
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.d.ts +6 -23
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.js +5 -23
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.js.map +1 -1
- package/dist/test/benchmark/first-message.js +7 -7
- package/dist/test/benchmark/first-message.js.map +1 -1
- package/dist/test/utils/utils.d.ts +2 -2
- package/dist/test/utils/utils.js +3 -3
- package/dist/test/utils/utils.js.map +1 -1
- package/package.json +6 -6
- package/protos/NetworkRpc.proto +3 -9
- package/src/NetworkNode.ts +1 -1
- package/src/NetworkStack.ts +24 -24
- package/src/exports.ts +2 -2
- package/src/logic/ContentDeliveryLayerNode.ts +112 -112
- package/src/logic/ContentDeliveryManager.ts +71 -67
- package/src/logic/ContentDeliveryRpcLocal.ts +12 -12
- package/src/logic/{Layer0Node.ts → ControlLayerNode.ts} +1 -1
- package/src/logic/{Layer1Node.ts → DiscoveryLayerNode.ts} +8 -8
- package/src/logic/PeerDescriptorStoreManager.ts +97 -0
- package/src/logic/StreamPartNetworkSplitAvoidance.ts +11 -11
- package/src/logic/StreamPartReconnect.ts +12 -12
- package/src/logic/createContentDeliveryLayerNode.ts +38 -38
- package/src/logic/inspect/InspectSession.ts +6 -6
- package/src/logic/inspect/Inspector.ts +9 -9
- package/src/logic/neighbor-discovery/HandshakeRpcLocal.ts +26 -26
- package/src/logic/neighbor-discovery/HandshakeRpcRemote.ts +6 -6
- package/src/logic/neighbor-discovery/Handshaker.ts +45 -45
- package/src/logic/neighbor-discovery/NeighborFinder.ts +10 -10
- package/src/logic/neighbor-discovery/NeighborUpdateManager.ts +14 -14
- package/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.ts +17 -17
- package/src/logic/proxy/ProxyClient.ts +26 -26
- package/src/logic/proxy/ProxyConnectionRpcLocal.ts +12 -12
- package/src/logic/temporary-connection/TemporaryConnectionRpcLocal.ts +13 -13
- package/src/proto/google/protobuf/any.ts +1 -1
- package/src/proto/google/protobuf/empty.ts +1 -1
- package/src/proto/google/protobuf/timestamp.ts +1 -1
- package/src/proto/packages/dht/protos/DhtRpc.client.ts +9 -9
- package/src/proto/packages/dht/protos/DhtRpc.server.ts +3 -3
- package/src/proto/packages/dht/protos/DhtRpc.ts +15 -5
- package/src/proto/packages/proto-rpc/protos/ProtoRpc.ts +1 -1
- package/src/proto/packages/trackerless-network/protos/NetworkRpc.client.ts +1 -1
- package/src/proto/packages/trackerless-network/protos/NetworkRpc.server.ts +1 -1
- package/src/proto/packages/trackerless-network/protos/NetworkRpc.ts +10 -27
- package/test/benchmark/StreamPartIdDataKeyDistribution.test.ts +1 -1
- package/test/benchmark/first-message.ts +9 -9
- package/test/end-to-end/content-delivery-layer-node-with-real-connections.test.ts +12 -12
- package/test/end-to-end/proxy-and-full-node.test.ts +4 -4
- package/test/integration/ContentDeliveryLayerNode-Layer1Node-Latencies.test.ts +19 -19
- package/test/integration/ContentDeliveryLayerNode-Layer1Node.test.ts +19 -19
- package/test/integration/ContentDeliveryManager.test.ts +11 -11
- package/test/integration/Inspect.test.ts +1 -1
- package/test/integration/Propagation.test.ts +6 -6
- package/test/integration/joining-streams-on-offline-peers.test.ts +3 -3
- package/test/integration/stream-without-default-entrypoints.test.ts +2 -2
- package/test/integration/streamEntryPointReplacing.test.ts +2 -2
- package/test/unit/ContentDeliveryLayerNode.test.ts +11 -11
- package/test/unit/ContentDeliveryManager.test.ts +2 -2
- package/test/unit/{EntrypointDiscovery.test.ts → PeerDescriptorStoreManager.test.ts} +28 -29
- package/test/unit/StreamPartIDDataKey.test.ts +1 -1
- package/test/unit/StreamPartNetworkSplitAvoidance.test.ts +8 -8
- package/test/unit/StreamPartReconnect.test.ts +9 -9
- package/test/utils/fake/FakePeerDescriptorStoreManager.ts +29 -0
- package/test/utils/mock/{MockLayer0Node.ts → MockControlLayerNode.ts} +2 -2
- package/test/utils/mock/{MockLayer1Node.ts → MockDiscoveryLayerNode.ts} +2 -2
- package/test/utils/utils.ts +5 -5
- package/dist/src/logic/EntryPointDiscovery.d.ts +0 -27
- package/dist/src/logic/EntryPointDiscovery.js +0 -80
- package/dist/src/logic/EntryPointDiscovery.js.map +0 -1
- package/dist/src/logic/Layer0Node.js.map +0 -1
- package/dist/src/logic/Layer1Node.js.map +0 -1
- package/src/logic/EntryPointDiscovery.ts +0 -100
- package/test/utils/fake/FakeEntryPointDiscovery.ts +0 -29
|
@@ -8,7 +8,7 @@ import { NeighborUpdateRpcRemote } from './NeighborUpdateRpcRemote'
|
|
|
8
8
|
import { NeighborUpdateRpcLocal } from './NeighborUpdateRpcLocal'
|
|
9
9
|
import { StreamPartID } from '@streamr/protocol'
|
|
10
10
|
|
|
11
|
-
interface
|
|
11
|
+
interface NeighborUpdateManagerOptions {
|
|
12
12
|
localPeerDescriptor: PeerDescriptor
|
|
13
13
|
neighbors: NodeList
|
|
14
14
|
nearbyNodeView: NodeList
|
|
@@ -25,19 +25,19 @@ const logger = new Logger(module)
|
|
|
25
25
|
export class NeighborUpdateManager {
|
|
26
26
|
|
|
27
27
|
private readonly abortController: AbortController
|
|
28
|
-
private readonly
|
|
28
|
+
private readonly options: NeighborUpdateManagerOptions
|
|
29
29
|
private readonly rpcLocal: NeighborUpdateRpcLocal
|
|
30
30
|
|
|
31
|
-
constructor(
|
|
31
|
+
constructor(options: NeighborUpdateManagerOptions) {
|
|
32
32
|
this.abortController = new AbortController()
|
|
33
|
-
this.rpcLocal = new NeighborUpdateRpcLocal(
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
33
|
+
this.rpcLocal = new NeighborUpdateRpcLocal(options)
|
|
34
|
+
this.options = options
|
|
35
|
+
this.options.rpcCommunicator.registerRpcMethod(NeighborUpdate, NeighborUpdate, 'neighborUpdate',
|
|
36
36
|
(req: NeighborUpdate, context) => this.rpcLocal.neighborUpdate(req, context))
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async start(): Promise<void> {
|
|
40
|
-
await scheduleAtInterval(() => this.updateNeighborInfo(), this.
|
|
40
|
+
await scheduleAtInterval(() => this.updateNeighborInfo(), this.options.neighborUpdateInterval, false, this.abortController.signal)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
stop(): void {
|
|
@@ -46,22 +46,22 @@ export class NeighborUpdateManager {
|
|
|
46
46
|
|
|
47
47
|
private async updateNeighborInfo(): Promise<void> {
|
|
48
48
|
logger.trace(`Updating neighbor info to nodes`)
|
|
49
|
-
const neighborDescriptors = this.
|
|
50
|
-
await Promise.allSettled(this.
|
|
51
|
-
const res = await this.createRemote(neighbor.getPeerDescriptor()).updateNeighbors(this.
|
|
49
|
+
const neighborDescriptors = this.options.neighbors.getAll().map((neighbor) => neighbor.getPeerDescriptor())
|
|
50
|
+
await Promise.allSettled(this.options.neighbors.getAll().map(async (neighbor) => {
|
|
51
|
+
const res = await this.createRemote(neighbor.getPeerDescriptor()).updateNeighbors(this.options.streamPartId, neighborDescriptors)
|
|
52
52
|
if (res.removeMe) {
|
|
53
53
|
const nodeId = getNodeIdFromPeerDescriptor(neighbor.getPeerDescriptor())
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
54
|
+
this.options.neighbors.remove(nodeId)
|
|
55
|
+
this.options.neighborFinder.start([nodeId])
|
|
56
56
|
}
|
|
57
57
|
}))
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
private createRemote(targetPeerDescriptor: PeerDescriptor): NeighborUpdateRpcRemote {
|
|
61
61
|
return new NeighborUpdateRpcRemote(
|
|
62
|
-
this.
|
|
62
|
+
this.options.localPeerDescriptor,
|
|
63
63
|
targetPeerDescriptor,
|
|
64
|
-
this.
|
|
64
|
+
this.options.rpcCommunicator,
|
|
65
65
|
NeighborUpdateRpcClient
|
|
66
66
|
)
|
|
67
67
|
}
|
|
@@ -8,7 +8,7 @@ import { ContentDeliveryRpcRemote } from '../ContentDeliveryRpcRemote'
|
|
|
8
8
|
import { NeighborFinder } from './NeighborFinder'
|
|
9
9
|
import { StreamPartID } from '@streamr/protocol'
|
|
10
10
|
|
|
11
|
-
interface
|
|
11
|
+
interface NeighborUpdateRpcLocalOptions {
|
|
12
12
|
localPeerDescriptor: PeerDescriptor
|
|
13
13
|
streamPartId: StreamPartID
|
|
14
14
|
neighbors: NodeList
|
|
@@ -21,23 +21,23 @@ interface NeighborUpdateRpcLocalConfig {
|
|
|
21
21
|
|
|
22
22
|
export class NeighborUpdateRpcLocal implements INeighborUpdateRpc {
|
|
23
23
|
|
|
24
|
-
private readonly
|
|
24
|
+
private readonly options: NeighborUpdateRpcLocalOptions
|
|
25
25
|
|
|
26
|
-
constructor(
|
|
27
|
-
this.
|
|
26
|
+
constructor(options: NeighborUpdateRpcLocalOptions) {
|
|
27
|
+
this.options = options
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
private updateContacts(neighborDescriptors: PeerDescriptor[]): void {
|
|
31
|
-
const ownNodeId = getNodeIdFromPeerDescriptor(this.
|
|
31
|
+
const ownNodeId = getNodeIdFromPeerDescriptor(this.options.localPeerDescriptor)
|
|
32
32
|
const newPeerDescriptors = neighborDescriptors.filter((peerDescriptor) => {
|
|
33
33
|
const nodeId = getNodeIdFromPeerDescriptor(peerDescriptor)
|
|
34
|
-
return nodeId !== ownNodeId && !this.
|
|
34
|
+
return nodeId !== ownNodeId && !this.options.neighbors.getIds().includes(nodeId)
|
|
35
35
|
})
|
|
36
|
-
newPeerDescriptors.forEach((peerDescriptor) => this.
|
|
36
|
+
newPeerDescriptors.forEach((peerDescriptor) => this.options.nearbyNodeView.add(
|
|
37
37
|
new ContentDeliveryRpcRemote(
|
|
38
|
-
this.
|
|
38
|
+
this.options.localPeerDescriptor,
|
|
39
39
|
peerDescriptor,
|
|
40
|
-
this.
|
|
40
|
+
this.options.rpcCommunicator,
|
|
41
41
|
ContentDeliveryRpcClient
|
|
42
42
|
))
|
|
43
43
|
)
|
|
@@ -45,8 +45,8 @@ export class NeighborUpdateRpcLocal implements INeighborUpdateRpc {
|
|
|
45
45
|
|
|
46
46
|
private createResponse(removeMe: boolean): NeighborUpdate {
|
|
47
47
|
return {
|
|
48
|
-
streamPartId: this.
|
|
49
|
-
neighborDescriptors: this.
|
|
48
|
+
streamPartId: this.options.streamPartId,
|
|
49
|
+
neighborDescriptors: this.options.neighbors.getAll().map((neighbor) => neighbor.getPeerDescriptor()),
|
|
50
50
|
removeMe
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -54,20 +54,20 @@ export class NeighborUpdateRpcLocal implements INeighborUpdateRpc {
|
|
|
54
54
|
// INeighborUpdateRpc server method
|
|
55
55
|
async neighborUpdate(message: NeighborUpdate, context: ServerCallContext): Promise<NeighborUpdate> {
|
|
56
56
|
const senderPeerDescriptor = (context as DhtCallContext).incomingSourceDescriptor!
|
|
57
|
-
const
|
|
57
|
+
const remoteNodeId = getNodeIdFromPeerDescriptor(senderPeerDescriptor)
|
|
58
58
|
this.updateContacts(message.neighborDescriptors)
|
|
59
|
-
if (!this.
|
|
59
|
+
if (!this.options.neighbors.has(remoteNodeId) && !this.options.ongoingHandshakes.has(remoteNodeId)) {
|
|
60
60
|
return this.createResponse(true)
|
|
61
61
|
} else {
|
|
62
|
-
const isOverNeighborCount = this.
|
|
62
|
+
const isOverNeighborCount = this.options.neighbors.size() > this.options.neighborTargetCount
|
|
63
63
|
// Motivation: We don't know the remote's neighborTargetCount setting here. We only ask to cut connections
|
|
64
64
|
// if the remote has a "sufficient" number of neighbors, where "sufficient" means our neighborTargetCount
|
|
65
65
|
// setting.
|
|
66
|
-
&& message.neighborDescriptors.length > this.
|
|
66
|
+
&& message.neighborDescriptors.length > this.options.neighborTargetCount
|
|
67
67
|
if (!isOverNeighborCount) {
|
|
68
|
-
this.
|
|
68
|
+
this.options.neighborFinder.start()
|
|
69
69
|
} else {
|
|
70
|
-
this.
|
|
70
|
+
this.options.neighbors.remove(remoteNodeId)
|
|
71
71
|
}
|
|
72
72
|
return this.createResponse(isOverNeighborCount)
|
|
73
73
|
}
|
|
@@ -27,7 +27,7 @@ import { markAndCheckDuplicate } from '../utils'
|
|
|
27
27
|
import { ProxyConnectionRpcRemote } from './ProxyConnectionRpcRemote'
|
|
28
28
|
import { formStreamPartContentDeliveryServiceId } from '../formStreamPartDeliveryServiceId'
|
|
29
29
|
|
|
30
|
-
// TODO use
|
|
30
|
+
// TODO use options option or named constant?
|
|
31
31
|
export const retry = async <T>(task: () => Promise<T>, description: string, abortSignal: AbortSignal, delay = 10000): Promise<T> => {
|
|
32
32
|
// eslint-disable-next-line no-constant-condition
|
|
33
33
|
while (true) {
|
|
@@ -43,7 +43,7 @@ export const retry = async <T>(task: () => Promise<T>, description: string, abor
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
interface
|
|
46
|
+
interface ProxyClientOptions {
|
|
47
47
|
transport: ITransport
|
|
48
48
|
localPeerDescriptor: PeerDescriptor
|
|
49
49
|
streamPartId: StreamPartID
|
|
@@ -75,7 +75,7 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
75
75
|
|
|
76
76
|
private readonly rpcCommunicator: ListeningRpcCommunicator
|
|
77
77
|
private readonly contentDeliveryRpcLocal: ContentDeliveryRpcLocal
|
|
78
|
-
private readonly
|
|
78
|
+
private readonly options: ProxyClientOptions
|
|
79
79
|
private readonly duplicateDetectors: Map<string, DuplicateMessageDetector> = new Map()
|
|
80
80
|
private definition?: ProxyDefinition
|
|
81
81
|
private readonly connections: Map<DhtAddress, ProxyConnection> = new Map()
|
|
@@ -83,19 +83,19 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
83
83
|
private readonly neighbors: NodeList
|
|
84
84
|
private readonly abortController: AbortController
|
|
85
85
|
|
|
86
|
-
constructor(
|
|
86
|
+
constructor(options: ProxyClientOptions) {
|
|
87
87
|
super()
|
|
88
|
-
this.
|
|
89
|
-
this.rpcCommunicator = new ListeningRpcCommunicator(formStreamPartContentDeliveryServiceId(
|
|
90
|
-
// TODO use
|
|
91
|
-
this.neighbors = new NodeList(getNodeIdFromPeerDescriptor(this.
|
|
88
|
+
this.options = options
|
|
89
|
+
this.rpcCommunicator = new ListeningRpcCommunicator(formStreamPartContentDeliveryServiceId(options.streamPartId), options.transport)
|
|
90
|
+
// TODO use options option or named constant?
|
|
91
|
+
this.neighbors = new NodeList(getNodeIdFromPeerDescriptor(this.options.localPeerDescriptor), 1000)
|
|
92
92
|
this.contentDeliveryRpcLocal = new ContentDeliveryRpcLocal({
|
|
93
|
-
localPeerDescriptor: this.
|
|
94
|
-
streamPartId: this.
|
|
93
|
+
localPeerDescriptor: this.options.localPeerDescriptor,
|
|
94
|
+
streamPartId: this.options.streamPartId,
|
|
95
95
|
markAndCheckDuplicate: (msg: MessageID, prev?: MessageRef) => markAndCheckDuplicate(this.duplicateDetectors, msg, prev),
|
|
96
96
|
broadcast: (message: StreamMessage, previousNode?: DhtAddress) => this.broadcast(message, previousNode),
|
|
97
|
-
onLeaveNotice: (
|
|
98
|
-
const contact = this.neighbors.get(
|
|
97
|
+
onLeaveNotice: (remoteNodeId: DhtAddress) => {
|
|
98
|
+
const contact = this.neighbors.get(remoteNodeId)
|
|
99
99
|
if (contact) {
|
|
100
100
|
// TODO should we catch possible promise rejection?
|
|
101
101
|
setImmediate(() => this.onNodeDisconnected(contact.getPeerDescriptor()))
|
|
@@ -105,8 +105,8 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
105
105
|
markForInspection: () => {}
|
|
106
106
|
})
|
|
107
107
|
this.propagation = new Propagation({
|
|
108
|
-
// TODO use
|
|
109
|
-
minPropagationTargets:
|
|
108
|
+
// TODO use options option or named constant?
|
|
109
|
+
minPropagationTargets: options.minPropagationTargets ?? 2,
|
|
110
110
|
sendToNeighbor: async (neighborId: DhtAddress, msg: StreamMessage): Promise<void> => {
|
|
111
111
|
const remote = this.neighbors.get(neighborId)
|
|
112
112
|
if (remote) {
|
|
@@ -132,7 +132,7 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
132
132
|
userId: EthereumAddress,
|
|
133
133
|
connectionCount?: number
|
|
134
134
|
): Promise<void> {
|
|
135
|
-
logger.trace('Setting proxies', { streamPartId: this.
|
|
135
|
+
logger.trace('Setting proxies', { streamPartId: this.options.streamPartId, peerDescriptors: nodes, direction, userId, connectionCount })
|
|
136
136
|
if (connectionCount !== undefined && connectionCount > nodes.length) {
|
|
137
137
|
throw new Error('Cannot set connectionCount above the size of the configured array of nodes')
|
|
138
138
|
}
|
|
@@ -180,17 +180,17 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
180
180
|
private async attemptConnection(nodeId: DhtAddress, direction: ProxyDirection, userId: EthereumAddress): Promise<void> {
|
|
181
181
|
const peerDescriptor = this.definition!.nodes.get(nodeId)!
|
|
182
182
|
const rpcRemote = new ProxyConnectionRpcRemote(
|
|
183
|
-
this.
|
|
183
|
+
this.options.localPeerDescriptor,
|
|
184
184
|
peerDescriptor,
|
|
185
185
|
this.rpcCommunicator,
|
|
186
186
|
ProxyConnectionRpcClient
|
|
187
187
|
)
|
|
188
188
|
const accepted = await rpcRemote.requestConnection(direction, userId)
|
|
189
189
|
if (accepted) {
|
|
190
|
-
this.
|
|
190
|
+
this.options.connectionLocker.lockConnection(peerDescriptor, SERVICE_ID)
|
|
191
191
|
this.connections.set(nodeId, { peerDescriptor, direction })
|
|
192
192
|
const remote = new ContentDeliveryRpcRemote(
|
|
193
|
-
this.
|
|
193
|
+
this.options.localPeerDescriptor,
|
|
194
194
|
peerDescriptor,
|
|
195
195
|
this.rpcCommunicator,
|
|
196
196
|
ContentDeliveryRpcClient
|
|
@@ -199,12 +199,12 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
199
199
|
this.propagation.onNeighborJoined(nodeId)
|
|
200
200
|
logger.info('Open proxy connection', {
|
|
201
201
|
nodeId,
|
|
202
|
-
streamPartId: this.
|
|
202
|
+
streamPartId: this.options.streamPartId
|
|
203
203
|
})
|
|
204
204
|
} else {
|
|
205
205
|
logger.warn('Unable to open proxy connection', {
|
|
206
206
|
nodeId,
|
|
207
|
-
streamPartId: this.
|
|
207
|
+
streamPartId: this.options.streamPartId
|
|
208
208
|
})
|
|
209
209
|
}
|
|
210
210
|
}
|
|
@@ -220,7 +220,7 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
220
220
|
nodeId
|
|
221
221
|
})
|
|
222
222
|
const server = this.neighbors.get(nodeId)
|
|
223
|
-
server?.leaveStreamPartNotice(this.
|
|
223
|
+
server?.leaveStreamPartNotice(this.options.streamPartId, false)
|
|
224
224
|
this.removeConnection(this.connections.get(nodeId)!.peerDescriptor)
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -229,7 +229,7 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
229
229
|
const nodeId = getNodeIdFromPeerDescriptor(peerDescriptor)
|
|
230
230
|
this.connections.delete(nodeId)
|
|
231
231
|
this.neighbors.remove(nodeId)
|
|
232
|
-
this.
|
|
232
|
+
this.options.connectionLocker.unlockConnection(peerDescriptor, SERVICE_ID)
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
broadcast(msg: StreamMessage, previousNode?: DhtAddress): void {
|
|
@@ -251,7 +251,7 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
251
251
|
private async onNodeDisconnected(peerDescriptor: PeerDescriptor): Promise<void> {
|
|
252
252
|
const nodeId = getNodeIdFromPeerDescriptor(peerDescriptor)
|
|
253
253
|
if (this.connections.has(nodeId)) {
|
|
254
|
-
this.
|
|
254
|
+
this.options.connectionLocker.unlockConnection(peerDescriptor, SERVICE_ID)
|
|
255
255
|
this.removeConnection(peerDescriptor)
|
|
256
256
|
await retry(() => this.updateConnections(), 'updating proxy connections', this.abortController.signal)
|
|
257
257
|
}
|
|
@@ -260,7 +260,7 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
260
260
|
async start(): Promise<void> {
|
|
261
261
|
this.registerDefaultServerMethods()
|
|
262
262
|
addManagedEventListener<any, any>(
|
|
263
|
-
this.
|
|
263
|
+
this.options.transport as any,
|
|
264
264
|
'disconnected',
|
|
265
265
|
// TODO should we catch possible promise rejection?
|
|
266
266
|
(peerDescriptor: PeerDescriptor) => this.onNodeDisconnected(peerDescriptor),
|
|
@@ -270,8 +270,8 @@ export class ProxyClient extends EventEmitter<Events> {
|
|
|
270
270
|
|
|
271
271
|
stop(): void {
|
|
272
272
|
this.neighbors.getAll().forEach((remote) => {
|
|
273
|
-
this.
|
|
274
|
-
remote.leaveStreamPartNotice(this.
|
|
273
|
+
this.options.connectionLocker.unlockConnection(remote.getPeerDescriptor(), SERVICE_ID)
|
|
274
|
+
remote.leaveStreamPartNotice(this.options.streamPartId, false)
|
|
275
275
|
})
|
|
276
276
|
this.neighbors.stop()
|
|
277
277
|
this.rpcCommunicator.destroy()
|
|
@@ -21,7 +21,7 @@ interface ProxyConnection {
|
|
|
21
21
|
remote: ContentDeliveryRpcRemote
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
interface
|
|
24
|
+
interface ProxyConnectionRpcLocalOptions {
|
|
25
25
|
localPeerDescriptor: PeerDescriptor
|
|
26
26
|
streamPartId: StreamPartID
|
|
27
27
|
rpcCommunicator: ListeningRpcCommunicator
|
|
@@ -33,13 +33,13 @@ export interface Events {
|
|
|
33
33
|
|
|
34
34
|
export class ProxyConnectionRpcLocal extends EventEmitter<Events> implements IProxyConnectionRpc {
|
|
35
35
|
|
|
36
|
-
private readonly
|
|
36
|
+
private readonly options: ProxyConnectionRpcLocalOptions
|
|
37
37
|
private readonly connections: Map<DhtAddress, ProxyConnection> = new Map()
|
|
38
38
|
|
|
39
|
-
constructor(
|
|
39
|
+
constructor(options: ProxyConnectionRpcLocalOptions) {
|
|
40
40
|
super()
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
41
|
+
this.options = options
|
|
42
|
+
this.options.rpcCommunicator.registerRpcMethod(ProxyConnectionRequest, ProxyConnectionResponse, 'requestConnection',
|
|
43
43
|
(msg: ProxyConnectionRequest, context) => this.requestConnection(msg, context))
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -56,7 +56,7 @@ export class ProxyConnectionRpcLocal extends EventEmitter<Events> implements IPr
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
stop(): void {
|
|
59
|
-
this.connections.forEach((connection) => connection.remote.leaveStreamPartNotice(this.
|
|
59
|
+
this.connections.forEach((connection) => connection.remote.leaveStreamPartNotice(this.options.streamPartId, false))
|
|
60
60
|
this.connections.clear()
|
|
61
61
|
this.removeAllListeners()
|
|
62
62
|
}
|
|
@@ -86,22 +86,22 @@ export class ProxyConnectionRpcLocal extends EventEmitter<Events> implements IPr
|
|
|
86
86
|
// IProxyConnectionRpc server method
|
|
87
87
|
async requestConnection(request: ProxyConnectionRequest, context: ServerCallContext): Promise<ProxyConnectionResponse> {
|
|
88
88
|
const senderPeerDescriptor = (context as DhtCallContext).incomingSourceDescriptor!
|
|
89
|
-
const
|
|
90
|
-
this.connections.set(
|
|
89
|
+
const remoteNodeId = getNodeIdFromPeerDescriptor(senderPeerDescriptor)
|
|
90
|
+
this.connections.set(remoteNodeId, {
|
|
91
91
|
direction: request.direction,
|
|
92
92
|
userId: toEthereumAddress(binaryToHex(request.userId, true)),
|
|
93
93
|
remote: new ContentDeliveryRpcRemote(
|
|
94
|
-
this.
|
|
94
|
+
this.options.localPeerDescriptor,
|
|
95
95
|
senderPeerDescriptor,
|
|
96
|
-
this.
|
|
96
|
+
this.options.rpcCommunicator,
|
|
97
97
|
ContentDeliveryRpcClient
|
|
98
98
|
)
|
|
99
99
|
})
|
|
100
100
|
const response: ProxyConnectionResponse = {
|
|
101
101
|
accepted: true
|
|
102
102
|
}
|
|
103
|
-
logger.trace(`Accepted connection request from ${
|
|
104
|
-
this.emit('newConnection',
|
|
103
|
+
logger.trace(`Accepted connection request from ${remoteNodeId} to ${this.options.streamPartId}`)
|
|
104
|
+
this.emit('newConnection', remoteNodeId)
|
|
105
105
|
return response
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -13,7 +13,7 @@ import { PeerDescriptor } from '../../proto/packages/dht/protos/DhtRpc'
|
|
|
13
13
|
import { Empty } from '../../proto/google/protobuf/empty'
|
|
14
14
|
import { StreamPartID } from '@streamr/protocol'
|
|
15
15
|
|
|
16
|
-
interface
|
|
16
|
+
interface TemporaryConnectionRpcLocalOptions {
|
|
17
17
|
rpcCommunicator: ListeningRpcCommunicator
|
|
18
18
|
localPeerDescriptor: PeerDescriptor
|
|
19
19
|
streamPartId: StreamPartID
|
|
@@ -24,14 +24,14 @@ const LOCK_ID_BASE = 'system/content-delivery/temporary-connection/'
|
|
|
24
24
|
|
|
25
25
|
export class TemporaryConnectionRpcLocal implements ITemporaryConnectionRpc {
|
|
26
26
|
|
|
27
|
-
private readonly
|
|
27
|
+
private readonly options: TemporaryConnectionRpcLocalOptions
|
|
28
28
|
private readonly temporaryNodes: NodeList
|
|
29
29
|
private readonly lockId: string
|
|
30
|
-
constructor(
|
|
31
|
-
this.
|
|
32
|
-
// TODO use
|
|
33
|
-
this.temporaryNodes = new NodeList(getNodeIdFromPeerDescriptor(
|
|
34
|
-
this.lockId = LOCK_ID_BASE +
|
|
30
|
+
constructor(options: TemporaryConnectionRpcLocalOptions) {
|
|
31
|
+
this.options = options
|
|
32
|
+
// TODO use options option or named constant?
|
|
33
|
+
this.temporaryNodes = new NodeList(getNodeIdFromPeerDescriptor(options.localPeerDescriptor), 10)
|
|
34
|
+
this.lockId = LOCK_ID_BASE + options.streamPartId
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
getNodes(): NodeList {
|
|
@@ -44,7 +44,7 @@ export class TemporaryConnectionRpcLocal implements ITemporaryConnectionRpc {
|
|
|
44
44
|
|
|
45
45
|
removeNode(nodeId: DhtAddress): void {
|
|
46
46
|
this.temporaryNodes.remove(nodeId)
|
|
47
|
-
this.
|
|
47
|
+
this.options.connectionLocker.weakUnlockConnection(nodeId, this.lockId)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
async openConnection(
|
|
@@ -53,21 +53,21 @@ export class TemporaryConnectionRpcLocal implements ITemporaryConnectionRpc {
|
|
|
53
53
|
): Promise<TemporaryConnectionResponse> {
|
|
54
54
|
const sender = (context as DhtCallContext).incomingSourceDescriptor!
|
|
55
55
|
const remote = new ContentDeliveryRpcRemote(
|
|
56
|
-
this.
|
|
56
|
+
this.options.localPeerDescriptor,
|
|
57
57
|
sender,
|
|
58
|
-
this.
|
|
58
|
+
this.options.rpcCommunicator,
|
|
59
59
|
ContentDeliveryRpcClient
|
|
60
60
|
)
|
|
61
61
|
this.temporaryNodes.add(remote)
|
|
62
|
-
this.
|
|
62
|
+
this.options.connectionLocker.weakLockConnection(getNodeIdFromPeerDescriptor(sender), this.lockId)
|
|
63
63
|
return {
|
|
64
64
|
accepted: true
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
async closeConnection(_request: CloseTemporaryConnection, context: ServerCallContext): Promise<Empty> {
|
|
69
|
-
const
|
|
70
|
-
this.removeNode(
|
|
69
|
+
const remoteNodeId = getNodeIdFromPeerDescriptor((context as DhtCallContext).incomingSourceDescriptor!)
|
|
70
|
+
this.removeNode(remoteNodeId)
|
|
71
71
|
return {}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "google/protobuf/any.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "google/protobuf/empty.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { ExternalApiRpc } from "./DhtRpc";
|
|
@@ -16,7 +16,7 @@ import type { IceCandidate } from "./DhtRpc";
|
|
|
16
16
|
import type { RtcAnswer } from "./DhtRpc";
|
|
17
17
|
import type { RtcOffer } from "./DhtRpc";
|
|
18
18
|
import type { WebrtcConnectionRequest } from "./DhtRpc";
|
|
19
|
-
import {
|
|
19
|
+
import { WebsocketClientConnectorRpc } from "./DhtRpc";
|
|
20
20
|
import type { WebsocketConnectionRequest } from "./DhtRpc";
|
|
21
21
|
import { RecursiveOperationSessionRpc } from "./DhtRpc";
|
|
22
22
|
import type { RecursiveOperationResponse } from "./DhtRpc";
|
|
@@ -236,21 +236,21 @@ export class RecursiveOperationSessionRpcClient implements IRecursiveOperationSe
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
|
-
* @generated from protobuf service dht.
|
|
239
|
+
* @generated from protobuf service dht.WebsocketClientConnectorRpc
|
|
240
240
|
*/
|
|
241
|
-
export interface
|
|
241
|
+
export interface IWebsocketClientConnectorRpcClient {
|
|
242
242
|
/**
|
|
243
243
|
* @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
|
|
244
244
|
*/
|
|
245
245
|
requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty>;
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
|
-
* @generated from protobuf service dht.
|
|
248
|
+
* @generated from protobuf service dht.WebsocketClientConnectorRpc
|
|
249
249
|
*/
|
|
250
|
-
export class
|
|
251
|
-
typeName =
|
|
252
|
-
methods =
|
|
253
|
-
options =
|
|
250
|
+
export class WebsocketClientConnectorRpcClient implements IWebsocketClientConnectorRpcClient, ServiceInfo {
|
|
251
|
+
typeName = WebsocketClientConnectorRpc.typeName;
|
|
252
|
+
methods = WebsocketClientConnectorRpc.methods;
|
|
253
|
+
options = WebsocketClientConnectorRpc.options;
|
|
254
254
|
constructor(private readonly _transport: RpcTransport) {
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { ExternalStoreDataResponse } from "./DhtRpc";
|
|
@@ -99,9 +99,9 @@ export interface IRecursiveOperationSessionRpc<T = ServerCallContext> {
|
|
|
99
99
|
sendResponse(request: RecursiveOperationResponse, context: T): Promise<Empty>;
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* @generated from protobuf service dht.
|
|
102
|
+
* @generated from protobuf service dht.WebsocketClientConnectorRpc
|
|
103
103
|
*/
|
|
104
|
-
export interface
|
|
104
|
+
export interface IWebsocketClientConnectorRpc<T = ServerCallContext> {
|
|
105
105
|
/**
|
|
106
106
|
* @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
|
|
107
107
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { Empty } from "../../../google/protobuf/empty";
|
|
@@ -123,7 +123,7 @@ export interface ClosestPeersRequest {
|
|
|
123
123
|
requestId: string;
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
|
-
* TODO rename to
|
|
126
|
+
* TODO rename to ClosestNeighborsResponse
|
|
127
127
|
*
|
|
128
128
|
* @generated from protobuf message dht.ClosestPeersResponse
|
|
129
129
|
*/
|
|
@@ -379,6 +379,14 @@ export interface ConnectivityResponse {
|
|
|
379
379
|
* @generated from protobuf field: string version = 5;
|
|
380
380
|
*/
|
|
381
381
|
version: string;
|
|
382
|
+
/**
|
|
383
|
+
* @generated from protobuf field: optional double latitude = 6;
|
|
384
|
+
*/
|
|
385
|
+
latitude?: number;
|
|
386
|
+
/**
|
|
387
|
+
* @generated from protobuf field: optional double longitude = 7;
|
|
388
|
+
*/
|
|
389
|
+
longitude?: number;
|
|
382
390
|
}
|
|
383
391
|
/**
|
|
384
392
|
* @generated from protobuf message dht.HandshakeRequest
|
|
@@ -978,7 +986,9 @@ class ConnectivityResponse$Type extends MessageType<ConnectivityResponse> {
|
|
|
978
986
|
{ no: 2, name: "natType", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
979
987
|
{ no: 3, name: "websocket", kind: "message", T: () => ConnectivityMethod },
|
|
980
988
|
{ no: 4, name: "ipAddress", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
981
|
-
{ no: 5, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
989
|
+
{ no: 5, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
990
|
+
{ no: 6, name: "latitude", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ },
|
|
991
|
+
{ no: 7, name: "longitude", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }
|
|
982
992
|
]);
|
|
983
993
|
}
|
|
984
994
|
}
|
|
@@ -1203,9 +1213,9 @@ export const RecursiveOperationSessionRpc = new ServiceType("dht.RecursiveOperat
|
|
|
1203
1213
|
{ name: "sendResponse", options: {}, I: RecursiveOperationResponse, O: Empty }
|
|
1204
1214
|
]);
|
|
1205
1215
|
/**
|
|
1206
|
-
* @generated ServiceType for protobuf service dht.
|
|
1216
|
+
* @generated ServiceType for protobuf service dht.WebsocketClientConnectorRpc
|
|
1207
1217
|
*/
|
|
1208
|
-
export const
|
|
1218
|
+
export const WebsocketClientConnectorRpc = new ServiceType("dht.WebsocketClientConnectorRpc", [
|
|
1209
1219
|
{ name: "requestConnection", options: {}, I: WebsocketConnectionRequest, O: Empty }
|
|
1210
1220
|
]);
|
|
1211
1221
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/proto-rpc/protos/ProtoRpc.proto" (package "protorpc", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/trackerless-network/protos/NetworkRpc.proto" (syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { NodeInfoRpc } from "./NetworkRpc";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/trackerless-network/protos/NetworkRpc.proto" (syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { NodeInfoResponse } from "./NetworkRpc";
|