0xMiden / 0xMiden/miden-vm

Refactor decoder handling of control blocks

Đang mở
#1,538 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
processor
Ngôn ngữ chính
Rust
Star
772
Fork
352
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
93

Mô tả

When encountering a control block (e.g. `JOIN`), writing to the system and stack columns is [handled by calling `self.execute_op(Operation::Noop)`](https://github.com/0xPolygonMiden/miden-vm/blob/b2294a1e0e98af155d679dce082eb7fe3a04d9a2/processor/src/decoder/mod.rs#L337). This is unintuitive, makes debugging harder (e.g. a print inside `execute_op()` prints a bunch of `NOOP` operations that are not actually in the trace). Also, `DYNCALL` was the first control block where its effect on the stack and system columns doesn't correspond to any existing operation.

The real purpose of "executing NOOPs" is to

1. ensure the trace capacity
2. copy the stack columns over to the next row
3. advance clock

We should introduce an abstraction that does this cleanly instead of reusing `execute_op()`.

Context: https://github.com/0xPolygonMiden/miden-vm/pull/1535#discussion_r1807544164

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.