@typeberry/jam 0.2.0-0303f5b → 0.2.0-0e2cdac
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 +38 -40
- package/bootstrap-generator.mjs.map +1 -1
- package/bootstrap-importer.mjs +6169 -5474
- package/bootstrap-importer.mjs.map +1 -1
- package/bootstrap-network.mjs +161 -31
- package/bootstrap-network.mjs.map +1 -1
- package/index.js +6435 -5570
- package/index.js.map +1 -1
- package/package.json +3 -2
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;
|
|
@@ -7453,10 +7456,23 @@ const fullChainSpec = new ChainSpec({
|
|
|
7453
7456
|
maxLookupAnchorAge: numbers_tryAsU32(14_400),
|
|
7454
7457
|
});
|
|
7455
7458
|
|
|
7459
|
+
;// CONCATENATED MODULE: ./packages/jam/config/pvm-backend.ts
|
|
7460
|
+
/** Implemented PVM Backends names in THE SAME ORDER as enum. */
|
|
7461
|
+
const PvmBackendNames = (/* unused pure expression or super */ null && (["built-in", "ananas"]));
|
|
7462
|
+
/** Implemented PVM Backends to choose from. */
|
|
7463
|
+
var PvmBackend;
|
|
7464
|
+
(function (PvmBackend) {
|
|
7465
|
+
/** Built-in aka. Typeberry 🫐 interpreter. */
|
|
7466
|
+
PvmBackend[PvmBackend["BuiltIn"] = 0] = "BuiltIn";
|
|
7467
|
+
/** Ananas 🍍 interpreter. */
|
|
7468
|
+
PvmBackend[PvmBackend["Ananas"] = 1] = "Ananas";
|
|
7469
|
+
})(PvmBackend || (PvmBackend = {}));
|
|
7470
|
+
|
|
7456
7471
|
;// CONCATENATED MODULE: ./packages/jam/config/index.ts
|
|
7457
7472
|
|
|
7458
7473
|
|
|
7459
7474
|
|
|
7475
|
+
|
|
7460
7476
|
;// CONCATENATED MODULE: ./packages/jam/block/codec.ts
|
|
7461
7477
|
|
|
7462
7478
|
|
|
@@ -9092,7 +9108,7 @@ function accumulationOutputComparator(a, b) {
|
|
|
9092
9108
|
if (result > 0) {
|
|
9093
9109
|
return Ordering.Greater;
|
|
9094
9110
|
}
|
|
9095
|
-
return
|
|
9111
|
+
return a.output.compare(b.output);
|
|
9096
9112
|
}
|
|
9097
9113
|
|
|
9098
9114
|
;// CONCATENATED MODULE: ./packages/jam/block/gp-constants.ts
|
|
@@ -10118,26 +10134,6 @@ class InMemoryStateView {
|
|
|
10118
10134
|
|
|
10119
10135
|
|
|
10120
10136
|
|
|
10121
|
-
/** Dictionary entry of services that auto-accumulate every block. */
|
|
10122
|
-
class AutoAccumulate {
|
|
10123
|
-
service;
|
|
10124
|
-
gasLimit;
|
|
10125
|
-
static Codec = descriptors_codec.Class(AutoAccumulate, {
|
|
10126
|
-
service: descriptors_codec.u32.asOpaque(),
|
|
10127
|
-
gasLimit: descriptors_codec.u64.asOpaque(),
|
|
10128
|
-
});
|
|
10129
|
-
static create({ service, gasLimit }) {
|
|
10130
|
-
return new AutoAccumulate(service, gasLimit);
|
|
10131
|
-
}
|
|
10132
|
-
constructor(
|
|
10133
|
-
/** Service id that auto-accumulates. */
|
|
10134
|
-
service,
|
|
10135
|
-
/** Gas limit for auto-accumulation. */
|
|
10136
|
-
gasLimit) {
|
|
10137
|
-
this.service = service;
|
|
10138
|
-
this.gasLimit = gasLimit;
|
|
10139
|
-
}
|
|
10140
|
-
}
|
|
10141
10137
|
/**
|
|
10142
10138
|
* https://graypaper.fluffylabs.dev/#/ab2cdbd/114402114402?v=0.7.2
|
|
10143
10139
|
*/
|
|
@@ -10155,7 +10151,9 @@ class PrivilegedServices {
|
|
|
10155
10151
|
registrar: Compatibility.isGreaterOrEqual(GpVersion.V0_7_1)
|
|
10156
10152
|
? descriptors_codec.u32.asOpaque()
|
|
10157
10153
|
: ignoreValueWithDefault(tryAsServiceId(2 ** 32 - 1)),
|
|
10158
|
-
autoAccumulateServices:
|
|
10154
|
+
autoAccumulateServices: descriptors_codec.dictionary(descriptors_codec.u32.asOpaque(), descriptors_codec.u64.asOpaque(), {
|
|
10155
|
+
sortKeys: (a, b) => a - b,
|
|
10156
|
+
}),
|
|
10159
10157
|
});
|
|
10160
10158
|
static create(a) {
|
|
10161
10159
|
return new PrivilegedServices(a.manager, a.delegator, a.registrar, a.assigners, a.autoAccumulateServices);
|
|
@@ -10788,7 +10786,7 @@ class InMemoryState extends WithDebug {
|
|
|
10788
10786
|
assigners: tryAsPerCore(new Array(spec.coresCount).fill(tryAsServiceId(0)), spec),
|
|
10789
10787
|
delegator: tryAsServiceId(0),
|
|
10790
10788
|
registrar: tryAsServiceId(MAX_VALUE),
|
|
10791
|
-
autoAccumulateServices:
|
|
10789
|
+
autoAccumulateServices: new Map(),
|
|
10792
10790
|
}),
|
|
10793
10791
|
accumulationOutputLog: SortedArray.fromArray(accumulationOutputComparator, []),
|
|
10794
10792
|
services: new Map(),
|