@typeberry/lib 0.1.1 → 0.1.2-60899f7

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.d.ts CHANGED
@@ -2,6 +2,7 @@ declare enum GpVersion {
2
2
  V0_6_7 = "0.6.7",
3
3
  V0_7_0 = "0.7.0",
4
4
  V0_7_1 = "0.7.1-preview",
5
+ V0_7_2 = "0.7.2-preview",
5
6
  }
6
7
 
7
8
  declare enum TestSuite {
@@ -11,9 +12,7 @@ declare enum TestSuite {
11
12
 
12
13
  declare const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
13
14
 
14
- declare const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1];
15
-
16
- declare const env = typeof process === "undefined" ? {} : process.env;
15
+ declare const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
17
16
  declare const DEFAULT_VERSION = GpVersion.V0_7_0;
18
17
  declare let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
19
18
  declare let CURRENT_SUITE = parseCurrentSuite(env.TEST_SUITE) ?? DEFAULT_SUITE;
@@ -22,24 +21,30 @@ declare function parseCurrentVersion(env?: string): GpVersion | undefined {
22
21
  if (env === undefined) {
23
22
  return undefined;
24
23
  }
25
- const version = env as GpVersion;
26
- if (!Object.values(GpVersion).includes(version)) {
27
- throw new Error(
28
- `Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`,
29
- );
24
+ switch (env) {
25
+ case GpVersion.V0_6_7:
26
+ case GpVersion.V0_7_0:
27
+ case GpVersion.V0_7_1:
28
+ case GpVersion.V0_7_2:
29
+ return env;
30
+ default:
31
+ throw new Error(
32
+ `Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`,
33
+ );
30
34
  }
31
- return version;
32
35
  }
33
36
 
34
37
  declare function parseCurrentSuite(env?: string): TestSuite | undefined {
35
38
  if (env === undefined) return undefined;
36
- const val = env as TestSuite;
37
- if (!Object.values(TestSuite).includes(val)) {
38
- throw new Error(
39
- `Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`,
40
- );
39
+ switch (env) {
40
+ case TestSuite.W3F_DAVXY:
41
+ case TestSuite.JAMDUNA:
42
+ return env;
43
+ default:
44
+ throw new Error(
45
+ `Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`,
46
+ );
41
47
  }
42
- return val;
43
48
  }
44
49
 
45
50
  declare class Compatibility {
@@ -235,6 +240,33 @@ declare abstract class WithDebug {
235
240
  }
236
241
  }
237
242
 
243
+ /**
244
+ * The function will produce relative path resolver that is adjusted
245
+ * for package location within the workspace.
246
+ *
247
+ * Example:
248
+ * $ npm start -w @typeberry/jam
249
+ *
250
+ * The above command will run `./bin/jam/index.js`, however we would
251
+ * still want relative paths to be resolved according to top-level workspace
252
+ * directory.
253
+ *
254
+ * So the caller, passes the absolute workspace path as argument and get's
255
+ * a function that can properly resolve relative paths.
256
+ *
257
+ * NOTE: the translation happens only for development build! When
258
+ * we build a single library from our project, we no longer mangle the paths.
259
+ */
260
+ declare const workspacePathFix =
261
+ env.NODE_ENV === "development"
262
+ ? (workspacePath: string) => (p: string) => {
263
+ if (p.startsWith("/")) {
264
+ return p;
265
+ }
266
+ return `${workspacePath}/${p}`;
267
+ }
268
+ : () => (p: string) => p;
269
+
238
270
  /**
239
271
  * @fileoverview `Opaque<Type, Token>` constructs a unique type which is a subset of Type with a
240
272
  * specified unique token Token. It means that base type cannot be assigned to unique type by accident.
@@ -712,7 +744,6 @@ declare const index$s_assertNever: typeof assertNever;
712
744
  declare const index$s_callCompareFunction: typeof callCompareFunction;
713
745
  declare const index$s_check: typeof check;
714
746
  declare const index$s_deepEqual: typeof deepEqual;
715
- declare const index$s_env: typeof env;
716
747
  declare const index$s_getAllKeysSorted: typeof getAllKeysSorted;
717
748
  declare const index$s_inspect: typeof inspect;
718
749
  declare const index$s_isBrowser: typeof isBrowser;
@@ -726,8 +757,9 @@ declare const index$s_parseCurrentVersion: typeof parseCurrentVersion;
726
757
  declare const index$s_resultToString: typeof resultToString;
727
758
  declare const index$s_seeThrough: typeof seeThrough;
728
759
  declare const index$s_trimStack: typeof trimStack;
760
+ declare const index$s_workspacePathFix: typeof workspacePathFix;
729
761
  declare namespace index$s {
730
- export { index$s_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$s_CURRENT_SUITE as CURRENT_SUITE, index$s_CURRENT_VERSION as CURRENT_VERSION, index$s_Compatibility as Compatibility, index$s_DEFAULT_SUITE as DEFAULT_SUITE, index$s_DEFAULT_VERSION as DEFAULT_VERSION, index$s_ErrorsCollector as ErrorsCollector, index$s_GpVersion as GpVersion, Result$2 as Result, index$s_RichTaggedError as RichTaggedError, index$s_TEST_COMPARE_USING as TEST_COMPARE_USING, index$s_TestSuite as TestSuite, index$s_WithDebug as WithDebug, index$s___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$s_asOpaqueType as asOpaqueType, index$s_assertEmpty as assertEmpty, index$s_assertNever as assertNever, index$s_callCompareFunction as callCompareFunction, index$s_check as check, index$s_deepEqual as deepEqual, index$s_env as env, index$s_getAllKeysSorted as getAllKeysSorted, index$s_inspect as inspect, index$s_isBrowser as isBrowser, index$s_isResult as isResult, index$s_isTaggedError as isTaggedError, index$s_maybeTaggedErrorToString as maybeTaggedErrorToString, index$s_measure as measure, index$s_oomWarningPrinted as oomWarningPrinted, index$s_parseCurrentSuite as parseCurrentSuite, index$s_parseCurrentVersion as parseCurrentVersion, index$s_resultToString as resultToString, index$s_seeThrough as seeThrough, index$s_trimStack as trimStack };
762
+ export { index$s_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$s_CURRENT_SUITE as CURRENT_SUITE, index$s_CURRENT_VERSION as CURRENT_VERSION, index$s_Compatibility as Compatibility, index$s_DEFAULT_SUITE as DEFAULT_SUITE, index$s_DEFAULT_VERSION as DEFAULT_VERSION, index$s_ErrorsCollector as ErrorsCollector, index$s_GpVersion as GpVersion, Result$2 as Result, index$s_RichTaggedError as RichTaggedError, index$s_TEST_COMPARE_USING as TEST_COMPARE_USING, index$s_TestSuite as TestSuite, index$s_WithDebug as WithDebug, index$s___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$s_asOpaqueType as asOpaqueType, index$s_assertEmpty as assertEmpty, index$s_assertNever as assertNever, index$s_callCompareFunction as callCompareFunction, index$s_check as check, index$s_deepEqual as deepEqual, index$s_getAllKeysSorted as getAllKeysSorted, index$s_inspect as inspect, index$s_isBrowser as isBrowser, index$s_isResult as isResult, index$s_isTaggedError as isTaggedError, index$s_maybeTaggedErrorToString as maybeTaggedErrorToString, index$s_measure as measure, index$s_oomWarningPrinted as oomWarningPrinted, index$s_parseCurrentSuite as parseCurrentSuite, index$s_parseCurrentVersion as parseCurrentVersion, index$s_resultToString as resultToString, index$s_seeThrough as seeThrough, index$s_trimStack as trimStack, index$s_workspacePathFix as workspacePathFix };
731
763
  export type { index$s_DeepEqualOptions as DeepEqualOptions, index$s_EnumMapping as EnumMapping, index$s_ErrorResult as ErrorResult, index$s_OK as OK, index$s_OkResult as OkResult, index$s_Opaque as Opaque, index$s_StringLiteral as StringLiteral, index$s_TaggedError as TaggedError, index$s_TokenOf as TokenOf, index$s_Uninstantiable as Uninstantiable, index$s_WithOpaque as WithOpaque };
732
764
  }
733
765
 
@@ -6841,6 +6873,25 @@ declare class Block extends WithDebug {
6841
6873
  /** Undecoded View of a [`Block`]. */
6842
6874
  type BlockView = DescribedBy<typeof Block.Codec.View>;
6843
6875
 
6876
+ declare function emptyBlock(slot: TimeSlot = tryAsTimeSlot(0)) {
6877
+ const header = Header.empty();
6878
+ header.timeSlotIndex = slot;
6879
+ return Block.create({
6880
+ header,
6881
+ extrinsic: Extrinsic.create({
6882
+ tickets: asKnownSize([]),
6883
+ preimages: [],
6884
+ assurances: asKnownSize([]),
6885
+ guarantees: asKnownSize([]),
6886
+ disputes: {
6887
+ verdicts: [],
6888
+ culprits: [],
6889
+ faults: [],
6890
+ },
6891
+ }),
6892
+ });
6893
+ }
6894
+
6844
6895
  type index$j_Block = Block;
6845
6896
  declare const index$j_Block: typeof Block;
6846
6897
  type index$j_BlockView = BlockView;
@@ -6884,6 +6935,7 @@ declare const index$j_assurances: typeof assurances;
6884
6935
  declare const index$j_codecPerEpochBlock: typeof codecPerEpochBlock;
6885
6936
  declare const index$j_codecPerValidator: typeof codecPerValidator;
6886
6937
  declare const index$j_disputes: typeof disputes;
6938
+ declare const index$j_emptyBlock: typeof emptyBlock;
6887
6939
  declare const index$j_encodeUnsealedHeader: typeof encodeUnsealedHeader;
6888
6940
  declare const index$j_guarantees: typeof guarantees;
6889
6941
  declare const index$j_headerViewWithHashCodec: typeof headerViewWithHashCodec;
@@ -6905,7 +6957,7 @@ declare const index$j_workPackage: typeof workPackage;
6905
6957
  declare const index$j_workReport: typeof workReport;
6906
6958
  declare const index$j_workResult: typeof workResult;
6907
6959
  declare namespace index$j {
6908
- export { index$j_Block as Block, index$j_EpochMarker as EpochMarker, index$j_Extrinsic as Extrinsic, index$j_Header as Header, index$j_HeaderViewWithHash as HeaderViewWithHash, index$j_MAX_NUMBER_OF_SEGMENTS as MAX_NUMBER_OF_SEGMENTS, index$j_TicketsMarker as TicketsMarker, index$j_ValidatorKeys as ValidatorKeys, index$j_W_E as W_E, index$j_W_S as W_S, index$j_assurances as assurances, index$j_codecPerEpochBlock as codecPerEpochBlock, index$j_codecPerValidator as codecPerValidator, codec as codecUtils, index$j_disputes as disputes, index$j_encodeUnsealedHeader as encodeUnsealedHeader, index$j_guarantees as guarantees, index$j_headerViewWithHashCodec as headerViewWithHashCodec, index$j_legacyDescriptor as legacyDescriptor, index$j_preimage as preimage, index$j_refineContext as refineContext, index$j_tickets as tickets, index$j_tryAsCoreIndex as tryAsCoreIndex, index$j_tryAsEpoch as tryAsEpoch, index$j_tryAsPerEpochBlock as tryAsPerEpochBlock, index$j_tryAsPerValidator as tryAsPerValidator, index$j_tryAsSegmentIndex as tryAsSegmentIndex, index$j_tryAsServiceGas as tryAsServiceGas, index$j_tryAsServiceId as tryAsServiceId, index$j_tryAsTimeSlot as tryAsTimeSlot, index$j_tryAsValidatorIndex as tryAsValidatorIndex, index$j_workItem as workItem, index$j_workPackage as workPackage, index$j_workReport as workReport, index$j_workResult as workResult };
6960
+ export { index$j_Block as Block, index$j_EpochMarker as EpochMarker, index$j_Extrinsic as Extrinsic, index$j_Header as Header, index$j_HeaderViewWithHash as HeaderViewWithHash, index$j_MAX_NUMBER_OF_SEGMENTS as MAX_NUMBER_OF_SEGMENTS, index$j_TicketsMarker as TicketsMarker, index$j_ValidatorKeys as ValidatorKeys, index$j_W_E as W_E, index$j_W_S as W_S, index$j_assurances as assurances, index$j_codecPerEpochBlock as codecPerEpochBlock, index$j_codecPerValidator as codecPerValidator, codec as codecUtils, index$j_disputes as disputes, index$j_emptyBlock as emptyBlock, index$j_encodeUnsealedHeader as encodeUnsealedHeader, index$j_guarantees as guarantees, index$j_headerViewWithHashCodec as headerViewWithHashCodec, index$j_legacyDescriptor as legacyDescriptor, index$j_preimage as preimage, index$j_refineContext as refineContext, index$j_tickets as tickets, index$j_tryAsCoreIndex as tryAsCoreIndex, index$j_tryAsEpoch as tryAsEpoch, index$j_tryAsPerEpochBlock as tryAsPerEpochBlock, index$j_tryAsPerValidator as tryAsPerValidator, index$j_tryAsSegmentIndex as tryAsSegmentIndex, index$j_tryAsServiceGas as tryAsServiceGas, index$j_tryAsServiceId as tryAsServiceId, index$j_tryAsTimeSlot as tryAsTimeSlot, index$j_tryAsValidatorIndex as tryAsValidatorIndex, index$j_workItem as workItem, index$j_workPackage as workPackage, index$j_workReport as workReport, index$j_workResult as workResult };
6909
6961
  export type { index$j_BlockView as BlockView, index$j_CodeHash as CodeHash, index$j_CoreIndex as CoreIndex, index$j_EntropyHash as EntropyHash, index$j_Epoch as Epoch, index$j_EpochMarkerView as EpochMarkerView, index$j_ExtrinsicHash as ExtrinsicHash, index$j_ExtrinsicView as ExtrinsicView, index$j_HeaderHash as HeaderHash, index$j_HeaderView as HeaderView, index$j_PerEpochBlock as PerEpochBlock, index$j_PerValidator as PerValidator, index$j_SEGMENT_BYTES as SEGMENT_BYTES, index$j_Segment as Segment, index$j_SegmentIndex as SegmentIndex, index$j_ServiceGas as ServiceGas, index$j_ServiceId as ServiceId, index$j_StateRootHash as StateRootHash, index$j_TicketsMarkerView as TicketsMarkerView, index$j_TimeSlot as TimeSlot, index$j_ValidatorIndex as ValidatorIndex, index$j_WorkReportHash as WorkReportHash };
6910
6962
  }
6911
6963
 
@@ -7928,12 +7980,6 @@ declare class Logger {
7928
7980
  return new Logger(module.padStart(8, " "), GLOBAL_CONFIG);
7929
7981
  }
7930
7982
 
7931
- /**
7932
- * Return currently configured level for given module. */
7933
- static getLevel(moduleName: string): Level {
7934
- return findLevel(GLOBAL_CONFIG.options, moduleName);
7935
- }
7936
-
7937
7983
  /**
7938
7984
  * Global configuration of all loggers.
7939
7985
  *
@@ -7968,39 +8014,55 @@ declare class Logger {
7968
8014
  Logger.configureAllFromOptions(options);
7969
8015
  }
7970
8016
 
8017
+ private cachedLevelAndName?: readonly [Level, string];
8018
+
7971
8019
  private constructor(
7972
8020
  private readonly moduleName: string,
7973
8021
  private readonly config: typeof GLOBAL_CONFIG,
7974
8022
  ) {}
7975
8023
 
8024
+ /** Return currently configured level for given module. */
8025
+ getLevel(): Level {
8026
+ return this.getLevelAndName()[0];
8027
+ }
8028
+
8029
+ private getLevelAndName(): readonly [Level, string] {
8030
+ if (this.cachedLevelAndName === undefined) {
8031
+ const level = findLevel(this.config.options, this.moduleName);
8032
+ const shortName = this.moduleName.replace(this.config.options.workingDir, "");
8033
+ this.cachedLevelAndName = [level, shortName];
8034
+ }
8035
+ return this.cachedLevelAndName;
8036
+ }
8037
+
7976
8038
  /** Log a message with `INSANE` level. */
7977
- insane(val: string) {
7978
- this.config.transport.insane(this.moduleName, val);
8039
+ insane(strings: TemplateStringsArray, ...data: unknown[]) {
8040
+ this.config.transport.insane(this.getLevelAndName(), strings, data);
7979
8041
  }
7980
8042
 
7981
8043
  /** Log a message with `TRACE` level. */
7982
- trace(val: string) {
7983
- this.config.transport.trace(this.moduleName, val);
8044
+ trace(strings: TemplateStringsArray, ...data: unknown[]) {
8045
+ this.config.transport.trace(this.getLevelAndName(), strings, data);
7984
8046
  }
7985
8047
 
7986
8048
  /** Log a message with `DEBUG`/`LOG` level. */
7987
- log(val: string) {
7988
- this.config.transport.log(this.moduleName, val);
8049
+ log(strings: TemplateStringsArray, ...data: unknown[]) {
8050
+ this.config.transport.log(this.getLevelAndName(), strings, data);
7989
8051
  }
7990
8052
 
7991
8053
  /** Log a message with `INFO` level. */
7992
- info(val: string) {
7993
- this.config.transport.info(this.moduleName, val);
8054
+ info(strings: TemplateStringsArray, ...data: unknown[]) {
8055
+ this.config.transport.info(this.getLevelAndName(), strings, data);
7994
8056
  }
7995
8057
 
7996
8058
  /** Log a message with `WARN` level. */
7997
- warn(val: string) {
7998
- this.config.transport.warn(this.moduleName, val);
8059
+ warn(strings: TemplateStringsArray, ...data: unknown[]) {
8060
+ this.config.transport.warn(this.getLevelAndName(), strings, data);
7999
8061
  }
8000
8062
 
8001
8063
  /** Log a message with `ERROR` level. */
8002
- error(val: string) {
8003
- this.config.transport.error(this.moduleName, val);
8064
+ error(strings: TemplateStringsArray, ...data: unknown[]) {
8065
+ this.config.transport.error(this.getLevelAndName(), strings, data);
8004
8066
  }
8005
8067
  }
8006
8068
 
@@ -8099,17 +8161,17 @@ declare class NodeConfiguration {
8099
8161
 
8100
8162
  declare function loadConfig(configPath: string): NodeConfiguration {
8101
8163
  if (configPath === DEFAULT_CONFIG) {
8102
- logger.log("🔧 Loading DEFAULT config");
8164
+ logger.log`🔧 Loading DEFAULT config`;
8103
8165
  return parseFromJson(configs.default, NodeConfiguration.fromJson);
8104
8166
  }
8105
8167
 
8106
8168
  if (configPath === DEV_CONFIG) {
8107
- logger.log("🔧 Loading DEV config");
8169
+ logger.log`🔧 Loading DEV config`;
8108
8170
  return parseFromJson(configs.dev, NodeConfiguration.fromJson);
8109
8171
  }
8110
8172
 
8111
8173
  try {
8112
- logger.log(`🔧 Loading config from ${configPath}`);
8174
+ logger.log`🔧 Loading config from ${configPath}`;
8113
8175
  const configFile = fs.readFileSync(configPath, "utf8");
8114
8176
  const parsed = JSON.parse(configFile);
8115
8177
  return parseFromJson(parsed, NodeConfiguration.fromJson);
@@ -14446,8 +14508,6 @@ declare enum AccessType {
14446
14508
  WRITE = 1,
14447
14509
  }
14448
14510
 
14449
- // const logger = Logger.new(import.meta.filename, "pvm:mem");
14450
-
14451
14511
  declare class Memory {
14452
14512
  static fromInitialMemory(initialMemoryState: InitialMemoryState) {
14453
14513
  return new Memory(
@@ -14484,7 +14544,7 @@ declare class Memory {
14484
14544
  return Result.ok(OK);
14485
14545
  }
14486
14546
 
14487
- // logger.insane(`MEM[${address}] <- ${BytesBlob.blobFrom(bytes)}`);
14547
+ logger.insane`MEM[${address}] <- ${BytesBlob.blobFrom(bytes)}`;
14488
14548
  const pagesResult = this.getPages(address, bytes.length, AccessType.WRITE);
14489
14549
 
14490
14550
  if (pagesResult.isError) {
@@ -14573,7 +14633,7 @@ declare class Memory {
14573
14633
  bytesLeft -= bytesToRead;
14574
14634
  }
14575
14635
 
14576
- // logger.insane(`MEM[${startAddress}] => ${BytesBlob.blobFrom(result)}`);
14636
+ logger.insane`MEM[${startAddress}] => ${BytesBlob.blobFrom(result)}`;
14577
14637
  return Result.ok(OK);
14578
14638
  }
14579
14639
 
@@ -14740,11 +14800,12 @@ declare class MemoryBuilder {
14740
14800
  `;
14741
14801
  this.ensureNotFinalized();
14742
14802
 
14743
- const range = MemoryRange.fromStartAndLength(startHeapIndex, endHeapIndex - startHeapIndex);
14744
- const pages = PageRange.fromMemoryRange(range);
14803
+ const heapRange = MemoryRange.fromStartAndLength(startHeapIndex, endHeapIndex - startHeapIndex);
14804
+ const heapPagesRange = PageRange.fromMemoryRange(heapRange);
14805
+ const initializedPageNumbers = Array.from(this.initialMemory.keys());
14745
14806
 
14746
- for (const pageNumber of pages) {
14747
- if (this.initialMemory.has(pageNumber)) {
14807
+ for (const pageNumber of initializedPageNumbers) {
14808
+ if (heapPagesRange.isInRange(pageNumber)) {
14748
14809
  throw new IncorrectSbrkIndex();
14749
14810
  }
14750
14811
  }
@@ -16536,7 +16597,7 @@ declare class ProgramDecoder {
16536
16597
  try {
16537
16598
  return Result.ok(new ProgramDecoder(program));
16538
16599
  } catch (e) {
16539
- logger.error(`Invalid program: ${e}`);
16600
+ logger.error`Invalid program: ${e}`;
16540
16601
  return Result.error(ProgramDecoderError.InvalidProgramError);
16541
16602
  }
16542
16603
  }
@@ -16698,7 +16759,7 @@ declare class Interpreter {
16698
16759
  const argsResult = this.argsDecodingResults[argsType];
16699
16760
  this.argsDecoder.fillArgs(this.pc, argsResult);
16700
16761
 
16701
- logger.insane(`[PC: ${this.pc}] ${Instruction[currentInstruction]}`);
16762
+ logger.insane`[PC: ${this.pc}] ${Instruction[currentInstruction]}`;
16702
16763
 
16703
16764
  if (!isValidInstruction) {
16704
16765
  this.instructionResult.status = Result.PANIC;
@@ -16775,7 +16836,7 @@ declare class Interpreter {
16775
16836
  this.status = Status.HOST;
16776
16837
  break;
16777
16838
  }
16778
- logger.insane(`[PC: ${this.pc}] Status: ${Result[this.instructionResult.status]}`);
16839
+ logger.insane`[PC: ${this.pc}] Status: ${Result[this.instructionResult.status]}`;
16779
16840
  return this.status;
16780
16841
  }
16781
16842
 
@@ -17117,18 +17178,13 @@ declare class PartiallyUpdatedState<T extends StateSlice = StateSlice> {
17117
17178
  *
17118
17179
  * NOTE the info may be updated compared to what is in the state.
17119
17180
  *
17120
- * Takes into account newly created services as well.
17181
+ * Takes into account ejected and newly created services as well.
17121
17182
  */
17122
17183
  getServiceInfo(destination: ServiceId | null): ServiceAccountInfo | null {
17123
17184
  if (destination === null) {
17124
17185
  return null;
17125
17186
  }
17126
17187
 
17127
- const isEjected = this.stateUpdate.services.servicesRemoved.some((x) => x === destination);
17128
- if (isEjected) {
17129
- return null;
17130
- }
17131
-
17132
17188
  const maybeNewService = this.stateUpdate.services.servicesUpdates.find(
17133
17189
  (update) => update.serviceId === destination,
17134
17190
  );
@@ -17514,7 +17570,7 @@ declare class HostCallsManager {
17514
17570
  return `r${idx}=${value} (0x${value.toString(16)})`;
17515
17571
  })
17516
17572
  .join(", ");
17517
- logger.insane(`[${currentServiceId}] ${context} ${name}${requested}. Gas: ${gas}. Regs: ${registerValues}.`);
17573
+ logger.insane`[${currentServiceId}] ${context} ${name}${requested}. Gas: ${gas}. Regs: ${registerValues}.`;
17518
17574
  }
17519
17575
  }
17520
17576