WASM components: add a wall-clock cutoff (Wasmtime epoch interruption) next to fuel and memory limits

オープン
#479 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
39/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

Start with elastos/crates/elastos-compute/src/providers/component.rs and trace how component calls configure fuel and memory limits. Read the Wasmtime 36.0.19 epoch interruption APIs, then identify the Runtime ticker and per-capsule configuration entry points. Done means deadline errors stop overdue calls while keeping the Runtime responsive, configurable limits and coverage for all three call scenarios, plus Jetson overhead measurements.

索引モデルが issue の本文から書いたものです。

説明

Today: component capsules run with a fuel limit and a memory limit (elastos/crates/elastos-compute/src/providers/component.rs: consume_fuel, set_fuel(COMPONENT_FUEL), StoreLimitsBuilder::memory_size). They have no time-based limit.

Proposal (Sash, 22 Oct): enable Wasmtime epoch interruption (Config::epoch_interruption), with a Runtime ticker and a per-call deadline, so a call also ends after a set wall-clock time. That covers time spent outside fuel accounting.

Done means:

  • a component call that exceeds its deadline is stopped with a clear error, and the Runtime stays responsive;
  • the deadline is configurable per capsule class;
  • tests cover a busy loop, a long host-call wait and a normal call under the limit;
  • the overhead is measured on the Jetson.

Not in 0.8.0. The Wasmtime 36.0.19 security update is already on the 0.8.0 train.

主要言語
Rust
スター
6
フォーク
2
平均マージ
1日 3時間
マージ済み PR(30日)
42

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

elastos/elastos-runtime のほかの issue

elastos/elastos-runtime の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。