0xMiden / 0xMiden/protocol

Decide on `NOTE_MAX_SIZE` and deduplicate note scripts

Aberta
#2,653 4 comentários 0 reações 0 responsáveis Ver no GitHub
fees rust
Linguagem predominante
Rust
Estrelas
132
Forks
167
Merge médio
1d 23h
PRs com merge (30d)
110

Descrição

> 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

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.