Skip to content

Commit

Permalink
Try #3388:
Browse files Browse the repository at this point in the history
  • Loading branch information
iohk-bors[bot] authored Jul 14, 2022
2 parents 2ac308b + a5c2c5e commit ee14d49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
18 changes: 1 addition & 17 deletions lib/shelley/src/Cardano/Wallet/Shelley/Compatibility.hs
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ import Data.ByteString.Short
( fromShort, toShort )
import Data.Coerce
( coerce )
import Data.Default
( Default (..) )
import Data.Foldable
( toList )
import Data.Function
Expand Down Expand Up @@ -918,19 +916,7 @@ fromBabbagePParams eraInfo currentNodeProtocolParameters pp =
, desiredNumberOfStakePools =
desiredNumberOfStakePoolsFromPParams pp
, minimumUTxO =
-- FIXME [ADP-1978] need to fix for final Babbage support ⚠️
--
-- We unexpectedly needed to increase @maxLengthAddress@ causing
-- tests to break in Babbage. Using the Alonzo calculation even in
-- Babbage is correct enough to make the integration tests to pass
-- in Babbage, and for us to be able to merge the Babbage
-- integration cluster support to master. This is not waterproof
-- though, and we should definitely use the babbage-specific
-- calculation.
minimumUTxOForShelleyBasedEra ShelleyBasedEraAlonzo $
def { Alonzo._coinsPerUTxOWord =
multiplyCoinBy 8 $ Babbage._coinsPerUTxOByte pp
}
minimumUTxOForShelleyBasedEra ShelleyBasedEraBabbage pp
, stakeKeyDeposit = stakeKeyDepositFromPParams pp
, eras = fromBoundToEpochNo <$> eraInfo
, maximumCollateralInputCount = unsafeIntToWord $
Expand All @@ -941,8 +927,6 @@ fromBabbagePParams eraInfo currentNodeProtocolParameters pp =
Just $ executionUnitPricesFromPParams pp
, currentNodeProtocolParameters
}
where
multiplyCoinBy a (SL.Coin c) = SL.Coin (a * c)

-- | Extract the current network decentralization level from the given set of
-- protocol parameters.
Expand Down
18 changes: 7 additions & 11 deletions lib/shelley/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@ spec = do
goldenTests_computeMinimumCoinForUTxO "Alonzo"
goldenMinimumUTxO_Alonzo
goldenMinimumCoins_Alonzo

-- FIXME [ADP-1978] Re-enable
--goldenTests_computeMinimumCoinForUTxO "Babbage"
-- goldenMinimumUTxO_Babbage
-- goldenMinimumCoins_Babbage
goldenTests_computeMinimumCoinForUTxO "Babbage"
goldenMinimumUTxO_Babbage
goldenMinimumCoins_Babbage

-- Check that it's possible to evaluate 'computeMinimumCoinForUTxO' without
-- any run-time error.
Expand Down Expand Up @@ -346,9 +344,8 @@ goldenMinimumUTxO_Alonzo =
minimumUTxOForShelleyBasedEra ShelleyBasedEraAlonzo
def {Alonzo._coinsPerUTxOWord = testParameter_coinsPerUTxOWord_Alonzo}

-- FIXME [ADP-1978] Re-enable
_goldenMinimumUTxO_Babbage :: MinimumUTxO
_goldenMinimumUTxO_Babbage =
goldenMinimumUTxO_Babbage :: MinimumUTxO
goldenMinimumUTxO_Babbage =
minimumUTxOForShelleyBasedEra ShelleyBasedEraBabbage
def {Babbage._coinsPerUTxOByte = testParameter_coinsPerUTxOByte_Babbage}

Expand Down Expand Up @@ -392,9 +389,8 @@ goldenMinimumCoins_Alonzo =
, (goldenTokenMap_4, Coin 1_862_028)
]

-- FIXME [ADP-1978] Re-enable
_goldenMinimumCoins_Babbage :: [(TokenMap, Coin)]
_goldenMinimumCoins_Babbage =
goldenMinimumCoins_Babbage :: [(TokenMap, Coin)]
goldenMinimumCoins_Babbage =
[ (goldenTokenMap_0, Coin 995_610)
, (goldenTokenMap_1, Coin 1_150_770)
, (goldenTokenMap_2, Coin 1_323_170)
Expand Down

0 comments on commit ee14d49

Please sign in to comment.