@streamr/trackerless-network 100.0.0-testnet-one.4 → 100.0.0-testnet-two.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 +7 -7
- package/dist/src/NetworkStack.d.ts +1 -5
- package/dist/src/NetworkStack.js +1 -3
- package/dist/src/NetworkStack.js.map +1 -1
- package/dist/src/logic/DeliveryRpcLocal.d.ts +1 -1
- package/dist/src/logic/DeliveryRpcLocal.js +3 -3
- package/dist/src/logic/DeliveryRpcLocal.js.map +1 -1
- package/dist/src/logic/DeliveryRpcRemote.d.ts +3 -3
- package/dist/src/logic/DeliveryRpcRemote.js +3 -2
- package/dist/src/logic/DeliveryRpcRemote.js.map +1 -1
- package/dist/src/logic/EntryPointDiscovery.d.ts +3 -0
- package/dist/src/logic/EntryPointDiscovery.js +11 -5
- package/dist/src/logic/EntryPointDiscovery.js.map +1 -1
- package/dist/src/logic/RandomGraphNode.d.ts +10 -8
- package/dist/src/logic/RandomGraphNode.js +23 -17
- package/dist/src/logic/RandomGraphNode.js.map +1 -1
- package/dist/src/logic/StreamrNode.js +13 -4
- package/dist/src/logic/StreamrNode.js.map +1 -1
- package/dist/src/logic/formStreamPartDeliveryServiceId.d.ts +2 -1
- package/dist/src/logic/formStreamPartDeliveryServiceId.js.map +1 -1
- package/dist/src/logic/inspect/Inspector.d.ts +5 -11
- package/dist/src/logic/inspect/Inspector.js +2 -3
- package/dist/src/logic/inspect/Inspector.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/HandshakeRpcLocal.d.ts +3 -3
- package/dist/src/logic/neighbor-discovery/HandshakeRpcLocal.js +39 -13
- package/dist/src/logic/neighbor-discovery/HandshakeRpcLocal.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/HandshakeRpcRemote.d.ts +5 -3
- package/dist/src/logic/neighbor-discovery/HandshakeRpcRemote.js +18 -8
- package/dist/src/logic/neighbor-discovery/HandshakeRpcRemote.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/Handshaker.d.ts +1 -6
- package/dist/src/logic/neighbor-discovery/Handshaker.js +6 -6
- package/dist/src/logic/neighbor-discovery/Handshaker.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborFinder.d.ts +1 -6
- package/dist/src/logic/neighbor-discovery/NeighborFinder.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborUpdateManager.d.ts +3 -8
- package/dist/src/logic/neighbor-discovery/NeighborUpdateManager.js +1 -3
- package/dist/src/logic/neighbor-discovery/NeighborUpdateManager.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.d.ts +2 -2
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.js +1 -2
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.js.map +1 -1
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcRemote.d.ts +2 -2
- package/dist/src/logic/neighbor-discovery/NeighborUpdateRpcRemote.js.map +1 -1
- package/dist/src/logic/proxy/ProxyClient.d.ts +4 -1
- package/dist/src/logic/proxy/ProxyClient.js +7 -6
- package/dist/src/logic/proxy/ProxyClient.js.map +1 -1
- package/dist/src/logic/proxy/ProxyConnectionRpcLocal.js +2 -3
- package/dist/src/logic/proxy/ProxyConnectionRpcLocal.js.map +1 -1
- package/dist/src/logic/proxy/ProxyConnectionRpcRemote.d.ts +2 -2
- package/dist/src/logic/proxy/ProxyConnectionRpcRemote.js.map +1 -1
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcLocal.js +2 -2
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcLocal.js.map +1 -1
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcRemote.d.ts +2 -2
- package/dist/src/logic/temporary-connection/TemporaryConnectionRpcRemote.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.d.ts +21 -22
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js +18 -18
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.d.ts +49 -65
- package/dist/src/proto/packages/dht/protos/DhtRpc.js +43 -58
- package/dist/src/proto/packages/dht/protos/DhtRpc.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.server.d.ts +11 -12
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.client.d.ts +6 -5
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.client.js +2 -2
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.client.js.map +1 -1
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.d.ts +26 -10
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.js +21 -9
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.js.map +1 -1
- package/dist/src/proto/packages/trackerless-network/protos/NetworkRpc.server.d.ts +4 -3
- package/dist/test/benchmark/first-message.js +4 -6
- package/dist/test/benchmark/first-message.js.map +1 -1
- package/dist/test/utils/utils.d.ts +1 -1
- package/dist/test/utils/utils.js +8 -7
- package/dist/test/utils/utils.js.map +1 -1
- package/package.json +7 -7
- package/protos/NetworkRpc.proto +8 -4
- package/src/NetworkStack.ts +1 -7
- package/src/logic/DeliveryRpcLocal.ts +4 -4
- package/src/logic/DeliveryRpcRemote.ts +5 -4
- package/src/logic/EntryPointDiscovery.ts +10 -6
- package/src/logic/RandomGraphNode.ts +38 -25
- package/src/logic/StreamrNode.ts +22 -5
- package/src/logic/formStreamPartDeliveryServiceId.ts +2 -1
- package/src/logic/inspect/Inspector.ts +15 -16
- package/src/logic/neighbor-discovery/HandshakeRpcLocal.ts +46 -15
- package/src/logic/neighbor-discovery/HandshakeRpcRemote.ts +21 -10
- package/src/logic/neighbor-discovery/Handshaker.ts +15 -24
- package/src/logic/neighbor-discovery/NeighborFinder.ts +1 -7
- package/src/logic/neighbor-discovery/NeighborUpdateManager.ts +10 -12
- package/src/logic/neighbor-discovery/NeighborUpdateRpcLocal.ts +4 -4
- package/src/logic/neighbor-discovery/NeighborUpdateRpcRemote.ts +2 -2
- package/src/logic/proxy/ProxyClient.ts +19 -7
- package/src/logic/proxy/ProxyConnectionRpcLocal.ts +3 -3
- package/src/logic/proxy/ProxyConnectionRpcRemote.ts +3 -3
- package/src/logic/temporary-connection/TemporaryConnectionRpcLocal.ts +3 -2
- package/src/logic/temporary-connection/TemporaryConnectionRpcRemote.ts +2 -2
- package/src/proto/packages/dht/protos/DhtRpc.client.ts +31 -32
- package/src/proto/packages/dht/protos/DhtRpc.server.ts +11 -12
- package/src/proto/packages/dht/protos/DhtRpc.ts +67 -90
- package/src/proto/packages/trackerless-network/protos/NetworkRpc.client.ts +7 -6
- package/src/proto/packages/trackerless-network/protos/NetworkRpc.server.ts +4 -3
- package/src/proto/packages/trackerless-network/protos/NetworkRpc.ts +36 -15
- package/test/benchmark/first-message.ts +8 -6
- package/test/end-to-end/random-graph-with-real-connections.test.ts +10 -5
- package/test/end-to-end/webrtc-full-node-network.test.ts +1 -1
- package/test/end-to-end/websocket-full-node-network.test.ts +2 -2
- package/test/integration/DeliveryRpcRemote.test.ts +3 -3
- package/test/integration/HandshakeRpcRemote.test.ts +2 -4
- package/test/integration/Handshakes.test.ts +8 -7
- package/test/integration/Inspect.test.ts +0 -2
- package/test/integration/NeighborUpdateRpcRemote.test.ts +2 -2
- package/test/integration/NetworkNode.test.ts +0 -2
- package/test/integration/NetworkRpc.test.ts +0 -3
- package/test/integration/RandomGraphNode-Layer1Node-Latencies.test.ts +4 -4
- package/test/integration/RandomGraphNode-Layer1Node.test.ts +4 -5
- package/test/integration/stream-without-default-entrypoints.test.ts +4 -7
- package/test/integration/streamEntryPointReplacing.test.ts +94 -0
- package/test/unit/DeliveryRpcLocal.test.ts +2 -1
- package/test/unit/EntrypointDiscovery.test.ts +5 -2
- package/test/unit/HandshakeRpcLocal.test.ts +47 -9
- package/test/unit/NodeList.test.ts +10 -12
- package/test/unit/ProxyConnectionRpcRemote.test.ts +18 -10
- package/test/unit/RandomGraphNode.test.ts +6 -4
- package/test/utils/mock/MockHandshaker.ts +3 -2
- package/test/utils/mock/MockNeighborFinder.ts +3 -2
- package/test/utils/mock/MockNeighborUpdateManager.ts +3 -2
- package/test/utils/utils.ts +16 -8
|
@@ -22,9 +22,9 @@ export interface StoreDataRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
data?: Any;
|
|
24
24
|
/**
|
|
25
|
-
* @generated from protobuf field:
|
|
25
|
+
* @generated from protobuf field: bytes creator = 3;
|
|
26
26
|
*/
|
|
27
|
-
creator
|
|
27
|
+
creator: Uint8Array;
|
|
28
28
|
/**
|
|
29
29
|
* @generated from protobuf field: google.protobuf.Timestamp createdAt = 4;
|
|
30
30
|
*/
|
|
@@ -38,10 +38,6 @@ export interface StoreDataRequest {
|
|
|
38
38
|
* @generated from protobuf message dht.StoreDataResponse
|
|
39
39
|
*/
|
|
40
40
|
export interface StoreDataResponse {
|
|
41
|
-
/**
|
|
42
|
-
* @generated from protobuf field: string error = 1;
|
|
43
|
-
*/
|
|
44
|
-
error: string;
|
|
45
41
|
}
|
|
46
42
|
/**
|
|
47
43
|
* @generated from protobuf message dht.ExternalStoreDataRequest
|
|
@@ -87,9 +83,9 @@ export interface DataEntry {
|
|
|
87
83
|
*/
|
|
88
84
|
data?: Any;
|
|
89
85
|
/**
|
|
90
|
-
* @generated from protobuf field:
|
|
86
|
+
* @generated from protobuf field: bytes creator = 3;
|
|
91
87
|
*/
|
|
92
|
-
creator
|
|
88
|
+
creator: Uint8Array;
|
|
93
89
|
/**
|
|
94
90
|
* @generated from protobuf field: google.protobuf.Timestamp createdAt = 4;
|
|
95
91
|
*/
|
|
@@ -138,22 +134,22 @@ export interface ClosestPeersResponse {
|
|
|
138
134
|
requestId: string;
|
|
139
135
|
}
|
|
140
136
|
/**
|
|
141
|
-
* @generated from protobuf message dht.
|
|
137
|
+
* @generated from protobuf message dht.RecursiveOperationRequest
|
|
142
138
|
*/
|
|
143
|
-
export interface
|
|
139
|
+
export interface RecursiveOperationRequest {
|
|
144
140
|
/**
|
|
145
141
|
* @generated from protobuf field: string sessionId = 1;
|
|
146
142
|
*/
|
|
147
143
|
sessionId: string;
|
|
148
144
|
/**
|
|
149
|
-
* @generated from protobuf field: dht.
|
|
145
|
+
* @generated from protobuf field: dht.RecursiveOperation operation = 2;
|
|
150
146
|
*/
|
|
151
|
-
|
|
147
|
+
operation: RecursiveOperation;
|
|
152
148
|
}
|
|
153
149
|
/**
|
|
154
|
-
* @generated from protobuf message dht.
|
|
150
|
+
* @generated from protobuf message dht.RecursiveOperationResponse
|
|
155
151
|
*/
|
|
156
|
-
export interface
|
|
152
|
+
export interface RecursiveOperationResponse {
|
|
157
153
|
/**
|
|
158
154
|
* @generated from protobuf field: repeated dht.PeerDescriptor closestConnectedPeers = 1;
|
|
159
155
|
*/
|
|
@@ -193,10 +189,6 @@ export interface PingResponse {
|
|
|
193
189
|
* @generated from protobuf message dht.LeaveNotice
|
|
194
190
|
*/
|
|
195
191
|
export interface LeaveNotice {
|
|
196
|
-
/**
|
|
197
|
-
* @generated from protobuf field: string serviceId = 1;
|
|
198
|
-
*/
|
|
199
|
-
serviceId: string;
|
|
200
192
|
}
|
|
201
193
|
/**
|
|
202
194
|
* @generated from protobuf message dht.PeerDescriptor
|
|
@@ -249,17 +241,17 @@ export interface ConnectivityMethod {
|
|
|
249
241
|
*/
|
|
250
242
|
export interface RouteMessageWrapper {
|
|
251
243
|
/**
|
|
252
|
-
* @generated from protobuf field:
|
|
244
|
+
* @generated from protobuf field: string requestId = 1;
|
|
253
245
|
*/
|
|
254
|
-
|
|
246
|
+
requestId: string;
|
|
255
247
|
/**
|
|
256
|
-
* @generated from protobuf field:
|
|
248
|
+
* @generated from protobuf field: dht.PeerDescriptor sourcePeer = 2;
|
|
257
249
|
*/
|
|
258
|
-
|
|
250
|
+
sourcePeer?: PeerDescriptor;
|
|
259
251
|
/**
|
|
260
|
-
* @generated from protobuf field:
|
|
252
|
+
* @generated from protobuf field: bytes target = 3;
|
|
261
253
|
*/
|
|
262
|
-
|
|
254
|
+
target: Uint8Array;
|
|
263
255
|
/**
|
|
264
256
|
* @generated from protobuf field: dht.Message message = 4;
|
|
265
257
|
*/
|
|
@@ -338,6 +330,10 @@ export interface HandshakeRequest {
|
|
|
338
330
|
* @generated from protobuf field: optional dht.PeerDescriptor targetPeerDescriptor = 2;
|
|
339
331
|
*/
|
|
340
332
|
targetPeerDescriptor?: PeerDescriptor;
|
|
333
|
+
/**
|
|
334
|
+
* @generated from protobuf field: string version = 3;
|
|
335
|
+
*/
|
|
336
|
+
version: string;
|
|
341
337
|
}
|
|
342
338
|
/**
|
|
343
339
|
* @generated from protobuf message dht.HandshakeResponse
|
|
@@ -351,6 +347,10 @@ export interface HandshakeResponse {
|
|
|
351
347
|
* @generated from protobuf field: optional dht.HandshakeError error = 2;
|
|
352
348
|
*/
|
|
353
349
|
error?: HandshakeError;
|
|
350
|
+
/**
|
|
351
|
+
* @generated from protobuf field: string version = 3;
|
|
352
|
+
*/
|
|
353
|
+
version: string;
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
356
|
* @generated from protobuf message dht.Message
|
|
@@ -410,11 +410,11 @@ export interface Message {
|
|
|
410
410
|
*/
|
|
411
411
|
rpcMessage: RpcMessage;
|
|
412
412
|
} | {
|
|
413
|
-
oneofKind: "
|
|
413
|
+
oneofKind: "recursiveOperationRequest";
|
|
414
414
|
/**
|
|
415
|
-
* @generated from protobuf field: dht.
|
|
415
|
+
* @generated from protobuf field: dht.RecursiveOperationRequest recursiveOperationRequest = 11;
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
recursiveOperationRequest: RecursiveOperationRequest;
|
|
418
418
|
} | {
|
|
419
419
|
oneofKind: undefined;
|
|
420
420
|
};
|
|
@@ -428,15 +428,6 @@ export interface Message {
|
|
|
428
428
|
*/
|
|
429
429
|
export interface WebsocketConnectionRequest {
|
|
430
430
|
}
|
|
431
|
-
/**
|
|
432
|
-
* @generated from protobuf message dht.WebsocketConnectionResponse
|
|
433
|
-
*/
|
|
434
|
-
export interface WebsocketConnectionResponse {
|
|
435
|
-
/**
|
|
436
|
-
* @generated from protobuf field: bool accepted = 1;
|
|
437
|
-
*/
|
|
438
|
-
accepted: boolean;
|
|
439
|
-
}
|
|
440
431
|
/**
|
|
441
432
|
* WebRTC
|
|
442
433
|
*
|
|
@@ -547,13 +538,13 @@ export interface ExternalFindDataResponse {
|
|
|
547
538
|
entries: DataEntry[];
|
|
548
539
|
}
|
|
549
540
|
/**
|
|
550
|
-
* @generated from protobuf enum dht.
|
|
541
|
+
* @generated from protobuf enum dht.RecursiveOperation
|
|
551
542
|
*/
|
|
552
|
-
export enum
|
|
543
|
+
export enum RecursiveOperation {
|
|
553
544
|
/**
|
|
554
|
-
* @generated from protobuf enum value:
|
|
545
|
+
* @generated from protobuf enum value: FIND_NODE = 0;
|
|
555
546
|
*/
|
|
556
|
-
|
|
547
|
+
FIND_NODE = 0,
|
|
557
548
|
/**
|
|
558
549
|
* @generated from protobuf enum value: FETCH_DATA = 1;
|
|
559
550
|
*/
|
|
@@ -574,11 +565,7 @@ export enum NodeType {
|
|
|
574
565
|
/**
|
|
575
566
|
* @generated from protobuf enum value: BROWSER = 1;
|
|
576
567
|
*/
|
|
577
|
-
BROWSER = 1
|
|
578
|
-
/**
|
|
579
|
-
* @generated from protobuf enum value: VIRTUAL = 3;
|
|
580
|
-
*/
|
|
581
|
-
VIRTUAL = 3
|
|
568
|
+
BROWSER = 1
|
|
582
569
|
}
|
|
583
570
|
/**
|
|
584
571
|
* @generated from protobuf enum dht.RpcResponseError
|
|
@@ -632,7 +619,11 @@ export enum HandshakeError {
|
|
|
632
619
|
/**
|
|
633
620
|
* @generated from protobuf enum value: INVALID_TARGET_PEER_DESCRIPTOR = 1;
|
|
634
621
|
*/
|
|
635
|
-
INVALID_TARGET_PEER_DESCRIPTOR = 1
|
|
622
|
+
INVALID_TARGET_PEER_DESCRIPTOR = 1,
|
|
623
|
+
/**
|
|
624
|
+
* @generated from protobuf enum value: UNSUPPORTED_VERSION = 2;
|
|
625
|
+
*/
|
|
626
|
+
UNSUPPORTED_VERSION = 2
|
|
636
627
|
}
|
|
637
628
|
// Wraps all messages
|
|
638
629
|
|
|
@@ -661,9 +652,9 @@ export enum MessageType {
|
|
|
661
652
|
*/
|
|
662
653
|
HANDSHAKE_RESPONSE = 4,
|
|
663
654
|
/**
|
|
664
|
-
* @generated from protobuf enum value:
|
|
655
|
+
* @generated from protobuf enum value: RECURSIVE_OPERATION_REQUEST = 5;
|
|
665
656
|
*/
|
|
666
|
-
|
|
657
|
+
RECURSIVE_OPERATION_REQUEST = 5
|
|
667
658
|
}
|
|
668
659
|
/**
|
|
669
660
|
* @generated from protobuf enum dht.DisconnectMode
|
|
@@ -684,7 +675,7 @@ class StoreDataRequest$Type extends MessageType$<StoreDataRequest> {
|
|
|
684
675
|
super("dht.StoreDataRequest", [
|
|
685
676
|
{ no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
686
677
|
{ no: 2, name: "data", kind: "message", T: () => Any },
|
|
687
|
-
{ no: 3, name: "creator", kind: "
|
|
678
|
+
{ no: 3, name: "creator", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
688
679
|
{ no: 4, name: "createdAt", kind: "message", T: () => Timestamp },
|
|
689
680
|
{ no: 5, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
690
681
|
]);
|
|
@@ -697,9 +688,7 @@ export const StoreDataRequest = new StoreDataRequest$Type();
|
|
|
697
688
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
698
689
|
class StoreDataResponse$Type extends MessageType$<StoreDataResponse> {
|
|
699
690
|
constructor() {
|
|
700
|
-
super("dht.StoreDataResponse", [
|
|
701
|
-
{ no: 1, name: "error", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
702
|
-
]);
|
|
691
|
+
super("dht.StoreDataResponse", []);
|
|
703
692
|
}
|
|
704
693
|
}
|
|
705
694
|
/**
|
|
@@ -749,7 +738,7 @@ class DataEntry$Type extends MessageType$<DataEntry> {
|
|
|
749
738
|
super("dht.DataEntry", [
|
|
750
739
|
{ no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
751
740
|
{ no: 2, name: "data", kind: "message", T: () => Any },
|
|
752
|
-
{ no: 3, name: "creator", kind: "
|
|
741
|
+
{ no: 3, name: "creator", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
753
742
|
{ no: 4, name: "createdAt", kind: "message", T: () => Timestamp },
|
|
754
743
|
{ no: 5, name: "storedAt", kind: "message", T: () => Timestamp },
|
|
755
744
|
{ no: 6, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
@@ -789,22 +778,22 @@ class ClosestPeersResponse$Type extends MessageType$<ClosestPeersResponse> {
|
|
|
789
778
|
*/
|
|
790
779
|
export const ClosestPeersResponse = new ClosestPeersResponse$Type();
|
|
791
780
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
792
|
-
class
|
|
781
|
+
class RecursiveOperationRequest$Type extends MessageType$<RecursiveOperationRequest> {
|
|
793
782
|
constructor() {
|
|
794
|
-
super("dht.
|
|
783
|
+
super("dht.RecursiveOperationRequest", [
|
|
795
784
|
{ no: 1, name: "sessionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
796
|
-
{ no: 2, name: "
|
|
785
|
+
{ no: 2, name: "operation", kind: "enum", T: () => ["dht.RecursiveOperation", RecursiveOperation] }
|
|
797
786
|
]);
|
|
798
787
|
}
|
|
799
788
|
}
|
|
800
789
|
/**
|
|
801
|
-
* @generated MessageType for protobuf message dht.
|
|
790
|
+
* @generated MessageType for protobuf message dht.RecursiveOperationRequest
|
|
802
791
|
*/
|
|
803
|
-
export const
|
|
792
|
+
export const RecursiveOperationRequest = new RecursiveOperationRequest$Type();
|
|
804
793
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
805
|
-
class
|
|
794
|
+
class RecursiveOperationResponse$Type extends MessageType$<RecursiveOperationResponse> {
|
|
806
795
|
constructor() {
|
|
807
|
-
super("dht.
|
|
796
|
+
super("dht.RecursiveOperationResponse", [
|
|
808
797
|
{ no: 1, name: "closestConnectedPeers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
809
798
|
{ no: 2, name: "dataEntries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DataEntry },
|
|
810
799
|
{ no: 3, name: "noCloserNodesFound", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
@@ -813,9 +802,9 @@ class FindResponse$Type extends MessageType$<FindResponse> {
|
|
|
813
802
|
}
|
|
814
803
|
}
|
|
815
804
|
/**
|
|
816
|
-
* @generated MessageType for protobuf message dht.
|
|
805
|
+
* @generated MessageType for protobuf message dht.RecursiveOperationResponse
|
|
817
806
|
*/
|
|
818
|
-
export const
|
|
807
|
+
export const RecursiveOperationResponse = new RecursiveOperationResponse$Type();
|
|
819
808
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
820
809
|
class PingRequest$Type extends MessageType$<PingRequest> {
|
|
821
810
|
constructor() {
|
|
@@ -843,9 +832,7 @@ export const PingResponse = new PingResponse$Type();
|
|
|
843
832
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
844
833
|
class LeaveNotice$Type extends MessageType$<LeaveNotice> {
|
|
845
834
|
constructor() {
|
|
846
|
-
super("dht.LeaveNotice", [
|
|
847
|
-
{ no: 1, name: "serviceId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
848
|
-
]);
|
|
835
|
+
super("dht.LeaveNotice", []);
|
|
849
836
|
}
|
|
850
837
|
}
|
|
851
838
|
/**
|
|
@@ -887,9 +874,9 @@ export const ConnectivityMethod = new ConnectivityMethod$Type();
|
|
|
887
874
|
class RouteMessageWrapper$Type extends MessageType$<RouteMessageWrapper> {
|
|
888
875
|
constructor() {
|
|
889
876
|
super("dht.RouteMessageWrapper", [
|
|
890
|
-
{ no: 1, name: "
|
|
891
|
-
{ no: 2, name: "
|
|
892
|
-
{ no: 3, name: "
|
|
877
|
+
{ no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
878
|
+
{ no: 2, name: "sourcePeer", kind: "message", T: () => PeerDescriptor },
|
|
879
|
+
{ no: 3, name: "target", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
893
880
|
{ no: 4, name: "message", kind: "message", T: () => Message },
|
|
894
881
|
{ no: 5, name: "reachableThrough", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
895
882
|
{ no: 6, name: "routingPath", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor }
|
|
@@ -947,7 +934,8 @@ class HandshakeRequest$Type extends MessageType$<HandshakeRequest> {
|
|
|
947
934
|
constructor() {
|
|
948
935
|
super("dht.HandshakeRequest", [
|
|
949
936
|
{ no: 1, name: "sourcePeerDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
950
|
-
{ no: 2, name: "targetPeerDescriptor", kind: "message", T: () => PeerDescriptor }
|
|
937
|
+
{ no: 2, name: "targetPeerDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
938
|
+
{ no: 3, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
951
939
|
]);
|
|
952
940
|
}
|
|
953
941
|
}
|
|
@@ -960,7 +948,8 @@ class HandshakeResponse$Type extends MessageType$<HandshakeResponse> {
|
|
|
960
948
|
constructor() {
|
|
961
949
|
super("dht.HandshakeResponse", [
|
|
962
950
|
{ no: 1, name: "sourcePeerDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
963
|
-
{ no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.HandshakeError", HandshakeError] }
|
|
951
|
+
{ no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.HandshakeError", HandshakeError] },
|
|
952
|
+
{ no: 3, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
964
953
|
]);
|
|
965
954
|
}
|
|
966
955
|
}
|
|
@@ -982,7 +971,7 @@ class Message$Type extends MessageType$<Message> {
|
|
|
982
971
|
{ no: 8, name: "handshakeRequest", kind: "message", oneof: "body", T: () => HandshakeRequest },
|
|
983
972
|
{ no: 9, name: "handshakeResponse", kind: "message", oneof: "body", T: () => HandshakeResponse },
|
|
984
973
|
{ no: 10, name: "rpcMessage", kind: "message", oneof: "body", T: () => RpcMessage },
|
|
985
|
-
{ no: 11, name: "
|
|
974
|
+
{ no: 11, name: "recursiveOperationRequest", kind: "message", oneof: "body", T: () => RecursiveOperationRequest }
|
|
986
975
|
]);
|
|
987
976
|
}
|
|
988
977
|
}
|
|
@@ -1001,18 +990,6 @@ class WebsocketConnectionRequest$Type extends MessageType$<WebsocketConnectionRe
|
|
|
1001
990
|
*/
|
|
1002
991
|
export const WebsocketConnectionRequest = new WebsocketConnectionRequest$Type();
|
|
1003
992
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1004
|
-
class WebsocketConnectionResponse$Type extends MessageType$<WebsocketConnectionResponse> {
|
|
1005
|
-
constructor() {
|
|
1006
|
-
super("dht.WebsocketConnectionResponse", [
|
|
1007
|
-
{ no: 1, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1008
|
-
]);
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
/**
|
|
1012
|
-
* @generated MessageType for protobuf message dht.WebsocketConnectionResponse
|
|
1013
|
-
*/
|
|
1014
|
-
export const WebsocketConnectionResponse = new WebsocketConnectionResponse$Type();
|
|
1015
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
1016
993
|
class WebrtcConnectionRequest$Type extends MessageType$<WebrtcConnectionRequest> {
|
|
1017
994
|
constructor() {
|
|
1018
995
|
super("dht.WebrtcConnectionRequest", []);
|
|
@@ -1160,10 +1137,10 @@ export const RouterRpc = new ServiceType("dht.RouterRpc", [
|
|
|
1160
1137
|
{ name: "forwardMessage", options: {}, I: RouteMessageWrapper, O: RouteMessageAck }
|
|
1161
1138
|
]);
|
|
1162
1139
|
/**
|
|
1163
|
-
* @generated ServiceType for protobuf service dht.
|
|
1140
|
+
* @generated ServiceType for protobuf service dht.RecursiveOperationRpc
|
|
1164
1141
|
*/
|
|
1165
|
-
export const
|
|
1166
|
-
{ name: "
|
|
1142
|
+
export const RecursiveOperationRpc = new ServiceType("dht.RecursiveOperationRpc", [
|
|
1143
|
+
{ name: "routeRequest", options: {}, I: RouteMessageWrapper, O: RouteMessageAck }
|
|
1167
1144
|
]);
|
|
1168
1145
|
/**
|
|
1169
1146
|
* @generated ServiceType for protobuf service dht.StoreRpc
|
|
@@ -1173,16 +1150,16 @@ export const StoreRpc = new ServiceType("dht.StoreRpc", [
|
|
|
1173
1150
|
{ name: "replicateData", options: {}, I: ReplicateDataRequest, O: Empty }
|
|
1174
1151
|
]);
|
|
1175
1152
|
/**
|
|
1176
|
-
* @generated ServiceType for protobuf service dht.
|
|
1153
|
+
* @generated ServiceType for protobuf service dht.RecursiveOperationSessionRpc
|
|
1177
1154
|
*/
|
|
1178
|
-
export const
|
|
1179
|
-
{ name: "
|
|
1155
|
+
export const RecursiveOperationSessionRpc = new ServiceType("dht.RecursiveOperationSessionRpc", [
|
|
1156
|
+
{ name: "sendResponse", options: {}, I: RecursiveOperationResponse, O: Empty }
|
|
1180
1157
|
]);
|
|
1181
1158
|
/**
|
|
1182
1159
|
* @generated ServiceType for protobuf service dht.WebsocketConnectorRpc
|
|
1183
1160
|
*/
|
|
1184
1161
|
export const WebsocketConnectorRpc = new ServiceType("dht.WebsocketConnectorRpc", [
|
|
1185
|
-
{ name: "requestConnection", options: {}, I: WebsocketConnectionRequest, O:
|
|
1162
|
+
{ name: "requestConnection", options: {}, I: WebsocketConnectionRequest, O: Empty }
|
|
1186
1163
|
]);
|
|
1187
1164
|
/**
|
|
1188
1165
|
* @generated ServiceType for protobuf service dht.WebrtcConnectorRpc
|
|
@@ -7,7 +7,8 @@ import type { TemporaryConnectionRequest } from "./NetworkRpc";
|
|
|
7
7
|
import { NeighborUpdateRpc } from "./NetworkRpc";
|
|
8
8
|
import type { NeighborUpdate } from "./NetworkRpc";
|
|
9
9
|
import { HandshakeRpc } from "./NetworkRpc";
|
|
10
|
-
import type {
|
|
10
|
+
import type { InterleaveResponse } from "./NetworkRpc";
|
|
11
|
+
import type { InterleaveRequest } from "./NetworkRpc";
|
|
11
12
|
import type { StreamPartHandshakeResponse } from "./NetworkRpc";
|
|
12
13
|
import type { StreamPartHandshakeRequest } from "./NetworkRpc";
|
|
13
14
|
import { ProxyConnectionRpc } from "./NetworkRpc";
|
|
@@ -94,9 +95,9 @@ export interface IHandshakeRpcClient {
|
|
|
94
95
|
*/
|
|
95
96
|
handshake(input: StreamPartHandshakeRequest, options?: RpcOptions): UnaryCall<StreamPartHandshakeRequest, StreamPartHandshakeResponse>;
|
|
96
97
|
/**
|
|
97
|
-
* @generated from protobuf rpc:
|
|
98
|
+
* @generated from protobuf rpc: interleaveRequest(InterleaveRequest) returns (InterleaveResponse);
|
|
98
99
|
*/
|
|
99
|
-
|
|
100
|
+
interleaveRequest(input: InterleaveRequest, options?: RpcOptions): UnaryCall<InterleaveRequest, InterleaveResponse>;
|
|
100
101
|
}
|
|
101
102
|
/**
|
|
102
103
|
* @generated from protobuf service HandshakeRpc
|
|
@@ -115,11 +116,11 @@ export class HandshakeRpcClient implements IHandshakeRpcClient, ServiceInfo {
|
|
|
115
116
|
return stackIntercept<StreamPartHandshakeRequest, StreamPartHandshakeResponse>("unary", this._transport, method, opt, input);
|
|
116
117
|
}
|
|
117
118
|
/**
|
|
118
|
-
* @generated from protobuf rpc:
|
|
119
|
+
* @generated from protobuf rpc: interleaveRequest(InterleaveRequest) returns (InterleaveResponse);
|
|
119
120
|
*/
|
|
120
|
-
|
|
121
|
+
interleaveRequest(input: InterleaveRequest, options?: RpcOptions): UnaryCall<InterleaveRequest, InterleaveResponse> {
|
|
121
122
|
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
122
|
-
return stackIntercept<
|
|
123
|
+
return stackIntercept<InterleaveRequest, InterleaveResponse>("unary", this._transport, method, opt, input);
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
/**
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { TemporaryConnectionResponse } from "./NetworkRpc";
|
|
5
5
|
import { TemporaryConnectionRequest } from "./NetworkRpc";
|
|
6
6
|
import { NeighborUpdate } from "./NetworkRpc";
|
|
7
|
-
import {
|
|
7
|
+
import { InterleaveResponse } from "./NetworkRpc";
|
|
8
|
+
import { InterleaveRequest } from "./NetworkRpc";
|
|
8
9
|
import { StreamPartHandshakeResponse } from "./NetworkRpc";
|
|
9
10
|
import { StreamPartHandshakeRequest } from "./NetworkRpc";
|
|
10
11
|
import { ProxyConnectionResponse } from "./NetworkRpc";
|
|
@@ -44,9 +45,9 @@ export interface IHandshakeRpc<T = ServerCallContext> {
|
|
|
44
45
|
*/
|
|
45
46
|
handshake(request: StreamPartHandshakeRequest, context: T): Promise<StreamPartHandshakeResponse>;
|
|
46
47
|
/**
|
|
47
|
-
* @generated from protobuf rpc:
|
|
48
|
+
* @generated from protobuf rpc: interleaveRequest(InterleaveRequest) returns (InterleaveResponse);
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
+
interleaveRequest(request: InterleaveRequest, context: T): Promise<InterleaveResponse>;
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* @generated from protobuf service NeighborUpdateRpc
|
|
@@ -184,20 +184,25 @@ export interface StreamPartHandshakeResponse {
|
|
|
184
184
|
interleaveTargetDescriptor?: PeerDescriptor;
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
|
-
* @generated from protobuf message
|
|
187
|
+
* @generated from protobuf message InterleaveRequest
|
|
188
188
|
*/
|
|
189
|
-
export interface
|
|
190
|
-
/**
|
|
191
|
-
* @generated from protobuf field: string streamPartId = 1;
|
|
192
|
-
*/
|
|
193
|
-
streamPartId: string;
|
|
189
|
+
export interface InterleaveRequest {
|
|
194
190
|
/**
|
|
195
191
|
* this is a required field but in generated NetworkRpc.ts it is incorrectly annotated as optional (NET-1082)
|
|
196
192
|
*
|
|
197
|
-
* @generated from protobuf field: dht.PeerDescriptor interleaveTargetDescriptor =
|
|
193
|
+
* @generated from protobuf field: dht.PeerDescriptor interleaveTargetDescriptor = 1;
|
|
198
194
|
*/
|
|
199
195
|
interleaveTargetDescriptor?: PeerDescriptor;
|
|
200
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* @generated from protobuf message InterleaveResponse
|
|
199
|
+
*/
|
|
200
|
+
export interface InterleaveResponse {
|
|
201
|
+
/**
|
|
202
|
+
* @generated from protobuf field: bool accepted = 1;
|
|
203
|
+
*/
|
|
204
|
+
accepted: boolean;
|
|
205
|
+
}
|
|
201
206
|
/**
|
|
202
207
|
* @generated from protobuf message LeaveStreamPartNotice
|
|
203
208
|
*/
|
|
@@ -206,6 +211,10 @@ export interface LeaveStreamPartNotice {
|
|
|
206
211
|
* @generated from protobuf field: string streamPartId = 1;
|
|
207
212
|
*/
|
|
208
213
|
streamPartId: string;
|
|
214
|
+
/**
|
|
215
|
+
* @generated from protobuf field: bool isEntryPoint = 2;
|
|
216
|
+
*/
|
|
217
|
+
isEntryPoint: boolean;
|
|
209
218
|
}
|
|
210
219
|
/**
|
|
211
220
|
* @generated from protobuf message NeighborUpdate
|
|
@@ -439,23 +448,35 @@ class StreamPartHandshakeResponse$Type extends MessageType<StreamPartHandshakeRe
|
|
|
439
448
|
*/
|
|
440
449
|
export const StreamPartHandshakeResponse = new StreamPartHandshakeResponse$Type();
|
|
441
450
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
442
|
-
class
|
|
451
|
+
class InterleaveRequest$Type extends MessageType<InterleaveRequest> {
|
|
443
452
|
constructor() {
|
|
444
|
-
super("
|
|
445
|
-
{ no: 1, name: "
|
|
446
|
-
{ no: 2, name: "interleaveTargetDescriptor", kind: "message", T: () => PeerDescriptor }
|
|
453
|
+
super("InterleaveRequest", [
|
|
454
|
+
{ no: 1, name: "interleaveTargetDescriptor", kind: "message", T: () => PeerDescriptor }
|
|
447
455
|
]);
|
|
448
456
|
}
|
|
449
457
|
}
|
|
450
458
|
/**
|
|
451
|
-
* @generated MessageType for protobuf message
|
|
459
|
+
* @generated MessageType for protobuf message InterleaveRequest
|
|
452
460
|
*/
|
|
453
|
-
export const
|
|
461
|
+
export const InterleaveRequest = new InterleaveRequest$Type();
|
|
462
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
463
|
+
class InterleaveResponse$Type extends MessageType<InterleaveResponse> {
|
|
464
|
+
constructor() {
|
|
465
|
+
super("InterleaveResponse", [
|
|
466
|
+
{ no: 1, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
467
|
+
]);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* @generated MessageType for protobuf message InterleaveResponse
|
|
472
|
+
*/
|
|
473
|
+
export const InterleaveResponse = new InterleaveResponse$Type();
|
|
454
474
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
455
475
|
class LeaveStreamPartNotice$Type extends MessageType<LeaveStreamPartNotice> {
|
|
456
476
|
constructor() {
|
|
457
477
|
super("LeaveStreamPartNotice", [
|
|
458
|
-
{ no: 1, name: "streamPartId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
478
|
+
{ no: 1, name: "streamPartId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
479
|
+
{ no: 2, name: "isEntryPoint", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
459
480
|
]);
|
|
460
481
|
}
|
|
461
482
|
}
|
|
@@ -542,7 +563,7 @@ export const ProxyConnectionRpc = new ServiceType("ProxyConnectionRpc", [
|
|
|
542
563
|
*/
|
|
543
564
|
export const HandshakeRpc = new ServiceType("HandshakeRpc", [
|
|
544
565
|
{ name: "handshake", options: {}, I: StreamPartHandshakeRequest, O: StreamPartHandshakeResponse },
|
|
545
|
-
{ name: "
|
|
566
|
+
{ name: "interleaveRequest", options: {}, I: InterleaveRequest, O: InterleaveResponse }
|
|
546
567
|
]);
|
|
547
568
|
/**
|
|
548
569
|
* @generated ServiceType for protobuf service NeighborUpdateRpc
|
|
@@ -31,7 +31,7 @@ const prepareLayer0 = async () => {
|
|
|
31
31
|
region: getRandomRegion()
|
|
32
32
|
})
|
|
33
33
|
layer0Ep = peerDescriptor
|
|
34
|
-
const entryPoint = createNetworkNodeWithSimulator(peerDescriptor, simulator, [peerDescriptor])
|
|
34
|
+
const entryPoint = await createNetworkNodeWithSimulator(peerDescriptor, simulator, [peerDescriptor])
|
|
35
35
|
await entryPoint.start()
|
|
36
36
|
nodes.push(entryPoint)
|
|
37
37
|
|
|
@@ -44,7 +44,7 @@ const prepareStream = async (streamId: string) => {
|
|
|
44
44
|
region: getRandomRegion()
|
|
45
45
|
})
|
|
46
46
|
const streamPartId = toStreamPartID(toStreamID(streamId), 0)
|
|
47
|
-
const streamPublisher = createNetworkNodeWithSimulator(peerDescriptor, simulator, [layer0Ep])
|
|
47
|
+
const streamPublisher = await createNetworkNodeWithSimulator(peerDescriptor, simulator, [layer0Ep])
|
|
48
48
|
await streamPublisher.start()
|
|
49
49
|
streamPublisher.join(streamPartId)
|
|
50
50
|
nodes.push(streamPublisher)
|
|
@@ -76,7 +76,7 @@ const measureJoiningTime = async () => {
|
|
|
76
76
|
0,
|
|
77
77
|
i,
|
|
78
78
|
Math.floor(Math.random() * 20000),
|
|
79
|
-
'
|
|
79
|
+
'2222' as any,
|
|
80
80
|
'msgChainId'
|
|
81
81
|
),
|
|
82
82
|
prevMsgRef: null,
|
|
@@ -90,7 +90,11 @@ const measureJoiningTime = async () => {
|
|
|
90
90
|
}, 1000)
|
|
91
91
|
// get random node from network to use as entrypoint
|
|
92
92
|
const randomNode = nodes[Math.floor(Math.random() * nodes.length)]
|
|
93
|
-
const streamSubscriber = createNetworkNodeWithSimulator(
|
|
93
|
+
const streamSubscriber = await createNetworkNodeWithSimulator(
|
|
94
|
+
peerDescriptor,
|
|
95
|
+
simulator,
|
|
96
|
+
[randomNode.stack.getLayer0Node().getLocalPeerDescriptor()]
|
|
97
|
+
)
|
|
94
98
|
currentNode = streamSubscriber
|
|
95
99
|
const start = performance.now()
|
|
96
100
|
await streamSubscriber.start()
|
|
@@ -109,7 +113,6 @@ const measureJoiningTime = async () => {
|
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
const run = async () => {
|
|
112
|
-
Simulator.useFakeTimers()
|
|
113
116
|
await prepareLayer0()
|
|
114
117
|
for (let i = 0; i < 20; i++) {
|
|
115
118
|
await prepareStream(`stream-${i}`)
|
|
@@ -124,7 +127,6 @@ const run = async () => {
|
|
|
124
127
|
}
|
|
125
128
|
fs.closeSync(logFile)
|
|
126
129
|
await shutdownNetwork()
|
|
127
|
-
Simulator.useFakeTimers(false)
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
// eslint-disable-next-line promise/catch-or-return, promise/always-return
|
|
@@ -50,7 +50,8 @@ describe('random graph with real connections', () => {
|
|
|
50
50
|
layer1Node: epDhtNode,
|
|
51
51
|
transport: epDhtNode.getTransport(),
|
|
52
52
|
connectionLocker: epDhtNode.getTransport() as ConnectionManager,
|
|
53
|
-
localPeerDescriptor: epPeerDescriptor
|
|
53
|
+
localPeerDescriptor: epPeerDescriptor,
|
|
54
|
+
isLocalNodeEntryPoint: () => false
|
|
54
55
|
}
|
|
55
56
|
)
|
|
56
57
|
randomGraphNode2 = createRandomGraphNode({
|
|
@@ -58,28 +59,32 @@ describe('random graph with real connections', () => {
|
|
|
58
59
|
layer1Node: dhtNode1,
|
|
59
60
|
transport: dhtNode1.getTransport(),
|
|
60
61
|
connectionLocker: dhtNode1.getTransport() as ConnectionManager,
|
|
61
|
-
localPeerDescriptor: dhtNode1.getLocalPeerDescriptor()
|
|
62
|
+
localPeerDescriptor: dhtNode1.getLocalPeerDescriptor(),
|
|
63
|
+
isLocalNodeEntryPoint: () => false
|
|
62
64
|
})
|
|
63
65
|
randomGraphNode3 = createRandomGraphNode({
|
|
64
66
|
streamPartId,
|
|
65
67
|
layer1Node: dhtNode2,
|
|
66
68
|
transport: dhtNode2.getTransport(),
|
|
67
69
|
connectionLocker: dhtNode2.getTransport() as ConnectionManager,
|
|
68
|
-
localPeerDescriptor: dhtNode2.getLocalPeerDescriptor()
|
|
70
|
+
localPeerDescriptor: dhtNode2.getLocalPeerDescriptor(),
|
|
71
|
+
isLocalNodeEntryPoint: () => false
|
|
69
72
|
})
|
|
70
73
|
randomGraphNode4 = createRandomGraphNode({
|
|
71
74
|
streamPartId,
|
|
72
75
|
layer1Node: dhtNode3,
|
|
73
76
|
transport: dhtNode3.getTransport(),
|
|
74
77
|
connectionLocker: dhtNode3.getTransport() as ConnectionManager,
|
|
75
|
-
localPeerDescriptor: dhtNode3.getLocalPeerDescriptor()
|
|
78
|
+
localPeerDescriptor: dhtNode3.getLocalPeerDescriptor(),
|
|
79
|
+
isLocalNodeEntryPoint: () => false
|
|
76
80
|
})
|
|
77
81
|
randomGraphNode5 = createRandomGraphNode({
|
|
78
82
|
streamPartId,
|
|
79
83
|
layer1Node: dhtNode4,
|
|
80
84
|
transport: dhtNode4.getTransport(),
|
|
81
85
|
connectionLocker: dhtNode4.getTransport() as ConnectionManager,
|
|
82
|
-
localPeerDescriptor: dhtNode4.getLocalPeerDescriptor()
|
|
86
|
+
localPeerDescriptor: dhtNode4.getLocalPeerDescriptor(),
|
|
87
|
+
isLocalNodeEntryPoint: () => false
|
|
83
88
|
})
|
|
84
89
|
await epDhtNode.joinDht([epPeerDescriptor])
|
|
85
90
|
await Promise.all([
|
|
@@ -65,7 +65,7 @@ describe('Full node network with WebRTC connections', () => {
|
|
|
65
65
|
waitForCondition(() => {
|
|
66
66
|
return node.getStreamrNode()!.getNeighbors(streamPartId).length >= 3
|
|
67
67
|
}
|
|
68
|
-
,
|
|
68
|
+
, 30000)
|
|
69
69
|
))
|
|
70
70
|
let numOfMessagesReceived = 0
|
|
71
71
|
const successIds: string[] = []
|
|
@@ -8,7 +8,7 @@ import { createMockPeerDescriptor, createStreamMessage } from '../utils/utils'
|
|
|
8
8
|
|
|
9
9
|
describe('Full node network with WebSocket connections only', () => {
|
|
10
10
|
|
|
11
|
-
const NUM_OF_NODES =
|
|
11
|
+
const NUM_OF_NODES = 32
|
|
12
12
|
const epPeerDescriptor = createMockPeerDescriptor({
|
|
13
13
|
websocket: { host: '127.0.0.1', port: 15555, tls: false }
|
|
14
14
|
})
|
|
@@ -62,7 +62,7 @@ describe('Full node network with WebSocket connections only', () => {
|
|
|
62
62
|
waitForCondition(() => {
|
|
63
63
|
return node.getStreamrNode()!.getNeighbors(streamPartId).length >= 4
|
|
64
64
|
}
|
|
65
|
-
,
|
|
65
|
+
, 30000)
|
|
66
66
|
))
|
|
67
67
|
let numOfMessagesReceived = 0
|
|
68
68
|
const successIds: string[] = []
|