@typeberry/lib 0.5.0-d7595f1 → 0.5.1-1dda9d6
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.cjs +645 -604
- package/index.d.ts +310 -40
- package/{index.js → index.mjs} +645 -604
- package/package.json +5 -3
package/index.d.ts
CHANGED
|
@@ -954,7 +954,7 @@ declare class Skipper {
|
|
|
954
954
|
}
|
|
955
955
|
|
|
956
956
|
/** Infer the type that is described by given descriptor `T` */
|
|
957
|
-
type DescribedBy<T> = T extends Descriptor<infer V> ? V : never;
|
|
957
|
+
type DescribedBy<T> = T extends Descriptor<infer V, infer _> ? V : never;
|
|
958
958
|
/**
|
|
959
959
|
* Converts a class `T` into an object with the same fields as the class.
|
|
960
960
|
*/
|
|
@@ -1206,6 +1206,21 @@ declare const custom: <T>({ name, sizeHint, }: {
|
|
|
1206
1206
|
name: string;
|
|
1207
1207
|
sizeHint: SizeHint;
|
|
1208
1208
|
}, encode: (e: Encoder, x: T) => void, decode: (d: Decoder) => T, skip: (s: Skipper) => void) => Descriptor<T>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Descriptor record for union variants.
|
|
1211
|
+
* Each variant can have its own view type, but the union itself won't expose views.
|
|
1212
|
+
*/
|
|
1213
|
+
type UnionDescriptorRecord<TKind extends number, T extends {
|
|
1214
|
+
kind: TKind;
|
|
1215
|
+
}> = {
|
|
1216
|
+
[K in TKind]: Descriptor<Omit<Extract<T, {
|
|
1217
|
+
kind: K;
|
|
1218
|
+
}>, "kind">, unknown>;
|
|
1219
|
+
};
|
|
1220
|
+
/** Tagged union type encoding. */
|
|
1221
|
+
declare const union: <TKind extends number, T extends {
|
|
1222
|
+
kind: TKind;
|
|
1223
|
+
}, TVariants extends UnionDescriptorRecord<TKind, T> = UnionDescriptorRecord<TKind, T>>(name: string, variants: TVariants) => Descriptor<T>;
|
|
1209
1224
|
/** Choose a descriptor depending on the encoding/decoding context. */
|
|
1210
1225
|
declare const select: <T, V = T>({ name, sizeHint, }: {
|
|
1211
1226
|
name: string;
|
|
@@ -1262,13 +1277,17 @@ declare const descriptors_u24: typeof u24;
|
|
|
1262
1277
|
declare const descriptors_u32: typeof u32;
|
|
1263
1278
|
declare const descriptors_u64: typeof u64;
|
|
1264
1279
|
declare const descriptors_u8: typeof u8;
|
|
1280
|
+
declare const descriptors_union: typeof union;
|
|
1265
1281
|
declare const descriptors_varU32: typeof varU32;
|
|
1266
1282
|
declare const descriptors_varU64: typeof varU64;
|
|
1267
1283
|
declare namespace descriptors {
|
|
1268
|
-
export { descriptors_Class as Class, descriptors_TYPICAL_DICTIONARY_LENGTH as TYPICAL_DICTIONARY_LENGTH, descriptors_bitVecFixLen as bitVecFixLen, descriptors_bitVecVarLen as bitVecVarLen, descriptors_blob as blob, descriptors_bool as bool, descriptors_bytes as bytes, descriptors_custom as custom, descriptors_dictionary as dictionary, descriptors_forEachDescriptor as forEachDescriptor, descriptors_i16 as i16, descriptors_i24 as i24, descriptors_i32 as i32, descriptors_i64 as i64, descriptors_i8 as i8, descriptors_nothing as nothing, descriptors_object as object, descriptors_optional as optional, descriptors_pair as pair, descriptors_readonlyArray as readonlyArray, descriptors_select as select, descriptors_sequenceFixLen as sequenceFixLen, descriptors_sequenceVarLen as sequenceVarLen, descriptors_string as string, descriptors_u16 as u16, descriptors_u24 as u24, descriptors_u32 as u32, descriptors_u64 as u64, descriptors_u8 as u8, descriptors_varU32 as varU32, descriptors_varU64 as varU64 };
|
|
1284
|
+
export { descriptors_Class as Class, descriptors_TYPICAL_DICTIONARY_LENGTH as TYPICAL_DICTIONARY_LENGTH, descriptors_bitVecFixLen as bitVecFixLen, descriptors_bitVecVarLen as bitVecVarLen, descriptors_blob as blob, descriptors_bool as bool, descriptors_bytes as bytes, descriptors_custom as custom, descriptors_dictionary as dictionary, descriptors_forEachDescriptor as forEachDescriptor, descriptors_i16 as i16, descriptors_i24 as i24, descriptors_i32 as i32, descriptors_i64 as i64, descriptors_i8 as i8, descriptors_nothing as nothing, descriptors_object as object, descriptors_optional as optional, descriptors_pair as pair, descriptors_readonlyArray as readonlyArray, descriptors_select as select, descriptors_sequenceFixLen as sequenceFixLen, descriptors_sequenceVarLen as sequenceVarLen, descriptors_string as string, descriptors_u16 as u16, descriptors_u24 as u24, descriptors_u32 as u32, descriptors_u64 as u64, descriptors_u8 as u8, descriptors_union as union, descriptors_varU32 as varU32, descriptors_varU64 as varU64 };
|
|
1269
1285
|
export type { descriptors_SequenceVarLenOptions as SequenceVarLenOptions };
|
|
1270
1286
|
}
|
|
1271
1287
|
|
|
1288
|
+
declare const codec: typeof descriptors;
|
|
1289
|
+
|
|
1290
|
+
declare const index$x_Class: typeof Class;
|
|
1272
1291
|
type index$x_ClassConstructor<T> = ClassConstructor<T>;
|
|
1273
1292
|
type index$x_Codec<T> = Codec<T>;
|
|
1274
1293
|
type index$x_CodecRecord<T> = CodecRecord<T>;
|
|
@@ -1290,20 +1309,53 @@ type index$x_ObjectView<T> = ObjectView<T>;
|
|
|
1290
1309
|
declare const index$x_ObjectView: typeof ObjectView;
|
|
1291
1310
|
type index$x_OptionalRecord<T> = OptionalRecord<T>;
|
|
1292
1311
|
type index$x_PropertyKeys<T> = PropertyKeys<T>;
|
|
1312
|
+
type index$x_SequenceVarLenOptions = SequenceVarLenOptions;
|
|
1293
1313
|
type index$x_SequenceView<T, V = T> = SequenceView<T, V>;
|
|
1294
1314
|
declare const index$x_SequenceView: typeof SequenceView;
|
|
1295
1315
|
type index$x_SimpleDescriptorRecord<T> = SimpleDescriptorRecord<T>;
|
|
1296
1316
|
type index$x_SizeHint = SizeHint;
|
|
1317
|
+
declare const index$x_TYPICAL_DICTIONARY_LENGTH: typeof TYPICAL_DICTIONARY_LENGTH;
|
|
1297
1318
|
type index$x_ViewField<T, V> = ViewField<T, V>;
|
|
1298
1319
|
declare const index$x_ViewField: typeof ViewField;
|
|
1299
1320
|
type index$x_ViewOf<T, D extends DescriptorRecord<T>> = ViewOf<T, D>;
|
|
1300
1321
|
declare const index$x_addSizeHints: typeof addSizeHints;
|
|
1322
|
+
declare const index$x_bitVecFixLen: typeof bitVecFixLen;
|
|
1323
|
+
declare const index$x_bitVecVarLen: typeof bitVecVarLen;
|
|
1324
|
+
declare const index$x_blob: typeof blob;
|
|
1325
|
+
declare const index$x_bool: typeof bool;
|
|
1326
|
+
declare const index$x_bytes: typeof bytes;
|
|
1327
|
+
declare const index$x_codec: typeof codec;
|
|
1328
|
+
declare const index$x_custom: typeof custom;
|
|
1301
1329
|
declare const index$x_decodeVariableLengthExtraBytes: typeof decodeVariableLengthExtraBytes;
|
|
1330
|
+
declare const index$x_dictionary: typeof dictionary;
|
|
1331
|
+
declare const index$x_forEachDescriptor: typeof forEachDescriptor;
|
|
1332
|
+
declare const index$x_i16: typeof i16;
|
|
1333
|
+
declare const index$x_i24: typeof i24;
|
|
1334
|
+
declare const index$x_i32: typeof i32;
|
|
1335
|
+
declare const index$x_i64: typeof i64;
|
|
1336
|
+
declare const index$x_i8: typeof i8;
|
|
1337
|
+
declare const index$x_nothing: typeof nothing;
|
|
1338
|
+
declare const index$x_object: typeof object;
|
|
1339
|
+
declare const index$x_optional: typeof optional;
|
|
1340
|
+
declare const index$x_pair: typeof pair;
|
|
1341
|
+
declare const index$x_readonlyArray: typeof readonlyArray;
|
|
1342
|
+
declare const index$x_select: typeof select;
|
|
1343
|
+
declare const index$x_sequenceFixLen: typeof sequenceFixLen;
|
|
1344
|
+
declare const index$x_sequenceVarLen: typeof sequenceVarLen;
|
|
1345
|
+
declare const index$x_string: typeof string;
|
|
1302
1346
|
declare const index$x_tryAsExactBytes: typeof tryAsExactBytes;
|
|
1347
|
+
declare const index$x_u16: typeof u16;
|
|
1348
|
+
declare const index$x_u24: typeof u24;
|
|
1349
|
+
declare const index$x_u32: typeof u32;
|
|
1350
|
+
declare const index$x_u64: typeof u64;
|
|
1351
|
+
declare const index$x_u8: typeof u8;
|
|
1352
|
+
declare const index$x_union: typeof union;
|
|
1303
1353
|
declare const index$x_validateLength: typeof validateLength;
|
|
1354
|
+
declare const index$x_varU32: typeof varU32;
|
|
1355
|
+
declare const index$x_varU64: typeof varU64;
|
|
1304
1356
|
declare namespace index$x {
|
|
1305
|
-
export { index$x_Decoder as Decoder, index$x_Descriptor as Descriptor, index$x_Encoder as Encoder, index$x_EndOfDataError as EndOfDataError, index$x_ObjectView as ObjectView, index$x_SequenceView as SequenceView, index$x_ViewField as ViewField, index$x_addSizeHints as addSizeHints,
|
|
1306
|
-
export type { index$x_ClassConstructor as ClassConstructor, index$x_Codec as Codec, index$x_CodecRecord as CodecRecord, index$x_CodecWithView as CodecWithView, index$x_Decode as Decode, index$x_DescribedBy as DescribedBy, index$x_DescriptorRecord as DescriptorRecord, index$x_Encode as Encode, index$x_LengthRange as LengthRange, index$x_OptionalRecord as OptionalRecord, Options$1 as Options, index$x_PropertyKeys as PropertyKeys, index$x_SimpleDescriptorRecord as SimpleDescriptorRecord, index$x_SizeHint as SizeHint, index$x_ViewOf as ViewOf };
|
|
1357
|
+
export { index$x_Class as Class, index$x_Decoder as Decoder, index$x_Descriptor as Descriptor, index$x_Encoder as Encoder, index$x_EndOfDataError as EndOfDataError, index$x_ObjectView as ObjectView, index$x_SequenceView as SequenceView, index$x_TYPICAL_DICTIONARY_LENGTH as TYPICAL_DICTIONARY_LENGTH, index$x_ViewField as ViewField, index$x_addSizeHints as addSizeHints, index$x_bitVecFixLen as bitVecFixLen, index$x_bitVecVarLen as bitVecVarLen, index$x_blob as blob, index$x_bool as bool, index$x_bytes as bytes, index$x_codec as codec, index$x_custom as custom, index$x_decodeVariableLengthExtraBytes as decodeVariableLengthExtraBytes, index$x_dictionary as dictionary, index$x_forEachDescriptor as forEachDescriptor, index$x_i16 as i16, index$x_i24 as i24, index$x_i32 as i32, index$x_i64 as i64, index$x_i8 as i8, index$x_nothing as nothing, index$x_object as object, index$x_optional as optional, index$x_pair as pair, index$x_readonlyArray as readonlyArray, index$x_select as select, index$x_sequenceFixLen as sequenceFixLen, index$x_sequenceVarLen as sequenceVarLen, index$x_string as string, index$x_tryAsExactBytes as tryAsExactBytes, index$x_u16 as u16, index$x_u24 as u24, index$x_u32 as u32, index$x_u64 as u64, index$x_u8 as u8, index$x_union as union, index$x_validateLength as validateLength, index$x_varU32 as varU32, index$x_varU64 as varU64 };
|
|
1358
|
+
export type { index$x_ClassConstructor as ClassConstructor, index$x_Codec as Codec, index$x_CodecRecord as CodecRecord, index$x_CodecWithView as CodecWithView, index$x_Decode as Decode, index$x_DescribedBy as DescribedBy, index$x_DescriptorRecord as DescriptorRecord, index$x_Encode as Encode, index$x_LengthRange as LengthRange, index$x_OptionalRecord as OptionalRecord, Options$1 as Options, index$x_PropertyKeys as PropertyKeys, index$x_SequenceVarLenOptions as SequenceVarLenOptions, index$x_SimpleDescriptorRecord as SimpleDescriptorRecord, index$x_SizeHint as SizeHint, index$x_ViewOf as ViewOf };
|
|
1307
1359
|
}
|
|
1308
1360
|
|
|
1309
1361
|
/**
|
|
@@ -3088,13 +3140,29 @@ declare enum WorkExecResultKind {
|
|
|
3088
3140
|
/** `BIG`: the code was too big (beyond the maximum allowed size `W_C`) */
|
|
3089
3141
|
codeOversize = 6
|
|
3090
3142
|
}
|
|
3143
|
+
type WorkExecResultUnion = {
|
|
3144
|
+
kind: WorkExecResultKind.ok;
|
|
3145
|
+
okBlob: BytesBlob;
|
|
3146
|
+
} | {
|
|
3147
|
+
kind: WorkExecResultKind.outOfGas;
|
|
3148
|
+
} | {
|
|
3149
|
+
kind: WorkExecResultKind.panic;
|
|
3150
|
+
} | {
|
|
3151
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
3152
|
+
} | {
|
|
3153
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
3154
|
+
} | {
|
|
3155
|
+
kind: WorkExecResultKind.badCode;
|
|
3156
|
+
} | {
|
|
3157
|
+
kind: WorkExecResultKind.codeOversize;
|
|
3158
|
+
};
|
|
3091
3159
|
/** The execution result of some work-package. */
|
|
3092
3160
|
declare class WorkExecResult extends WithDebug {
|
|
3093
3161
|
/** The execution result tag. */
|
|
3094
3162
|
readonly kind: WorkExecResultKind;
|
|
3095
3163
|
/** Optional octet sequence - available only if `kind === ok` */
|
|
3096
3164
|
readonly okBlob: BytesBlob | null;
|
|
3097
|
-
static Codec: Descriptor<WorkExecResult,
|
|
3165
|
+
static Codec: Descriptor<WorkExecResult, WorkExecResultUnion>;
|
|
3098
3166
|
constructor(
|
|
3099
3167
|
/** The execution result tag. */
|
|
3100
3168
|
kind: WorkExecResultKind,
|
|
@@ -3169,7 +3237,7 @@ declare class WorkResult {
|
|
|
3169
3237
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
3170
3238
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
3171
3239
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
3172
|
-
result: Descriptor<WorkExecResult,
|
|
3240
|
+
result: Descriptor<WorkExecResult, WorkExecResultUnion>;
|
|
3173
3241
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
3174
3242
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
3175
3243
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -3551,7 +3619,22 @@ declare class WorkReport extends WithDebug {
|
|
|
3551
3619
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
3552
3620
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
3553
3621
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
3554
|
-
result: Descriptor<WorkExecResult,
|
|
3622
|
+
result: Descriptor<WorkExecResult, {
|
|
3623
|
+
kind: WorkExecResultKind.ok;
|
|
3624
|
+
okBlob: BytesBlob;
|
|
3625
|
+
} | {
|
|
3626
|
+
kind: WorkExecResultKind.outOfGas;
|
|
3627
|
+
} | {
|
|
3628
|
+
kind: WorkExecResultKind.panic;
|
|
3629
|
+
} | {
|
|
3630
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
3631
|
+
} | {
|
|
3632
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
3633
|
+
} | {
|
|
3634
|
+
kind: WorkExecResultKind.badCode;
|
|
3635
|
+
} | {
|
|
3636
|
+
kind: WorkExecResultKind.codeOversize;
|
|
3637
|
+
}>;
|
|
3555
3638
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
3556
3639
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
3557
3640
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -3603,7 +3686,7 @@ declare namespace workReport {
|
|
|
3603
3686
|
* Since GP defines that value explicitly as "two or three",
|
|
3604
3687
|
* we do that as well.
|
|
3605
3688
|
*
|
|
3606
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
3689
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/152b01152d01?v=0.7.2
|
|
3607
3690
|
*/
|
|
3608
3691
|
type REQUIRED_CREDENTIALS = 2 | 3;
|
|
3609
3692
|
declare const REQUIRED_CREDENTIALS_RANGE: number[];
|
|
@@ -3623,7 +3706,7 @@ declare class Credential extends WithDebug {
|
|
|
3623
3706
|
/**
|
|
3624
3707
|
* Tuple of work-report, a credential and it's corresponding timeslot.
|
|
3625
3708
|
*
|
|
3626
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
3709
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/15df00150301?v=0.7.2
|
|
3627
3710
|
*/
|
|
3628
3711
|
declare class ReportGuarantee extends WithDebug {
|
|
3629
3712
|
/** The work-report being guaranteed. */
|
|
@@ -3635,7 +3718,7 @@ declare class ReportGuarantee extends WithDebug {
|
|
|
3635
3718
|
* validator index and a signature.
|
|
3636
3719
|
* Credentials must be ordered by their validator index.
|
|
3637
3720
|
*
|
|
3638
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
3721
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/152b01152d01?v=0.7.2
|
|
3639
3722
|
*/
|
|
3640
3723
|
readonly credentials: KnownSizeArray<Credential, `${REQUIRED_CREDENTIALS}`>;
|
|
3641
3724
|
static Codec: Descriptor<ReportGuarantee, ViewOf<ReportGuarantee, {
|
|
@@ -3668,7 +3751,22 @@ declare class ReportGuarantee extends WithDebug {
|
|
|
3668
3751
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
3669
3752
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
3670
3753
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
3671
|
-
result: Descriptor<WorkExecResult,
|
|
3754
|
+
result: Descriptor<WorkExecResult, {
|
|
3755
|
+
kind: WorkExecResultKind.ok;
|
|
3756
|
+
okBlob: BytesBlob;
|
|
3757
|
+
} | {
|
|
3758
|
+
kind: WorkExecResultKind.outOfGas;
|
|
3759
|
+
} | {
|
|
3760
|
+
kind: WorkExecResultKind.panic;
|
|
3761
|
+
} | {
|
|
3762
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
3763
|
+
} | {
|
|
3764
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
3765
|
+
} | {
|
|
3766
|
+
kind: WorkExecResultKind.badCode;
|
|
3767
|
+
} | {
|
|
3768
|
+
kind: WorkExecResultKind.codeOversize;
|
|
3769
|
+
}>;
|
|
3672
3770
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
3673
3771
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
3674
3772
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -3694,7 +3792,7 @@ declare const GuaranteesExtrinsicBounds = "[0..CoresCount)";
|
|
|
3694
3792
|
* Each core index (within work-report) must be unique and guarantees
|
|
3695
3793
|
* must be in ascending order of this.
|
|
3696
3794
|
*
|
|
3697
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
3795
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/15d10015d400?v=0.7.2
|
|
3698
3796
|
*/
|
|
3699
3797
|
type GuaranteesExtrinsic = KnownSizeArray<ReportGuarantee, typeof GuaranteesExtrinsicBounds>;
|
|
3700
3798
|
declare const guaranteesExtrinsicCodec: Descriptor<readonly ReportGuarantee[] & WithOpaque<"[0..CoresCount)">, SequenceView<ReportGuarantee, ViewOf<ReportGuarantee, {
|
|
@@ -3727,7 +3825,22 @@ declare const guaranteesExtrinsicCodec: Descriptor<readonly ReportGuarantee[] &
|
|
|
3727
3825
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
3728
3826
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
3729
3827
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
3730
|
-
result: Descriptor<WorkExecResult,
|
|
3828
|
+
result: Descriptor<WorkExecResult, {
|
|
3829
|
+
kind: WorkExecResultKind.ok;
|
|
3830
|
+
okBlob: BytesBlob;
|
|
3831
|
+
} | {
|
|
3832
|
+
kind: WorkExecResultKind.outOfGas;
|
|
3833
|
+
} | {
|
|
3834
|
+
kind: WorkExecResultKind.panic;
|
|
3835
|
+
} | {
|
|
3836
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
3837
|
+
} | {
|
|
3838
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
3839
|
+
} | {
|
|
3840
|
+
kind: WorkExecResultKind.badCode;
|
|
3841
|
+
} | {
|
|
3842
|
+
kind: WorkExecResultKind.codeOversize;
|
|
3843
|
+
}>;
|
|
3731
3844
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
3732
3845
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
3733
3846
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -3872,7 +3985,22 @@ declare class Extrinsic extends WithDebug {
|
|
|
3872
3985
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
3873
3986
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
3874
3987
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
3875
|
-
result: Descriptor<WorkExecResult,
|
|
3988
|
+
result: Descriptor<WorkExecResult, {
|
|
3989
|
+
kind: WorkExecResultKind.ok;
|
|
3990
|
+
okBlob: BytesBlob;
|
|
3991
|
+
} | {
|
|
3992
|
+
kind: WorkExecResultKind.outOfGas;
|
|
3993
|
+
} | {
|
|
3994
|
+
kind: WorkExecResultKind.panic;
|
|
3995
|
+
} | {
|
|
3996
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
3997
|
+
} | {
|
|
3998
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
3999
|
+
} | {
|
|
4000
|
+
kind: WorkExecResultKind.badCode;
|
|
4001
|
+
} | {
|
|
4002
|
+
kind: WorkExecResultKind.codeOversize;
|
|
4003
|
+
}>;
|
|
3876
4004
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
3877
4005
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
3878
4006
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -3997,7 +4125,22 @@ declare class Block extends WithDebug {
|
|
|
3997
4125
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
3998
4126
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
3999
4127
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
4000
|
-
result: Descriptor<WorkExecResult,
|
|
4128
|
+
result: Descriptor<WorkExecResult, {
|
|
4129
|
+
kind: WorkExecResultKind.ok;
|
|
4130
|
+
okBlob: BytesBlob;
|
|
4131
|
+
} | {
|
|
4132
|
+
kind: WorkExecResultKind.outOfGas;
|
|
4133
|
+
} | {
|
|
4134
|
+
kind: WorkExecResultKind.panic;
|
|
4135
|
+
} | {
|
|
4136
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
4137
|
+
} | {
|
|
4138
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
4139
|
+
} | {
|
|
4140
|
+
kind: WorkExecResultKind.badCode;
|
|
4141
|
+
} | {
|
|
4142
|
+
kind: WorkExecResultKind.codeOversize;
|
|
4143
|
+
}>;
|
|
4001
4144
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
4002
4145
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
4003
4146
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -4722,7 +4865,22 @@ declare class NotYetAccumulatedReport extends WithDebug {
|
|
|
4722
4865
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
4723
4866
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
4724
4867
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
4725
|
-
result: Descriptor<WorkExecResult,
|
|
4868
|
+
result: Descriptor<WorkExecResult, {
|
|
4869
|
+
kind: WorkExecResultKind.ok;
|
|
4870
|
+
okBlob: BytesBlob;
|
|
4871
|
+
} | {
|
|
4872
|
+
kind: WorkExecResultKind.outOfGas;
|
|
4873
|
+
} | {
|
|
4874
|
+
kind: WorkExecResultKind.panic;
|
|
4875
|
+
} | {
|
|
4876
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
4877
|
+
} | {
|
|
4878
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
4879
|
+
} | {
|
|
4880
|
+
kind: WorkExecResultKind.badCode;
|
|
4881
|
+
} | {
|
|
4882
|
+
kind: WorkExecResultKind.codeOversize;
|
|
4883
|
+
}>;
|
|
4726
4884
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
4727
4885
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
4728
4886
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -4771,7 +4929,22 @@ declare const accumulationQueueCodec: Descriptor<readonly (readonly NotYetAccumu
|
|
|
4771
4929
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
4772
4930
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
4773
4931
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
4774
|
-
result: Descriptor<WorkExecResult,
|
|
4932
|
+
result: Descriptor<WorkExecResult, {
|
|
4933
|
+
kind: WorkExecResultKind.ok;
|
|
4934
|
+
okBlob: BytesBlob;
|
|
4935
|
+
} | {
|
|
4936
|
+
kind: WorkExecResultKind.outOfGas;
|
|
4937
|
+
} | {
|
|
4938
|
+
kind: WorkExecResultKind.panic;
|
|
4939
|
+
} | {
|
|
4940
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
4941
|
+
} | {
|
|
4942
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
4943
|
+
} | {
|
|
4944
|
+
kind: WorkExecResultKind.badCode;
|
|
4945
|
+
} | {
|
|
4946
|
+
kind: WorkExecResultKind.codeOversize;
|
|
4947
|
+
}>;
|
|
4775
4948
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
4776
4949
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
4777
4950
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -4828,7 +5001,22 @@ declare class AvailabilityAssignment extends WithDebug {
|
|
|
4828
5001
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
4829
5002
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
4830
5003
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
4831
|
-
result: Descriptor<WorkExecResult,
|
|
5004
|
+
result: Descriptor<WorkExecResult, {
|
|
5005
|
+
kind: WorkExecResultKind.ok;
|
|
5006
|
+
okBlob: BytesBlob;
|
|
5007
|
+
} | {
|
|
5008
|
+
kind: WorkExecResultKind.outOfGas;
|
|
5009
|
+
} | {
|
|
5010
|
+
kind: WorkExecResultKind.panic;
|
|
5011
|
+
} | {
|
|
5012
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
5013
|
+
} | {
|
|
5014
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
5015
|
+
} | {
|
|
5016
|
+
kind: WorkExecResultKind.badCode;
|
|
5017
|
+
} | {
|
|
5018
|
+
kind: WorkExecResultKind.codeOversize;
|
|
5019
|
+
}>;
|
|
4832
5020
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
4833
5021
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
4834
5022
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -4873,7 +5061,22 @@ declare const availabilityAssignmentsCodec: Descriptor<readonly (AvailabilityAss
|
|
|
4873
5061
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
4874
5062
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
4875
5063
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
4876
|
-
result: Descriptor<WorkExecResult,
|
|
5064
|
+
result: Descriptor<WorkExecResult, {
|
|
5065
|
+
kind: WorkExecResultKind.ok;
|
|
5066
|
+
okBlob: BytesBlob;
|
|
5067
|
+
} | {
|
|
5068
|
+
kind: WorkExecResultKind.outOfGas;
|
|
5069
|
+
} | {
|
|
5070
|
+
kind: WorkExecResultKind.panic;
|
|
5071
|
+
} | {
|
|
5072
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
5073
|
+
} | {
|
|
5074
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
5075
|
+
} | {
|
|
5076
|
+
kind: WorkExecResultKind.badCode;
|
|
5077
|
+
} | {
|
|
5078
|
+
kind: WorkExecResultKind.codeOversize;
|
|
5079
|
+
}>;
|
|
4877
5080
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
4878
5081
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
4879
5082
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -7270,12 +7473,12 @@ declare class DirectWorkerConfig<TParams = void, TBlocks = BlocksDb, TStates = S
|
|
|
7270
7473
|
readonly workerParams: TParams;
|
|
7271
7474
|
private readonly blocksDb;
|
|
7272
7475
|
private readonly statesDb;
|
|
7273
|
-
static new<T, B, S>({ nodeName, chainSpec, blocksDb, statesDb, params, }: {
|
|
7476
|
+
static new<T, B, S>({ nodeName, chainSpec, blocksDb, statesDb, workerParams: params, }: {
|
|
7274
7477
|
nodeName: string;
|
|
7275
7478
|
chainSpec: ChainSpec;
|
|
7276
7479
|
blocksDb: B;
|
|
7277
7480
|
statesDb: S;
|
|
7278
|
-
|
|
7481
|
+
workerParams: T;
|
|
7279
7482
|
}): DirectWorkerConfig<T, B, S>;
|
|
7280
7483
|
private constructor();
|
|
7281
7484
|
openDatabase(_options?: {
|
|
@@ -9215,6 +9418,8 @@ type Input = {
|
|
|
9215
9418
|
* https://graypaper.fluffylabs.dev/#/cc517d7/18dd0018dd00?v=0.6.5
|
|
9216
9419
|
*/
|
|
9217
9420
|
transferStatistics: Map<ServiceId, CountAndGasUsed>;
|
|
9421
|
+
reporters: readonly Ed25519Key[];
|
|
9422
|
+
currentValidatorData: State["currentValidatorData"];
|
|
9218
9423
|
};
|
|
9219
9424
|
type CountAndGasUsed = {
|
|
9220
9425
|
count: U32;
|
|
@@ -9281,14 +9486,19 @@ type AccumulateResult = {
|
|
|
9281
9486
|
accumulationOutputLog: SortedArray<AccumulationOutput>;
|
|
9282
9487
|
};
|
|
9283
9488
|
|
|
9489
|
+
type AccumulateOptions = {
|
|
9490
|
+
pvm: PvmBackend;
|
|
9491
|
+
accumulateSequentially: boolean;
|
|
9492
|
+
};
|
|
9493
|
+
|
|
9284
9494
|
declare const ACCUMULATION_ERROR = "duplicate service created";
|
|
9285
9495
|
type ACCUMULATION_ERROR = typeof ACCUMULATION_ERROR;
|
|
9286
9496
|
declare class Accumulate {
|
|
9287
9497
|
readonly chainSpec: ChainSpec;
|
|
9288
9498
|
readonly blake2b: Blake2b;
|
|
9289
9499
|
readonly state: AccumulateState;
|
|
9290
|
-
readonly
|
|
9291
|
-
constructor(chainSpec: ChainSpec, blake2b: Blake2b, state: AccumulateState,
|
|
9500
|
+
readonly options: AccumulateOptions;
|
|
9501
|
+
constructor(chainSpec: ChainSpec, blake2b: Blake2b, state: AccumulateState, options: AccumulateOptions);
|
|
9292
9502
|
/**
|
|
9293
9503
|
* Returns an index that determines how many WorkReports can be processed before exceeding a given gasLimit.
|
|
9294
9504
|
*
|
|
@@ -9727,40 +9937,53 @@ interface HeaderChain {
|
|
|
9727
9937
|
* by validators).
|
|
9728
9938
|
*
|
|
9729
9939
|
* After enough assurances the work-report is considered available,
|
|
9730
|
-
* and the work
|
|
9940
|
+
* and the work-digests transform the state of their associated
|
|
9731
9941
|
* service by virtue of accumulation, covered in section 12.
|
|
9732
9942
|
* The report may also be timed-out, implying it may be replaced
|
|
9733
9943
|
* by another report without accumulation.
|
|
9734
9944
|
*
|
|
9735
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
9945
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/138801138d01?v=0.7.2
|
|
9736
9946
|
*/
|
|
9737
9947
|
type ReportsInput = {
|
|
9738
9948
|
/**
|
|
9739
9949
|
* A work-package, is transformed by validators acting as
|
|
9740
9950
|
* guarantors into its corresponding work-report, which
|
|
9741
|
-
* similarly comprises several work
|
|
9951
|
+
* similarly comprises several work-digests and then
|
|
9742
9952
|
* presented on-chain within the guarantees extrinsic.
|
|
9743
9953
|
*
|
|
9744
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
9954
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/138001138401?v=0.7.2
|
|
9745
9955
|
*/
|
|
9746
9956
|
guarantees: GuaranteesExtrinsicView;
|
|
9747
9957
|
/** Current time slot, excerpted from block header. */
|
|
9748
9958
|
slot: TimeSlot;
|
|
9749
9959
|
/** `eta_prime`: New entropy, after potential epoch transition. */
|
|
9750
9960
|
newEntropy: SafroleStateUpdate["entropy"];
|
|
9751
|
-
/**
|
|
9961
|
+
/**
|
|
9962
|
+
* β† - Partial update of recent blocks.
|
|
9963
|
+
*
|
|
9964
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/0f56020f6b02?v=0.7.2
|
|
9965
|
+
*/
|
|
9752
9966
|
recentBlocksPartialUpdate: RecentHistoryStateUpdate["recentBlocks"];
|
|
9753
9967
|
/**
|
|
9754
9968
|
* ρ‡ - Availability assignment resulting from assurances transition
|
|
9755
|
-
*
|
|
9969
|
+
*
|
|
9970
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/141302144402?v=0.7.2
|
|
9756
9971
|
*/
|
|
9757
9972
|
assurancesAvailAssignment: AssurancesStateUpdate["availabilityAssignment"];
|
|
9758
9973
|
/**
|
|
9759
9974
|
* ψ′O - Ed25519 keys of validators that were proven to judge incorrectly.
|
|
9760
9975
|
*
|
|
9761
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
9976
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/134201134201?v=0.7.2
|
|
9762
9977
|
*/
|
|
9763
9978
|
offenders: HashSet<Ed25519Key>;
|
|
9979
|
+
/**
|
|
9980
|
+
* `κ' kappa prime` - Current validator data.
|
|
9981
|
+
*/
|
|
9982
|
+
currentValidatorData: SafroleStateUpdate["currentValidatorData"];
|
|
9983
|
+
/**
|
|
9984
|
+
* `λ' lambda prime` - Previous validator data.
|
|
9985
|
+
*/
|
|
9986
|
+
previousValidatorData: SafroleStateUpdate["previousValidatorData"];
|
|
9764
9987
|
};
|
|
9765
9988
|
|
|
9766
9989
|
type GuarantorAssignment = {
|
|
@@ -9768,7 +9991,7 @@ type GuarantorAssignment = {
|
|
|
9768
9991
|
ed25519: Ed25519Key;
|
|
9769
9992
|
};
|
|
9770
9993
|
|
|
9771
|
-
type ReportsState = Pick<State, "availabilityAssignment" | "
|
|
9994
|
+
type ReportsState = Pick<State, "availabilityAssignment" | "entropy" | "getService" | "recentBlocks" | "accumulationQueue" | "recentlyAccumulated"> & WithStateView<Pick<StateView, "authPoolsView">>;
|
|
9772
9995
|
/** Reports state update. */
|
|
9773
9996
|
type ReportsStateUpdate = Pick<ReportsState, "availabilityAssignment">;
|
|
9774
9997
|
type ReportsOutput = {
|
|
@@ -9780,7 +10003,7 @@ type ReportsOutput = {
|
|
|
9780
10003
|
* This dictionary has the same number of items as in the input guarantees extrinsic.
|
|
9781
10004
|
*/
|
|
9782
10005
|
reported: HashDictionary<WorkPackageHash, WorkPackageInfo>;
|
|
9783
|
-
/** A set `
|
|
10006
|
+
/** A set `M` of work package reporters. */
|
|
9784
10007
|
reporters: KnownSizeArray<Ed25519Key, "Guarantees * Credentials (at most `cores*3`)">;
|
|
9785
10008
|
};
|
|
9786
10009
|
declare class Reports {
|
|
@@ -9799,9 +10022,9 @@ declare class Reports {
|
|
|
9799
10022
|
* Get the guarantor assignment (both core and validator data)
|
|
9800
10023
|
* depending on the rotation.
|
|
9801
10024
|
*
|
|
9802
|
-
* https://graypaper.fluffylabs.dev/#/
|
|
10025
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/15df0115df01?v=0.7.2
|
|
9803
10026
|
*/
|
|
9804
|
-
getGuarantorAssignment(headerTimeSlot: TimeSlot, guaranteeTimeSlot: TimeSlot, newEntropy: SafroleStateUpdate["entropy"]): Result<PerValidator<GuarantorAssignment>, ReportsError>;
|
|
10027
|
+
getGuarantorAssignment(headerTimeSlot: TimeSlot, guaranteeTimeSlot: TimeSlot, newEntropy: SafroleStateUpdate["entropy"], currentValidatorData: SafroleStateUpdate["currentValidatorData"], previousValidatorData: SafroleStateUpdate["previousValidatorData"]): Result<PerValidator<GuarantorAssignment>, ReportsError>;
|
|
9805
10028
|
}
|
|
9806
10029
|
|
|
9807
10030
|
declare class DbHeaderChain implements HeaderChain {
|
|
@@ -9850,7 +10073,7 @@ declare class OnChain {
|
|
|
9850
10073
|
private readonly authorization;
|
|
9851
10074
|
private readonly statistics;
|
|
9852
10075
|
private isReadyForNextEpoch;
|
|
9853
|
-
constructor(chainSpec: ChainSpec, state: State & WithStateView, hasher: TransitionHasher,
|
|
10076
|
+
constructor(chainSpec: ChainSpec, state: State & WithStateView, hasher: TransitionHasher, options: AccumulateOptions, headerChain: HeaderChain);
|
|
9854
10077
|
/** Pre-populate things worth caching for the next epoch. */
|
|
9855
10078
|
prepareForNextEpoch(): Promise<void>;
|
|
9856
10079
|
private verifySeal;
|
|
@@ -9935,7 +10158,22 @@ declare class Operand extends WithDebug {
|
|
|
9935
10158
|
authorizerHash: Descriptor<Bytes<32> & WithOpaque<"AuthorizerHash">, Bytes<32>>;
|
|
9936
10159
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
9937
10160
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
9938
|
-
result: Descriptor<WorkExecResult,
|
|
10161
|
+
result: Descriptor<WorkExecResult, {
|
|
10162
|
+
kind: WorkExecResultKind.ok;
|
|
10163
|
+
okBlob: BytesBlob;
|
|
10164
|
+
} | {
|
|
10165
|
+
kind: WorkExecResultKind.outOfGas;
|
|
10166
|
+
} | {
|
|
10167
|
+
kind: WorkExecResultKind.panic;
|
|
10168
|
+
} | {
|
|
10169
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
10170
|
+
} | {
|
|
10171
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
10172
|
+
} | {
|
|
10173
|
+
kind: WorkExecResultKind.badCode;
|
|
10174
|
+
} | {
|
|
10175
|
+
kind: WorkExecResultKind.codeOversize;
|
|
10176
|
+
}>;
|
|
9939
10177
|
authorizationOutput: Descriptor<BytesBlob, BytesBlob>;
|
|
9940
10178
|
}>>;
|
|
9941
10179
|
/**
|
|
@@ -10038,6 +10276,7 @@ type index$7_ACCUMULATION_ERROR = ACCUMULATION_ERROR;
|
|
|
10038
10276
|
type index$7_Accumulate = Accumulate;
|
|
10039
10277
|
declare const index$7_Accumulate: typeof Accumulate;
|
|
10040
10278
|
type index$7_AccumulateInput = AccumulateInput;
|
|
10279
|
+
type index$7_AccumulateOptions = AccumulateOptions;
|
|
10041
10280
|
type index$7_AccumulateResult = AccumulateResult;
|
|
10042
10281
|
type index$7_AccumulateRoot = AccumulateRoot;
|
|
10043
10282
|
type index$7_AccumulateState = AccumulateState;
|
|
@@ -10112,7 +10351,7 @@ declare const index$7_copyAndUpdateState: typeof copyAndUpdateState;
|
|
|
10112
10351
|
declare const index$7_stfError: typeof stfError;
|
|
10113
10352
|
declare namespace index$7 {
|
|
10114
10353
|
export { index$7_Accumulate as Accumulate, index$7_Assurances as Assurances, index$7_AssurancesError as AssurancesError, index$7_Authorization as Authorization, index$7_BlockVerifier as BlockVerifier, index$7_BlockVerifierError as BlockVerifierError, index$7_DbHeaderChain as DbHeaderChain, index$7_DeferredTransfers as DeferredTransfers, index$7_DeferredTransfersErrorCode as DeferredTransfersErrorCode, index$7_Disputes as Disputes, index$7_GAS_TO_INVOKE_WORK_REPORT as GAS_TO_INVOKE_WORK_REPORT, index$7_OnChain as OnChain, index$7_Preimages as Preimages, index$7_PreimagesErrorCode as PreimagesErrorCode, index$7_REPORT_TIMEOUT_GRACE_PERIOD as REPORT_TIMEOUT_GRACE_PERIOD, index$7_RecentHistory as RecentHistory, index$7_Reports as Reports, index$7_ReportsError as ReportsError, index$7_Statistics as Statistics, index$7_StfErrorKind as StfErrorKind, index$7_TransitionHasher as TransitionHasher, index$7_copyAndUpdateState as copyAndUpdateState, index$8 as externalities, index$7_stfError as stfError };
|
|
10115
|
-
export type { index$7_ACCUMULATION_ERROR as ACCUMULATION_ERROR, index$7_AccumulateInput as AccumulateInput, index$7_AccumulateResult as AccumulateResult, index$7_AccumulateRoot as AccumulateRoot, index$7_AccumulateState as AccumulateState, index$7_AccumulateStateUpdate as AccumulateStateUpdate, index$7_AssurancesInput as AssurancesInput, index$7_AssurancesState as AssurancesState, index$7_AssurancesStateUpdate as AssurancesStateUpdate, index$7_AuthorizationInput as AuthorizationInput, index$7_AuthorizationState as AuthorizationState, index$7_AuthorizationStateUpdate as AuthorizationStateUpdate, index$7_CountAndGasUsed as CountAndGasUsed, index$7_DeferredTransfersResult as DeferredTransfersResult, index$7_DeferredTransfersState as DeferredTransfersState, index$7_DisputesState as DisputesState, index$7_DisputesStateUpdate as DisputesStateUpdate, index$7_HeaderChain as HeaderChain, index$7_Input as Input, index$7_Ok as Ok, index$7_PreimagesInput as PreimagesInput, index$7_PreimagesState as PreimagesState, index$7_PreimagesStateUpdate as PreimagesStateUpdate, index$7_RecentHistoryInput as RecentHistoryInput, index$7_RecentHistoryPartialInput as RecentHistoryPartialInput, index$7_RecentHistoryState as RecentHistoryState, index$7_RecentHistoryStateUpdate as RecentHistoryStateUpdate, index$7_ReportsInput as ReportsInput, index$7_ReportsOutput as ReportsOutput, index$7_ReportsState as ReportsState, index$7_ReportsStateUpdate as ReportsStateUpdate, index$7_StatisticsState as StatisticsState, index$7_StatisticsStateUpdate as StatisticsStateUpdate, index$7_StfError as StfError };
|
|
10354
|
+
export type { index$7_ACCUMULATION_ERROR as ACCUMULATION_ERROR, index$7_AccumulateInput as AccumulateInput, index$7_AccumulateOptions as AccumulateOptions, index$7_AccumulateResult as AccumulateResult, index$7_AccumulateRoot as AccumulateRoot, index$7_AccumulateState as AccumulateState, index$7_AccumulateStateUpdate as AccumulateStateUpdate, index$7_AssurancesInput as AssurancesInput, index$7_AssurancesState as AssurancesState, index$7_AssurancesStateUpdate as AssurancesStateUpdate, index$7_AuthorizationInput as AuthorizationInput, index$7_AuthorizationState as AuthorizationState, index$7_AuthorizationStateUpdate as AuthorizationStateUpdate, index$7_CountAndGasUsed as CountAndGasUsed, index$7_DeferredTransfersResult as DeferredTransfersResult, index$7_DeferredTransfersState as DeferredTransfersState, index$7_DisputesState as DisputesState, index$7_DisputesStateUpdate as DisputesStateUpdate, index$7_HeaderChain as HeaderChain, index$7_Input as Input, index$7_Ok as Ok, index$7_PreimagesInput as PreimagesInput, index$7_PreimagesState as PreimagesState, index$7_PreimagesStateUpdate as PreimagesStateUpdate, index$7_RecentHistoryInput as RecentHistoryInput, index$7_RecentHistoryPartialInput as RecentHistoryPartialInput, index$7_RecentHistoryState as RecentHistoryState, index$7_RecentHistoryStateUpdate as RecentHistoryStateUpdate, index$7_ReportsInput as ReportsInput, index$7_ReportsOutput as ReportsOutput, index$7_ReportsState as ReportsState, index$7_ReportsStateUpdate as ReportsStateUpdate, index$7_StatisticsState as StatisticsState, index$7_StatisticsStateUpdate as StatisticsStateUpdate, index$7_StfError as StfError };
|
|
10116
10355
|
}
|
|
10117
10356
|
|
|
10118
10357
|
declare enum ImporterErrorKind {
|
|
@@ -10217,7 +10456,22 @@ declare const protocol: LousyProtocol<{
|
|
|
10217
10456
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
10218
10457
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
10219
10458
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
10220
|
-
result: Descriptor<WorkExecResult,
|
|
10459
|
+
result: Descriptor<WorkExecResult, {
|
|
10460
|
+
kind: WorkExecResultKind.ok;
|
|
10461
|
+
okBlob: BytesBlob;
|
|
10462
|
+
} | {
|
|
10463
|
+
kind: WorkExecResultKind.outOfGas;
|
|
10464
|
+
} | {
|
|
10465
|
+
kind: WorkExecResultKind.panic;
|
|
10466
|
+
} | {
|
|
10467
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
10468
|
+
} | {
|
|
10469
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
10470
|
+
} | {
|
|
10471
|
+
kind: WorkExecResultKind.badCode;
|
|
10472
|
+
} | {
|
|
10473
|
+
kind: WorkExecResultKind.codeOversize;
|
|
10474
|
+
}>;
|
|
10221
10475
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
10222
10476
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
10223
10477
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -10326,7 +10580,22 @@ declare const protocol: LousyProtocol<{
|
|
|
10326
10580
|
codeHash: Descriptor<Bytes<32> & WithOpaque<"CodeHash">, Bytes<32>>;
|
|
10327
10581
|
payloadHash: Descriptor<Bytes<32>, Bytes<32>>;
|
|
10328
10582
|
gas: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, Bytes<8>>;
|
|
10329
|
-
result: Descriptor<WorkExecResult,
|
|
10583
|
+
result: Descriptor<WorkExecResult, {
|
|
10584
|
+
kind: WorkExecResultKind.ok;
|
|
10585
|
+
okBlob: BytesBlob;
|
|
10586
|
+
} | {
|
|
10587
|
+
kind: WorkExecResultKind.outOfGas;
|
|
10588
|
+
} | {
|
|
10589
|
+
kind: WorkExecResultKind.panic;
|
|
10590
|
+
} | {
|
|
10591
|
+
kind: WorkExecResultKind.incorrectNumberOfExports;
|
|
10592
|
+
} | {
|
|
10593
|
+
kind: WorkExecResultKind.digestTooBig;
|
|
10594
|
+
} | {
|
|
10595
|
+
kind: WorkExecResultKind.badCode;
|
|
10596
|
+
} | {
|
|
10597
|
+
kind: WorkExecResultKind.codeOversize;
|
|
10598
|
+
}>;
|
|
10330
10599
|
load: Descriptor<WorkRefineLoad, ViewOf<WorkRefineLoad, {
|
|
10331
10600
|
gasUsed: Descriptor<bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">, U64>;
|
|
10332
10601
|
importedSegments: Descriptor<U32, U32>;
|
|
@@ -11306,4 +11575,5 @@ declare namespace index {
|
|
|
11306
11575
|
};
|
|
11307
11576
|
}
|
|
11308
11577
|
|
|
11309
|
-
export { index$s as block, index$q as block_json, index$y as bytes, index$x as codec, index$v as collections, index$t as config, index$p as config_node, index$u as crypto, index$k as database, index$j as erasure_coding, index$h as fuzz_proto, index$w as hash, index$9 as jam_host_calls, index$r as json_parser, index$f as logger, index$n as mmr, index$B as numbers, index$A as ordering, index$e as pvm, index$d as pvm_host_calls, index$3 as pvm_interpreter, index$2 as shuffling, index$m as state, index$1 as state_json, index$l as state_merkleization, index as state_vectors, index$7 as transition, index$o as trie, index$6 as typeberry, index$z as utils, index$g as workers };
|
|
11578
|
+
export { TEST_COMPARE_USING, __OPAQUE_TYPE__, __REPRESENTATION_BYTES__, index$s as block, index$q as block_json, index$y as bytes, index$x as codec, index$v as collections, index$t as config, index$p as config_node, index$u as crypto, index$k as database, index$j as erasure_coding, index$h as fuzz_proto, index$w as hash, index$9 as jam_host_calls, index$r as json_parser, index$f as logger, index$n as mmr, index$B as numbers, index$A as ordering, index$e as pvm, index$d as pvm_host_calls, index$3 as pvm_interpreter, index$2 as shuffling, index$m as state, index$1 as state_json, index$l as state_merkleization, index as state_vectors, index$7 as transition, index$o as trie, index$6 as typeberry, index$z as utils, index$g as workers };
|
|
11579
|
+
export type { WithBytesRepresentation, WithOpaque };
|