Optimize asset delta tracking with non-determinism
- Lingua principale
- Rust
- Stelle
- 132
- Fork
- 167
- Merge medio
- 1g 23h
- PR unite (30g)
- 110
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.