Optimize asset delta tracking with non-determinism
- 主要语言
- Rust
- 星标
- 132
- 派生
- 167
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 110
描述
I wonder if we could move away from using a `LinkMap` for this both to reduce complexity and improve efficiency.
The key idea is that we can keep the un-sorted list of mutation entries in a contiguous memory region. If the entry for a given asset key already exists, we'll ask the prover to give its location non-deterministically. If it doesn't exist, we'll append the entry to the end of the list.
Then, in the epilogue, we'd need to check that the prover didn't cheat and we didn't end up with duplicates in the list. This could be pretty easy to do by forcing the prover to write down a sorted list of all updated asset keys, and then use the sorted list to iterate over the unsorted list (we'd need to rely on non-deterministic inputs here - but should be as simple as just memory lookup).
_Originally posted by @bobbinth in https://github.com/0xMiden/protocol/pull/3038#discussion_r3360514607_
This could be done after mainnet as an internal optimization.
贡献指南
评估
这个 Issue 还没有评估数据。