@typeberry/jam 0.2.0-5746fdc → 0.2.0-79dc2d4
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/README.md +3 -3
- package/bootstrap-generator.mjs +24 -39
- package/bootstrap-generator.mjs.map +1 -1
- package/bootstrap-importer.mjs +113 -104
- package/bootstrap-importer.mjs.map +1 -1
- package/bootstrap-network.mjs +146 -31
- package/bootstrap-network.mjs.map +1 -1
- package/index.js +289 -132
- package/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ Gray Paper compliance can be controlled via `GP_VERSION` environment variable.
|
|
|
14
14
|
|
|
15
15
|
- [x] 0.6.7
|
|
16
16
|
- [x] 0.7.0
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
17
|
+
- [x] 0.7.1
|
|
18
|
+
- [x] 0.7.2
|
|
19
19
|
|
|
20
20
|
JAM Prize requirements
|
|
21
21
|
|
|
@@ -75,7 +75,7 @@ $ docker run typeberry
|
|
|
75
75
|
$ docker run typeberry --config /app/configs/typeberry-dev.json --node-name my-node
|
|
76
76
|
|
|
77
77
|
# Run with environment variables (e.g., for logging)
|
|
78
|
-
$ docker run -e JAM_LOG=trace GP_VERSION=0.7.
|
|
78
|
+
$ docker run -e JAM_LOG=trace GP_VERSION=0.7.2 typeberry
|
|
79
79
|
|
|
80
80
|
# Run with volume mounts for persistent data
|
|
81
81
|
$ docker run -v $(pwd)/database:/app/database typeberry
|
package/bootstrap-generator.mjs
CHANGED
|
@@ -2869,44 +2869,40 @@ var GpVersion;
|
|
|
2869
2869
|
GpVersion["V0_6_7"] = "0.6.7";
|
|
2870
2870
|
GpVersion["V0_7_0"] = "0.7.0";
|
|
2871
2871
|
GpVersion["V0_7_1"] = "0.7.1";
|
|
2872
|
-
GpVersion["V0_7_2"] = "0.7.2
|
|
2872
|
+
GpVersion["V0_7_2"] = "0.7.2";
|
|
2873
2873
|
})(GpVersion || (GpVersion = {}));
|
|
2874
2874
|
var TestSuite;
|
|
2875
2875
|
(function (TestSuite) {
|
|
2876
2876
|
TestSuite["W3F_DAVXY"] = "w3f-davxy";
|
|
2877
2877
|
TestSuite["JAMDUNA"] = "jamduna";
|
|
2878
2878
|
})(TestSuite || (TestSuite = {}));
|
|
2879
|
+
const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
|
|
2879
2880
|
const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
|
|
2880
|
-
const DEFAULT_VERSION = GpVersion.
|
|
2881
|
+
const DEFAULT_VERSION = GpVersion.V0_7_2;
|
|
2881
2882
|
const env = typeof process === "undefined" ? {} : process.env;
|
|
2882
2883
|
let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
|
|
2883
2884
|
let CURRENT_SUITE = parseCurrentSuite(env.TEST_SUITE) ?? DEFAULT_SUITE;
|
|
2884
|
-
const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
|
|
2885
2885
|
function parseCurrentVersion(env) {
|
|
2886
2886
|
if (env === undefined) {
|
|
2887
2887
|
return undefined;
|
|
2888
2888
|
}
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
case GpVersion.V0_7_2:
|
|
2894
|
-
return env;
|
|
2895
|
-
default:
|
|
2896
|
-
throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
|
|
2889
|
+
for (const v of Object.values(GpVersion)) {
|
|
2890
|
+
if (env === v) {
|
|
2891
|
+
return v;
|
|
2892
|
+
}
|
|
2897
2893
|
}
|
|
2894
|
+
throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
|
|
2898
2895
|
}
|
|
2899
2896
|
function parseCurrentSuite(env) {
|
|
2900
2897
|
if (env === undefined) {
|
|
2901
2898
|
return undefined;
|
|
2902
2899
|
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
default:
|
|
2908
|
-
throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
|
|
2900
|
+
for (const s of Object.values(TestSuite)) {
|
|
2901
|
+
if (env === s) {
|
|
2902
|
+
return s;
|
|
2903
|
+
}
|
|
2909
2904
|
}
|
|
2905
|
+
throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
|
|
2910
2906
|
}
|
|
2911
2907
|
class Compatibility {
|
|
2912
2908
|
static override(version) {
|
|
@@ -3067,6 +3063,13 @@ class WithDebug {
|
|
|
3067
3063
|
return debug_inspect(this);
|
|
3068
3064
|
}
|
|
3069
3065
|
}
|
|
3066
|
+
function lazyInspect(obj) {
|
|
3067
|
+
return {
|
|
3068
|
+
toString() {
|
|
3069
|
+
return debug_inspect(obj);
|
|
3070
|
+
},
|
|
3071
|
+
};
|
|
3072
|
+
}
|
|
3070
3073
|
|
|
3071
3074
|
;// CONCATENATED MODULE: ./packages/core/utils/dev.ts
|
|
3072
3075
|
const dev_env = typeof process === "undefined" ? {} : process.env;
|
|
@@ -10131,26 +10134,6 @@ class InMemoryStateView {
|
|
|
10131
10134
|
|
|
10132
10135
|
|
|
10133
10136
|
|
|
10134
|
-
/** Dictionary entry of services that auto-accumulate every block. */
|
|
10135
|
-
class AutoAccumulate {
|
|
10136
|
-
service;
|
|
10137
|
-
gasLimit;
|
|
10138
|
-
static Codec = descriptors_codec.Class(AutoAccumulate, {
|
|
10139
|
-
service: descriptors_codec.u32.asOpaque(),
|
|
10140
|
-
gasLimit: descriptors_codec.u64.asOpaque(),
|
|
10141
|
-
});
|
|
10142
|
-
static create({ service, gasLimit }) {
|
|
10143
|
-
return new AutoAccumulate(service, gasLimit);
|
|
10144
|
-
}
|
|
10145
|
-
constructor(
|
|
10146
|
-
/** Service id that auto-accumulates. */
|
|
10147
|
-
service,
|
|
10148
|
-
/** Gas limit for auto-accumulation. */
|
|
10149
|
-
gasLimit) {
|
|
10150
|
-
this.service = service;
|
|
10151
|
-
this.gasLimit = gasLimit;
|
|
10152
|
-
}
|
|
10153
|
-
}
|
|
10154
10137
|
/**
|
|
10155
10138
|
* https://graypaper.fluffylabs.dev/#/ab2cdbd/114402114402?v=0.7.2
|
|
10156
10139
|
*/
|
|
@@ -10168,7 +10151,9 @@ class PrivilegedServices {
|
|
|
10168
10151
|
registrar: Compatibility.isGreaterOrEqual(GpVersion.V0_7_1)
|
|
10169
10152
|
? descriptors_codec.u32.asOpaque()
|
|
10170
10153
|
: ignoreValueWithDefault(tryAsServiceId(2 ** 32 - 1)),
|
|
10171
|
-
autoAccumulateServices:
|
|
10154
|
+
autoAccumulateServices: descriptors_codec.dictionary(descriptors_codec.u32.asOpaque(), descriptors_codec.u64.asOpaque(), {
|
|
10155
|
+
sortKeys: (a, b) => a - b,
|
|
10156
|
+
}),
|
|
10172
10157
|
});
|
|
10173
10158
|
static create(a) {
|
|
10174
10159
|
return new PrivilegedServices(a.manager, a.delegator, a.registrar, a.assigners, a.autoAccumulateServices);
|
|
@@ -10801,7 +10786,7 @@ class InMemoryState extends WithDebug {
|
|
|
10801
10786
|
assigners: tryAsPerCore(new Array(spec.coresCount).fill(tryAsServiceId(0)), spec),
|
|
10802
10787
|
delegator: tryAsServiceId(0),
|
|
10803
10788
|
registrar: tryAsServiceId(MAX_VALUE),
|
|
10804
|
-
autoAccumulateServices:
|
|
10789
|
+
autoAccumulateServices: new Map(),
|
|
10805
10790
|
}),
|
|
10806
10791
|
accumulationOutputLog: SortedArray.fromArray(accumulationOutputComparator, []),
|
|
10807
10792
|
services: new Map(),
|