-
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 API function calculateMinimumUTxO
for minimum UTxO calculations.
#3368
Use Cardano API function calculateMinimumUTxO
for minimum UTxO calculations.
#3368
Commits on Jul 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ad11edb - Browse repository at this point
Copy the full SHA ad11edbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f3b549 - Browse repository at this point
Copy the full SHA 3f3b549View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76c2756 - Browse repository at this point
Copy the full SHA 76c2756View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45ba2f5 - Browse repository at this point
Copy the full SHA 45ba2f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55fad34 - Browse repository at this point
Copy the full SHA 55fad34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04af270 - Browse repository at this point
Copy the full SHA 04af270View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66f9086 - Browse repository at this point
Copy the full SHA 66f9086View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6175a5 - Browse repository at this point
Copy the full SHA d6175a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f7de9b - Browse repository at this point
Copy the full SHA 6f7de9bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d32b55a - Browse repository at this point
Copy the full SHA d32b55aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4935f26 - Browse repository at this point
Copy the full SHA 4935f26View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03d1c6c - Browse repository at this point
Copy the full SHA 03d1c6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 33f480f - Browse repository at this point
Copy the full SHA 33f480fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9a8558 - Browse repository at this point
Copy the full SHA c9a8558View commit details -
Configuration menu - View commit details
-
Copy full SHA for aad2053 - Browse repository at this point
Copy the full SHA aad2053View commit details -
Configuration menu - View commit details
-
Copy full SHA for 527529b - Browse repository at this point
Copy the full SHA 527529bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a46f500 - Browse repository at this point
Copy the full SHA a46f500View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae5790f - Browse repository at this point
Copy the full SHA ae5790fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9c8cae - Browse repository at this point
Copy the full SHA d9c8caeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 009d3e3 - Browse repository at this point
Copy the full SHA 009d3e3View commit details -
Extract out
getMinimumUTxOFunction
within Blockfrost network layer.This function encapsulates the logic of constructing an era-specific minimum UTxO function, and reduces the complexity of the `fromBlockfrostPP` function.
Configuration menu - View commit details
-
Copy full SHA for c26ef6f - Browse repository at this point
Copy the full SHA c26ef6fView commit details -
Generalize function
verify
inTest.QuickCheck.Extra
.This allows `verify` to modify any `Testable` value.
Configuration menu - View commit details
-
Copy full SHA for c2a55f6 - Browse repository at this point
Copy the full SHA c2a55f6View commit details -
Add property
prop_computeMinimumCoinForUTxO_shelleyBasedEra_stability
.This function compares the stability of: - the Cardano API function 'calculateMinimumUTxO' - the wallet function 'computeMinimumCoinForUTxO'
Configuration menu - View commit details
-
Copy full SHA for c4f01d9 - Browse repository at this point
Copy the full SHA c4f01d9View commit details -
Simplify property `prop_computeMinimumCoinForUTxO_shelleyBasedEra_bou…
…nds`. Simplify this property by moving the error pattern match to inner function `apiComputeMinCoin`. We assume that error pattern will never match. But if it does, then this property will still fail.
Configuration menu - View commit details
-
Copy full SHA for 6bd15b1 - Browse repository at this point
Copy the full SHA 6bd15b1View commit details -
Add golden tests for minimum UTxO values.
We add golden minimum UTxO values for all Shelley-based eras.
Configuration menu - View commit details
-
Copy full SHA for 4f348ca - Browse repository at this point
Copy the full SHA 4f348caView commit details -
Configuration menu - View commit details
-
Copy full SHA for f75c995 - Browse repository at this point
Copy the full SHA f75c995View commit details -
Disable
PartialTypeSignatures
inShelley.Compatibility
.This extension was only used once in the whole module. In the particular case it was used, it is arguably clearer and safer to state the era explicitly.
Configuration menu - View commit details
-
Copy full SHA for 75015c2 - Browse repository at this point
Copy the full SHA 75015c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 763a0d3 - Browse repository at this point
Copy the full SHA 763a0d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc2344e - Browse repository at this point
Copy the full SHA fc2344eView commit details -
Improve clarity of counterexample output within golden tests.
In particular, we indicate more clearly which value was expected, and which value was returned. For example: ``` Failures: lib/shelley/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs:490:9: 1) computeMinimumCoinForUTxO, Golden Tests, goldenTests_computeMinimumCoinForUTxO Babbage, golden test #3 Falsified (after 1 test): resultExpected: Coin 1323170 Coin 1323170 resultReturned: Coin 1357650 Condition violated: resultReturned == resultExpected ```
Configuration menu - View commit details
-
Copy full SHA for 964faa4 - Browse repository at this point
Copy the full SHA 964faa4View commit details -
Add further explanatory comments.
In response to review feedback: #3368 (comment) #3368 (comment)
Configuration menu - View commit details
-
Copy full SHA for bda5651 - Browse repository at this point
Copy the full SHA bda5651View commit details -
Add commentary to `prop_computeMinimumCoinForUTxO_shelleyBasedEra_sta…
…bility`. We further explain the purpose of this property. If the Cardano API function `calculateMinimumUTxO` is ever changed so that it computes a fixed point before returning its result, this property will fail. However, this is valuable information, as it tells us that we might be able to revise our implementation of `computeMinimumCoinForUTxO` to reduce the level of overestimation. In response to review feedback.
Configuration menu - View commit details
-
Copy full SHA for a4d6519 - Browse repository at this point
Copy the full SHA a4d6519View commit details -
Improve realism of generated test protocol parameters in `MinimumUTxO…
….Gen`. This commit introduces generator function `genLedgerCoinOfSimilarMagnitude`, which, when given a coin value, will generate another coin value that is of a similar magnitude. When generating test values of `MinimumUTxO`, we apply the generator function `genLedgerCoinOfSimilarMagnitude` to protocol parameter values obtained from real mainnet genesis files. This enables us to generate more realistic values of `MinimumUTxO`. In response to review feedback: #3368 (comment)
Configuration menu - View commit details
-
Copy full SHA for 114cf90 - Browse repository at this point
Copy the full SHA 114cf90View commit details -
Reuse test protocol parameters from
MinimumUTxO.Gen
in `MinimumUTxO……Spec`. Since we've already defined a set of test protocol parameter values within `MinimumUTxO.Gen`, we might as well re-use these test parameter values within `MinimumUTxOSpec`. This reduces the amount of repetition.
Configuration menu - View commit details
-
Copy full SHA for f08e0a0 - Browse repository at this point
Copy the full SHA f08e0a0View commit details -
Adjust monotonicity comment for function `embedTokenMapWithinPaddedTx…
…Out`. In response to review feedback: #3368 (comment)
Configuration menu - View commit details
-
Copy full SHA for eb446c6 - Browse repository at this point
Copy the full SHA eb446c6View commit details -
Describe motivation for
MinimumUTxOConstant
constructor.In response to review feedback: #3368 (comment)
Configuration menu - View commit details
-
Copy full SHA for 727c7cb - Browse repository at this point
Copy the full SHA 727c7cbView commit details