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

Re-enable Babbage-era minimum UTxO calculation for the Babbage era #3388

Merged
merged 10 commits into from
Jul 18, 2022

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented Jul 14, 2022

Issue Number

ADP-2026

Summary

This PR reverts a subset of the changes made in #3318.

In particular, we:

  • re-enable the Babbage-era minimum UTxO calculation for the Babbage era;
  • re-enable the golden tests for Babbage-era UTxO values.

In addition, we:

  • fix integration tests for Alonzo and Babbage eras by adjusting several hard-coded constants that relate to minimum UTxO values.

@jonathanknowles
Copy link
Member Author

bors try

iohk-bors bot added a commit that referenced this pull request Jul 14, 2022
@jonathanknowles jonathanknowles changed the title WIP: Babbage-era minimum UTxO corrections WIP: Re-enable Babbage-era minimum UTxO calculation for the Babbage era Jul 14, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 14, 2022

try

Build failed:

@jonathanknowles jonathanknowles self-assigned this Jul 14, 2022
@jonathanknowles jonathanknowles added the RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG label Jul 14, 2022
@jonathanknowles jonathanknowles added this to the Vasil HF milestone Jul 14, 2022
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/babbage-minimum-utxo-corrections branch from a5c2c5e to 7936843 Compare July 14, 2022 08:58
This appears to no longer be necessary, as the Cardano API now exports
the `BabbageEra` identifier, and we no longer use any partial type
signatures in this module.
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/babbage-minimum-utxo-corrections branch 2 times, most recently from ddb596e to 7baf98b Compare July 14, 2022 09:17
@jonathanknowles
Copy link
Member Author

bors try

iohk-bors bot added a commit that referenced this pull request Jul 15, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 15, 2022

try

Build failed:

@jonathanknowles
Copy link
Member Author

bors try

iohk-bors bot added a commit that referenced this pull request Jul 18, 2022
jonathanknowles and others added 5 commits July 18, 2022 03:39
Note that these tests currently fail.

Test failures are of the following form:
```
  lib/shelley/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs:496:9:
  1) computeMinimumCoinForUTxO, Golden Tests, goldenTests_computeMinimumCoinForUTxO Babbage, golden test #0
       Falsified (after 1 test):
         resultExpected:
             Coin 995610

         resultReturned:
             Coin 1077500

         Condition violated: resultReturned == resultExpected

  To rerun use: --match "/computeMinimumCoinForUTxO/Golden Tests/goldenTests_computeMinimumCoinForUTxO Babbage/golden test #0/"
  ...
```
We re-introduce the Babbage-era minimum UTxO calculation in the Babbage
era, and remove the workaround.

This causes multiple integration tests to fail with `utxo_too_small`.

For example:

```hs
API Specifications, SHELLEY_TRANSACTIONS, TRANSMETA_ESTIMATE_01b - fee estimation includes no-schema metadata
       expected a successful response but got an error: ClientError (Object (fromList [("code",String "utxo_too_small"),("message",String "Some outputs have ada values that are too small. There's a minimum ada value specified by the protocol that each output must satisfy. I'll handle that minimum value myself when you do not explicitly specify an ada value for an output. Otherwise, you must specify enough ada. Here are the problematic outputs:   - Expected min coin value: 1.077500     Address: 010d62b5...3a953592     Token bundle:       coin: 0.999920       tokens: [] ")]))
       While verifying value:
         ( Status
             { statusCode = 403
             , statusMessage = "Forbidden"
             }
         , Left
             ( ClientError
                 ( Object
                     ( fromList
                         [
                             ( "code"
                             , String "utxo_too_small"
                             )
                         ,
                             ( "message"
                             , String "Some outputs have ada values that are too small. There's a minimum ada value specified by the protocol that each output must satisfy. I'll handle that minimum value myself when you do not explicitly specify an ada value for an output. Otherwise, you must specify enough ada. Here are the problematic outputs:   - Expected min coin value: 1.077500     Address: 010d62b5...3a953592     Token bundle:       coin: 0.999920       tokens: [] "
                             )
                         ]
                     )
                 )
             )
         )
```
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/babbage-minimum-utxo-corrections branch from 41aacaf to ea696fe Compare July 18, 2022 03:48
@jonathanknowles
Copy link
Member Author

bors cancel

@jonathanknowles
Copy link
Member Author

bors try

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 18, 2022

try

Already running a review

@jonathanknowles
Copy link
Member Author

bors cancel

@jonathanknowles
Copy link
Member Author

bors try

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 18, 2022

try

Already running a review

@jonathanknowles
Copy link
Member Author

bors try-

@jonathanknowles
Copy link
Member Author

bors ping

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 18, 2022

pong

#expected

@jonathanknowles
Copy link
Member Author

bors try-

@jonathanknowles
Copy link
Member Author

bors try

iohk-bors bot added a commit that referenced this pull request Jul 18, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 18, 2022

try

Build failed:

@jonathanknowles jonathanknowles force-pushed the jonathanknowles/babbage-minimum-utxo-corrections branch from ea696fe to 5312321 Compare July 18, 2022 05:12
@jonathanknowles
Copy link
Member Author

bors try

iohk-bors bot added a commit that referenced this pull request Jul 18, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 18, 2022

try

Build failed:

@jonathanknowles jonathanknowles changed the title WIP: Re-enable Babbage-era minimum UTxO calculation for the Babbage era Re-enable Babbage-era minimum UTxO calculation for the Babbage era Jul 18, 2022
@jonathanknowles jonathanknowles requested a review from Anviking July 18, 2022 09:08
@jonathanknowles jonathanknowles marked this pull request as ready for review July 18, 2022 09:08
Copy link
Member

@Anviking Anviking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@Anviking
Copy link
Member

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 18, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 67d9fe5 into master Jul 18, 2022
@iohk-bors iohk-bors bot deleted the jonathanknowles/babbage-minimum-utxo-corrections branch July 18, 2022 10:14
WilliamKingNoel-Bot pushed a commit that referenced this pull request Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants