Skip to content

Commit

Permalink
[FAIL] Use Babbage-era minimum UTxO calculation in Babbage era.
Browse files Browse the repository at this point in the history
We re-introduce the Babbage-era minimum UTxO calculation in the Babbage
era, and remove the workaround.
  • Loading branch information
jonathanknowles committed Jul 14, 2022
1 parent f8d3217 commit ddb596e
Showing 1 changed file with 1 addition and 17 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 @@ -277,8 +277,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 @@ -915,19 +913,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 @@ -938,8 +924,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

0 comments on commit ddb596e

Please sign in to comment.