@typeberry/lib 0.10.0-9e3af22 → 0.11.0-411c828
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 +1 -3
- package/packages/jam/config-node/node-config.d.ts +1 -11
- package/packages/jam/config-node/node-config.d.ts.map +1 -1
- package/packages/jam/config-node/node-config.js +3 -25
- package/packages/jam/config-node/node-config.test.js +3 -7
- package/packages/jam/database/states.d.ts +1 -8
- package/packages/jam/database/states.d.ts.map +1 -1
- package/packages/jam/database/value-refs.d.ts +4 -5
- package/packages/jam/database/value-refs.d.ts.map +1 -1
- package/packages/jam/database-fjall/blocks.d.ts +1 -0
- package/packages/jam/database-fjall/blocks.d.ts.map +1 -1
- package/packages/jam/database-fjall/blocks.js +8 -3
- package/packages/jam/database-fjall/hybrid-states.d.ts +10 -4
- package/packages/jam/database-fjall/hybrid-states.d.ts.map +1 -1
- package/packages/jam/database-fjall/hybrid-states.js +22 -6
- package/packages/jam/database-fjall/root.d.ts +2 -0
- package/packages/jam/database-fjall/root.d.ts.map +1 -1
- package/packages/jam/database-fjall/root.js +8 -1
- package/packages/jam/database-fjall/root.test.d.ts +2 -0
- package/packages/jam/database-fjall/root.test.d.ts.map +1 -0
- package/packages/jam/database-fjall/root.test.js +23 -0
- package/packages/jam/database-fjall/states.d.ts +1 -0
- package/packages/jam/database-fjall/states.d.ts.map +1 -1
- package/packages/jam/database-fjall/states.js +6 -3
- package/packages/jam/node/export.d.ts.map +1 -1
- package/packages/jam/node/export.js +8 -17
- package/packages/jam/node/main-fuzz.d.ts.map +1 -1
- package/packages/jam/node/main-fuzz.js +51 -46
- package/packages/jam/node/main-importer.d.ts +6 -11
- package/packages/jam/node/main-importer.d.ts.map +1 -1
- package/packages/jam/node/main-importer.js +14 -28
- package/packages/jam/node/main.d.ts.map +1 -1
- package/packages/jam/node/main.js +6 -16
- package/packages/jam/rpc/test/e2e-server.d.ts.map +1 -1
- package/packages/jam/rpc/test/e2e-server.js +3 -5
- package/packages/jam/rpc/test/e2e.js +1 -1
- package/packages/jam/state-merkleization/index.d.ts +1 -1
- package/packages/jam/state-merkleization/index.js +1 -1
- package/packages/workers/api-node/config.d.ts +14 -46
- package/packages/workers/api-node/config.d.ts.map +1 -1
- package/packages/workers/api-node/config.js +31 -96
- package/packages/workers/api-node/config.test.js +82 -63
- package/packages/jam/database-lmdb/blocks.d.ts +0 -24
- package/packages/jam/database-lmdb/blocks.d.ts.map +0 -1
- package/packages/jam/database-lmdb/blocks.js +0 -82
- package/packages/jam/database-lmdb/hybrid-states.d.ts +0 -56
- package/packages/jam/database-lmdb/hybrid-states.d.ts.map +0 -1
- package/packages/jam/database-lmdb/hybrid-states.js +0 -149
- package/packages/jam/database-lmdb/hybrid-states.test.d.ts +0 -2
- package/packages/jam/database-lmdb/hybrid-states.test.d.ts.map +0 -1
- package/packages/jam/database-lmdb/hybrid-states.test.js +0 -180
- package/packages/jam/database-lmdb/index.d.ts +0 -5
- package/packages/jam/database-lmdb/index.d.ts.map +0 -1
- package/packages/jam/database-lmdb/index.js +0 -4
- package/packages/jam/database-lmdb/root.d.ts +0 -26
- package/packages/jam/database-lmdb/root.d.ts.map +0 -1
- package/packages/jam/database-lmdb/root.js +0 -53
- package/packages/jam/database-lmdb/states.d.ts +0 -76
- package/packages/jam/database-lmdb/states.d.ts.map +0 -1
- package/packages/jam/database-lmdb/states.js +0 -145
- package/packages/jam/database-lmdb/states.test.d.ts +0 -2
- package/packages/jam/database-lmdb/states.test.d.ts.map +0 -1
- package/packages/jam/database-lmdb/states.test.js +0 -202
|
@@ -8,25 +8,23 @@ import { v1 as fuzzV1 } from "#@typeberry/fuzz-proto";
|
|
|
8
8
|
import { HASH_SIZE } from "#@typeberry/hash";
|
|
9
9
|
import { Logger } from "#@typeberry/logger";
|
|
10
10
|
import { CURRENT_VERSION, Result, version } from "#@typeberry/utils";
|
|
11
|
-
import {
|
|
11
|
+
import { FjallRoot, logHostEnvironment } from "#@typeberry/workers-api-node";
|
|
12
12
|
import { getChainSpec } from "./common.js";
|
|
13
13
|
import { mainImporter } from "./main-importer.js";
|
|
14
14
|
const logger = Logger.new(import.meta.filename, "fuzztarget");
|
|
15
15
|
/** Dedicated subdirectory under the configured base path that the fuzzer owns and wipes. */
|
|
16
16
|
const FUZZ_DB_SUBDIR = "typeberry-fuzz-db";
|
|
17
17
|
const FUZZ_DB_FJALL = "fjall-hybrid";
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const FUZZ_FJALL_VALUES_SUBDIR = "values-session";
|
|
18
|
+
const FUZZ_DB_OPTIONS = [FUZZ_DB_FJALL, "fjall"];
|
|
19
|
+
/** The partitions used by FjallBlocks and FjallStates in the full-fjall backend. */
|
|
20
|
+
const FUZZ_FJALL_PARTITIONS = ["headers", "extrinsics", "postStateRoots", "states", "values"];
|
|
22
21
|
/**
|
|
23
|
-
* Size of the fjall block-cache for the fuzz session.
|
|
24
|
-
* resets
|
|
25
|
-
* the resident memory bounded.
|
|
22
|
+
* Size of the fjall block-cache for the fuzz session. The keyspace stays open
|
|
23
|
+
* across resets, so this cache is what keeps the resident memory bounded.
|
|
26
24
|
*/
|
|
27
25
|
const FUZZ_FJALL_CACHE_BYTES = 128 * 1024 * 1024;
|
|
28
|
-
/** Rebuild the fjall-hybrid
|
|
29
|
-
const
|
|
26
|
+
/** Rebuild the fjall-hybrid keyspace every N resets to limit LSM read amplification. */
|
|
27
|
+
const REBUILD_FJALL_HYBRID_KEYSPACE_EVERY = 50;
|
|
30
28
|
/**
|
|
31
29
|
* Resolve the directory the fuzzer should use for its on-disk database, or
|
|
32
30
|
* `undefined` for an in-memory database. The dedicated `FUZZ_DB_SUBDIR` is
|
|
@@ -64,7 +62,6 @@ export async function mainFuzz(fuzzConfig, withRelPath) {
|
|
|
64
62
|
const { jamNodeConfig: config } = fuzzConfig;
|
|
65
63
|
const fuzzDbBase = resolveFuzzDbBase(config.node.databaseBasePath);
|
|
66
64
|
const rawFuzzDb = process.env.JAM_FUZZ_DB?.trim() ?? "";
|
|
67
|
-
// Using experimental fjall-hybrid by default, with an option to test lmdb as well.
|
|
68
65
|
const hybridStateBackend = rawFuzzDb === "" ? FUZZ_DB_FJALL : rawFuzzDb;
|
|
69
66
|
if (!isValidStateBackend(hybridStateBackend)) {
|
|
70
67
|
throw new Error(`JAM_FUZZ_DB must be one of: ${FUZZ_DB_OPTIONS} (got: "${rawFuzzDb}").`);
|
|
@@ -73,11 +70,10 @@ export async function mainFuzz(fuzzConfig, withRelPath) {
|
|
|
73
70
|
logger.info `🗄️ Fuzz persistent backend: ${hybridStateBackend}.`;
|
|
74
71
|
}
|
|
75
72
|
let runningNode = null;
|
|
76
|
-
// The fjall
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
// Track how many times resetState has been called for periodic fjall session rebuilds.
|
|
73
|
+
// The fjall keyspace is opened once per fuzz session and reused on every
|
|
74
|
+
// reset, because opening it is the slow part.
|
|
75
|
+
let fjallKeyspace = null;
|
|
76
|
+
// Track how many times resetState has been called for periodic fjall keyspace rebuilds.
|
|
81
77
|
let resetCount = 0;
|
|
82
78
|
// Set when close() starts. Guards resetState so a fuzz command arriving
|
|
83
79
|
// mid-shutdown can't build a fresh node that close() then orphans.
|
|
@@ -144,46 +140,55 @@ export async function mainFuzz(fuzzConfig, withRelPath) {
|
|
|
144
140
|
// also turns on compression further down, so the big values do not grow the
|
|
145
141
|
// db too much. Tiny stays uncompressed, its db is small and speed matters more.
|
|
146
142
|
ephemeral: isPersistent,
|
|
147
|
-
stateBackend: isPersistent ? hybridStateBackend : "
|
|
148
|
-
// Reuse the
|
|
149
|
-
//
|
|
150
|
-
|
|
143
|
+
stateBackend: isPersistent ? hybridStateBackend : "fjall",
|
|
144
|
+
// Reuse the keyspace for both fjall backends. Nothing to pass for
|
|
145
|
+
// the in-memory fallback.
|
|
146
|
+
sharedFjallKeyspace: fjallKeyspace ?? undefined,
|
|
151
147
|
});
|
|
152
148
|
};
|
|
153
149
|
if (fuzzDbBase !== undefined) {
|
|
154
150
|
try {
|
|
151
|
+
const fjallKeyspacePath = withRelPath(fuzzDbBase);
|
|
155
152
|
if (hybridStateBackend === FUZZ_DB_FJALL) {
|
|
156
|
-
// fjall-hybrid:
|
|
157
|
-
//
|
|
158
|
-
|
|
159
|
-
if (resetCount === 1) {
|
|
153
|
+
// fjall-hybrid: values pile up across resets, so rebuild the
|
|
154
|
+
// keyspace periodically to avoid LSM read amplification.
|
|
155
|
+
if (resetCount === 1 || fjallKeyspace === null) {
|
|
160
156
|
// First reset: start from a clean slate.
|
|
161
157
|
await wipeFuzzDb(fuzzDbBase);
|
|
162
|
-
|
|
158
|
+
fjallKeyspace = await FjallRoot.open(fjallKeyspacePath, {
|
|
163
159
|
ephemeral: true,
|
|
164
160
|
cacheSizeBytes: FUZZ_FJALL_CACHE_BYTES,
|
|
165
161
|
});
|
|
166
|
-
logger.info `🗄️ Opened reusable fjall
|
|
162
|
+
logger.info `🗄️ Opened reusable fjall keyspace at ${fjallKeyspacePath}`;
|
|
167
163
|
}
|
|
168
|
-
if (resetCount %
|
|
169
|
-
// Periodic rebuild: close, wipe
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
await
|
|
173
|
-
await wipeFuzzDb(
|
|
174
|
-
|
|
175
|
-
if (fjallSession === null) {
|
|
176
|
-
// No active session: create a fresh one.
|
|
177
|
-
fjallSession = await FjallValuesSession.open(fjallSessionPath, {
|
|
164
|
+
else if (resetCount % REBUILD_FJALL_HYBRID_KEYSPACE_EVERY === 0) {
|
|
165
|
+
// Periodic rebuild: close, wipe keyspace dir, and reopen.
|
|
166
|
+
const keyspace = fjallKeyspace;
|
|
167
|
+
fjallKeyspace = null;
|
|
168
|
+
await keyspace.close().catch(() => { });
|
|
169
|
+
await wipeFuzzDb(fuzzDbBase).catch(() => { });
|
|
170
|
+
fjallKeyspace = await FjallRoot.open(fjallKeyspacePath, {
|
|
178
171
|
ephemeral: true,
|
|
179
172
|
cacheSizeBytes: FUZZ_FJALL_CACHE_BYTES,
|
|
180
173
|
});
|
|
181
|
-
logger.info `🗄️
|
|
174
|
+
logger.info `🗄️ Rebuilt reusable fjall keyspace at ${fjallKeyspacePath}`;
|
|
182
175
|
}
|
|
183
176
|
}
|
|
184
177
|
else {
|
|
185
|
-
//
|
|
186
|
-
|
|
178
|
+
// full-fjall: keep one keyspace open and recycle only the five
|
|
179
|
+
// partitions used by FjallBlocks/FjallStates.
|
|
180
|
+
if (resetCount === 1 || fjallKeyspace === null) {
|
|
181
|
+
await wipeFuzzDb(fuzzDbBase);
|
|
182
|
+
fjallKeyspace = await FjallRoot.open(fjallKeyspacePath, {
|
|
183
|
+
ephemeral: true,
|
|
184
|
+
cacheSizeBytes: FUZZ_FJALL_CACHE_BYTES,
|
|
185
|
+
});
|
|
186
|
+
logger.info `🗄️ Opened reusable fjall keyspace at ${fjallKeyspacePath}`;
|
|
187
|
+
}
|
|
188
|
+
else if (fjallKeyspace !== null) {
|
|
189
|
+
const keyspace = fjallKeyspace;
|
|
190
|
+
await Promise.all(FUZZ_FJALL_PARTITIONS.map((name) => keyspace.deletePartition(name)));
|
|
191
|
+
}
|
|
187
192
|
}
|
|
188
193
|
runningNode = await buildNode(fuzzDbBase);
|
|
189
194
|
return await runningNode.getBestStateRootHash();
|
|
@@ -212,9 +217,9 @@ export async function mainFuzz(fuzzConfig, withRelPath) {
|
|
|
212
217
|
isClosing = true;
|
|
213
218
|
// Stop accepting connections + unlink the socket.
|
|
214
219
|
closeFuzzTarget();
|
|
215
|
-
// Drain the active
|
|
220
|
+
// Drain the active reset (flush + close DB). Swallow errors so a
|
|
216
221
|
// failing close still lets the process exit 0; the db is wiped next.
|
|
217
|
-
// The node references the shared fjall
|
|
222
|
+
// The node references the shared fjall keyspace, so it must close first.
|
|
218
223
|
if (activeReset !== null) {
|
|
219
224
|
await activeReset.catch((e) => logger.error `Error waiting for fuzz reset: ${e}`);
|
|
220
225
|
}
|
|
@@ -223,11 +228,11 @@ export async function mainFuzz(fuzzConfig, withRelPath) {
|
|
|
223
228
|
runningNode = null;
|
|
224
229
|
await node.close().catch((e) => logger.error `Error closing fuzz node: ${e}`);
|
|
225
230
|
}
|
|
226
|
-
// Release the reused fjall
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
await
|
|
231
|
+
// Release the reused fjall keyspace before wiping its files.
|
|
232
|
+
if (fjallKeyspace !== null) {
|
|
233
|
+
const keyspace = fjallKeyspace;
|
|
234
|
+
fjallKeyspace = null;
|
|
235
|
+
await keyspace.close().catch((e) => logger.error `Error closing fjall keyspace: ${e}`);
|
|
231
236
|
}
|
|
232
237
|
if (fuzzDbBase !== undefined) {
|
|
233
238
|
await wipeFuzzDb(fuzzDbBase).catch(() => { });
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type FjallRoot } from "#@typeberry/workers-api-node";
|
|
2
2
|
import type { JamConfig } from "./jam-config.js";
|
|
3
3
|
import type { NodeApi } from "./main.js";
|
|
4
|
-
export type StateBackend = "
|
|
4
|
+
export type StateBackend = "fjall" | "fjall-hybrid";
|
|
5
5
|
export type ImporterOptions = {
|
|
6
6
|
initGenesisFromAncestry?: boolean;
|
|
7
7
|
dummyFinalityDepth?: number;
|
|
8
8
|
pruneBlocks?: boolean;
|
|
9
9
|
/** Open the database without fsync/compression. Only safe for throwaway dbs (e.g. fuzzing). */
|
|
10
10
|
ephemeral?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Persistent backend used when `databaseBasePath` is set. Defaults to config's backend (fjall unless overridden).
|
|
13
|
-
*
|
|
14
|
-
* lmdb and lmdb-hybrid are deprecated and retained as explicit fallbacks.
|
|
15
|
-
*/
|
|
11
|
+
/** Persistent backend used when `databaseBasePath` is set. Defaults to fjall. */
|
|
16
12
|
stateBackend?: StateBackend;
|
|
17
13
|
/**
|
|
18
|
-
* Reuse an already-open fjall
|
|
19
|
-
*
|
|
20
|
-
* opens one per run and reuses it across resets.
|
|
14
|
+
* Reuse an already-open fjall keyspace instead of opening a fresh keyspace
|
|
15
|
+
* from `dbPath`. Used by fjall and fjall-hybrid fuzz targets.
|
|
21
16
|
*/
|
|
22
|
-
|
|
17
|
+
sharedFjallKeyspace?: FjallRoot;
|
|
23
18
|
};
|
|
24
19
|
export declare function mainImporter(config: JamConfig, withRelPath: (v: string) => string, options?: ImporterOptions): Promise<NodeApi>;
|
|
25
20
|
//# sourceMappingURL=main-importer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-importer.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/node/main-importer.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"main-importer.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/node/main-importer.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,SAAS,EAA4D,MAAM,6BAA6B,CAAC;AAEvH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,cAAc,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+FAA+F;IAC/F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iFAAiF;IACjF,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC;CACjC,CAAC;AAEF,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAClC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAqGlB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Bytes } from "#@typeberry/bytes";
|
|
2
2
|
import { PvmBackend } from "#@typeberry/config";
|
|
3
|
-
import { KnownChainSpec
|
|
3
|
+
import { KnownChainSpec } from "#@typeberry/config-node";
|
|
4
4
|
import { bandersnatch, initWasm } from "#@typeberry/crypto";
|
|
5
5
|
import { Blake2b, HASH_SIZE } from "#@typeberry/hash";
|
|
6
6
|
import { createImporter, ImporterConfig } from "#@typeberry/importer";
|
|
7
7
|
import { tryAsU16 } from "#@typeberry/numbers";
|
|
8
8
|
import { CURRENT_SUITE, CURRENT_VERSION, Result, resultToString, version } from "#@typeberry/utils";
|
|
9
|
-
import { FjallWorkerConfig, HybridWorkerConfig, InMemWorkerConfig
|
|
9
|
+
import { FjallWorkerConfig, HybridWorkerConfig, InMemWorkerConfig } from "#@typeberry/workers-api-node";
|
|
10
10
|
import { getChainSpec, getDatabasePath, initializeDatabase, logger } from "./common.js";
|
|
11
11
|
const zeroHash = Bytes.zero(HASH_SIZE).asOpaque();
|
|
12
12
|
export async function mainImporter(config, withRelPath, options = {}) {
|
|
@@ -18,13 +18,8 @@ export async function mainImporter(config, withRelPath, options = {}) {
|
|
|
18
18
|
logger.info `🐇 Bandersnatch ${bandesnatchNative.isOk ? "native 🚀" : `using wasm: ${bandesnatchNative.error}`}`;
|
|
19
19
|
// Single source of truth for the states db backend: drives both the log line
|
|
20
20
|
// below and the worker config picked further down.
|
|
21
|
-
const dbBackend = config.node.databaseBasePath === undefined
|
|
22
|
-
? "in-memory"
|
|
23
|
-
: (options.stateBackend ?? config.node.stateBackend ?? RegularStateBackend.Fjall);
|
|
21
|
+
const dbBackend = config.node.databaseBasePath === undefined ? "in-memory" : (options.stateBackend ?? "fjall");
|
|
24
22
|
logger.info `🗄️ States DB: ${dbBackend}.`;
|
|
25
|
-
if (dbBackend === "lmdb" || dbBackend === "lmdb-hybrid") {
|
|
26
|
-
logger.warn `🗄️ The ${dbBackend} state backend is deprecated. Use fjall unless you need a temporary fallback.`;
|
|
27
|
-
}
|
|
28
23
|
const chainSpec = getChainSpec(config.node.flavor);
|
|
29
24
|
const blake2b = await Blake2b.createHasher();
|
|
30
25
|
const nodeName = config.nodeName;
|
|
@@ -44,7 +39,7 @@ export async function mainImporter(config, withRelPath, options = {}) {
|
|
|
44
39
|
blake2b,
|
|
45
40
|
workerParams,
|
|
46
41
|
})
|
|
47
|
-
: dbBackend === "
|
|
42
|
+
: dbBackend === "fjall-hybrid"
|
|
48
43
|
? await HybridWorkerConfig.new({
|
|
49
44
|
nodeName,
|
|
50
45
|
chainSpec,
|
|
@@ -53,26 +48,17 @@ export async function mainImporter(config, withRelPath, options = {}) {
|
|
|
53
48
|
workerParams,
|
|
54
49
|
ephemeral,
|
|
55
50
|
compression,
|
|
56
|
-
|
|
57
|
-
sharedFjallSession: options.sharedFjallSession,
|
|
51
|
+
sharedFjallKeyspace: options.sharedFjallKeyspace,
|
|
58
52
|
})
|
|
59
|
-
:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
: LmdbWorkerConfig.new({
|
|
69
|
-
nodeName,
|
|
70
|
-
chainSpec,
|
|
71
|
-
blake2b,
|
|
72
|
-
dbPath,
|
|
73
|
-
workerParams,
|
|
74
|
-
ephemeral,
|
|
75
|
-
});
|
|
53
|
+
: FjallWorkerConfig.new({
|
|
54
|
+
nodeName,
|
|
55
|
+
chainSpec,
|
|
56
|
+
blake2b,
|
|
57
|
+
dbPath,
|
|
58
|
+
workerParams,
|
|
59
|
+
ephemeral,
|
|
60
|
+
sharedFjallKeyspace: options.sharedFjallKeyspace,
|
|
61
|
+
});
|
|
76
62
|
// Initialize the database with genesis state and block if there isn't one.
|
|
77
63
|
logger.info `🛢️ Opening database at ${dbPath}`;
|
|
78
64
|
const rootDb = await workerConfig.openDatabase({ readonly: false });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/node/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAc,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/node/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAc,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAe/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAkC,MAAM,EAAW,MAAM,kBAAkB,CAAC;AAWnF,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAWhE,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAChE,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IACtE,oBAAoB,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,wBAAsB,IAAI,CACxB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAClC,SAAS,EAAE,SAAS,GAAG,IAAI,GAC1B,OAAO,CAAC,OAAO,CAAC,CAuLlB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { isMainThread } from "node:worker_threads";
|
|
2
2
|
import { AUTHORSHIP_NETWORK_PORT } from "#@typeberry/comms-authorship-network";
|
|
3
3
|
import { PvmBackend } from "#@typeberry/config";
|
|
4
|
-
import { RegularStateBackend } from "#@typeberry/config-node";
|
|
5
4
|
import { initWasm } from "#@typeberry/crypto";
|
|
6
5
|
import { deriveBandersnatchSecretKey, deriveEd25519SecretKey, trivialSeed, } from "#@typeberry/crypto/key-derivation.js";
|
|
7
6
|
import { Blake2b } from "#@typeberry/hash";
|
|
@@ -11,7 +10,7 @@ import { Listener } from "#@typeberry/listener";
|
|
|
11
10
|
import { tryAsU16, tryAsU32 } from "#@typeberry/numbers";
|
|
12
11
|
import { CURRENT_SUITE, CURRENT_VERSION, Result, version } from "#@typeberry/utils";
|
|
13
12
|
import { DirectPort, DirectWorkerConfig } from "#@typeberry/workers-api";
|
|
14
|
-
import { FjallWorkerConfig, InMemWorkerConfig,
|
|
13
|
+
import { FjallWorkerConfig, InMemWorkerConfig, logHostEnvironment, ThreadPort, } from "#@typeberry/workers-api-node";
|
|
15
14
|
import { getChainSpec, getDatabasePath, initializeDatabase, logger } from "./common.js";
|
|
16
15
|
import { initializeExtensions } from "./extensions.js";
|
|
17
16
|
import * as metrics from "./metrics.js";
|
|
@@ -30,12 +29,9 @@ export async function main(config, withRelPath, telemetry) {
|
|
|
30
29
|
const blake2b = await Blake2b.createHasher();
|
|
31
30
|
const nodeName = config.nodeName;
|
|
32
31
|
const isInMemory = config.node.databaseBasePath === undefined;
|
|
33
|
-
logger.info `🗄️ States DB: ${isInMemory ? "in-memory" :
|
|
34
|
-
if (!isInMemory && config.node.stateBackend === RegularStateBackend.Lmdb) {
|
|
35
|
-
logger.warn `🗄️ The lmdb state backend is deprecated. Use state_backend="fjall" unless you need a temporary fallback.`;
|
|
36
|
-
}
|
|
32
|
+
logger.info `🗄️ States DB: ${isInMemory ? "in-memory" : "fjall"}.`;
|
|
37
33
|
const { dbPath, genesisHeaderHash } = getDatabasePath(blake2b, nodeName, config.node.chainSpec.genesisHeader, withRelPath(config.node.databaseBasePath ?? "<in-memory>"));
|
|
38
|
-
const baseConfig = { nodeName, chainSpec, blake2b, dbPath
|
|
34
|
+
const baseConfig = { nodeName, chainSpec, blake2b, dbPath };
|
|
39
35
|
const importerParams = {
|
|
40
36
|
...baseConfig,
|
|
41
37
|
workerParams: ImporterConfig.create({
|
|
@@ -63,9 +59,8 @@ export async function main(config, withRelPath, telemetry) {
|
|
|
63
59
|
throw e;
|
|
64
60
|
}
|
|
65
61
|
// fjall-js shares the engine explicitly and requires every handle to close.
|
|
66
|
-
// Keep lmdb's historical main-thread handle open until shutdown.
|
|
67
62
|
let mainRootDb = rootDb;
|
|
68
|
-
if (!importerConfig.isInMemory
|
|
63
|
+
if (!importerConfig.isInMemory) {
|
|
69
64
|
await rootDb.close();
|
|
70
65
|
mainRootDb = null;
|
|
71
66
|
}
|
|
@@ -241,11 +236,6 @@ const initNetwork = async (importer, params, baseConfig, genesisHeaderHash, netw
|
|
|
241
236
|
});
|
|
242
237
|
return { closeNetwork: finish, networkApi: network, networkWorker: worker };
|
|
243
238
|
};
|
|
244
|
-
function createPersistentWorkerConfig(
|
|
245
|
-
|
|
246
|
-
case RegularStateBackend.Fjall:
|
|
247
|
-
return FjallWorkerConfig.new(params);
|
|
248
|
-
case RegularStateBackend.Lmdb:
|
|
249
|
-
return LmdbWorkerConfig.new(params);
|
|
250
|
-
}
|
|
239
|
+
function createPersistentWorkerConfig(params) {
|
|
240
|
+
return FjallWorkerConfig.new(params);
|
|
251
241
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e-server.d.ts","sourceRoot":"","sources":["../../../../../../packages/jam/rpc/test/e2e-server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,SAAe,
|
|
1
|
+
{"version":3,"file":"e2e-server.d.ts","sourceRoot":"","sources":["../../../../../../packages/jam/rpc/test/e2e-server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,SAAe,sBA0B/E"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PvmBackend } from "#@typeberry/config";
|
|
2
|
-
import { loadConfig, NODE_DEFAULTS
|
|
2
|
+
import { loadConfig, NODE_DEFAULTS } from "#@typeberry/config-node";
|
|
3
3
|
import { Blake2b } from "#@typeberry/hash";
|
|
4
4
|
import { getChainSpec, getDatabasePath } from "#@typeberry/node";
|
|
5
5
|
import { validation } from "#@typeberry/rpc-validation";
|
|
6
6
|
import { workspacePathFix } from "#@typeberry/utils";
|
|
7
|
-
import { FjallWorkerConfig
|
|
7
|
+
import { FjallWorkerConfig } from "#@typeberry/workers-api-node";
|
|
8
8
|
import { handlers } from "../src/handlers.js";
|
|
9
9
|
import { RpcServer } from "../src/server.js";
|
|
10
10
|
const DEFAULT_PORT = 19800;
|
|
@@ -25,8 +25,6 @@ export async function startTestRpcServer(configPath, port = DEFAULT_PORT) {
|
|
|
25
25
|
dbPath,
|
|
26
26
|
blake2b,
|
|
27
27
|
};
|
|
28
|
-
const rootDb =
|
|
29
|
-
? await FjallWorkerConfig.new(dbConfigParams).openDatabase({ readonly: true })
|
|
30
|
-
: await LmdbWorkerConfig.new(dbConfigParams).openDatabase({ readonly: true });
|
|
28
|
+
const rootDb = await FjallWorkerConfig.new(dbConfigParams).openDatabase({ readonly: true });
|
|
31
29
|
return RpcServer.new(port, rootDb, spec, blake2b, PvmBackend.Ananas, handlers, validation.schemas);
|
|
32
30
|
}
|
|
@@ -94,7 +94,7 @@ describe("JSON RPC Client-Server E2E", { concurrency: false }, () => {
|
|
|
94
94
|
// TODO [ToDr] We should probably do a little bit better in terms of
|
|
95
95
|
// tracking recently active services. Some options for the future:
|
|
96
96
|
// 1. Use InMemoryDb for RPC E2E tests.
|
|
97
|
-
// 2. Store additional service metadata in
|
|
97
|
+
// 2. Store additional service metadata in the database.
|
|
98
98
|
// 3. Cache the state object, so that accessed services would be returned here.
|
|
99
99
|
assert.deepStrictEqual(result, []);
|
|
100
100
|
});
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* (incomplete in-memory view).
|
|
20
20
|
* - `SerializedState<LeafDb>`: Disk-backed trie storage-leaf nodes live on
|
|
21
21
|
* disk and load on demand; cheap to update (no data duplication) and re-compute
|
|
22
|
-
* the `stateRoot`.
|
|
22
|
+
* the `stateRoot`.
|
|
23
23
|
* - `SerializedState<StateEntries>`: serialized state represented as a simple in-memory
|
|
24
24
|
* hashmap of `key -> value` entries.
|
|
25
25
|
*/
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* (incomplete in-memory view).
|
|
20
20
|
* - `SerializedState<LeafDb>`: Disk-backed trie storage-leaf nodes live on
|
|
21
21
|
* disk and load on demand; cheap to update (no data duplication) and re-compute
|
|
22
|
-
* the `stateRoot`.
|
|
22
|
+
* the `stateRoot`.
|
|
23
23
|
* - `SerializedState<StateEntries>`: serialized state represented as a simple in-memory
|
|
24
24
|
* hashmap of `key -> value` entries.
|
|
25
25
|
*/
|
|
@@ -2,46 +2,15 @@ import type { MessagePort } from "node:worker_threads";
|
|
|
2
2
|
import { type Decode, type Encode } from "#@typeberry/codec";
|
|
3
3
|
import { ChainSpec } from "#@typeberry/config";
|
|
4
4
|
import { type BlocksDb, type RootDb, type SerializedStatesDb } from "#@typeberry/database";
|
|
5
|
-
import { FjallValuesSession } from "#@typeberry/database-fjall";
|
|
5
|
+
import { FjallRoot, FjallValuesSession } from "#@typeberry/database-fjall";
|
|
6
6
|
import { Blake2b } from "#@typeberry/hash";
|
|
7
7
|
import type { WorkerConfig } from "#@typeberry/workers-api";
|
|
8
8
|
import { ThreadPort, type TransferablePort } from "./port.js";
|
|
9
|
-
export { FjallValuesSession };
|
|
9
|
+
export { FjallRoot, FjallValuesSession };
|
|
10
10
|
/** Persistent regular-node backend. */
|
|
11
|
-
export type PersistentBackend = "
|
|
11
|
+
export type PersistentBackend = "fjall";
|
|
12
12
|
/** Transferable worker config for persistent regular-node workers. */
|
|
13
|
-
export type PersistentWorkerConfig<T> =
|
|
14
|
-
/**
|
|
15
|
-
* Worker config for node.js, backed by the LMDB database.
|
|
16
|
-
*
|
|
17
|
-
* @deprecated lmdb is retained as an explicit fallback. Use `FjallWorkerConfig` for regular nodes.
|
|
18
|
-
*/
|
|
19
|
-
export declare class LmdbWorkerConfig<T = void> implements WorkerConfig<T, BlocksDb, SerializedStatesDb> {
|
|
20
|
-
readonly nodeName: string;
|
|
21
|
-
readonly chainSpec: ChainSpec;
|
|
22
|
-
readonly workerParams: T;
|
|
23
|
-
readonly dbPath: string;
|
|
24
|
-
readonly blake2b: Blake2b;
|
|
25
|
-
readonly ports: Map<string, ThreadPort>;
|
|
26
|
-
readonly ephemeral: boolean;
|
|
27
|
-
static new<T>({ nodeName, chainSpec, workerParams, dbPath, blake2b, ports, ephemeral, }: {
|
|
28
|
-
nodeName: string;
|
|
29
|
-
chainSpec: ChainSpec;
|
|
30
|
-
workerParams: T;
|
|
31
|
-
dbPath: string;
|
|
32
|
-
blake2b: Blake2b;
|
|
33
|
-
ports?: Map<string, ThreadPort>;
|
|
34
|
-
ephemeral?: boolean;
|
|
35
|
-
}): LmdbWorkerConfig<T>;
|
|
36
|
-
/** Restore node config from a transferable config object. */
|
|
37
|
-
static fromTransferable<T>(decodeParams: Decode<T>, config: TransferableConfig): Promise<LmdbWorkerConfig<T>>;
|
|
38
|
-
private constructor();
|
|
39
|
-
openDatabase(options?: {
|
|
40
|
-
readonly: boolean;
|
|
41
|
-
}): Promise<RootDb<BlocksDb, SerializedStatesDb>>;
|
|
42
|
-
/** Convert this config into a thread-transferable object. */
|
|
43
|
-
intoTransferable(paramsCodec: Encode<T>): TransferableConfig;
|
|
44
|
-
}
|
|
13
|
+
export type PersistentWorkerConfig<T> = FjallWorkerConfig<T>;
|
|
45
14
|
/** Worker config for node.js, backed by a shared fjall engine. */
|
|
46
15
|
export declare class FjallWorkerConfig<T = void> implements WorkerConfig<T, BlocksDb, SerializedStatesDb> {
|
|
47
16
|
readonly nodeName: string;
|
|
@@ -52,7 +21,8 @@ export declare class FjallWorkerConfig<T = void> implements WorkerConfig<T, Bloc
|
|
|
52
21
|
readonly ports: Map<string, ThreadPort>;
|
|
53
22
|
readonly ephemeral: boolean;
|
|
54
23
|
readonly cacheSizeBytes: number | undefined;
|
|
55
|
-
|
|
24
|
+
private readonly sharedFjallKeyspace;
|
|
25
|
+
static new<T>({ nodeName, chainSpec, workerParams, dbPath, blake2b, ports, ephemeral, cacheSizeBytes, sharedFjallKeyspace, }: {
|
|
56
26
|
nodeName: string;
|
|
57
27
|
chainSpec: ChainSpec;
|
|
58
28
|
workerParams: T;
|
|
@@ -61,6 +31,7 @@ export declare class FjallWorkerConfig<T = void> implements WorkerConfig<T, Bloc
|
|
|
61
31
|
ports?: Map<string, ThreadPort>;
|
|
62
32
|
ephemeral?: boolean;
|
|
63
33
|
cacheSizeBytes?: number;
|
|
34
|
+
sharedFjallKeyspace?: FjallRoot;
|
|
64
35
|
}): FjallWorkerConfig<T>;
|
|
65
36
|
/** Restore node config from a transferable config object. */
|
|
66
37
|
static fromTransferable<T>(decodeParams: Decode<T>, config: TransferableConfig): Promise<FjallWorkerConfig<T>>;
|
|
@@ -115,11 +86,10 @@ export declare class InMemWorkerConfig<T = undefined> implements WorkerConfig<T,
|
|
|
115
86
|
}): Promise<RootDb<BlocksDb, SerializedStatesDb>>;
|
|
116
87
|
}
|
|
117
88
|
/** Persistent values store backing the hybrid config. */
|
|
118
|
-
export type HybridBackend = "
|
|
89
|
+
export type HybridBackend = "fjall";
|
|
119
90
|
/**
|
|
120
91
|
* Hybrid worker config for the fuzz target: in-memory blocks and leaf sets,
|
|
121
|
-
* but large values persisted to disk
|
|
122
|
-
* (lmdb or fjall).
|
|
92
|
+
* but large values persisted to disk via fjall.
|
|
123
93
|
*
|
|
124
94
|
* fjall opens its keyspace asynchronously, that is why `new` here is async.
|
|
125
95
|
*
|
|
@@ -141,7 +111,7 @@ export declare class HybridWorkerConfig<T = undefined> implements WorkerConfig<T
|
|
|
141
111
|
readonly ephemeral: boolean;
|
|
142
112
|
readonly compression: boolean;
|
|
143
113
|
private readonly states;
|
|
144
|
-
static new<T>({ nodeName, chainSpec, workerParams, blake2b, dbPath, ephemeral, compression,
|
|
114
|
+
static new<T>({ nodeName, chainSpec, workerParams, blake2b, dbPath, ephemeral, compression, sharedFjallKeyspace, }: {
|
|
145
115
|
nodeName: string;
|
|
146
116
|
chainSpec: ChainSpec;
|
|
147
117
|
workerParams: T;
|
|
@@ -149,14 +119,12 @@ export declare class HybridWorkerConfig<T = undefined> implements WorkerConfig<T
|
|
|
149
119
|
dbPath: string;
|
|
150
120
|
ephemeral?: boolean;
|
|
151
121
|
compression?: boolean;
|
|
152
|
-
backend?: HybridBackend;
|
|
153
122
|
/**
|
|
154
|
-
* Reuse an already-open fjall
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* unless `backend === "fjall"`.
|
|
123
|
+
* Reuse an already-open fjall keyspace instead of opening a fresh keyspace.
|
|
124
|
+
* The fuzz target opens one per run and passes it on every reset, so only
|
|
125
|
+
* the in-memory blocks/leaf sets are rebuilt per vector.
|
|
158
126
|
*/
|
|
159
|
-
|
|
127
|
+
sharedFjallKeyspace?: FjallRoot;
|
|
160
128
|
}): Promise<HybridWorkerConfig<T>>;
|
|
161
129
|
private readonly blocks;
|
|
162
130
|
private constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../packages/workers/api-node/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,MAAM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