Skip to content

Commit 3c9c583

Browse files
fix: memory range error (#211)
* fix: disable wasm trap handler to avoid memory exhaustion by default wasm allocates 10GB virtual memory cage which too big for current scone heap (1GB) https://github.com/nodejs/node/blob/v24.4.1/doc/changelogs/CHANGELOG_V20.md#cli-allow-running-wasm-in-limited-vmem-with---disable-wasm-trap-handler * fix: upgrade scone heap size to 7G * ci: fix dapp test * ci: remove duplicated test
1 parent b07b9b1 commit 3c9c583

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

.github/workflows/dapp-ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
MJ_APIKEY_PRIVATE: ${{ secrets.MAILJET_APIKEY_PRIVATE }}
4848
MJ_SENDER: ${{ secrets.MAILJET_SENDER }}
4949
MAILGUN_APIKEY: ${{ secrets.MAILGUN_APIKEY }}
50-
WEB3MAIL_WHITELISTED_APPS: ${{ secrets.WEB3MAIL_WHITELISTED_APPS }}
50+
WEB3MAIL_WHITELISTED_APPS: ${{ vars.WEB3MAIL_WHITELISTED_APPS }}
5151
steps:
5252
- uses: actions/checkout@v4
5353

@@ -60,8 +60,5 @@ jobs:
6060
- name: Install Dependencies
6161
run: npm ci
6262

63-
- name: Test unit
64-
run: npm run test
65-
6663
- name: Test with coverage
6764
run: npm run ctest

.github/workflows/dapp-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ jobs:
6363
docker-registry: docker.io
6464
sconify-version: '5.9.0-v15'
6565
binary: /usr/local/bin/node
66-
command: node /app/src/app.js
66+
command: node
6767
host-path: |
6868
/etc/hosts
6969
/etc/resolv.conf
7070
binary-fs: true
7171
fs-dir: /app
72-
heap: 1G
72+
heap: 7G
7373
dlopen: 1
7474
mprotect: 1
7575
secrets:

.github/workflows/dapp-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ jobs:
4444
docker-registry: docker.io
4545
sconify-version: '5.9.0-v15'
4646
binary: /usr/local/bin/node
47-
command: node /app/src/app.js
47+
command: node
4848
host-path: |
4949
/etc/hosts
5050
/etc/resolv.conf
5151
binary-fs: true
5252
fs-dir: /app
53-
heap: 1G
53+
heap: 7G
5454
dlopen: 1
5555
mprotect: 1
5656
secrets:

dapp/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM node:20-alpine3.22
1+
FROM node:20.19-alpine3.22
22
WORKDIR /app
33
COPY package*.json ./
44
RUN npm ci --production
55
COPY ./src .
6-
ENTRYPOINT [ "node", "/app/app.js"]
6+
ENTRYPOINT [ "node", "--disable-wasm-trap-handler", "/app/app.js" ]

deployment-dapp/src/singleFunction/deployApp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export const deployApp = async ({
2727
const mrenclave = {
2828
framework: 'SCONE' as any, // workaround framework not auto capitalized
2929
version: 'v5.9',
30-
entrypoint: 'node /app/app.js',
31-
heapSize: 1073741824,
30+
entrypoint: 'node --disable-wasm-trap-handler /app/app.js',
31+
heapSize: 7516192768,
3232
fingerprint,
3333
};
3434
const app = {

0 commit comments

Comments
 (0)