Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] - Do not prepend change output when balancing transaction #3725

Closed
Tracked by #4144 ...
oskin1 opened this issue Mar 29, 2022 · 0 comments · Fixed by #4343
Closed
Tracked by #4144 ...

[FR] - Do not prepend change output when balancing transaction #3725

oskin1 opened this issue Mar 29, 2022 · 0 comments · Fixed by #4343
Assignees
Labels
comp: cardano-api enhancement New feature or request user type: external Created by an external user

Comments

@oskin1
Copy link

oskin1 commented Mar 29, 2022

Internal/External
External otherwise.

Area
Plutus Related to Plutus Scripts (Alonzo).

Describe the feature you'd like
makeTransactionAutoBalance which is used in Cardano-CLI prepends change output breaking original outputs indexing.
https://github.com/input-output-hk/cardano-node/blob/9c991b0c610b5a0f2b58e0c381e9ac7c4b11ac78/cardano-api/src/Cardano/Api/Fees.hs#L975

Append change output instead.

Additional context / screenshots
Stable outputs indexing allows dApp developers to write more efficient Plutus validators by passing an index of a particular input/output with a redeemer rather than making an expensive full search through all inputs/outputs.
Example:
https://github.com/ergolabs/cardano-dex-contracts/blob/34aa1723174abb1700d0b78e883e9c74b8f50948/src/ErgoDex/PContracts/PSwap.hs#L70

@oskin1 oskin1 added the enhancement New feature or request label Mar 29, 2022
@CarlosLopezDeLara CarlosLopezDeLara moved this to 📋 Backlog in Node CLI/API 2022 Aug 11, 2022
LudvikGalois pushed a commit that referenced this issue Aug 16, 2022
It's desirable for a client to be able to predict the index of outputs.
As such we append change to the end so that the index of other outputs
doesn't changed based on whether there's change or not.

Resolves #3725
LudvikGalois pushed a commit that referenced this issue Aug 16, 2022
It's desirable for a client to be able to predict the index of outputs.
As such we append change to the end so that the index of other outputs
doesn't changed based on whether there's change or not.

Resolves #3725
iohk-bors bot added a commit that referenced this issue Aug 17, 2022
4343: Append change instead of prepending it r=newhoggy a=LudvikGalois

It's desirable for a client to be able to predict the index of outputs.
As such we append change to the end so that the index of other outputs
doesn't changed based on whether there's change or not.

Resolves #3725

Co-authored-by: Robert 'Probie' Offner <robert.offner@iohk.io>
@iohk-bors iohk-bors bot closed this as completed in 706dca7 Aug 17, 2022
@CarlosLopezDeLara CarlosLopezDeLara moved this from 📋 Backlog to 👀Code review in Node CLI/API 2022 Aug 23, 2022
Jimbo4350 pushed a commit that referenced this issue Sep 29, 2022
It's desirable for a client to be able to predict the index of outputs.
As such we append change to the end so that the index of other outputs
doesn't changed based on whether there's change or not.

Resolves #3725
disassembler pushed a commit that referenced this issue Sep 29, 2022
It's desirable for a client to be able to predict the index of outputs.
As such we append change to the end so that the index of other outputs
doesn't changed based on whether there's change or not.

Resolves #3725
@CarlosLopezDeLara CarlosLopezDeLara moved this from 👀Code review to ✅ Done in Node CLI/API 2022 Oct 11, 2022
@dorin100 dorin100 added user type: external Created by an external user comp: cardano-api labels Oct 21, 2022
disassembler pushed a commit that referenced this issue Oct 25, 2022
It's desirable for a client to be able to predict the index of outputs.
As such we append change to the end so that the index of other outputs
doesn't changed based on whether there's change or not.

Resolves #3725
@CarlosLopezDeLara CarlosLopezDeLara mentioned this issue Nov 3, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: cardano-api enhancement New feature or request user type: external Created by an external user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants