0xMiden / 0xMiden/protocol

Optimize asset delta tracking with non-determinism

Offen
#3,054 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
kernels
Vorherrschende Sprache
Rust
Sterne
132
Forks
167
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
110

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.