@typeberry/jam 0.1.3-ca63b35 → 0.2.0-b6e3410
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 +41 -24
- package/bootstrap-generator.mjs.map +1 -1
- package/bootstrap-importer.mjs +174 -52
- package/bootstrap-importer.mjs.map +1 -1
- package/bootstrap-network.mjs +43 -26
- package/bootstrap-network.mjs.map +1 -1
- package/index.js +259 -58
- package/index.js.map +1 -1
- package/package.json +1 -1
package/bootstrap-generator.mjs
CHANGED
|
@@ -2870,7 +2870,7 @@ var GpVersion;
|
|
|
2870
2870
|
(function (GpVersion) {
|
|
2871
2871
|
GpVersion["V0_6_7"] = "0.6.7";
|
|
2872
2872
|
GpVersion["V0_7_0"] = "0.7.0";
|
|
2873
|
-
GpVersion["V0_7_1"] = "0.7.1
|
|
2873
|
+
GpVersion["V0_7_1"] = "0.7.1";
|
|
2874
2874
|
GpVersion["V0_7_2"] = "0.7.2-preview";
|
|
2875
2875
|
})(GpVersion || (GpVersion = {}));
|
|
2876
2876
|
var TestSuite;
|
|
@@ -2879,11 +2879,11 @@ var TestSuite;
|
|
|
2879
2879
|
TestSuite["JAMDUNA"] = "jamduna";
|
|
2880
2880
|
})(TestSuite || (TestSuite = {}));
|
|
2881
2881
|
const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
|
|
2882
|
-
const
|
|
2882
|
+
const DEFAULT_VERSION = GpVersion.V0_7_1;
|
|
2883
2883
|
const env = typeof process === "undefined" ? {} : process.env;
|
|
2884
|
-
const DEFAULT_VERSION = GpVersion.V0_7_0;
|
|
2885
2884
|
let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
|
|
2886
2885
|
let CURRENT_SUITE = parseCurrentSuite(env.TEST_SUITE) ?? DEFAULT_SUITE;
|
|
2886
|
+
const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
|
|
2887
2887
|
function parseCurrentVersion(env) {
|
|
2888
2888
|
if (env === undefined) {
|
|
2889
2889
|
return undefined;
|
|
@@ -9909,6 +9909,7 @@ class UpdateStorage {
|
|
|
9909
9909
|
|
|
9910
9910
|
|
|
9911
9911
|
|
|
9912
|
+
|
|
9912
9913
|
const codecServiceId = Compatibility.isSuite(TestSuite.W3F_DAVXY) || Compatibility.isSuite(TestSuite.JAMDUNA, GpVersion.V0_6_7)
|
|
9913
9914
|
? descriptors_codec.u32.asOpaque()
|
|
9914
9915
|
: descriptors_codec.varU32.convert((s) => numbers_tryAsU32(s), (i) => tryAsServiceId(i));
|
|
@@ -10040,8 +10041,7 @@ class CoreStatistics {
|
|
|
10040
10041
|
* Service statistics.
|
|
10041
10042
|
* Updated per block, based on available work reports (`W`).
|
|
10042
10043
|
*
|
|
10043
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
10044
|
-
* https://github.com/gavofyork/graypaper/blob/9bffb08f3ea7b67832019176754df4fb36b9557d/text/statistics.tex#L77
|
|
10044
|
+
* https://graypaper.fluffylabs.dev/#/1c979cb/199802199802?v=0.7.1
|
|
10045
10045
|
*/
|
|
10046
10046
|
class ServiceStatistics {
|
|
10047
10047
|
providedCount;
|
|
@@ -10056,22 +10056,8 @@ class ServiceStatistics {
|
|
|
10056
10056
|
accumulateGasUsed;
|
|
10057
10057
|
onTransfersCount;
|
|
10058
10058
|
onTransfersGasUsed;
|
|
10059
|
-
static Codec = Compatibility.
|
|
10060
|
-
|
|
10061
|
-
providedCount: codecVarU16,
|
|
10062
|
-
providedSize: descriptors_codec.varU32,
|
|
10063
|
-
refinementCount: descriptors_codec.varU32,
|
|
10064
|
-
refinementGasUsed: codecVarGas,
|
|
10065
|
-
imports: codecVarU16,
|
|
10066
|
-
extrinsicCount: codecVarU16,
|
|
10067
|
-
extrinsicSize: descriptors_codec.varU32,
|
|
10068
|
-
exports: codecVarU16,
|
|
10069
|
-
accumulateCount: descriptors_codec.varU32,
|
|
10070
|
-
accumulateGasUsed: codecVarGas,
|
|
10071
|
-
onTransfersCount: descriptors_codec.varU32,
|
|
10072
|
-
onTransfersGasUsed: codecVarGas,
|
|
10073
|
-
})
|
|
10074
|
-
: descriptors_codec.Class(ServiceStatistics, {
|
|
10059
|
+
static Codec = Compatibility.selectIfGreaterOrEqual({
|
|
10060
|
+
fallback: descriptors_codec.Class(ServiceStatistics, {
|
|
10075
10061
|
providedCount: codecVarU16,
|
|
10076
10062
|
providedSize: descriptors_codec.varU32,
|
|
10077
10063
|
refinementCount: descriptors_codec.varU32,
|
|
@@ -10084,7 +10070,38 @@ class ServiceStatistics {
|
|
|
10084
10070
|
accumulateGasUsed: codecVarGas,
|
|
10085
10071
|
onTransfersCount: descriptors_codec.varU32,
|
|
10086
10072
|
onTransfersGasUsed: codecVarGas,
|
|
10087
|
-
})
|
|
10073
|
+
}),
|
|
10074
|
+
versions: {
|
|
10075
|
+
[GpVersion.V0_7_0]: descriptors_codec.Class(ServiceStatistics, {
|
|
10076
|
+
providedCount: codecVarU16,
|
|
10077
|
+
providedSize: descriptors_codec.varU32,
|
|
10078
|
+
refinementCount: descriptors_codec.varU32,
|
|
10079
|
+
refinementGasUsed: codecVarGas,
|
|
10080
|
+
imports: codecVarU16,
|
|
10081
|
+
extrinsicCount: codecVarU16,
|
|
10082
|
+
extrinsicSize: descriptors_codec.varU32,
|
|
10083
|
+
exports: codecVarU16,
|
|
10084
|
+
accumulateCount: descriptors_codec.varU32,
|
|
10085
|
+
accumulateGasUsed: codecVarGas,
|
|
10086
|
+
onTransfersCount: descriptors_codec.varU32,
|
|
10087
|
+
onTransfersGasUsed: codecVarGas,
|
|
10088
|
+
}),
|
|
10089
|
+
[GpVersion.V0_7_1]: descriptors_codec.Class(ServiceStatistics, {
|
|
10090
|
+
providedCount: codecVarU16,
|
|
10091
|
+
providedSize: descriptors_codec.varU32,
|
|
10092
|
+
refinementCount: descriptors_codec.varU32,
|
|
10093
|
+
refinementGasUsed: codecVarGas,
|
|
10094
|
+
imports: codecVarU16,
|
|
10095
|
+
extrinsicCount: codecVarU16,
|
|
10096
|
+
extrinsicSize: descriptors_codec.varU32,
|
|
10097
|
+
exports: codecVarU16,
|
|
10098
|
+
accumulateCount: descriptors_codec.varU32,
|
|
10099
|
+
accumulateGasUsed: codecVarGas,
|
|
10100
|
+
onTransfersCount: ignoreValueWithDefault(numbers_tryAsU32(0)),
|
|
10101
|
+
onTransfersGasUsed: ignoreValueWithDefault(tryAsServiceGas(0)),
|
|
10102
|
+
}),
|
|
10103
|
+
},
|
|
10104
|
+
});
|
|
10088
10105
|
static create(v) {
|
|
10089
10106
|
return new ServiceStatistics(v.providedCount, v.providedSize, v.refinementCount, v.refinementGasUsed, v.imports, v.exports, v.extrinsicSize, v.extrinsicCount, v.accumulateCount, v.accumulateGasUsed, v.onTransfersCount, v.onTransfersGasUsed);
|
|
10090
10107
|
}
|
|
@@ -10109,9 +10126,9 @@ class ServiceStatistics {
|
|
|
10109
10126
|
accumulateCount,
|
|
10110
10127
|
/** `a.1` */
|
|
10111
10128
|
accumulateGasUsed,
|
|
10112
|
-
/** `t.0` */
|
|
10129
|
+
/** `t.0` @deprecated since 0.7.1 */
|
|
10113
10130
|
onTransfersCount,
|
|
10114
|
-
/** `t.1` */
|
|
10131
|
+
/** `t.1` @deprecated since 0.7.1 */
|
|
10115
10132
|
onTransfersGasUsed) {
|
|
10116
10133
|
this.providedCount = providedCount;
|
|
10117
10134
|
this.providedSize = providedSize;
|