querysub 0.414.0 → 0.415.0
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/package.json
CHANGED
|
@@ -21,6 +21,9 @@ import { isNode } from "typesafecss";
|
|
|
21
21
|
import { areNodeIdsEqual, getOwnNodeId, getOwnThreadId } from "../-f-node-discovery/NodeDiscovery";
|
|
22
22
|
import { timeInMinute } from "socket-function/src/misc";
|
|
23
23
|
|
|
24
|
+
// NOTE: This used to be small, but we cache this, so it would mean a node on startup would time out, and then we would refuse to talk to it ever again. So... this can't be small
|
|
25
|
+
const MAX_CHANGE_IDENTITY_TIMEOUT = timeInMinute * 5;
|
|
26
|
+
|
|
24
27
|
let callerInfo = new Map<CallerContext, {
|
|
25
28
|
reconnectNodeId: string | undefined;
|
|
26
29
|
machineId: string;
|
|
@@ -131,7 +134,7 @@ class IdentityControllerBase {
|
|
|
131
134
|
let time = Date.now();
|
|
132
135
|
const caller = SocketFunction.getCaller();
|
|
133
136
|
// Verify it wasn't signed too long ago (to make signature stealing WAY more difficult).
|
|
134
|
-
const signedThreshold = Date.now() -
|
|
137
|
+
const signedThreshold = Date.now() - MAX_CHANGE_IDENTITY_TIMEOUT;
|
|
135
138
|
if (payload.time < signedThreshold) {
|
|
136
139
|
throw new Error(`Signed payload too old, ${payload.time} < ${signedThreshold} from ${caller.localNodeId} (${caller.nodeId})`);
|
|
137
140
|
}
|
|
@@ -236,8 +239,7 @@ const changeIdentityOnce = cacheWeak(async function changeIdentityOnce(connectio
|
|
|
236
239
|
};
|
|
237
240
|
let signature = sign(threadKeyCert, payload);
|
|
238
241
|
await timeoutToError(
|
|
239
|
-
|
|
240
|
-
timeInMinute * 3,
|
|
242
|
+
MAX_CHANGE_IDENTITY_TIMEOUT,
|
|
241
243
|
IdentityController.nodes[nodeId].changeIdentity(signature, payload),
|
|
242
244
|
() => new Error(`Timeout calling changeIdentity for ${nodeId}`)
|
|
243
245
|
);
|
package/tempnotes.txt
CHANGED
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
Local CYOA + Local FunctionRunner works
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
Wait... Didn't we restart everything? Why does it seem like the function runner is still watching the same things?
|
|
7
|
+
"00020e3a3b543382.a794fbcf7b104c68.querysubtest.com:37381"
|
|
8
|
+
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
Hmm... we ask to watch it, but the watch doesn't show up on the other side? Fuck...
|
|
9
12
|
|
|
13
|
+
Hmm, it's still failing in the same way. The function runner just has, like, no watches. It tried to watch I assume the same thing as before. Nothing showed up on the other end.
|
|
14
|
+
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
|