@typeberry/jam 0.5.4-e1cdb43 → 0.5.5-d447af6
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/bootstrap-generator.mjs +1 -1
- package/bootstrap-importer.mjs +1 -1
- package/bootstrap-network.mjs +4 -1
- package/bootstrap-network.mjs.map +1 -1
- package/index.js +50 -28
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -139928,6 +139928,7 @@ var __webpack_exports__ = {};
|
|
|
139928
139928
|
|
|
139929
139929
|
// EXPORTS
|
|
139930
139930
|
__nccwpck_require__.d(__webpack_exports__, {
|
|
139931
|
+
wf: () => (/* reexport */ ARGS),
|
|
139931
139932
|
uB: () => (/* reexport */ Command),
|
|
139932
139933
|
_$: () => (/* reexport */ HELP),
|
|
139933
139934
|
Zy: () => (/* reexport */ parseArgs),
|
|
@@ -145528,6 +145529,9 @@ var descriptors_json;
|
|
|
145528
145529
|
if (typeof inJson !== "object" || inJson === null) {
|
|
145529
145530
|
throw new Error("Expected map for parsing");
|
|
145530
145531
|
}
|
|
145532
|
+
if (Array.isArray(inJson)) {
|
|
145533
|
+
throw new Error("Expected map, got array");
|
|
145534
|
+
}
|
|
145531
145535
|
const result = new Map();
|
|
145532
145536
|
for (const [key, value] of Object.entries(inJson)) {
|
|
145533
145537
|
result.set(parse_parseFromJson(key, K, `${context}.key`), parse_parseFromJson(value, V, `${context}.value`));
|
|
@@ -148159,7 +148163,7 @@ function handleMessageFragmentation(callback, onOverflow) {
|
|
|
148159
148163
|
// EXTERNAL MODULE: ./node_modules/@opentelemetry/api/build/src/index.js
|
|
148160
148164
|
var src = __nccwpck_require__(25555);
|
|
148161
148165
|
;// CONCATENATED MODULE: ./packages/core/networking/package.json
|
|
148162
|
-
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/networking","rE":"0.5.
|
|
148166
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/networking","rE":"0.5.5"}');
|
|
148163
148167
|
;// CONCATENATED MODULE: ./packages/core/networking/metrics.ts
|
|
148164
148168
|
|
|
148165
148169
|
|
|
@@ -166428,7 +166432,7 @@ class TransitionHasher {
|
|
|
166428
166432
|
|
|
166429
166433
|
|
|
166430
166434
|
;// CONCATENATED MODULE: ./packages/workers/importer/package.json
|
|
166431
|
-
const importer_package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/importer","rE":"0.5.
|
|
166435
|
+
const importer_package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/importer","rE":"0.5.5"}');
|
|
166432
166436
|
;// CONCATENATED MODULE: ./packages/workers/importer/metrics.ts
|
|
166433
166437
|
|
|
166434
166438
|
|
|
@@ -169427,7 +169431,7 @@ function initializeExtensions(api) {
|
|
|
169427
169431
|
}
|
|
169428
169432
|
|
|
169429
169433
|
;// CONCATENATED MODULE: ./packages/jam/node/package.json
|
|
169430
|
-
const node_package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/node","rE":"0.5.
|
|
169434
|
+
const node_package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/node","rE":"0.5.5"}');
|
|
169431
169435
|
;// CONCATENATED MODULE: ./packages/jam/node/metrics.ts
|
|
169432
169436
|
|
|
169433
169437
|
|
|
@@ -169468,7 +169472,7 @@ function node_metrics_createMetrics() {
|
|
|
169468
169472
|
}
|
|
169469
169473
|
|
|
169470
169474
|
;// CONCATENATED MODULE: ./packages/workers/block-authorship/package.json
|
|
169471
|
-
const block_authorship_package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/block-authorship","rE":"0.5.
|
|
169475
|
+
const block_authorship_package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@typeberry/block-authorship","rE":"0.5.5"}');
|
|
169472
169476
|
;// CONCATENATED MODULE: ./packages/workers/block-authorship/metrics.ts
|
|
169473
169477
|
|
|
169474
169478
|
|
|
@@ -170387,7 +170391,7 @@ var sdk_node_build_src = __nccwpck_require__(80918);
|
|
|
170387
170391
|
// EXTERNAL MODULE: ./node_modules/@opentelemetry/semantic-conventions/build/src/index.js
|
|
170388
170392
|
var semantic_conventions_build_src = __nccwpck_require__(47632);
|
|
170389
170393
|
;// CONCATENATED MODULE: ./packages/core/telemetry/package.json
|
|
170390
|
-
const telemetry_package_namespaceObject = {"rE":"0.5.
|
|
170394
|
+
const telemetry_package_namespaceObject = {"rE":"0.5.5"};
|
|
170391
170395
|
;// CONCATENATED MODULE: ./packages/core/telemetry/index.ts
|
|
170392
170396
|
|
|
170393
170397
|
|
|
@@ -170493,7 +170497,7 @@ function initializeTelemetry(config) {
|
|
|
170493
170497
|
var minimist = __nccwpck_require__(38595);
|
|
170494
170498
|
var minimist_default = /*#__PURE__*/__nccwpck_require__.n(minimist);
|
|
170495
170499
|
;// CONCATENATED MODULE: ./bin/jam/package.json
|
|
170496
|
-
const jam_package_namespaceObject = {"rE":"0.5.
|
|
170500
|
+
const jam_package_namespaceObject = {"rE":"0.5.5"};
|
|
170497
170501
|
;// CONCATENATED MODULE: ./bin/jam/args.ts
|
|
170498
170502
|
|
|
170499
170503
|
|
|
@@ -170501,32 +170505,41 @@ const jam_package_namespaceObject = {"rE":"0.5.4"};
|
|
|
170501
170505
|
|
|
170502
170506
|
|
|
170503
170507
|
|
|
170508
|
+
const ARGS = {
|
|
170509
|
+
NAME: "name",
|
|
170510
|
+
CONFIG: "config",
|
|
170511
|
+
PVM: "pvm",
|
|
170512
|
+
FAST_FORWARD: "fast-forward",
|
|
170513
|
+
INIT_GENESIS_FROM_ANCESTRY: "init-genesis-from-ancestry",
|
|
170514
|
+
VERSION: "version",
|
|
170515
|
+
};
|
|
170504
170516
|
const HELP = `
|
|
170505
170517
|
@typeberry/jam ${jam_package_namespaceObject.rE} by Fluffy Labs.
|
|
170506
170518
|
|
|
170507
170519
|
Usage:
|
|
170508
170520
|
jam [options]
|
|
170509
|
-
jam [options] dev <dev-validator-index> [
|
|
170521
|
+
jam [options] dev <dev-validator-index> [--${ARGS.FAST_FORWARD}]
|
|
170510
170522
|
jam [options] import <bin-or-json-blocks>
|
|
170511
170523
|
jam [options] export <output-directory-or-file>
|
|
170512
|
-
jam [options] [
|
|
170524
|
+
jam [options] fuzz-target [--${ARGS.VERSION}=1] [--${ARGS.INIT_GENESIS_FROM_ANCESTRY}] [socket-path=/tmp/jam_target.sock]
|
|
170513
170525
|
|
|
170514
170526
|
Options:
|
|
170515
|
-
|
|
170527
|
+
--${ARGS.NAME} Override node name. Affects networking key and db location.
|
|
170516
170528
|
[default: ${NODE_DEFAULTS.name}]
|
|
170517
|
-
|
|
170529
|
+
--${ARGS.CONFIG} Configuration directives. If specified more than once, they are evaluated and merged from left to right.
|
|
170518
170530
|
A configuration directive can be a path to a config file, an inline JSON object, a pseudo-jq query or one of predefined configs ['${DEV_CONFIG}', '${DEFAULT_CONFIG}'].
|
|
170519
170531
|
Pseudo-jq queries are a way to modify the config using a subset of jq syntax.
|
|
170520
|
-
Example:
|
|
170521
|
-
Example:
|
|
170522
|
-
Example:
|
|
170523
|
-
Example:
|
|
170524
|
-
Example:
|
|
170525
|
-
Example:
|
|
170532
|
+
Example: --${ARGS.CONFIG}=dev --${ARGS.CONFIG}=.chain_spec+={"bootnodes": []} -- will modify only the bootnodes property of the chain spec (merge).
|
|
170533
|
+
Example: --${ARGS.CONFIG}=dev --${ARGS.CONFIG}=.chain_spec={"bootnodes": []} -- will replace the entire chain spec property with the provided JSON object.
|
|
170534
|
+
Example: --${ARGS.CONFIG}=dev --${ARGS.CONFIG}=.chain_spec+=bootnodes.json -- you may also use JSON files in your queries. This one will merge the contents of bootnodes.json onto the chain spec.
|
|
170535
|
+
Example: --${ARGS.CONFIG}=dev --${ARGS.CONFIG}={"chain_spec": { "bootnodes": [] }} -- will merge the provided JSON object onto the "dev" config.
|
|
170536
|
+
Example: --${ARGS.CONFIG}=dev --${ARGS.CONFIG}=bootnodes.json -- will merge the contents of bootnodes.json onto the "dev" config.
|
|
170537
|
+
Example: --${ARGS.CONFIG}=custom-config.json -- will use the contents of custom-config.json as the config.
|
|
170526
170538
|
[default: ${NODE_DEFAULTS.config}]
|
|
170527
|
-
|
|
170539
|
+
--${ARGS.PVM} PVM Backend, one of: [${PvmBackendNames.join(", ")}].
|
|
170528
170540
|
[default: ${PvmBackendNames[NODE_DEFAULTS.pvm]}]
|
|
170529
|
-
|
|
170541
|
+
--${ARGS.FAST_FORWARD} (dev mode only) Generate blocks as fast as possible without waiting for real time.
|
|
170542
|
+
--${ARGS.INIT_GENESIS_FROM_ANCESTRY} (fuzz-target only) Skip parent hash and state root verification.
|
|
170530
170543
|
`;
|
|
170531
170544
|
/** Command to execute. */
|
|
170532
170545
|
var Command;
|
|
@@ -170543,9 +170556,9 @@ var Command;
|
|
|
170543
170556
|
Command["FuzzTarget"] = "fuzz-target";
|
|
170544
170557
|
})(Command || (Command = {}));
|
|
170545
170558
|
function parseSharedOptions(args, defaultConfig = NODE_DEFAULTS.config) {
|
|
170546
|
-
const { name } = parseStringOption(args,
|
|
170547
|
-
const { config } = parseValueOptionAsArray(args,
|
|
170548
|
-
const { pvm } = parseStringOption(args,
|
|
170559
|
+
const { name } = parseStringOption(args, ARGS.NAME, (v) => v, NODE_DEFAULTS.name);
|
|
170560
|
+
const { config } = parseValueOptionAsArray(args, ARGS.CONFIG, "string", (v) => (v === "" ? null : v), defaultConfig);
|
|
170561
|
+
const { pvm } = parseStringOption(args, ARGS.PVM, (v) => {
|
|
170549
170562
|
const pvm = PvmBackendNames.indexOf(v);
|
|
170550
170563
|
if (pvm >= 0) {
|
|
170551
170564
|
return pvm;
|
|
@@ -170559,7 +170572,15 @@ function parseSharedOptions(args, defaultConfig = NODE_DEFAULTS.config) {
|
|
|
170559
170572
|
};
|
|
170560
170573
|
}
|
|
170561
170574
|
function parseArgs(input, withRelPath) {
|
|
170562
|
-
const args = minimist_default()(input
|
|
170575
|
+
const args = minimist_default()(input, {
|
|
170576
|
+
boolean: [ARGS.FAST_FORWARD, ARGS.INIT_GENESIS_FROM_ANCESTRY],
|
|
170577
|
+
});
|
|
170578
|
+
if (args[ARGS.FAST_FORWARD] === false) {
|
|
170579
|
+
delete args[ARGS.FAST_FORWARD];
|
|
170580
|
+
}
|
|
170581
|
+
if (args[ARGS.INIT_GENESIS_FROM_ANCESTRY] === false) {
|
|
170582
|
+
delete args[ARGS.INIT_GENESIS_FROM_ANCESTRY];
|
|
170583
|
+
}
|
|
170563
170584
|
const command = args._.shift() ?? Command.Run;
|
|
170564
170585
|
const isHelp = args.help !== undefined;
|
|
170565
170586
|
if (isHelp) {
|
|
@@ -170577,8 +170598,8 @@ function parseArgs(input, withRelPath) {
|
|
|
170577
170598
|
if (indexOrAll === undefined) {
|
|
170578
170599
|
throw new Error("Missing dev-validator index.");
|
|
170579
170600
|
}
|
|
170580
|
-
const isFastForward = args[
|
|
170581
|
-
delete args[
|
|
170601
|
+
const isFastForward = args[ARGS.FAST_FORWARD] === true;
|
|
170602
|
+
delete args[ARGS.FAST_FORWARD];
|
|
170582
170603
|
if (indexOrAll === "all") {
|
|
170583
170604
|
assertNoMoreArgs(args);
|
|
170584
170605
|
return { command: Command.Dev, args: { ...data, index: indexOrAll, isFastForward } };
|
|
@@ -170592,9 +170613,9 @@ function parseArgs(input, withRelPath) {
|
|
|
170592
170613
|
}
|
|
170593
170614
|
case Command.FuzzTarget: {
|
|
170594
170615
|
const data = parseSharedOptions(args);
|
|
170595
|
-
const { version } = parseValueOption(args,
|
|
170596
|
-
const initGenesisFromAncestry = args[
|
|
170597
|
-
delete args[
|
|
170616
|
+
const { version } = parseValueOption(args, ARGS.VERSION, "number", parseFuzzVersion, 1);
|
|
170617
|
+
const initGenesisFromAncestry = args[ARGS.INIT_GENESIS_FROM_ANCESTRY] === true;
|
|
170618
|
+
delete args[ARGS.INIT_GENESIS_FROM_ANCESTRY];
|
|
170598
170619
|
if (initGenesisFromAncestry) {
|
|
170599
170620
|
common_logger.warn `Init genesis from ancestry is enabled. Parent hash and state root verification is skipped.`;
|
|
170600
170621
|
}
|
|
@@ -170843,10 +170864,11 @@ function devNetworkingSeed(blake2b, name) {
|
|
|
170843
170864
|
return key;
|
|
170844
170865
|
}
|
|
170845
170866
|
|
|
170867
|
+
var __webpack_exports__ARGS = __webpack_exports__.wf;
|
|
170846
170868
|
var __webpack_exports__Command = __webpack_exports__.uB;
|
|
170847
170869
|
var __webpack_exports__HELP = __webpack_exports__._$;
|
|
170848
170870
|
var __webpack_exports__parseArgs = __webpack_exports__.Zy;
|
|
170849
170871
|
var __webpack_exports__parseSharedOptions = __webpack_exports__.P3;
|
|
170850
|
-
export { __webpack_exports__Command as Command, __webpack_exports__HELP as HELP, __webpack_exports__parseArgs as parseArgs, __webpack_exports__parseSharedOptions as parseSharedOptions };
|
|
170872
|
+
export { __webpack_exports__ARGS as ARGS, __webpack_exports__Command as Command, __webpack_exports__HELP as HELP, __webpack_exports__parseArgs as parseArgs, __webpack_exports__parseSharedOptions as parseSharedOptions };
|
|
170851
170873
|
|
|
170852
170874
|
//# sourceMappingURL=index.js.map
|