@prismnetwork/agent-sdk 0.7.0 → 0.7.2

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 (3) hide show
  1. package/README.md +1 -1
  2. package/attest.mjs +16 -7
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -150,4 +150,4 @@ The wallet needs two balances on Robinhood Chain (id 4663): USDG (`0x5fc5360D040
150
150
  Node >= 20, `viem` ^2 (peer), and `ssh` + `ssh-keygen` on PATH for `run()` and
151
151
  for workspace save and restore.
152
152
 
153
- See [example.mjs](https://github.com/prismnetwork-tech/prism/blob/main/sdk/example.mjs) for a full run.
153
+ See [example.mjs](https://github.com/winter0x/prism/blob/main/sdk/example.mjs) for a full run.
package/attest.mjs CHANGED
@@ -683,7 +683,13 @@ async function sessionChecks(t, { root, fetchImpl, sessionId, servedAt }) {
683
683
  async function gpuChecks(t, { root, fetchImpl, model, digest, quote, collateralUrl, now }) {
684
684
  let fetched;
685
685
  try {
686
- const query = model ? `?model=${encodeURIComponent(model)}` : "";
686
+ // Name the instance we need. The model runs on several, and the endpoint
687
+ // answers from whichever the upstream picks, so asking blind returns a
688
+ // sibling most of the time: same image, same compose, different RTMR3.
689
+ const params = new URLSearchParams();
690
+ if (model) params.set("model", model);
691
+ if (digest) params.set("keyset_digest", digest);
692
+ const query = params.size ? `?${params}` : "";
687
693
  fetched = await getJson(fetchImpl, `${root}/v1/gpu-evidence${query}`, "the GPU evidence endpoint");
688
694
  } catch (err) {
689
695
  fetched = { ok: false, detail: err?.message ?? String(err) };
@@ -719,11 +725,13 @@ async function gpuChecks(t, { root, fetchImpl, model, digest, quote, collateralU
719
725
  // verified. Its own quote is verified here, the report-data slot is read out
720
726
  // of that verified structure, and the TD it came from is held against the TD
721
727
  // whose quote carried our nonce. The plaintext key-set field the same
722
- // response supplies is a label, not a binding.
723
- if (report.workload_keyset_digest !== digest) {
724
- const named = report.workload_keyset_digest;
725
- return t.fail("gpu-binding", `the GPU evidence names key set ${named}, not the one that served us`);
726
- }
728
+ // response supplies is a label, not a binding, so a label that disagrees is
729
+ // reported and then ignored: the evidence endpoint is served by one replica
730
+ // and completions by another, so the label routinely names a sibling even
731
+ // when the quotes below prove the evidence came from the TD that served us.
732
+ // Failing on it here would reject evidence that binds cryptographically.
733
+ const labelled = report.workload_keyset_digest;
734
+ const mislabelled = labelled !== digest;
727
735
  if (typeof report.intel_quote !== "string") {
728
736
  return t.fail("gpu-binding", "the GPU evidence carries no CPU quote to bind against");
729
737
  }
@@ -744,10 +752,11 @@ async function gpuChecks(t, { root, fetchImpl, model, digest, quote, collateralU
744
752
  signingAddress: report.signing_address,
745
753
  nonce,
746
754
  });
755
+ const aside = mislabelled ? `; the evidence labels itself key set ${labelled}, which the quotes above override` : "";
747
756
  t.add(
748
757
  "gpu-binding",
749
758
  gate.ok ? "pass" : "fail",
750
- gate.ok ? `${gate.detail}, quoted by the TD that carried our nonce` : gate.detail,
759
+ gate.ok ? `${gate.detail}, quoted by the TD that carried our nonce${aside}` : gate.detail,
751
760
  );
752
761
  }
753
762
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismnetwork/agent-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Headless GPU leasing and renter-encrypted storage on Prism Network for wallet-holding agents.",
5
5
  "type": "module",
6
6
  "main": "prism.mjs",
@@ -69,11 +69,11 @@
69
69
  "homepage": "https://prismnetwork.tech",
70
70
  "repository": {
71
71
  "type": "git",
72
- "url": "git+https://github.com/prismnetwork-tech/prism.git",
72
+ "url": "git+https://github.com/winter0x/prism.git",
73
73
  "directory": "sdk"
74
74
  },
75
75
  "bugs": {
76
- "url": "https://github.com/prismnetwork-tech/prism/issues"
76
+ "url": "https://github.com/winter0x/prism/issues"
77
77
  },
78
78
  "license": "Apache-2.0",
79
79
  "publishConfig": {