Skip to content

Commit ee6f864

Browse files
authored
Merge pull request oasisprotocol#2430 from oasisprotocol/matevz/feature/rofl-appd-localnet
rofl-appd-localnet: Add appd for Localnet
2 parents c469f37 + 03785c4 commit ee6f864

File tree

13 files changed

+199
-18
lines changed

13 files changed

+199
-18
lines changed

.github/workflows/ci-lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
uses: ./.github/actions/lint-rust
3939
with:
4040
features: debug-logging,test,unsafe-allow-debug
41+
exclude: rofl-appd-localnet
4142
token: ${{ secrets.GITHUB_TOKEN }}
4243

4344
- name: Lint Rust code (mock TEE)
@@ -51,6 +52,7 @@ jobs:
5152
uses: ./.github/actions/lint-rust
5253
with:
5354
features: tdx
55+
exclude: rofl-appd-localnet
5456
token: ${{ secrets.GITHUB_TOKEN }}
5557

5658
- name: Lint Hello contract code

.github/workflows/ci-test.yaml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ permissions:
2929

3030
jobs:
3131
test-rust:
32-
# NOTE: This name appears in GitHub's Checks API.
3332
name: test-rust
3433
runs-on: ubuntu-latest
3534
steps:
@@ -56,18 +55,56 @@ jobs:
5655
- name: Test Rust code
5756
uses: ./.github/actions/test-rust
5857

58+
test-rust-rofl-appd-localnet:
59+
name: test-rust-rofl-appd-localnet
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v4
64+
65+
- name: Set up Rust
66+
run: rustup show
67+
68+
- name: Test rofl-appd-localnet code
69+
uses: ./.github/actions/test-rust
70+
with:
71+
manifest_path: rofl-appd-localnet/Cargo.toml
72+
73+
test-rust-hello-contract:
74+
name: test-rust-hello-contract
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Checkout code
78+
uses: actions/checkout@v4
79+
80+
- name: Set up Rust
81+
run: rustup show
82+
83+
- name: Build test contracts
84+
working-directory: tests/contracts/hello
85+
run: cargo build --target wasm32-unknown-unknown --release
86+
5987
- name: Test Hello contract code
6088
uses: ./.github/actions/test-rust
6189
with:
6290
manifest_path: tests/contracts/hello/Cargo.toml
6391

92+
test-rust-oas20-contract:
93+
name: test-rust-oas20-contract
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout code
97+
uses: actions/checkout@v4
98+
99+
- name: Set up Rust
100+
run: rustup show
101+
64102
- name: Test OAS-20 contract
65103
uses: ./.github/actions/test-rust
66104
with:
67105
manifest_path: contract-sdk/specs/token/oas20/Cargo.toml
68106

69107
test-rust-sgx:
70-
# NOTE: This name appears in GitHub's Checks API.
71108
name: test-rust-sgx
72109
runs-on: ubuntu-latest
73110
steps:
@@ -94,7 +131,6 @@ jobs:
94131
CC_x86_64_fortanix_unknown_sgx: clang-18
95132

96133
check-core-versions:
97-
# NOTE: This name appears in GitHub's Checks API.
98134
name: check-core-versions
99135
runs-on: ubuntu-latest
100136
steps:
@@ -105,7 +141,6 @@ jobs:
105141
run: ./tests/check-core-versions.sh
106142

107143
test-go:
108-
# NOTE: This name appears in GitHub's Checks API.
109144
name: test-go
110145
runs-on: ubuntu-latest
111146
steps:
@@ -128,7 +163,6 @@ jobs:
128163
use_oidc: true # Upload authentication to avoid rate-limiting
129164

130165
test-go-tools:
131-
# NOTE: This name appears in GitHub's Checks API.
132166
name: test-tools
133167
runs-on: ubuntu-latest
134168
steps:
@@ -149,7 +183,6 @@ jobs:
149183
run: go build
150184

151185
typecheck:
152-
# NOTE: This name appears in GitHub's Checks API.
153186
name: typecheck
154187
runs-on: ubuntu-latest
155188
steps:
@@ -204,7 +237,6 @@ jobs:
204237
run: npx typedoc
205238

206239
e2e-ts-web-core:
207-
# NOTE: This name appears in GitHub's Checks API.
208240
name: e2e-ts-web-core
209241
runs-on: ubuntu-latest
210242
steps:
@@ -279,7 +311,6 @@ jobs:
279311
/tmp/oasis-net-runner-sdk-core/**/*.log
280312
281313
e2e-ts-web-ext-utils:
282-
# NOTE: This name appears in GitHub's Checks API.
283314
name: e2e-ts-web-ext-utils
284315
runs-on: ubuntu-latest
285316
steps:
@@ -317,7 +348,6 @@ jobs:
317348
path: client-sdk/ts-web/ext-utils/cypress/screenshots
318349

319350
e2e-ts-web-rt:
320-
# NOTE: This name appears in GitHub's Checks API.
321351
name: e2e-ts-web-rt
322352
runs-on: ubuntu-latest
323353
env:
@@ -407,7 +437,6 @@ jobs:
407437
/tmp/fixture.json
408438
409439
e2e-rt:
410-
# NOTE: This name appears in GitHub's Checks API.
411440
name: e2e-rt
412441
runs-on: ubuntu-latest
413442
steps:
@@ -521,7 +550,6 @@ jobs:
521550
run: npx typedoc
522551

523552
ts-web-core-reflect:
524-
# NOTE: This name appears in GitHub's Checks API.
525553
name: ts-web-core-reflect
526554
runs-on: ubuntu-latest
527555
steps:
@@ -548,7 +576,6 @@ jobs:
548576
diff -u --color=always /tmp/current.ts /tmp/reflect-out.ts || true
549577
550578
ts-web-rt-reflect:
551-
# NOTE: This name appears in GitHub's Checks API.
552579
name: ts-web-rt-reflect
553580
runs-on: ubuntu-latest
554581
steps:
@@ -562,7 +589,6 @@ jobs:
562589
npm run-script check-missing-methods
563590
564591
benchmark-rt:
565-
# NOTE: This name appears in GitHub's Checks API.
566592
name: benchmark-rt
567593
runs-on: ubuntu-latest
568594
timeout-minutes: 30
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release-rofl-appd-localnet
2+
3+
on:
4+
push:
5+
tags:
6+
- "rofl-appd-localnet/v[0-9]+.[0-9]+*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release-rofl-appd-localnet:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Oasis CLI
19+
uses: oasisprotocol/setup-cli-action@0.0.2
20+
with:
21+
version: '0.18.5'
22+
23+
- name: Build rofl-appd-localnet for Localnet
24+
working-directory: rofl-appd-localnet
25+
run: oasis rofl build --deployment localnet --offline
26+
27+
- name: Publish the release
28+
uses: ncipollo/release-action@v1
29+
with:
30+
artifacts: rofl-appd-localnet/rofl-appd-localnet.localnet.orc
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
artifactErrorsFailBuild: true

.github/workflows/release-rofl-scheduler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222

2323
- name: Build rofl-scheduler for Testnet
2424
working-directory: rofl-scheduler
25-
run: ../oasis rofl build --deployment testnet --offline --verify
25+
run: oasis rofl build --deployment testnet --offline --verify
2626

2727
- name: Build rofl-scheduler for Mainnet
2828
working-directory: rofl-scheduler
29-
run: ../oasis rofl build --deployment mainnet --offline --verify
29+
run: oasis rofl build --deployment mainnet --offline --verify
3030

3131
- name: Publish the release
3232
uses: ncipollo/release-action@v1

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ members = [
3535
"tests/runtimes/components-rofl",
3636
]
3737
exclude = [
38+
# Localnet-only ROFL. Conflicts with production TDX flags.
39+
"rofl-appd-localnet",
3840
# Test contracts.
3941
"tests/contracts",
4042
# Example contracts and runtimes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[build]
2+
rustflags = ["-C", "target-feature=+aes,+ssse3"]
3+
rustdocflags = ["-C", "target-feature=+aes,+ssse3"]
4+
5+
[test]
6+
rustflags = ["-C", "target-feature=+aes,+ssse3"]
7+
rustdocflags = ["-C", "target-feature=+aes,+ssse3"]

rofl-appd-localnet/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.orc

rofl-appd-localnet/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "rofl-appd-localnet"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
# Oasis SDK.
8+
oasis-runtime-sdk = { path = "../runtime-sdk", features = ["debug-mock-sgx"] }
9+
rofl-app-core = { path = "../rofl-app-core" }
10+
rofl-appd = { path = "../rofl-appd" }
11+
12+
# Third-party dependencies.
13+
async-trait = "0.1.77"
14+
tokio = { version = "1.38", features = ["rt", "rt-multi-thread"] }
15+
16+
[features]
17+
# Mock SGX in non-SGX builds.
18+
debug-mock-sgx = []

rofl-appd-localnet/rofl.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: rofl-appd-localnet
2+
version: 0.1.0
3+
tee: sgx
4+
kind: raw
5+
resources:
6+
memory: 512
7+
cpus: 1
8+
artifacts:
9+
builder: ghcr.io/oasisprotocol/rofl-dev:v0.1.0@sha256:1d2b77c25811f70219f366153265702417e0e4a08067a68cce4d132e253d7607
10+
deployments:
11+
localnet:
12+
app_id: rofl1qqn9xndja7e2pnxhttktmecvwzz0yqwxsquqyxdf
13+
network: testnet
14+
paratime: sapphire
15+
admin: test:bob
16+
debug: true
17+
policy:
18+
quotes:
19+
pcs:
20+
tcb_validity_period: 30
21+
min_tcb_evaluation_data_number: 18
22+
enclaves:
23+
- id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
24+
- id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
25+
- id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
26+
- id: 0+tTmlVjUvP0eIHXH7Dld3svPppCUdKDwYxnzplndLdOPdSOjtlloBWDuG9YL6TzIL975QTZJ8zMhMUdWMkR8A==
27+
endorsements:
28+
- any: {}
29+
fees: endorsing_node
30+
max_expiration: 3
31+
tooling:
32+
version: 0.18.5
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[toolchain]
2+
channel = "nightly-2025-05-09"
3+
components = ["rustfmt", "clippy"]
4+
targets = ["x86_64-fortanix-unknown-sgx", "x86_64-unknown-linux-musl"]
5+
profile = "minimal"

0 commit comments

Comments
 (0)