ElementsProject / ElementsProject/rust-elements

Add a way to pad transactions' size if needed by Simplicity cost metric

Aberta
#260 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
57
Forks
40
Merge médio
11h 58min
PRs com merge (30d)
1

Descrição

Simplicity transactions have an additional "cost" associated with the computational resources consumed by verification of the results of executing the contract.

This cost is paid for by ensuring that the transaction has a sufficiently high weight (using conventional weight calculations) to cause the associated fee to be adequate according to the cost formula. Currently, most typical Simplicity programs inherently produce large enough transactions to satisfy this requirement, so there hasn't been a need to artificially increase the size of their transactions in order to get them accepted by Liquid nodes. However, this might not always be the case for more computationally-intensive contracts in the future, e.g. those that use loops or that call expensive jets repeatedly for some reason.

So, we could use a standardized way to pad transactions to make them deliberately larger when this turns out to be required by the cost formula.

@apoelstra suggested that the appropriate place to specify and implement the basis for this is here in `rust-elements`.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

A issue menciona rust-elements, mas não indica nenhum arquivo ou teste. Comece localizando os pontos de entrada do peso das transações e da serialização, bem como o tratamento existente dos custos de Simplicity; em seguida, determine a base do padding e a cobertura necessária. Considera-se concluído quando um mecanismo padronizado e testado para aplicar padding às transações até o peso exigido tiver sido implementado.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
rust
Domínio
blockchain
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

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