@typeberry/lib 0.5.3 → 0.5.4

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.
Files changed (149) hide show
  1. package/package.json +8 -4
  2. package/packages/core/hash/hash.d.ts.map +1 -1
  3. package/packages/core/hash/hash.js +1 -0
  4. package/packages/core/networking/certificate.d.ts.map +1 -1
  5. package/packages/core/networking/certificate.js +1 -0
  6. package/packages/core/networking/package.json +1 -1
  7. package/packages/core/networking/setup.d.ts.map +1 -1
  8. package/packages/core/networking/setup.js +16 -12
  9. package/packages/core/numbers/index.d.ts +4 -0
  10. package/packages/core/numbers/index.d.ts.map +1 -1
  11. package/packages/core/numbers/index.js +4 -4
  12. package/packages/core/pvm-host-calls/host-calls-executor.d.ts +23 -17
  13. package/packages/core/pvm-host-calls/host-calls-executor.d.ts.map +1 -1
  14. package/packages/core/pvm-host-calls/host-calls-executor.js +23 -31
  15. package/packages/core/pvm-interpreter/ops/math-consts.d.ts +2 -3
  16. package/packages/core/pvm-interpreter/ops/math-consts.d.ts.map +1 -1
  17. package/packages/core/pvm-interpreter/ops/math-consts.js +2 -3
  18. package/packages/core/pvm-interpreter/ops/math-ops.js +3 -3
  19. package/packages/core/pvm-interpreter/ops/math-utils.js +13 -13
  20. package/packages/core/pvm-interpreter/ops/math-utils.test.js +17 -16
  21. package/packages/core/telemetry/package.json +1 -1
  22. package/packages/extensions/ipc/jamnp/handler.d.ts +5 -4
  23. package/packages/extensions/ipc/jamnp/handler.d.ts.map +1 -1
  24. package/packages/extensions/ipc/jamnp/handler.js +59 -34
  25. package/packages/extensions/ipc/jamnp/stream.d.ts +6 -4
  26. package/packages/extensions/ipc/jamnp/stream.d.ts.map +1 -1
  27. package/packages/jam/block/work-item.d.ts +13 -4
  28. package/packages/jam/block/work-item.d.ts.map +1 -1
  29. package/packages/jam/block/work-package.d.ts +3 -1
  30. package/packages/jam/block/work-package.d.ts.map +1 -1
  31. package/packages/jam/block/work-package.js +6 -2
  32. package/packages/jam/block/work-result.d.ts +3 -5
  33. package/packages/jam/block/work-result.d.ts.map +1 -1
  34. package/packages/jam/block/work-result.js +6 -0
  35. package/packages/jam/block-json/block.d.ts +125 -0
  36. package/packages/jam/block-json/block.d.ts.map +1 -1
  37. package/packages/jam/block-json/block.js +9 -2
  38. package/packages/jam/block-json/work-result.d.ts.map +1 -1
  39. package/packages/jam/block-json/work-result.js +6 -6
  40. package/packages/jam/database-lmdb/states.test.js +4 -3
  41. package/packages/jam/executor/index.d.ts +4 -0
  42. package/packages/jam/executor/index.d.ts.map +1 -0
  43. package/packages/jam/executor/index.js +2 -0
  44. package/packages/jam/{transition/accumulate → executor}/pvm-executor.d.ts +19 -16
  45. package/packages/jam/executor/pvm-executor.d.ts.map +1 -0
  46. package/packages/jam/{transition/accumulate → executor}/pvm-executor.js +46 -3
  47. package/packages/jam/fuzz-proto/v1/handler.d.ts +1 -1
  48. package/packages/jam/fuzz-proto/v1/handler.d.ts.map +1 -1
  49. package/packages/jam/fuzz-proto/v1/handler.js +43 -19
  50. package/packages/jam/in-core/externalities/refine.d.ts +24 -0
  51. package/packages/jam/in-core/externalities/refine.d.ts.map +1 -0
  52. package/packages/jam/in-core/externalities/refine.js +36 -0
  53. package/packages/jam/in-core/in-core.d.ts +60 -0
  54. package/packages/jam/in-core/in-core.d.ts.map +1 -0
  55. package/packages/jam/in-core/in-core.js +294 -0
  56. package/packages/jam/in-core/in-core.test.d.ts +2 -0
  57. package/packages/jam/in-core/in-core.test.d.ts.map +1 -0
  58. package/packages/jam/in-core/in-core.test.js +81 -0
  59. package/packages/jam/in-core/index.d.ts +2 -0
  60. package/packages/jam/in-core/index.d.ts.map +1 -0
  61. package/packages/jam/in-core/index.js +1 -0
  62. package/packages/jam/jam-host-calls/accumulate/bless.test.js +4 -5
  63. package/packages/jam/jamnp-s/peers.d.ts.map +1 -1
  64. package/packages/jam/jamnp-s/peers.js +10 -0
  65. package/packages/jam/jamnp-s/protocol/ce-128-block-request.d.ts +1 -1
  66. package/packages/jam/jamnp-s/protocol/ce-128-block-request.d.ts.map +1 -1
  67. package/packages/jam/jamnp-s/protocol/ce-128-block-request.js +10 -8
  68. package/packages/jam/jamnp-s/protocol/ce-129-state-request.d.ts.map +1 -1
  69. package/packages/jam/jamnp-s/protocol/ce-129-state-request.js +11 -9
  70. package/packages/jam/jamnp-s/protocol/ce-131-ce-132-safrole-ticket-distribution.d.ts +3 -3
  71. package/packages/jam/jamnp-s/protocol/ce-131-ce-132-safrole-ticket-distribution.d.ts.map +1 -1
  72. package/packages/jam/jamnp-s/protocol/ce-131-ce-132-safrole-ticket-distribution.js +2 -2
  73. package/packages/jam/jamnp-s/protocol/ce-133-work-package-submission.d.ts +5 -5
  74. package/packages/jam/jamnp-s/protocol/ce-133-work-package-submission.d.ts.map +1 -1
  75. package/packages/jam/jamnp-s/protocol/ce-133-work-package-submission.js +2 -2
  76. package/packages/jam/jamnp-s/protocol/ce-134-work-package-sharing.d.ts.map +1 -1
  77. package/packages/jam/jamnp-s/protocol/ce-134-work-package-sharing.js +8 -6
  78. package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.d.ts +3 -3
  79. package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.d.ts.map +1 -1
  80. package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.js +2 -2
  81. package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.test.js +2 -2
  82. package/packages/jam/jamnp-s/protocol/stream.d.ts +13 -7
  83. package/packages/jam/jamnp-s/protocol/stream.d.ts.map +1 -1
  84. package/packages/jam/jamnp-s/protocol/stream.js +5 -4
  85. package/packages/jam/jamnp-s/protocol/test-utils.d.ts +1 -1
  86. package/packages/jam/jamnp-s/protocol/test-utils.d.ts.map +1 -1
  87. package/packages/jam/jamnp-s/protocol/test-utils.js +9 -12
  88. package/packages/jam/jamnp-s/protocol/up-0-block-announcement.d.ts +1 -1
  89. package/packages/jam/jamnp-s/protocol/up-0-block-announcement.d.ts.map +1 -1
  90. package/packages/jam/jamnp-s/protocol/up-0-block-announcement.js +1 -1
  91. package/packages/jam/jamnp-s/stream-manager.d.ts.map +1 -1
  92. package/packages/jam/jamnp-s/stream-manager.js +7 -5
  93. package/packages/jam/jamnp-s/stream-manager.test.js +8 -5
  94. package/packages/jam/jamnp-s/tasks/sync.js +1 -1
  95. package/packages/jam/node/jam-config.d.ts +4 -1
  96. package/packages/jam/node/jam-config.d.ts.map +1 -1
  97. package/packages/jam/node/jam-config.js +6 -2
  98. package/packages/jam/node/main.d.ts.map +1 -1
  99. package/packages/jam/node/main.js +5 -4
  100. package/packages/jam/node/package.json +1 -1
  101. package/packages/jam/rpc-validation/types.d.ts +7 -3
  102. package/packages/jam/rpc-validation/types.d.ts.map +1 -1
  103. package/packages/jam/rpc-validation/validation.d.ts +254 -36
  104. package/packages/jam/rpc-validation/validation.d.ts.map +1 -1
  105. package/packages/jam/rpc-validation/validation.js +20 -2
  106. package/packages/jam/state/in-memory-state.d.ts.map +1 -1
  107. package/packages/jam/state/in-memory-state.js +2 -3
  108. package/packages/jam/state/test.utils.d.ts.map +1 -1
  109. package/packages/jam/state/test.utils.js +2 -3
  110. package/packages/jam/state-vectors/index.d.ts +377 -5
  111. package/packages/jam/state-vectors/index.d.ts.map +1 -1
  112. package/packages/jam/state-vectors/index.js +3 -3
  113. package/packages/jam/transition/accumulate/accumulate-data.d.ts.map +1 -1
  114. package/packages/jam/transition/accumulate/accumulate-data.js +1 -2
  115. package/packages/jam/transition/accumulate/accumulate-queue.test.js +2 -2
  116. package/packages/jam/transition/accumulate/accumulate-utils.test.js +2 -2
  117. package/packages/jam/transition/accumulate/accumulate.d.ts.map +1 -1
  118. package/packages/jam/transition/accumulate/accumulate.js +8 -13
  119. package/packages/jam/transition/accumulate/accumulate.test.js +2 -2
  120. package/packages/jam/transition/accumulate/accumulation-result-merge-utils.d.ts.map +1 -1
  121. package/packages/jam/transition/accumulate/accumulation-result-merge-utils.js +1 -2
  122. package/packages/jam/transition/accumulate/accumulation-result-merge-utils.test.js +1 -2
  123. package/packages/jam/transition/accumulate/deferred-transfers.d.ts +1 -1
  124. package/packages/jam/transition/accumulate/deferred-transfers.d.ts.map +1 -1
  125. package/packages/jam/transition/accumulate/deferred-transfers.js +6 -7
  126. package/packages/jam/transition/disputes/disputes.test.data2.js +2 -2
  127. package/packages/jam/transition/externalities/fetch-externalities.d.ts +7 -1
  128. package/packages/jam/transition/externalities/fetch-externalities.d.ts.map +1 -1
  129. package/packages/jam/transition/externalities/fetch-externalities.js +4 -0
  130. package/packages/jam/transition/externalities/fetch-externalities.test.js +2 -2
  131. package/packages/jam/transition/hasher.test.js +2 -2
  132. package/packages/jam/transition/reports/error.d.ts +3 -1
  133. package/packages/jam/transition/reports/error.d.ts.map +1 -1
  134. package/packages/jam/transition/reports/error.js +2 -0
  135. package/packages/jam/transition/reports/test.utils.d.ts.map +1 -1
  136. package/packages/jam/transition/reports/test.utils.js +2 -2
  137. package/packages/jam/transition/reports/verify-basic.d.ts.map +1 -1
  138. package/packages/jam/transition/reports/verify-basic.js +10 -0
  139. package/packages/jam/transition/reports/verify-basic.test.js +29 -0
  140. package/packages/workers/block-authorship/main.d.ts.map +1 -1
  141. package/packages/workers/block-authorship/main.js +23 -4
  142. package/packages/workers/block-authorship/package.json +1 -1
  143. package/packages/workers/block-authorship/protocol.d.ts +3 -1
  144. package/packages/workers/block-authorship/protocol.d.ts.map +1 -1
  145. package/packages/workers/block-authorship/protocol.js +6 -3
  146. package/packages/workers/importer/importer.d.ts.map +1 -1
  147. package/packages/workers/importer/importer.js +0 -1
  148. package/packages/workers/importer/package.json +1 -1
  149. package/packages/jam/transition/accumulate/pvm-executor.d.ts.map +0 -1
@@ -1,10 +1,14 @@
1
- import type { ServiceId } from "#@typeberry/block";
1
+ import { type ServiceGas, type ServiceId } from "#@typeberry/block";
2
2
  import type { BytesBlob } from "#@typeberry/bytes";
3
3
  import type { ChainSpec, PvmBackend } from "#@typeberry/config";
4
4
  import { general } from "#@typeberry/jam-host-calls";
5
5
  import type { PartialState } from "#@typeberry/jam-host-calls/externalities/partial-state.js";
6
- import type { Gas } from "#@typeberry/pvm-interface";
7
- type AccumulateHostCallExternalities = {
6
+ import { type RefineExternalities } from "#@typeberry/jam-host-calls/externalities/refine-externalities.js";
7
+ export type RefineHostCallExternalities = {
8
+ refine: RefineExternalities;
9
+ fetchExternalities: general.IFetchExternalities;
10
+ };
11
+ export type AccumulateHostCallExternalities = {
8
12
  partialState: PartialState;
9
13
  fetchExternalities: general.IFetchExternalities;
10
14
  serviceExternalities: general.AccountsInfo & general.AccountsLookup & general.AccountsWrite & general.AccountsRead;
@@ -23,6 +27,8 @@ export declare class PvmExecutor {
23
27
  private hostCalls;
24
28
  private constructor();
25
29
  private static prepareBackend;
30
+ /** Prepare refine host call handlers */
31
+ private static prepareRefineHostCalls;
26
32
  /** Prepare accumulation host call handlers */
27
33
  private static prepareAccumulateHostCalls;
28
34
  /** Prepare on transfer host call handlers */
@@ -32,21 +38,18 @@ export declare class PvmExecutor {
32
38
  *
33
39
  * @param args additional arguments that will be placed in PVM memory before execution
34
40
  * @param gas gas limit
35
- * @returns `ReturnValue` object that can be a status or memory slice
41
+ * @returns `ReturnValue` object containing consumed gas, status and an optional memory slice
36
42
  */
37
- run(args: BytesBlob, gas: Gas): Promise<{
38
- consumedGas: Gas;
39
- status: import("@typeberry/pvm-interface").Status | null;
40
- memorySlice: Uint8Array | null;
41
- hasMemorySlice(): this is /*elided*/ any & {
42
- status: null;
43
- memorySlice: Uint8Array;
44
- };
45
- hasStatus(): this is /*elided*/ any & {
46
- status: import("@typeberry/pvm-interface").Status;
47
- memorySlice: null;
48
- };
43
+ run(args: BytesBlob, gas: ServiceGas): Promise<{
44
+ consumedGas: bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">;
45
+ status: import("@typeberry/pvm-host-calls").ReturnStatus.OK;
46
+ memorySlice: Uint8Array;
47
+ } | {
48
+ consumedGas: bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">;
49
+ status: import("@typeberry/pvm-host-calls").ReturnStatus.OOG | import("@typeberry/pvm-host-calls").ReturnStatus.PANIC;
49
50
  }>;
51
+ /** A utility function that can be used to prepare refine executor */
52
+ static createRefineExecutor(serviceId: ServiceId, serviceCode: BytesBlob, externalities: RefineHostCallExternalities, pvm: PvmBackend): Promise<PvmExecutor>;
50
53
  /** A utility function that can be used to prepare accumulate executor */
51
54
  static createAccumulateExecutor(serviceId: ServiceId, serviceCode: BytesBlob, externalities: AccumulateHostCallExternalities, chainSpec: ChainSpec, pvm: PvmBackend): Promise<PvmExecutor>;
52
55
  /** A utility function that can be used to prepare on transfer executor */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pvm-executor.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/executor/pvm-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAmB,MAAM,kBAAkB,CAAC;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAc,OAAO,EAAU,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0DAA0D,CAAC;AAC7F,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,iEAAiE,CAAC;AAuCzE,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,kBAAkB,EAAE,OAAO,CAAC,mBAAmB,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,YAAY,EAAE,YAAY,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAChD,oBAAoB,EAAE,OAAO,CAAC,YAA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typeberry/block";
2
+ import { accumulate, general, refine } from "#@typeberry/jam-host-calls";
2
3
  import { tryAsProgramCounter, } from "#@typeberry/jam-host-calls/externalities/refine-externalities.js";
3
4
  import { HostCalls, HostCallsExecutor, PvmInstanceManager } from "#@typeberry/pvm-host-calls";
5
+ import { tryAsGas } from "#@typeberry/pvm-interface";
6
+ /**
7
+ * Refine-specific host calls with common constructor.
8
+ * https://graypaper.fluffylabs.dev/#/ab2cdbd/2fa7022fa702?v=0.7.2
9
+ */
10
+ const REFINE_HOST_CALL_CLASSES = [
11
+ refine.HistoricalLookup,
12
+ refine.Export,
13
+ refine.Machine,
14
+ refine.Peek,
15
+ refine.Poke,
16
+ refine.Pages,
17
+ refine.Invoke,
18
+ refine.Expunge,
19
+ ];
20
+ /**
21
+ * Accumulate-specific host calls with common constructor.
22
+ * https://graypaper.fluffylabs.dev/#/ab2cdbd/30d00130d001?v=0.7.2
23
+ */
4
24
  const ACCUMULATE_HOST_CALL_CLASSES = [
5
25
  accumulate.Bless,
6
26
  accumulate.Assign,
@@ -21,6 +41,7 @@ var entrypoint;
21
41
  entrypoint.IS_AUTHORIZED = tryAsProgramCounter(0);
22
42
  entrypoint.REFINE = tryAsProgramCounter(0);
23
43
  entrypoint.ACCUMULATE = tryAsProgramCounter(5);
44
+ /** @deprecated since 0.7.1 */
24
45
  entrypoint.ON_TRANSFER = tryAsProgramCounter(10);
25
46
  })(entrypoint || (entrypoint = {}));
26
47
  /**
@@ -43,9 +64,21 @@ export class PvmExecutor {
43
64
  static async prepareBackend(pvm) {
44
65
  return PvmInstanceManager.new(pvm);
45
66
  }
67
+ /** Prepare refine host call handlers */
68
+ static prepareRefineHostCalls(serviceId, externalities) {
69
+ const refineHandlers = REFINE_HOST_CALL_CLASSES.map((HandlerClass) => new HandlerClass(externalities.refine));
70
+ /** https://graypaper.fluffylabs.dev/#/ab2cdbd/2fa7022fa702?v=0.7.2 */
71
+ const generalHandlers = [
72
+ new general.LogHostCall(serviceId),
73
+ new general.GasHostCall(serviceId),
74
+ new general.Fetch(serviceId, externalities.fetchExternalities),
75
+ ];
76
+ return refineHandlers.concat(generalHandlers);
77
+ }
46
78
  /** Prepare accumulation host call handlers */
47
79
  static prepareAccumulateHostCalls(serviceId, externalities, chainSpec) {
48
80
  const accumulateHandlers = ACCUMULATE_HOST_CALL_CLASSES.map((HandlerClass) => new HandlerClass(serviceId, externalities.partialState, chainSpec));
81
+ /** https://graypaper.fluffylabs.dev/#/ab2cdbd/30d00130d001?v=0.7.2 */
49
82
  const generalHandlers = [
50
83
  new general.LogHostCall(serviceId),
51
84
  new general.GasHostCall(serviceId),
@@ -75,10 +108,20 @@ export class PvmExecutor {
75
108
  *
76
109
  * @param args additional arguments that will be placed in PVM memory before execution
77
110
  * @param gas gas limit
78
- * @returns `ReturnValue` object that can be a status or memory slice
111
+ * @returns `ReturnValue` object containing consumed gas, status and an optional memory slice
79
112
  */
80
113
  async run(args, gas) {
81
- return this.pvm.runProgram(this.serviceCode.raw, args.raw, Number(this.entrypoint), gas);
114
+ const ret = await this.pvm.runProgram(this.serviceCode.raw, args.raw, Number(this.entrypoint), tryAsGas(gas));
115
+ return {
116
+ ...ret,
117
+ consumedGas: tryAsServiceGas(ret.consumedGas),
118
+ };
119
+ }
120
+ /** A utility function that can be used to prepare refine executor */
121
+ static async createRefineExecutor(serviceId, serviceCode, externalities, pvm) {
122
+ const hostCallHandlers = PvmExecutor.prepareRefineHostCalls(serviceId, externalities);
123
+ const instances = await PvmExecutor.prepareBackend(pvm);
124
+ return new PvmExecutor(serviceCode, hostCallHandlers, entrypoint.REFINE, instances);
82
125
  }
83
126
  /** A utility function that can be used to prepare accumulate executor */
84
127
  static async createAccumulateExecutor(serviceId, serviceCode, externalities, chainSpec, pvm) {
@@ -2,7 +2,7 @@ import type { BlockView, HeaderHash, StateRootHash } from "#@typeberry/block";
2
2
  import type { ChainSpec } from "#@typeberry/config";
3
3
  import { type Result } from "#@typeberry/utils";
4
4
  import type { IpcHandler, IpcSender } from "../server.js";
5
- import { type ErrorMessage, type Initialize, type KeyValue, type PeerInfo } from "./types.js";
5
+ import { ErrorMessage, type Initialize, type KeyValue, type PeerInfo } from "./types.js";
6
6
  /**
7
7
  * Handler interface for v1 fuzzer protocol messages.
8
8
  * https://github.com/davxy/jam-conformance/blob/main/fuzz-proto/fuzz-v1.asn
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../../../packages/jam/fuzz-proto/v1/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,UAAU,EACf,KAAK,QAAQ,EAKb,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AAIpB;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEhD;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvD;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;IAE5E,gEAAgE;IAChE,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC5D;AAED,qBAAa,UAAW,YAAW,UAAU;aAIzB,UAAU,EAAE,kBAAkB;aAC9B,MAAM,EAAE,SAAS;aACjB,IAAI,EAAE,SAAS;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,EAAE,CAAC,CAAC;CAC5D;AAED,qBAAa,UAAW,YAAW,UAAU;aAIzB,UAAU,EAAE,kBAAkB;aAC9B,MAAM,EAAE,SAAS;aACjB,IAAI,EAAE,SAAS;IALjC,OAAO,CAAC,eAAe,CAAK;gBAGV,UAAU,EAAE,kBAAkB,EAC9B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,SAAS;IAG3B,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAiBvC,iBAAiB;IA2H/B,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG,IAAI;IAI3C,4DAA4D;IAC5D,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;CAGrC"}
@@ -1,7 +1,7 @@
1
1
  import { Decoder, Encoder } from "#@typeberry/codec";
2
2
  import { Logger } from "#@typeberry/logger";
3
3
  import { assertNever } from "#@typeberry/utils";
4
- import { Features, MessageType, messageCodec, } from "./types.js";
4
+ import { ErrorMessage, Features, MessageType, messageCodec, } from "./types.js";
5
5
  const logger = Logger.new(import.meta.filename, "ext-ipc-fuzz-v1");
6
6
  export class FuzzTarget {
7
7
  msgHandler;
@@ -53,35 +53,59 @@ export class FuzzTarget {
53
53
  break;
54
54
  }
55
55
  case MessageType.Initialize: {
56
- const stateRoot = await this.msgHandler.initialize(message.value);
57
- response = {
58
- type: MessageType.StateRoot,
59
- value: stateRoot,
60
- };
61
- break;
62
- }
63
- case MessageType.ImportBlock: {
64
- const result = await this.msgHandler.importBlock(message.value);
65
- if (result.isOk) {
56
+ try {
57
+ const stateRoot = await this.msgHandler.initialize(message.value);
66
58
  response = {
67
59
  type: MessageType.StateRoot,
68
- value: result.ok,
60
+ value: stateRoot,
69
61
  };
70
62
  }
71
- else {
63
+ catch (e) {
72
64
  response = {
73
65
  type: MessageType.Error,
74
- value: result.error,
66
+ value: ErrorMessage.create({ message: `initialize error: ${e}` }),
67
+ };
68
+ }
69
+ break;
70
+ }
71
+ case MessageType.ImportBlock: {
72
+ try {
73
+ const result = await this.msgHandler.importBlock(message.value);
74
+ if (result.isOk) {
75
+ response = {
76
+ type: MessageType.StateRoot,
77
+ value: result.ok,
78
+ };
79
+ }
80
+ else {
81
+ response = {
82
+ type: MessageType.Error,
83
+ value: result.error,
84
+ };
85
+ }
86
+ }
87
+ catch (e) {
88
+ response = {
89
+ type: MessageType.Error,
90
+ value: ErrorMessage.create({ message: `importBlock error: ${e}` }),
75
91
  };
76
92
  }
77
93
  break;
78
94
  }
79
95
  case MessageType.GetState: {
80
- const state = await this.msgHandler.getSerializedState(message.value);
81
- response = {
82
- type: MessageType.State,
83
- value: state,
84
- };
96
+ try {
97
+ const state = await this.msgHandler.getSerializedState(message.value);
98
+ response = {
99
+ type: MessageType.State,
100
+ value: state,
101
+ };
102
+ }
103
+ catch (e) {
104
+ response = {
105
+ type: MessageType.Error,
106
+ value: ErrorMessage.create({ message: `getState error: ${e}` }),
107
+ };
108
+ }
85
109
  break;
86
110
  }
87
111
  case MessageType.StateRoot: {
@@ -0,0 +1,24 @@
1
+ import type { Segment, SegmentIndex, ServiceId } from "#@typeberry/block";
2
+ import type { BytesBlob } from "#@typeberry/bytes";
3
+ import type { Blake2bHash } from "#@typeberry/hash";
4
+ import type { MachineId, MachineResult, MemoryOperation, NoMachineError, PagesError, PeekPokeError, ProgramCounter, RefineExternalities, SegmentExportError, ZeroVoidError } from "#@typeberry/jam-host-calls";
5
+ import type { U64 } from "#@typeberry/numbers";
6
+ import type { HostCallMemory, HostCallRegisters } from "#@typeberry/pvm-host-calls";
7
+ import type { BigGas } from "#@typeberry/pvm-interface";
8
+ import type { ProgramDecoderError } from "#@typeberry/pvm-interpreter";
9
+ import type { OK, Result } from "#@typeberry/utils";
10
+ export declare class RefineExternalitiesImpl implements RefineExternalities {
11
+ static create(): RefineExternalitiesImpl;
12
+ private constructor();
13
+ machineExpunge(_machineIndex: MachineId): Promise<Result<ProgramCounter, NoMachineError>>;
14
+ machinePages(_machineIndex: MachineId, _pageStart: U64, _pageCount: U64, _requestType: MemoryOperation | null): Promise<Result<OK, PagesError>>;
15
+ machineVoidPages(_machineIndex: MachineId, _pageStart: U64, _pageCount: U64): Promise<Result<OK, ZeroVoidError>>;
16
+ machineZeroPages(_machineIndex: MachineId, _pageStart: U64, _pageCount: U64): Promise<Result<OK, ZeroVoidError>>;
17
+ machinePeekFrom(_machineIndex: MachineId, _destinationStart: U64, _sourceStart: U64, _length: U64, _destination: HostCallMemory): Promise<Result<OK, PeekPokeError>>;
18
+ machinePokeInto(_machineIndex: MachineId, _sourceStart: U64, _destinationStart: U64, _length: U64, _source: HostCallMemory): Promise<Result<OK, PeekPokeError>>;
19
+ machineInit(_code: BytesBlob, _programCounter: ProgramCounter): Promise<Result<MachineId, ProgramDecoderError>>;
20
+ machineInvoke(_machineIndex: MachineId, _gas: BigGas, _registers: HostCallRegisters): Promise<Result<MachineResult, NoMachineError>>;
21
+ exportSegment(_segment: Segment): Result<SegmentIndex, SegmentExportError>;
22
+ historicalLookup(_serviceId: ServiceId | null, _hash: Blake2bHash): Promise<BytesBlob | null>;
23
+ }
24
+ //# sourceMappingURL=refine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refine.d.ts","sourceRoot":"","sources":["../../../../../../packages/jam/in-core/externalities/refine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,eAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KA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AAO,EAAE,GAAG,EACZ,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;IAIrC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IAI/G,aAAa,CACX,aAAa,EAAE,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAIjD,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAI1E,gBAAgB,CAAC,UAAU,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;CAG9F"}
@@ -0,0 +1,36 @@
1
+ export class RefineExternalitiesImpl {
2
+ static create() {
3
+ return new RefineExternalitiesImpl();
4
+ }
5
+ constructor() { }
6
+ machineExpunge(_machineIndex) {
7
+ throw new Error("Method not implemented.");
8
+ }
9
+ machinePages(_machineIndex, _pageStart, _pageCount, _requestType) {
10
+ throw new Error("Method not implemented.");
11
+ }
12
+ machineVoidPages(_machineIndex, _pageStart, _pageCount) {
13
+ throw new Error("Method not implemented.");
14
+ }
15
+ machineZeroPages(_machineIndex, _pageStart, _pageCount) {
16
+ throw new Error("Method not implemented.");
17
+ }
18
+ machinePeekFrom(_machineIndex, _destinationStart, _sourceStart, _length, _destination) {
19
+ throw new Error("Method not implemented.");
20
+ }
21
+ machinePokeInto(_machineIndex, _sourceStart, _destinationStart, _length, _source) {
22
+ throw new Error("Method not implemented.");
23
+ }
24
+ machineInit(_code, _programCounter) {
25
+ throw new Error("Method not implemented.");
26
+ }
27
+ machineInvoke(_machineIndex, _gas, _registers) {
28
+ throw new Error("Method not implemented.");
29
+ }
30
+ exportSegment(_segment) {
31
+ throw new Error("Method not implemented.");
32
+ }
33
+ historicalLookup(_serviceId, _hash) {
34
+ throw new Error("Method not implemented.");
35
+ }
36
+ }
@@ -0,0 +1,60 @@
1
+ import { type CoreIndex, type Segment, type SegmentIndex, type ServiceGas } from "#@typeberry/block";
2
+ import { type WorkPackageHash } from "#@typeberry/block/refine-context.js";
3
+ import type { WorkItemExtrinsic } from "#@typeberry/block/work-item.js";
4
+ import type { WorkPackage } from "#@typeberry/block/work-package.js";
5
+ import { WorkReport } from "#@typeberry/block/work-report.js";
6
+ import { WorkExecResult, WorkResult } from "#@typeberry/block/work-result.js";
7
+ import { type KnownSizeArray } from "#@typeberry/collections";
8
+ import type { ChainSpec, PvmBackend } from "#@typeberry/config";
9
+ import type { StatesDb } from "#@typeberry/database";
10
+ import { type ReturnValue } from "#@typeberry/executor";
11
+ import { type Blake2b, type WithHash } from "#@typeberry/hash";
12
+ import { Result } from "#@typeberry/utils";
13
+ export type RefineResult = {
14
+ report: WorkReport;
15
+ exports: PerWorkItem<Segment[]>;
16
+ };
17
+ export type RefineItemResult = {
18
+ result: WorkResult;
19
+ exports: Segment[];
20
+ };
21
+ export declare enum RefineError {
22
+ /** State for context anchor block or lookup anchor is not found in the DB. */
23
+ StateMissing = 0,
24
+ /** Posterior state root of context anchor block does not match the one in the DB. */
25
+ StateRootMismatch = 1,
26
+ /** Lookup anchor state-slot does not match the one given in context. */
27
+ InvalidLookupAnchorSlot = 2,
28
+ /** Authorization error. */
29
+ AuthorizationError = 3
30
+ }
31
+ export type PerWorkItem<T> = KnownSizeArray<T, "for each work item">;
32
+ export type ImportedSegment = {
33
+ index: SegmentIndex;
34
+ data: Segment;
35
+ };
36
+ export declare class InCore {
37
+ readonly chainSpec: ChainSpec;
38
+ private readonly states;
39
+ private readonly pvmBackend;
40
+ private readonly blake2b;
41
+ constructor(chainSpec: ChainSpec, states: StatesDb, pvmBackend: PvmBackend, blake2b: Blake2b);
42
+ /**
43
+ * Work-report computation function.
44
+ *
45
+ * Note this requires all of the imports and extrinsics to be already fetched
46
+ * and only performs the refinement.
47
+ *
48
+ * Any validation must be done externally!
49
+ *
50
+ * https://graypaper.fluffylabs.dev/#/ab2cdbd/1b7f021b7f02?v=0.7.2
51
+ */
52
+ refine(workPackageAndHash: WithHash<WorkPackageHash, WorkPackage>, core: CoreIndex, imports: PerWorkItem<ImportedSegment[]>, extrinsics: PerWorkItem<WorkItemExtrinsic[]>): Promise<Result<RefineResult, RefineError>>;
53
+ private amalgamateWorkReport;
54
+ private authorizePackage;
55
+ private refineItem;
56
+ extractWorkResult(execResult: ReturnValue<ServiceGas>): WorkExecResult;
57
+ private getServiceCode;
58
+ private createRefineExternalities;
59
+ }
60
+ //# sourceMappingURL=in-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-core.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/in-core/in-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EAIhB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAY,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAmB,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAsC,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGjH,OAAO,EAA+B,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAA+D,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpH,OA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