0xMiden / 0xMiden/protocol

Optimize asset delta tracking with non-determinism

Aberta
#3,054 1 comentário 0 reações 0 responsáveis Ver no GitHub
kernels
Linguagem predominante
Rust
Estrelas
132
Forks
167
Merge médio
1d 23h
PRs com merge (30d)
110

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.