@typeberry/jam 0.2.0-daa61f5 → 0.2.0-dabd741
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 +29 -36
- package/bootstrap-generator.mjs.map +1 -1
- package/bootstrap-importer.mjs +4191 -4132
- package/bootstrap-importer.mjs.map +1 -1
- package/bootstrap-network.mjs +16 -3
- package/bootstrap-network.mjs.map +1 -1
- package/index.js +5009 -4945
- package/index.js.map +1 -1
- package/package.json +2 -3
package/bootstrap-network.mjs
CHANGED
|
@@ -24227,6 +24227,13 @@ class WithDebug {
|
|
|
24227
24227
|
return debug_inspect(this);
|
|
24228
24228
|
}
|
|
24229
24229
|
}
|
|
24230
|
+
function lazyInspect(obj) {
|
|
24231
|
+
return {
|
|
24232
|
+
toString() {
|
|
24233
|
+
return debug_inspect(obj);
|
|
24234
|
+
},
|
|
24235
|
+
};
|
|
24236
|
+
}
|
|
24230
24237
|
|
|
24231
24238
|
;// CONCATENATED MODULE: ./packages/core/utils/dev.ts
|
|
24232
24239
|
const dev_env = typeof process === "undefined" ? {} : process.env;
|
|
@@ -24775,12 +24782,13 @@ class bytes_BytesBlob {
|
|
|
24775
24782
|
}
|
|
24776
24783
|
/** Display a hex-encoded version of this byte blob, but truncated if it's large. */
|
|
24777
24784
|
toStringTruncated() {
|
|
24785
|
+
const bytes = `${this.raw.length} ${this.raw.length === 1 ? "byte" : "bytes"}`;
|
|
24778
24786
|
if (this.raw.length > 32) {
|
|
24779
24787
|
const start = bytesToHexString(this.raw.subarray(0, 16));
|
|
24780
24788
|
const end = bytesToHexString(this.raw.subarray(this.raw.length - 16));
|
|
24781
|
-
return `${start}...${end.substring(2)} (${
|
|
24789
|
+
return `${start}...${end.substring(2)} (${bytes})`;
|
|
24782
24790
|
}
|
|
24783
|
-
return this.toString()
|
|
24791
|
+
return `${this.toString()} (${bytes})`;
|
|
24784
24792
|
}
|
|
24785
24793
|
toJSON() {
|
|
24786
24794
|
return this.toString();
|
|
@@ -28617,6 +28625,8 @@ const EC_SEGMENT_SIZE = 4104;
|
|
|
28617
28625
|
* Additional data that has to be passed to the codec to correctly parse incoming bytes.
|
|
28618
28626
|
*/
|
|
28619
28627
|
class ChainSpec extends WithDebug {
|
|
28628
|
+
/** Human-readable name of the chain spec. */
|
|
28629
|
+
name;
|
|
28620
28630
|
/** Number of validators. */
|
|
28621
28631
|
validatorsCount;
|
|
28622
28632
|
/** 1/3 of number of validators */
|
|
@@ -28659,6 +28669,7 @@ class ChainSpec extends WithDebug {
|
|
|
28659
28669
|
maxLookupAnchorAge;
|
|
28660
28670
|
constructor(data) {
|
|
28661
28671
|
super();
|
|
28672
|
+
this.name = data.name;
|
|
28662
28673
|
this.validatorsCount = data.validatorsCount;
|
|
28663
28674
|
this.thirdOfValidators = numbers_tryAsU16(Math.floor(data.validatorsCount / 3));
|
|
28664
28675
|
this.validatorsSuperMajority = numbers_tryAsU16(Math.floor(data.validatorsCount / 3) * 2 + 1);
|
|
@@ -28679,6 +28690,7 @@ class ChainSpec extends WithDebug {
|
|
|
28679
28690
|
}
|
|
28680
28691
|
/** Set of values for "tiny" chain as defined in JAM test vectors. */
|
|
28681
28692
|
const tinyChainSpec = new ChainSpec({
|
|
28693
|
+
name: "tiny",
|
|
28682
28694
|
validatorsCount: numbers_tryAsU16(6),
|
|
28683
28695
|
coresCount: numbers_tryAsU16(2),
|
|
28684
28696
|
epochLength: numbers_tryAsU32(12),
|
|
@@ -28700,6 +28712,7 @@ const tinyChainSpec = new ChainSpec({
|
|
|
28700
28712
|
* Please note that only validatorsCount and epochLength are "full", the rest is copied from "tiny".
|
|
28701
28713
|
*/
|
|
28702
28714
|
const fullChainSpec = new ChainSpec({
|
|
28715
|
+
name: "full",
|
|
28703
28716
|
validatorsCount: numbers_tryAsU16(1023),
|
|
28704
28717
|
coresCount: numbers_tryAsU16(341),
|
|
28705
28718
|
epochLength: numbers_tryAsU32(600),
|
|
@@ -31318,7 +31331,7 @@ const DEFAULT_CONFIG = "default";
|
|
|
31318
31331
|
const NODE_DEFAULTS = {
|
|
31319
31332
|
name: isBrowser() ? "browser" : external_node_os_default().hostname(),
|
|
31320
31333
|
config: [DEFAULT_CONFIG],
|
|
31321
|
-
pvm: PvmBackend.
|
|
31334
|
+
pvm: PvmBackend.Ananas,
|
|
31322
31335
|
};
|
|
31323
31336
|
/** Chain spec chooser. */
|
|
31324
31337
|
var KnownChainSpec;
|