-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix incorrect fees estimation when balancing transaction minting assets #622
Fix incorrect fees estimation when balancing transaction minting assets #622
Conversation
10c5809
to
fdc91b3
Compare
a83f93b
to
88aceab
Compare
88aceab
to
dc5d4cb
Compare
UnsignedTx unsignedTx0 <- | ||
first TxBodyError | ||
$ makeUnsignedTx | ||
availableEra | ||
$ obtainShimConstraints bEraOnwards | ||
$ txbodycontent | ||
{ txOuts = | ||
txOuts txbodycontent | ||
++ [TxOut changeaddr (lovelaceToTxOutValue sbe 0) TxOutDatumNone ReferenceScriptNone] | ||
-- TODO: think about the size of the change output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jimbo4350 What does this TODO mean? This PR changes the TxOut
to include all assets from TxIns
and minted ones, so I guess this TODO is fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duncan left that there and I can't remember why.
address | ||
Nothing | ||
-- the correct amount with manual balancing of assets | ||
335_729 === feeWithTxoutAsset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR does not change the value of the fee here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but one comment regarding the change output
UnsignedTx unsignedTx0 <- | ||
first TxBodyError | ||
$ makeUnsignedTx | ||
availableEra | ||
$ obtainShimConstraints bEraOnwards | ||
$ txbodycontent | ||
{ txOuts = | ||
txOuts txbodycontent | ||
++ [TxOut changeaddr (lovelaceToTxOutValue sbe 0) TxOutDatumNone ReferenceScriptNone] | ||
-- TODO: think about the size of the change output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duncan left that there and I can't remember why.
++ [TxOut changeaddr (lovelaceToTxOutValue sbe 0) TxOutDatumNone ReferenceScriptNone] | ||
-- TODO: think about the size of the change output | ||
-- 1,2,4 or 8 bytes? | ||
TxOut changeaddr (TxOutValueShelleyBased sbe change) TxOutDatumNone ReferenceScriptNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we had an issue in the past where users were expecting the change output to be appended to the list of tx outs. We best not change it. There may be an issue about this floating around somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's just an intermediary txbodycontent for execution units calculation. I'll change the order.
dc5d4cb
to
7535526
Compare
Changelog
Context
This PR should be reviewed on commit-by-commit basis.
Deprecate valueFromList and valueToList. Add IsList Value
- contains refactor commitFix fee estimation when autobalancing assets
implement the test case and the fix for Incorrect script budget estimation when minting assets and autobalancing a transaction cardano-cli#614Checklist