fix(builders): count signers only for native scripts the transaction needs

Aberta
#596 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

  • #600 de @penielgold-hub — fechado sem integrar

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

Start at buildFakeWitnessSet in internal/txBuilder.ts and trace which native scripts reach it from reference and spent inputs. Work out where the set of script hashes the ledger actually runs (spending, minting, certificate, withdrawal, vote, proposal, per Conway UTxO.hs L95-105) can be computed, and have signer placeholders counted only for scripts in that set; verify with the fee-estimation tests. Note that open PR #600 already targets this issue, so confirm it is not already fixed before starting.

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

Descrição

The fee estimate adds signer placeholders for every native script carried by a reference input, and after #595 by a spent input, even when the transaction needs none of them.

Example: Bob stores his 2-of-3 treasury multisig as a reference script in a UTxO at his own key address. He later spends that UTxO to pay Carol. The transaction needs only Bob's signature, but buildFakeWitnessSet (internal/txBuilder.ts) also adds 2 placeholders for the multisig, so the fee is estimated for 3 signatures. The transaction is still valid; Bob overpays by roughly 0.009 ADA.

The ledger only runs a script when the transaction needs it for spending, minting, a certificate, a withdrawal, a vote or a proposal (Conway UTxO.hs L95-105). The fee estimate should count signers only for native scripts whose hash is in that set, and skip scripts that are only carried by an input.

Linguagem predominante
TypeScript
Estrelas
22
Forks
34
Merge médio
16h 53min
PRs com merge (30d)
10

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de IntersectMBO/evolution-sdk

Todas as issues de IntersectMBO/evolution-sdk

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

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