-
Notifications
You must be signed in to change notification settings - Fork 214
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
Use cardano-ledger
for all minimum UTxO calculations
#3456
Use cardano-ledger
for all minimum UTxO calculations
#3456
Commits on Aug 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a846156 - Browse repository at this point
Copy the full SHA a846156View commit details -
Configuration menu - View commit details
-
Copy full SHA for a345f43 - Browse repository at this point
Copy the full SHA a345f43View commit details -
Add function
computeMinimumCoinForUTxOCardanoApi
.This function simply encapsulates the Cardano API minimum UTxO function in a wallet-friendly interface, acceping and returning wallet-friendly types.
Configuration menu - View commit details
-
Copy full SHA for d014ad1 - Browse repository at this point
Copy the full SHA d014ad1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58893a7 - Browse repository at this point
Copy the full SHA 58893a7View commit details -
Make
unsafeCoinFromCardanoApiCalculateMinimumUTxOResult
an inner fu……nction. This function is now only used by `computeMinimumCoinForUTxOCardanoApi`. We can safely make it an inner function.
Configuration menu - View commit details
-
Copy full SHA for 73bcc85 - Browse repository at this point
Copy the full SHA 73bcc85View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8450f1d - Browse repository at this point
Copy the full SHA 8450f1dView commit details -
Add function
computeMinimumCoinForUTxOCardanoLedger
.This function simply encapsulates the Cardano Ledger minimum UTxO function in a wallet-friendly interface, acceping and returning wallet-friendly types.
Configuration menu - View commit details
-
Copy full SHA for eef2937 - Browse repository at this point
Copy the full SHA eef2937View commit details -
Test that
computeMinimumCoinForUTxO{CardanoApi,CardanoLedger}
are e……quivalent. We eventually wish to switch from the Cardano API implementation of the minimum UTXO calculaion to the Cardano Ledger implementation. But before we do that, we test that the implementations are equivalent.
Configuration menu - View commit details
-
Copy full SHA for 687ec15 - Browse repository at this point
Copy the full SHA 687ec15View commit details -
Use
computeMinimumCoinForUTxOCardanoLedger
in implementation.This commit switches from the Cardano API implementation of the minimum UTxO calculation to the Cardano Ledger implementation.
Configuration menu - View commit details
-
Copy full SHA for 070fa91 - Browse repository at this point
Copy the full SHA 070fa91View commit details -
Do not treat the Babbage era specially in the public implementation.
Now that we are using the Cardano Ledger implementation of the minimum UTxO calculation, we no longer need to treat the Babbage era specially in our public implementation.
Configuration menu - View commit details
-
Copy full SHA for b54ab99 - Browse repository at this point
Copy the full SHA b54ab99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b8469c - Browse repository at this point
Copy the full SHA 3b8469cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 85d4577 - Browse repository at this point
Copy the full SHA 85d4577View commit details -
Delete redundant code from public
MinimumUTxO
module.These functions are no longer used.
Configuration menu - View commit details
-
Copy full SHA for 7d04155 - Browse repository at this point
Copy the full SHA 7d04155View commit details -
Remove
prop_computeMinimumCoinForUTxO_evaluation
.Since our minimum UTxO calculation now relies on Cardano Ledger, we no longer need to convert from era-specific protocol parameters to the era-agnostic protocol parameters required by the Cardano API. Therefore, this property test (which checked that conversions would never cause run-time errors) is no longer necessary.
Configuration menu - View commit details
-
Copy full SHA for 0d964e4 - Browse repository at this point
Copy the full SHA 0d964e4View commit details -
Use underscores to make function names clearer.
The juxtaposition of "UTxO" followed by another capitalised word is rather hard to read. This commit introduces underscores to aid readability.
Configuration menu - View commit details
-
Copy full SHA for 3b009d2 - Browse repository at this point
Copy the full SHA 3b009d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd1f8e3 - Browse repository at this point
Copy the full SHA bd1f8e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b8f585 - Browse repository at this point
Copy the full SHA 3b8f585View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93b4405 - Browse repository at this point
Copy the full SHA 93b4405View commit details -
Adjust signature of `prop_computeMinimumCoinForUTxO_CardanoApi_Cardan…
…oLedger`. It's simpler for this property to accept a `TokenBundle` instead of a `TokenMap` and `Coin`. The `Arbitrary` instance for `TokenBundle` uses the `genTxOutTokenBundle` generator, which already has good coverage of minimum and maximum values specifically in the context of a transaction output. This allows us to get rid of the `Arbitrary` instance for `Coin` (which in hindsight would have been better to implement with the `genTxOutCoin` generator). In response to review feedback: #3456 (comment)
Configuration menu - View commit details
-
Copy full SHA for 9f37edc - Browse repository at this point
Copy the full SHA 9f37edcView commit details -
Simplify type signatures of
to{Alonzo,Babbage}TxOut
.We can use the `Standard{Alonzo,Babbage}` synonyms for greater concision.
Configuration menu - View commit details
-
Copy full SHA for 3866692 - Browse repository at this point
Copy the full SHA 3866692View commit details