`transaction build` queries the node twice

Abierto
#1,472 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
haskell
Área
backend, cli

Línea de trabajo

Read cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs, especially runTransactionBuildCmd and runTxBuild at the linked locations. Trace how the query results feed balancing, treasury values, and the --calculate-plutus-script-cost branch. The issue is done when the command queries once with certificates and passes that result to runTxBuild, preserving the needed values across those paths.

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

Descripción

performance

transaction build runs queryStateForBalancedTx twice per invocation, each time over a new local state query connection:

queryCurrentEra is also called twice, in runTransactionBuildCmd and in runTxBuild.

runTxBuild balances with the result of its own query only.
runTransactionBuildCmd uses the first result for two things:

On a plain build --out-file without the treasury value, the first query's result is not used at all.

Effects:

  • Every build opens two extra node connections and repeats the whole query set, including UTxO by TxIn and the stake pool set.
  • The two queries acquire the volatile tip separately, so the treasury value can come from a different ledger state than the UTxO and protocol parameters used for balancing.

Suggested fix: query once in runTransactionBuildCmd, with the certificates, and pass the result to runTxBuild.

Lenguaje dominante
Haskell
Estrellas
72
Forks
26
Merge medio
2 d 2 h
PR fusionados (30 d)
21

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/cardano-cli

Todos los issues de IntersectMBO/cardano-cli

Issues similares

Más issues de Haskell

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.