0xMiden / 0xMiden/miden-vm

Simplify structure of basic block nodes

Đang mở
#2,109 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
core 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ả

Once we get rid of the slow processor, we should be able to refactor our basic block nodes to look something like this:
```rust
pub struct BasicBlockNode {
/// operations here would contain Respan operations to mark boundaries of operation batches
ops: Vec,
digest: Word,
}
```
This structure has a number of benefits:

- The fast processor would need just a single loop to iterate over all operations in a basic block.
- We would allocate only a single vector per basic block vs. allocating a vector (plus several arrays) per operation batch.
- Fast (but trusted) serialization/deserialization of the basic block becomes trivial.

I would create a couple of complications though:
- Computing the hash of the node would be a bit more complicated, and this would make the slow (but untrusted) deserialization more difficult.
- Trace generation would require more work because trace builders would need to build the `OpBatch` structs themselves.

Both of these are acceptable tradeoffs in my opinion.

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.