0xMiden / 0xMiden/protocol

Optimize asset delta tracking with non-determinism

未关闭
#3,054 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
kernels
主要语言
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 还没有评估数据。

把新 issue 发到你的邮箱

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