@peerbit/rpc 5.0.7 → 5.0.8-88f45c3
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/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +41 -43
- package/dist/src/utils.js.map +1 -1
- package/package.json +68 -68
- package/src/utils.ts +45 -46
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,eAAe,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EACX,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,MAAM,SAAS,CAAC;AAEjB,qBAAa,qBAAsB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAG3B;AACD,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,yBAAyB,CAAC,CAAC,CAAC,GACjE,iBAAiB,GAAG;IAAE,IAAI,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;CAAE,GAAG,eAAe,CAAC;AAE5E,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,eAAe,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EACX,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,MAAM,SAAS,CAAC;AAEjB,qBAAa,qBAAsB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAG3B;AACD,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,yBAAyB,CAAC,CAAC,CAAC,GACjE,iBAAiB,GAAG;IAAE,IAAI,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;CAAE,GAAG,eAAe,CAAC;AAE5E,eAAO,MAAM,QAAQ,GAAU,CAAC,EAAE,CAAC,OAC7B,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,UACN,MAAM,EAAE,EAAE,WACT,CAAC,mBACO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,YAC3D,oBAAoB,CAAC,CAAC,CAAC,GAAG,SAAS,kBA6D7C,CAAC"}
|
package/dist/src/utils.js
CHANGED
|
@@ -6,57 +6,55 @@ export class MissingResponsesError extends Error {
|
|
|
6
6
|
super(message);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
export const queryAll = (rpc, groups, request, responseHandler, options) => {
|
|
9
|
+
export const queryAll = async (rpc, groups, request, responseHandler, options) => {
|
|
10
10
|
// In each shard/group only query a subset
|
|
11
11
|
groups = [...groups].filter((x) => !x.find((y) => y === rpc.node.identity.publicKey.hashcode()));
|
|
12
12
|
const sendModeType = options?.mode || SilentDelivery;
|
|
13
13
|
let rng = Math.round(Math.random() * groups.length);
|
|
14
14
|
const startRng = rng;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
let missingReponses = undefined;
|
|
16
|
+
while (groups.length > 0) {
|
|
17
|
+
const peersToQuery = new Array(groups.length);
|
|
18
|
+
let counter = 0;
|
|
19
|
+
const peerToGroupIndex = new Map();
|
|
20
|
+
for (let i = 0; i < groups.length; i++) {
|
|
21
|
+
const group = groups[i];
|
|
22
|
+
peersToQuery[counter] = group[rng % group.length];
|
|
23
|
+
peerToGroupIndex.set(peersToQuery[counter], i);
|
|
24
|
+
counter++;
|
|
25
|
+
}
|
|
26
|
+
if (peersToQuery.length > 0) {
|
|
27
|
+
const results = await rpc.request(request, {
|
|
28
|
+
...options,
|
|
29
|
+
// eslint-disable-next-line new-cap
|
|
30
|
+
mode: new sendModeType({ to: peersToQuery, redundancy: 1 }), // TODO configuration redundancy?
|
|
31
|
+
});
|
|
32
|
+
for (const result of results) {
|
|
33
|
+
if (!result.from) {
|
|
34
|
+
throw new Error("Unexpected, missing from");
|
|
35
|
+
}
|
|
36
|
+
peerToGroupIndex.delete(result.from.hashcode());
|
|
26
37
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
await responseHandler(results);
|
|
39
|
+
const indicesLeft = new Set([...peerToGroupIndex.values()]);
|
|
40
|
+
rng += 1;
|
|
41
|
+
groups = groups.filter((v, ix) => {
|
|
42
|
+
if (indicesLeft.has(ix)) {
|
|
43
|
+
const peerIndex = rng % v.length;
|
|
44
|
+
if (rng === startRng || peerIndex === startRng % v.length) {
|
|
45
|
+
// TODO Last condition needed?
|
|
46
|
+
(missingReponses || (missingReponses = [])).push(v);
|
|
47
|
+
return false;
|
|
36
48
|
}
|
|
37
|
-
|
|
49
|
+
return true;
|
|
38
50
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
rng += 1;
|
|
42
|
-
groups = groups.filter((v, ix) => {
|
|
43
|
-
if (indicesLeft.has(ix)) {
|
|
44
|
-
const peerIndex = rng % v.length;
|
|
45
|
-
if (rng === startRng || peerIndex === startRng % v.length) {
|
|
46
|
-
// TODO Last condition needed?
|
|
47
|
-
missingReponses = true;
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
return false;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
51
|
+
return false;
|
|
52
|
+
});
|
|
55
53
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
}
|
|
55
|
+
if (missingReponses) {
|
|
56
|
+
throw new MissingResponsesError("Did not receive responses from all shards: " +
|
|
57
|
+
JSON.stringify(missingReponses));
|
|
58
|
+
}
|
|
61
59
|
};
|
|
62
60
|
//# sourceMappingURL=utils.js.map
|
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAGN,cAAc,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAY,MAAM,iBAAiB,CAAC;AAO3C,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC;CACD;AAID,MAAM,CAAC,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAGN,cAAc,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAY,MAAM,iBAAiB,CAAC;AAO3C,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC;CACD;AAID,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC5B,GAAc,EACd,MAAkB,EAClB,OAAU,EACV,eAAqE,EACrE,OAA6C,EAC5C,EAAE;IACH,0CAA0C;IAC1C,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,CAC1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,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
2
|
+
"name": "@peerbit/rpc",
|
|
3
|
+
"version": "5.0.8-88f45c3",
|
|
4
|
+
"description": "RPC calls for peers",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"*": [
|
|
11
|
+
"*",
|
|
12
|
+
"dist/*",
|
|
13
|
+
"dist/src/*",
|
|
14
|
+
"dist/src/*/index"
|
|
15
|
+
],
|
|
16
|
+
"src/*": [
|
|
17
|
+
"*",
|
|
18
|
+
"dist/*",
|
|
19
|
+
"dist/src/*",
|
|
20
|
+
"dist/src/*/index"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"src",
|
|
26
|
+
"dist",
|
|
27
|
+
"!dist/e2e",
|
|
28
|
+
"!dist/test",
|
|
29
|
+
"!**/*.tsbuildinfo"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/src/index.d.ts",
|
|
34
|
+
"import": "./dist/src/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"eslintConfig": {
|
|
38
|
+
"extends": "peerbit",
|
|
39
|
+
"parserOptions": {
|
|
40
|
+
"project": true,
|
|
41
|
+
"sourceType": "module"
|
|
42
|
+
},
|
|
43
|
+
"ignorePatterns": [
|
|
44
|
+
"!.aegir.js",
|
|
45
|
+
"test/ts-use",
|
|
46
|
+
"*.d.ts"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"clean": "aegir clean",
|
|
54
|
+
"build": "aegir build --no-bundle",
|
|
55
|
+
"test": "aegir test --target=node",
|
|
56
|
+
"lint": "aegir lint"
|
|
57
|
+
},
|
|
58
|
+
"author": "dao.xyz",
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@dao-xyz/borsh": "^5.2.3",
|
|
62
|
+
"@peerbit/crypto": "2.3.1-88f45c3",
|
|
63
|
+
"@peerbit/logger": "1.0.3-88f45c3",
|
|
64
|
+
"@peerbit/program": "5.0.2-88f45c3",
|
|
65
|
+
"@peerbit/time": "2.0.7-88f45c3"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@peerbit/test-utils": "2.0.42-88f45c3"
|
|
69
|
+
}
|
|
70
70
|
}
|
package/src/utils.ts
CHANGED
|
@@ -19,7 +19,7 @@ export class MissingResponsesError extends Error {
|
|
|
19
19
|
export type RPCRequestAllOptions<R> = RPCRequestResponseOptions<R> &
|
|
20
20
|
EncryptionOptions & { mode?: Constructor<DeliveryMode> } & PriorityOptions;
|
|
21
21
|
|
|
22
|
-
export const queryAll = <Q, R>(
|
|
22
|
+
export const queryAll = async <Q, R>(
|
|
23
23
|
rpc: RPC<Q, R>,
|
|
24
24
|
groups: string[][],
|
|
25
25
|
request: Q,
|
|
@@ -34,56 +34,55 @@ export const queryAll = <Q, R>(
|
|
|
34
34
|
const sendModeType = options?.mode || SilentDelivery;
|
|
35
35
|
let rng = Math.round(Math.random() * groups.length);
|
|
36
36
|
const startRng = rng;
|
|
37
|
-
const fn = async () => {
|
|
38
|
-
let missingReponses = false;
|
|
39
|
-
while (groups.length > 0) {
|
|
40
|
-
const peersToQuery: string[] = new Array(groups.length);
|
|
41
|
-
let counter = 0;
|
|
42
|
-
const peerToGroupIndex = new Map<string, number>();
|
|
43
|
-
for (let i = 0; i < groups.length; i++) {
|
|
44
|
-
const group = groups[i];
|
|
45
|
-
peersToQuery[counter] = group[rng % group.length];
|
|
46
|
-
peerToGroupIndex.set(peersToQuery[counter], i);
|
|
47
|
-
counter++;
|
|
48
|
-
}
|
|
49
|
-
if (peersToQuery.length > 0) {
|
|
50
|
-
const results = await rpc.request(request, {
|
|
51
|
-
...options,
|
|
52
|
-
// eslint-disable-next-line new-cap
|
|
53
|
-
mode: new sendModeType({ to: peersToQuery, redundancy: 1 }), // TODO configuration redundancy?
|
|
54
|
-
});
|
|
55
37
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
let missingReponses: string[][] | undefined = undefined;
|
|
39
|
+
while (groups.length > 0) {
|
|
40
|
+
const peersToQuery: string[] = new Array(groups.length);
|
|
41
|
+
let counter = 0;
|
|
42
|
+
const peerToGroupIndex = new Map<string, number>();
|
|
43
|
+
for (let i = 0; i < groups.length; i++) {
|
|
44
|
+
const group = groups[i];
|
|
45
|
+
peersToQuery[counter] = group[rng % group.length];
|
|
46
|
+
peerToGroupIndex.set(peersToQuery[counter], i);
|
|
47
|
+
counter++;
|
|
48
|
+
}
|
|
49
|
+
if (peersToQuery.length > 0) {
|
|
50
|
+
const results = await rpc.request(request, {
|
|
51
|
+
...options,
|
|
52
|
+
// eslint-disable-next-line new-cap
|
|
53
|
+
mode: new sendModeType({ to: peersToQuery, redundancy: 1 }), // TODO configuration redundancy?
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
for (const result of results) {
|
|
57
|
+
if (!result.from) {
|
|
58
|
+
throw new Error("Unexpected, missing from");
|
|
61
59
|
}
|
|
60
|
+
peerToGroupIndex.delete(result.from.hashcode());
|
|
61
|
+
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
await responseHandler(results);
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
const indicesLeft = new Set([...peerToGroupIndex.values()]);
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
return true;
|
|
67
|
+
rng += 1;
|
|
68
|
+
groups = groups.filter((v, ix) => {
|
|
69
|
+
if (indicesLeft.has(ix)) {
|
|
70
|
+
const peerIndex = rng % v.length;
|
|
71
|
+
if (rng === startRng || peerIndex === startRng % v.length) {
|
|
72
|
+
// TODO Last condition needed?
|
|
73
|
+
(missingReponses || (missingReponses = [])).push(v);
|
|
74
|
+
return false;
|
|
77
75
|
}
|
|
78
|
-
return
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (missingReponses) {
|
|
83
|
-
throw new MissingResponsesError(
|
|
84
|
-
"Did not receive responses from all shards",
|
|
85
|
-
);
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
});
|
|
86
80
|
}
|
|
87
|
-
}
|
|
88
|
-
|
|
81
|
+
}
|
|
82
|
+
if (missingReponses) {
|
|
83
|
+
throw new MissingResponsesError(
|
|
84
|
+
"Did not receive responses from all shards: " +
|
|
85
|
+
JSON.stringify(missingReponses),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
89
88
|
};
|