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

Abierto
#596 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #600 de @penielgold-hub — cerrado sin fusionar

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
22
Forks
34
Merge medio
16 h 53 min
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IntersectMBO/evolution-sdk

Todos los issues de IntersectMBO/evolution-sdk

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.