Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`transaction build` queries the node twice

Aperta
#1,472 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
haskell
Ambito
backend, cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Haskell
Stelle
72
Fork
26
Merge medio
3g 27m
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/cardano-cli

Tutte le issue di IntersectMBO/cardano-cli

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.