@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethernity-cloud/sdk-js",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "A package to run ethernity cloud build scripts",
5
5
  "scripts": {
6
6
  "ecld-build": "cross-env node ./node_modules/@ethernity-cloud/sdk-js/build.js",
@@ -33,7 +33,7 @@
33
33
  "run.js"
34
34
  ],
35
35
  "dependencies": {
36
- "@ethernity-cloud/runner": "^0.4.4",
36
+ "@ethernity-cloud/runner": "^0.5.0",
37
37
  "acorn": "^8.11.0",
38
38
  "adm-zip": "^0.5.14",
39
39
  "axios": "^1.7.2",
@@ -5,7 +5,9 @@ services:
5
5
  privileged: true
6
6
  image: 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.
10
+ command: "/usr/local/bin/las -a 0.0.0.0"
9
11
  devices:
10
12
  - "/dev/sgx_enclave:/dev/sgx_enclave"
11
13
  restart: on-failure
@@ -244,8 +244,12 @@ class EtnySecureLock:
244
244
  port = int(port)
245
245
  except ValueError:
246
246
  continue
247
- # REST pairing convention: rest = 8081 + (enclave - 18765)
248
- rest_port = 8081 + (port - 18765) if 18765 <= port < 18965 else 8081
247
+ # REST pairing convention: a CAS publishes its enclave port only,
248
+ # and its REST port sits at the same offset from the in-container
249
+ # pair 18765/8081 (19768 -> 9084).
250
+ rest_port = 8081 + (port - 18765)
251
+ if not 1 <= rest_port <= 65535:
252
+ continue
249
253
  if kind == 'onion3':
250
254
  host = host if host.endswith('.onion') else host + '.onion'
251
255
  onion.append(f'http://{host}:{rest_port}')
package/pynithy/build.mjs CHANGED
@@ -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,7 @@ services:
5
5
  privileged: true
6
6
  image: localhost:5000/etny-las
7
7
  entrypoint: "/las_entrypoint.sh"
8
- command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las | tee /var/log/las.log'"
8
+ command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las -a 0.0.0.0 | tee /var/log/las.log'"
9
9
  restart: unless-stopped
10
10
  networks:
11
11
  - ethernity
@@ -5,7 +5,11 @@ services:
5
5
  privileged: true
6
6
  image: localhost:5000/etny-las
7
7
  entrypoint: "/las_entrypoint.sh"
8
- command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las | tee /var/log/las.log'"
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
11
+ # attestation. The enclaves reach it over IPv4 either way.
12
+ command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las -a 0.0.0.0 | tee /var/log/las.log'"
9
13
  devices:
10
14
  - "/dev/sgx_enclave:/dev/sgx_enclave"
11
15
  restart: unless-stopped
@@ -4,7 +4,7 @@ services:
4
4
  container_name: las
5
5
  privileged: true
6
6
  image: localhost:5000/etny-las
7
- command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las | tee /var/log/las.log'"
7
+ command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las -a 0.0.0.0 | tee /var/log/las.log'"
8
8
  devices:
9
9
  - "/dev/sgx_enclave:/dev/sgx_enclave"
10
10
  restart: unless-stopped
@@ -11,7 +11,11 @@ services:
11
11
  container_name: las
12
12
  privileged: true
13
13
  image: localhost:5000/etny-las
14
- command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las | tee /var/log/las.log'"
14
+ # -a 0.0.0.0: without it the LAS binds dual-stack (:::18766) and cannot
15
+ # allocate the socket on a host booted with ipv6.disable=1, so it
16
+ # crash-loops and every task on that node times out with no
17
+ # attestation. The enclaves reach it over IPv4 either way.
18
+ command: "bash -c '/las_entrypoint.sh && /usr/local/bin/las -a 0.0.0.0 | tee /var/log/las.log'"
15
19
  restart: unless-stopped
16
20
  ports:
17
21
  - target: 18766