Skip to content

feat(polkavm): stage computer host interfaces - #215

Draft
replghost wants to merge 7 commits into
feat/pvm-wasmfrom
feat/pvm-computer-rfc
Draft

feat(polkavm): stage computer host interfaces#215
replghost wants to merge 7 commits into
feat/pvm-wasmfrom
feat/pvm-computer-rfc

Conversation

@replghost

@replghost replghost commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Status

Draft. Do not merge until the host-interface RFC defines and accepts this contract.

Stacked on #185. This preserves the computer implementation previously developed in #201 while keeping the runtime-aware App implementation in #185 limited to paritytech/host-rust-core#507, #540, and issue #550.

Proposed scope

  • introduce the versioned polkadot-host/0.1/{core,fs,tty,process,net,workspace} capability family
  • run supervisor and child PolkaVM machines with bounded TTY, process, pipe, and workspace resources
  • persist a shared virtual /home filesystem
  • resolve explicitly invoked published child applications through an origin-authenticated Host bridge
  • gate TCP access behind Host permission and an explicitly configured loopback relay
  • fail closed when a manifest requires an unavailable host interface

Review boundary

The interface identifiers, manifest discrimination through capabilities.host.requires, filesystem semantics, process model, open-spawn policy, workspace lifecycle, and network permission model are proposals—not part of the accepted App v2 graphics/input/audio contract. Review should happen against the future host-interface RFC rather than as part of #185.

Verification

  • bunx --bun turbo run typecheck: 13/13 workspace tasks passed
  • bunx --bun turbo run lint: 13/13 workspace tasks passed
  • bunx --bun turbo run test: 12/12 workspace test tasks passed, including production builds
  • sandbox suite: 87 passed, including computer terminal, lifecycle, permission, and runtime coverage

Deployment approval

The user explicitly selected this computer-feature PR for deployment to westendli.dev, after bringing in #185's current changes. This approval is for the review deployment only; the PR remains a draft and the RFC/merge boundary above is unchanged. No other environment is approved.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

⚡ Performance Report

⚠️ No baseline found on main. This PR's results are recorded but cannot be compared.
Merge to main to establish a baseline.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Chunks over 500 KB:

File Raw Brotli Gzip
host/assets/paseo.smol-DboPaEh1.json 1.84 MB 941.7 KB 1.05 MB
host/assets/paseo-people-next.smol.json 3.36 MB 1.68 MB 1.92 MB
host/assets/smoldot.js 3.05 MB 2.27 MB (-173 B) 2.34 MB (-2 B)
host/assets/smoldot_worker.js 3.02 MB 2.26 MB 2.33 MB
host/assets/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
sandbox/polkavm-runtime/polkavm-browser-runtime.wasm 1.06 MB 182.8 KB 245.9 KB
Total 28.33 MB (+1.50 MB) 18.36 MB (+299.0 KB) (-35%) 19.53 MB (+378.7 KB)
All files
File Raw Brotli Gzip
host/.well-known/apple-app-site-association 505 B 505 B 505 B
host/.well-known/assetlinks.json 2.1 KB 343 B 427 B
host/assets/_md.js 6.3 KB 2.6 KB 2.8 KB
host/assets/blake2.js 11.7 KB 4.1 KB 4.7 KB
host/assets/bridge.js 130.0 KB (+5.1 KB) 31.4 KB (+1.3 KB) 37.5 KB (+1.6 KB)
host/assets/browser.js 22.9 KB 7.6 KB 8.6 KB
host/assets/client.js 10.6 KB (+379 B) 3.4 KB (+126 B) 3.9 KB (+149 B)
host/assets/get-sync-provider.js 2.7 KB 1.1 KB 1.2 KB (+1 B)
host/assets/hex.js 160 B 160 B 160 B
host/assets/index.css 55.2 KB (+147 B) 8.6 KB (+54 B) 9.9 KB (+54 B)
host/assets/index.js 168.6 KB (+10.8 KB) 44.4 KB (+3.0 KB) 53.2 KB (+3.5 KB)
host/assets/manifest.js 21.5 KB (-1.8 KB) 7.0 KB (-395 B) 7.7 KB (-414 B)
host/assets/network.js 6.3 KB 2.2 KB 2.5 KB
host/assets/panel.js 79.3 KB (+3.1 KB) 21.4 KB (+804 B) 24.1 KB (+843 B)
host/assets/paseo.smol-DboPaEh1.json 1.84 MB 941.7 KB 1.05 MB
host/assets/paseo-people-next.smol.json 3.36 MB 1.68 MB 1.92 MB
host/assets/paseo.smol.json 25.2 KB 5.6 KB 7.2 KB
host/assets/previewnet.smol.json 63.7 KB 7.6 KB 13.4 KB
host/assets/proofs.js 29.3 KB 8.6 KB (+2 B) 9.5 KB (+2 B)
host/assets/resolve.js 158 B 158 B 158 B
host/assets/rolldown-runtime.js 716 B 716 B 716 B
host/assets/rpc-resolve.js 3.0 KB (+369 B) 1.2 KB (+114 B) 1.4 KB (+111 B)
host/assets/scale-ts.js 4.8 KB 2.0 KB 2.2 KB
host/assets/smoldot.js 3.05 MB 2.27 MB (-173 B) 2.34 MB (-2 B)
host/assets/smoldot_worker.js 3.02 MB 2.26 MB 2.33 MB
host/assets/spans.js 2.7 KB (+232 B) 1.1 KB (+85 B) 1.3 KB (+112 B)
host/assets/src.js 84.2 KB 26.5 KB (-30 B) 29.6 KB (-2 B)
host/assets/styles.css 18.0 KB (+2.7 KB) 3.8 KB (+513 B) 4.4 KB (+567 B)
host/assets/substrate-client.js 5.8 KB 2.2 KB 2.5 KB (-1 B)
host/assets/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/twoX.js 2.8 KB 1022 B 1.1 KB
host/assets/utils.js 3.5 KB 1.4 KB 1.5 KB
host/assets/wasm/web/README.md 13.4 KB 13.4 KB 13.4 KB
host/assets/wasm/web/package.json 371 B 371 B 371 B
host/assets/wasm/web/truapi_server.d.ts 12.6 KB 12.6 KB 12.6 KB
host/assets/wasm/web/truapi_server.js 49.7 KB 7.9 KB 9.3 KB
host/assets/wasm/web/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm.d.ts 4.0 KB 4.0 KB 4.0 KB
host/assets/web.js 18.2 KB 4.6 KB (+10 B) 5.1 KB (-8 B)
host/assets/worker-runtime.js 28.9 KB (+28.8 KB) 6.8 KB (+6.7 KB) 7.8 KB (+7.7 KB)
host/assets/worker-runtime.js 106 B 106 B 106 B
host/assets/ws.js 23.1 KB 7.5 KB (-1 B) 8.3 KB (-1 B)
host/dotli.png 11.5 KB 11.5 KB 11.5 KB
host/favicon.svg 1.8 KB 1.8 KB 1.8 KB
host/host-sw.js 3.1 KB (-57 B) 1.2 KB (-21 B) 1.4 KB (-21 B)
host/icon-192.png 12.5 KB 12.5 KB 12.5 KB
host/icon-512.png 42.8 KB 42.8 KB 42.8 KB
host/index.html 33.9 KB (+62 B) 7.0 KB (+50 B) 8.6 KB (+44 B)
host/manifest.webmanifest 441 B 441 B 441 B
host/workbox.js 14.8 KB 4.6 KB 5.1 KB
sandbox/app-sw.js 11.3 KB (+1.4 KB) 3.5 KB (+323 B) 4.0 KB (+381 B)
sandbox/assets/bitswap-bridge.js 840 B 840 B 840 B
sandbox/assets/fetch.js 3.4 KB 1.2 KB (+2 B) 1.4 KB (+3 B)
sandbox/assets/index.js 262.5 KB (+139.0 KB) 69.7 KB (+34.8 KB) 83.0 KB (+42.2 KB)
sandbox/assets/index.css 55.2 KB (+147 B) 8.6 KB (+54 B) 9.9 KB (+54 B)
sandbox/favicon.svg 1.8 KB 1.8 KB 1.8 KB
sandbox/index.html 1.7 KB (+20 B) 591 B (+9 B) 799 B (+11 B)
sandbox/polkavm-runtime/LICENSE-MPL-2.0 16.3 KB 16.3 KB 16.3 KB
sandbox/polkavm-runtime/PolkaVM-LICENSE-APACHE 10.6 KB 10.6 KB 10.6 KB
sandbox/polkavm-runtime/PolkaVM-LICENSE-MIT 1023 B 1023 B 1023 B
sandbox/polkavm-runtime/SHA256SUMS 631 B 631 B 631 B
sandbox/polkavm-runtime/SOURCE.json 561 B 561 B 561 B
sandbox/polkavm-runtime/polkavm-browser-runtime.wasm 1.06 MB 182.8 KB 245.9 KB
sandbox/polkavm-runtime/polkavm.js 88.0 KB 14.9 KB 17.5 KB
sandbox/polkavm-runtime/polkavm-gpu-worker.js 63.6 KB 10.9 KB 12.6 KB
sandbox/polkavm-runtime/polkavm-worker.js 86.4 KB 14.0 KB 16.6 KB
Total 28.33 MB (+1.50 MB) 18.36 MB (+299.0 KB) (-35%) 19.53 MB (+378.7 KB)

Commit: dc593af

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E Product suite skipped — pairing/signing infrastructure is unavailable.

The truapi-host CLI could not complete pairing (testnet chains or
identity backend outage). This is not a dot.li test failure.
Re-run from the Actions tab once the infrastructure recovers.

Logs: https://github.com/paritytech/dotli-community/actions/runs/34354285917

…215-deploy

# Conflicts:
#	scripts/polkavm-runtime.lock.json
@replghost

replghost commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Deployment succeeded, but westendli.dev was subsequently overwritten by #185.

#215 verification and deployment:

Superseding deployment:

Verified-mode diagnostics, with no trusted-provider switch:

  • Browser WebSocket connectivity to the Paseo relay bootnode succeeded. Logs showed verified Paseo finality and verified People-chain blocks; the UI’s generic “no connection with peers” timeout text was not an accurate diagnosis.
  • Asset Hub bootstrap repeatedly failed on runtime storage-proof requests with SubstreamReset from two peers. Backed up and removed only the isolated test browser’s paseo-next-v2:asset-hub chain-cache entry; after reload, verified DotNS resolution succeeded.
  • Initial Bitswap retrieval failed with -32810 (“No connected peers have the CID requested”). A normal retry retrieved the package, then encountered the ABI dispatch error on the superseding deployment.
  • Child-editor launch and persistence remain unverified on feat(polkavm): stage computer host interfaces #215. No further server deployment or deployment-label change was made during diagnostics; awaiting approval before restoring feat(polkavm): stage computer host interfaces #215 over the newer feat(polkavm): run App Manifest v2 runtimes in Dotli #185 deployment.

This PR remains draft and unmerged. No separate Zed guest responsiveness/cursor bundle was published.

@replghost

replghost commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Live PNV2 peer-path check on westendli.dev (2026-09-09) did not reproduce the proposed no-peer report.

Fresh headless Chromium profile, network=paseo-next-v2, forced chainBackend=smoldot-direct, cache bypass, 20-second observation:

  • loaded Paseo genesis 0x3740…14fd;
  • started the relay connection to /dns/n8r2.bn.turboflakes.io/tcp/30443/wss at 3.63 s;
  • opened relay gossip with the first peer at 4.54 s and had 2 distinct Paseo relay peers by 17.03 s;
  • completed GRANDPA warp sync to block #987234 and transitioned to Ready at 8.25 s;
  • opened gossip with 4 distinct next-people-paseo peers by 14.83 s;
  • continued receiving and verifying new relay and parachain block announcements.

Conclusion: the deployed relay spec does ship a working WSS bootnode, and the observed sync path was up. Please do not file “smoldot gets no peers on PNV2” from the current deployment without an intermittent-failure trace that contradicts this run.

Deployment ownership remains this PR (#215); source/deployment workflow ownership is paritytech/dotli-community.

@replghost

Copy link
Copy Markdown
Collaborator Author

PR #185's docked PolkaVM diagnostics are now integrated into this stacked deployment and live on westendli.dev.

Live browser verification on doom.westendli.dev/?debug=true reached data-polkavm-ready=true, displayed PVM JIT · FF 813.6 ms, opened the Runtime view with backend JIT and first frame 813.6 ms, and remained visible after switching to the right dock (480×664, below the 56px topbar).

The separate sandbox metrics overlay is absent by construction; the runtime diagnostics are in the existing Debug panel. PR #215 remains draft and was not merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant