0xMiden / 0xMiden/node

Execution and signing is blocking in an async runtime

未关闭
#1,976 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
104
派生
138
平均合并
1 天 13 小时
30 天内合并 PR
56

描述

Some of our program execution occurs within an async context, despite being potentially blocking. This is because the VM exposes an async API, however this only works if the program being executed constantly requires external inputs (which cause it to yield execution).

The same is true for our remote and local proving, and potentially in signing or verification of signatures, or even commitment calculations are causes for concern if not done in a blocking task.

We should find such instances and move them to blocking tasks, or in cases where the API is async, create a dedicated runtime which can isolate the problem.

Known problem areas:

- validator re-executes transactions with provided inputs
- validator signs and hashes
- prover also re-executes, and proves
- network transaction builder executes, and
- also proves if configured for local proving
- store calculates commitments and hashes
- store does verification
- block producer can do local proving

Relates to #1969.

Ideally we would have all blocking tasks isolated, where blocking is defined as `< 100us` between await points.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。