@typeberry/convert 0.5.0-5496f08 → 0.5.0-584584e

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/index.js CHANGED
@@ -5814,7 +5814,7 @@ function addSizeHints(a, b) {
5814
5814
  };
5815
5815
  }
5816
5816
  const DEFAULT_START_LENGTH = 512; // 512B
5817
- const encoder_MAX_LENGTH = 10 * 1024 * 1024; // 10MB
5817
+ const encoder_MAX_LENGTH = 20 * 1024 * 1024; // 20MB
5818
5818
  /**
5819
5819
  * JAM encoder.
5820
5820
  */
@@ -6167,7 +6167,7 @@ class encoder_Encoder {
6167
6167
  if (options.silent) {
6168
6168
  return;
6169
6169
  }
6170
- throw new Error(`The encoded size would reach the maximum of ${encoder_MAX_LENGTH}.`);
6170
+ throw new Error(`The encoded size (${newLength}) would reach the maximum of ${encoder_MAX_LENGTH}.`);
6171
6171
  }
6172
6172
  if (newLength > this.destination.length) {
6173
6173
  // we can try to resize the underlying buffer
@@ -10114,7 +10114,7 @@ class Credential extends WithDebug {
10114
10114
  /**
10115
10115
  * Tuple of work-report, a credential and it's corresponding timeslot.
10116
10116
  *
10117
- * https://graypaper.fluffylabs.dev/#/579bd12/147102149102
10117
+ * https://graypaper.fluffylabs.dev/#/ab2cdbd/15df00150301?v=0.7.2
10118
10118
  */
10119
10119
  class ReportGuarantee extends WithDebug {
10120
10120
  report;
@@ -10142,7 +10142,7 @@ class ReportGuarantee extends WithDebug {
10142
10142
  * validator index and a signature.
10143
10143
  * Credentials must be ordered by their validator index.
10144
10144
  *
10145
- * https://graypaper.fluffylabs.dev/#/579bd12/14b90214bb02
10145
+ * https://graypaper.fluffylabs.dev/#/ab2cdbd/152b01152d01?v=0.7.2
10146
10146
  */
10147
10147
  credentials) {
10148
10148
  super();
@@ -10943,7 +10943,7 @@ const workExecResultFromJson = json.object({
10943
10943
  code_oversize: json.optional(json.fromAny(() => null)),
10944
10944
  output_oversize: json.optional(json.fromAny(() => null)),
10945
10945
  }, (val) => {
10946
- const { ok, out_of_gas, panic, bad_code, code_oversize } = val;
10946
+ const { ok, out_of_gas, panic, bad_code, code_oversize, output_oversize } = val;
10947
10947
  if (ok !== undefined) {
10948
10948
  return new WorkExecResult(numbers_tryAsU32(WorkExecResultKind.ok), ok);
10949
10949
  }
@@ -10959,7 +10959,7 @@ const workExecResultFromJson = json.object({
10959
10959
  if (code_oversize === null) {
10960
10960
  return new WorkExecResult(numbers_tryAsU32(WorkExecResultKind.codeOversize));
10961
10961
  }
10962
- if (val.output_oversize === null) {
10962
+ if (output_oversize === null) {
10963
10963
  return new WorkExecResult(numbers_tryAsU32(WorkExecResultKind.digestTooBig));
10964
10964
  }
10965
10965
  throw new Error("Invalid WorkExecResult");
@@ -12111,8 +12111,6 @@ const W_B = Compatibility.isGreaterOrEqual(GpVersion.V0_7_2) ? 13_791_360 : 13_7
12111
12111
  const W_C = 4_000_000;
12112
12112
  /** `W_M`: The maximum number of imports in a work-package. */
12113
12113
  const W_M = 3_072;
12114
- /** `W_R`: The maximum total size of all output blobs in a work-report, in octets. */
12115
- const W_R = 49_152;
12116
12114
  /** `W_T`: The size of a transfer memo in octets. */
12117
12115
  const W_T = 128;
12118
12116
  /** `W_M`: The maximum number of exports in a work-package. */