0xMiden / 0xMiden/protocol

Decide on `NOTE_MAX_SIZE` and deduplicate note scripts

Abierto
#2,653 4 comentarios 0 reacciones 0 asignados Ver en GitHub
fees rust
Lenguaje dominante
Rust
Estrellas
132
Forks
167
Merge medio
1 d 23 h
PR fusionados (30 d)
110

Descripción

> One thing we could consider is to allow relatively large note script sizes but scale the fee for these superlinearly. The main reason for this is that we really need only one public note with a given script to put the full script on-chain. All subsequent notes could contain just an External MAST node referring to this script. This will be possible because the node could keep track of only the most "complete" version of the script. We will need to update some logic on the node for this - and also to provide an easy way to figure out if one MAST forest is a strict subset of another.

_Originally posted by @bobbinth_

I guess the main benefit is to:
- only store full note scripts once
- reduce the size of transactions, batches or blocks when the full note script isn't needed.

The second point requires replacing a full note script with an `External` node if we know it already exists or isn't needed by whoever requested it, but the first point alone could also be done purely at the node DB level without changing anything about the rest of the system, afaict.

I imagine the client would always need to download a note with a full script from the node, for transaction execution, so the node may have to provide an API that allows for that.

Context: https://github.com/0xMiden/protocol/issues/2651#issuecomment-4098409631

cc @Mirko-von-Leipzig for node visibility

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.