@series-inc/rundot-syncplay 6.0.0-rc.88 → 6.0.0-rc.89

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.
@@ -367,6 +367,23 @@ export function createOwnedInstalledRuntimeAdapter(options) {
367
367
  return cell;
368
368
  }
369
369
 
370
+ // The compact checksum is the equality token for both local and wire reports.
371
+ // checksumStateBytes is a required hook, so a checksum never needs a full
372
+ // serialization: serializing a physics checkpoint can take seconds.
373
+ function ensureChecksumHex(cell) {
374
+ if (cell.checksumHex === null) {
375
+ let csBytes;
376
+ try {
377
+ csBytes = hooks.checksumStateBytes(cell.captured);
378
+ } catch (cause) {
379
+ fail('KINETIX_RUNTIME_CHECKPOINT_INVALID', cause);
380
+ }
381
+ if (!isUint8Array(csBytes)) fail('KINETIX_RUNTIME_CHECKPOINT_INVALID');
382
+ cell.checksumHex = sha256Hex(csBytes);
383
+ }
384
+ return cell.checksumHex;
385
+ }
386
+
370
387
  const capabilities = Object.freeze({
371
388
  commands: decodeCommand !== undefined,
372
389
  ownership: 'lease',
@@ -720,7 +737,7 @@ export function createOwnedInstalledRuntimeAdapter(options) {
720
737
 
721
738
  const cell = createCell(candidate, frame, liveRev);
722
739
  cell.serialized = copyUint8Array(canonicalBytes);
723
- cell.wireChecksumHex = strongReport ? strongWireChecksum(cell) : sha256Hex(cell.serialized);
740
+ cell.wireChecksumHex = strongReport ? strongWireChecksum(cell) : ensureChecksumHex(cell);
724
741
  activeCells.add(cell);
725
742
  return createHandle(cell);
726
743
  } catch (err) {
@@ -741,41 +758,12 @@ export function createOwnedInstalledRuntimeAdapter(options) {
741
758
  }
742
759
  },
743
760
  checksum(checkpoint) {
744
- assertNotDisposed();
745
- assertNotFailed();
746
- const cell = lookupCell(checkpoint);
747
- if (cell.checksumHex === null) {
748
- let csBytes;
749
- try {
750
- csBytes = hooks.checksumStateBytes(cell.captured);
751
- } catch (cause) {
752
- fail('KINETIX_RUNTIME_CHECKPOINT_INVALID', cause);
753
- }
754
- if (!isUint8Array(csBytes)) fail('KINETIX_RUNTIME_CHECKPOINT_INVALID');
755
- cell.checksumHex = sha256Hex(csBytes);
756
- }
757
- return cell.checksumHex;
761
+ return ensureChecksumHex(lookupCell(checkpoint));
758
762
  },
759
763
  wireChecksum(checkpoint) {
760
- assertNotDisposed();
761
- assertNotFailed();
762
764
  const cell = lookupCell(checkpoint);
763
765
  if (cell.wireChecksumHex === null) {
764
- if (strongReport) {
765
- cell.wireChecksumHex = strongWireChecksum(cell);
766
- return cell.wireChecksumHex;
767
- }
768
- if (cell.serialized === null) {
769
- let rawBytes;
770
- try {
771
- rawBytes = hooks.serializeState(cell.captured);
772
- } catch (cause) {
773
- fail('KINETIX_RUNTIME_CHECKPOINT_INVALID', cause);
774
- }
775
- if (!isUint8Array(rawBytes)) fail('KINETIX_RUNTIME_CHECKPOINT_INVALID');
776
- cell.serialized = copyUint8Array(rawBytes);
777
- }
778
- cell.wireChecksumHex = sha256Hex(cell.serialized);
766
+ cell.wireChecksumHex = strongReport ? strongWireChecksum(cell) : ensureChecksumHex(cell);
779
767
  }
780
768
  return cell.wireChecksumHex;
781
769
  },
@@ -972,9 +960,9 @@ export function createOwnedInstalledRuntimeAdapter(options) {
972
960
  }
973
961
 
974
962
  const cachedSerialized = cell.serialized !== null ? copyUint8Array(cell.serialized) : null;
975
- const cachedWireChecksum = strongReport
976
- ? (cell.wireChecksumHex ??= strongWireChecksum(cell))
977
- : cell.wireChecksumHex;
963
+ const cachedWireChecksum = cell.wireChecksumHex ??= strongReport
964
+ ? strongWireChecksum(cell)
965
+ : ensureChecksumHex(cell);
978
966
  const baselineDigest = initialBaselineDigest;
979
967
  const hasCustomAsync = Boolean(
980
968
  innerPin !== undefined
@@ -36,7 +36,7 @@ export const physicsProfileWasmMetadata = Object.freeze({
36
36
  "sourceHash": "c8bc2f977767cc9fcc2fdf7c04aade9caa2dd0789438d5a18be1a613a6d3c60a",
37
37
  "wasmSha256": "6995c2e6651f2a60b09f1a07fc1fd681aaf42370e28546c67e2210bd9fc397c4",
38
38
  "artifact": "profile",
39
- "packageVersion": "6.0.0-rc.88",
39
+ "packageVersion": "6.0.0-rc.89",
40
40
  "compilerFlags": [
41
41
  "-std=c++20",
42
42
  "-O3",
@@ -36,7 +36,7 @@ export const physicsWasmMetadata = Object.freeze({
36
36
  "sourceHash": "a7e27f307f36d22bc886ac00f8d17dbe97428301af30f99e208c593f59a53899",
37
37
  "wasmSha256": "02aa2490a56cb47fbf8f45c8ddf4b84241eac2867e527a76ed19abc42106b0ae",
38
38
  "artifact": "production",
39
- "packageVersion": "6.0.0-rc.88",
39
+ "packageVersion": "6.0.0-rc.89",
40
40
  "compilerFlags": [
41
41
  "-std=c++20",
42
42
  "-O3",
@@ -50,7 +50,7 @@ export const physics2dWasmMetadata = Object.freeze({
50
50
  "sourceHash": "c982f7b72b0494c8892d40b5fbf1a67ac94a7f20dea1f160abb888f4ccb313c0",
51
51
  "wasmSha256": "49cb90541deed40f5fff1015bb578e13ec9a793d51931c1227e3e5a11bbfa3f7",
52
52
  "artifact": "production",
53
- "packageVersion": "6.0.0-rc.88",
53
+ "packageVersion": "6.0.0-rc.89",
54
54
  "compilerFlags": [
55
55
  "-std=c++20",
56
56
  "-O3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@series-inc/rundot-syncplay",
3
- "version": "6.0.0-rc.88",
3
+ "version": "6.0.0-rc.89",
4
4
  "description": "Kinetix orchestration, rollback, replay, late-join, and deterministic networking for RUN.game",
5
5
  "repository": {
6
6
  "type": "git",