[FR] - Balance existing transaction
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- haskell
- Área
- blockchain, cli
Línea de trabajo
Comienza revisando el flujo de trabajo existente de cardano-cli transaction build y cómo se gestionan los envelopes de transacción, los redeemers y las claves de firma. Se considera terminado cuando una transacción elaborada externamente se equilibra calculando los costes de los scripts y las comisiones, seleccionando los inputs para las comisiones, añadiendo el cambio y escribiendo el resultado en el disco o en stdout usando datos del nodo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Internal (anyone could benefit though)
Area
Transaction building
Describe the feature you'd like
I would like to use the cardano-cli to balance a transaction that was drafted by another application. Assuming we have a transaction already built with body and witnesses (redeemers) by a DApp in a transaction envelope tx.json and some signing key wallet.sk which owns ADA to pay fees:
cardano-cli transaction balance \
--socket-path ... \ #
--testnet-magic 2 \
--unbalanced-tx tx.json \
--cardano-signing-key wallet.sk \
--out-file tx.json
Would connect to the cardano-node as usual to fetch various information (utxo owned by user, protocol parameters, system start and era history) and balance the transaction. That is:
- (Re-)calculate script costs using redeemers from the tx
- Estimate fees
- Find and add input to cover fees
- Add a change output
- Write the balanced transaction to disk (or stdout)
Alternative with slightly smaller scope: Take only an input to use for paying fees and change address, very much like transaction build.
Describe alternatives you've considered
Obvious alternative is to do all this in the DApp itself, but balancing a transaction is a generic process and not application-specific. Also, this would tie the transaction creating code very much to the "source" of where UTxO, protocol parameters etc. are fetched from. Having it in the cardano-cli, a dedicated client to the cardano-node, would keep it separated from e.g. an alternative workflow that uses blockfrost.
Additional context / screenshots
We encountered this while designing a command line tool to create certain smart contract transactions in the Hydra protocol. More details here: https://github.com/cardano-scaling/hydra/issues/1574
- Lenguaje dominante
- Haskell
- Estrellas
- 72
- Forks
- 25
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de IntersectMBO/cardano-cli
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
IntersectMBO/cardano-cli#1306 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Clarify the origin and intended use of Plutus V2/V4 test fixturesPosiblemente ocupada @Jimbo4350 la tomó hoy. Abierto
IntersectMBO/cardano-cli#1464 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Share body construction and input reading between transaction and sub-transaction buildersPosiblemente ocupada @Jimbo4350 la tomó hoy. Abierto
IntersectMBO/cardano-cli#1463 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Share common transaction-body arguments across builder commandsPosiblemente ocupada @Jimbo4350 la tomó hoy. Abierto
IntersectMBO/cardano-cli#1462 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Move Transaction.Internal.Common helpers into focused modulesPosiblemente ocupada @Jimbo4350 la tomó hoy. Abierto
IntersectMBO/cardano-cli#1461 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de IntersectMBO/cardano-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
A failed JNA download is reported as a corrupt zip, because `curl` in `Makefile` lacks `--fail`Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
objectionary/phino#1884 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Eval plugin errors on `:seti`Abiertocomponent: hls-eval-plugin status: needs triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
haskell/haskell-language-server#5144 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG]: -std selection does not work with COBOL -> GnuCOBOL 1.1Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9272 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
alunduil/siren-json.hs#247 ·
Los mantenedores suelen responder en 1 día