@ethernity-cloud/sdk-js 1.6.0 → 1.6.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.
@@ -133,8 +133,11 @@ class EtnySecureLock {
133
133
  let host = parts[1];
134
134
  const port = parseInt(parts[3], 10);
135
135
  if (!Number.isInteger(port)) continue;
136
- // REST pairing convention: rest = 8081 + (enclave - 18765)
137
- const restPort = (port >= 18765 && port < 18965) ? 8081 + (port - 18765) : 8081;
136
+ // REST pairing convention: a CAS publishes its enclave port only,
137
+ // and its REST port sits at the same offset from the in-container
138
+ // pair 18765/8081 (19768 -> 9084).
139
+ const restPort = 8081 + (port - 18765);
140
+ if (restPort < 1 || restPort > 65535) continue;
138
141
  if (kind === 'onion3') {
139
142
  if (!host.endsWith('.onion')) host += '.onion';
140
143
  onion.push(`http://${host}:${restPort}`);
@@ -31,9 +31,9 @@ const writeEnv = (key, value) => {
31
31
  // Kept in sync with etny-{pynithy,nodenithy}/v3/networks.yaml (the authoritative
32
32
  // on-chain constants). Covers all supported networks for both dApp types.
33
33
  export const ECRunner = {
34
- // --- bloxberg ---
35
- 'etny-pynithy-testnet': ['0x02882F03097fE8cD31afbdFbB5D72a498B41112c', '0x15D73a742529C3fb11f3FA32EF7f0CC3870ACA31', 'https://bloxberg.ethernity.cloud', 8995],
36
- 'etny-nodenithy-testnet': ['0x02882F03097fE8cD31afbdFbB5D72a498B41112c', '0x15D73a742529C3fb11f3FA32EF7f0CC3870ACA31', 'https://bloxberg.ethernity.cloud', 8995],
34
+ // --- bloxberg (the testnet reads ECImageRegistryV2, mainnet the original) ---
35
+ 'etny-pynithy-testnet': ['0x02882F03097fE8cD31afbdFbB5D72a498B41112c', '0x99A84C624C028bdf0a855A1E9E3f2fcf7275B3D8', 'https://bloxberg.ethernity.cloud', 8995],
36
+ 'etny-nodenithy-testnet': ['0x02882F03097fE8cD31afbdFbB5D72a498B41112c', '0x99A84C624C028bdf0a855A1E9E3f2fcf7275B3D8', 'https://bloxberg.ethernity.cloud', 8995],
37
37
  'etny-pynithy': ['0x549A6E06BB2084100148D50F51CF77a3436C3Ae7', '0x15D73a742529C3fb11f3FA32EF7f0CC3870ACA31', 'https://bloxberg.ethernity.cloud', 8995],
38
38
  'etny-nodenithy': ['0x549A6E06BB2084100148D50F51CF77a3436C3Ae7', '0x15D73a742529C3fb11f3FA32EF7f0CC3870ACA31', 'https://bloxberg.ethernity.cloud', 8995],
39
39
  // --- polygon mainnet ---
@@ -5,7 +5,11 @@ services:
5
5
  privileged: true
6
6
  image: localhost:5000/etny-las
7
7
  entrypoint: "/las_entrypoint.sh"
8
- command: "/usr/local/bin/las"
8
+ # -a 0.0.0.0: without it the LAS binds dual-stack (:::18766) and cannot
9
+ # allocate the socket on a host booted with ipv6.disable=1, so it
10
+ # crash-loops and every task on that node times out with no attestation.
11
+ # The enclaves reach it over IPv4 either way.
12
+ command: "/usr/local/bin/las -a 0.0.0.0"
9
13
  networks:
10
14
  - ethernity
11
15
  devices:
@@ -12,7 +12,11 @@ services:
12
12
  privileged: true
13
13
  image: localhost:5000/etny-las
14
14
  entrypoint: "/las_entrypoint.sh"
15
- command: "/usr/local/bin/las"
15
+ # -a 0.0.0.0: without it the LAS binds dual-stack (:::18766) and cannot
16
+ # allocate the socket on a host booted with ipv6.disable=1, so it
17
+ # crash-loops and every task on that node times out with no attestation.
18
+ # The enclaves reach it over IPv4 either way.
19
+ command: "/usr/local/bin/las -a 0.0.0.0"
16
20
  restart: on-failure
17
21
  ports:
18
22
  - target: 18766