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

Bump CHaP to latest ledger, consensus, network in preparation for cardano-node 8.8 #407

Merged
merged 23 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bf0c2ef
Replace deserialiseAddr with decodeAddr
Jimbo4350 Dec 20, 2023
9d3ecd0
Parameterize TransactionValidityError on era and convert to GADT
Jimbo4350 Dec 20, 2023
ff3f622
Remove patterns AlonzoPlutusScript and AlonzoTimelockScript
Jimbo4350 Dec 20, 2023
8b6dcaa
Update protocol parameter types pool max retire epoch, drep activity and
Jimbo4350 Dec 20, 2023
9e32b0a
Replace PlutusDebug with PlutusWithContext
Jimbo4350 Dec 20, 2023
3c83cf7
Replace mkRwdAcnt with RewardAcnt
Jimbo4350 Dec 20, 2023
757cd89
Remove ExtendedUTxO and EraPlutusContext type classes
Jimbo4350 Feb 5, 2024
cd786ca
Update cardano-api.cabal file with latest releases from consensus and
Jimbo4350 Jan 31, 2024
edc018d
Update arguments for textToUrl and textToDns
Jimbo4350 Jan 31, 2024
50c0762
Replace 'Maybe ChainPoint' with 'Target ChainPoint' from consensus
Jimbo4350 Jan 31, 2024
1f7b7d9
Remove redundant constraints
Jimbo4350 Jan 31, 2024
9bd9c49
Replace 'RdmrPtr' with associated data type 'PlutusPurpose' in
Jimbo4350 Jan 31, 2024
c55b15e
Satisfy required ledger constraints in Conway related queries
Jimbo4350 Jan 31, 2024
3122765
Update the following protocol parameters:
Jimbo4350 Jan 31, 2024
a42f536
Replace 'PrevGovActionId' usage in 'GovernanceAction' with 'GovPurpo…
Jimbo4350 Jan 31, 2024
1c57e9a
Delete Cardano.Api.TxBody and Cardano.Api.Tx
Jimbo4350 Jan 31, 2024
d6f3994
Propagate renames:
Jimbo4350 Jan 31, 2024
eb3422b
Update golden files
Jimbo4350 Jan 31, 2024
2809c42
Update cardano-api gen's generators
Jimbo4350 Jan 31, 2024
2dd0b0a
Update piplineSize of chain sync client from Word32 -> Word16
Jimbo4350 Jan 31, 2024
0d8efae
Implement TxProposalProcedures and TxVotingProcedures
Jimbo4350 Jan 31, 2024
e739675
Move TxBody to Cardano.Api.Sign.Tx in order to remove the old
Jimbo4350 Feb 1, 2024
9aae71c
Address review comments
Jimbo4350 Feb 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ library internal
Cardano.Api.SerialiseUsing
Cardano.Api.SpecialByron
Cardano.Api.StakePoolMetadata
Cardano.Api.Tx
Cardano.Api.TxBody
Cardano.Api.Tx.Body
Cardano.Api.Tx.Sign
Cardano.Api.TxIn
Cardano.Api.TxMetadata
Cardano.Api.Utils
Expand All @@ -162,16 +162,16 @@ library internal
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-wrapper ^>= 1.5
, cardano-data >= 1.0
, cardano-ledger-alonzo >= 1.5.0
, cardano-ledger-allegra >= 1.2.3.1
, cardano-ledger-api ^>= 1.7
, cardano-ledger-babbage >= 1.5.0
, cardano-ledger-binary
, cardano-ledger-byron >= 1.0.0.2
, cardano-ledger-conway >= 1.10.0
, cardano-ledger-core >= 1.8.0
, cardano-ledger-mary >= 1.3.0.2
, cardano-ledger-shelley >= 1.7.0
, cardano-ledger-alonzo >= 1.6.0
, cardano-ledger-allegra >= 1.3
, cardano-ledger-api ^>= 1.8
, cardano-ledger-babbage >= 1.6.0
, cardano-ledger-binary ^>= 1.3
, cardano-ledger-byron >= 1.0.0.4
, cardano-ledger-conway >= 1.12.0
, cardano-ledger-core >= 1.10
, cardano-ledger-mary >= 1.5
, cardano-ledger-shelley >= 1.9.0
, cardano-protocol-tpraos >= 1.0.3.6
, cardano-slotting >= 0.1
, cardano-strict-containers >= 0.1
Expand All @@ -191,19 +191,19 @@ library internal
, mtl
, network
, optparse-applicative-fork
, ouroboros-consensus ^>= 0.14
, ouroboros-consensus-cardano ^>= 0.12
, ouroboros-consensus-diffusion ^>= 0.9
, ouroboros-consensus-protocol ^>= 0.6
, ouroboros-consensus ^>= 0.15
, ouroboros-consensus-cardano ^>= 0.13
, ouroboros-consensus-diffusion ^>= 0.10
, ouroboros-consensus-protocol ^>= 0.7
, ouroboros-network
, ouroboros-network-api
, ouroboros-network-api ^>= 0.6.2
, ouroboros-network-framework
, ouroboros-network-protocols
, parsec
, plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>= 1.15
, plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>= 1.21
, prettyprinter
, prettyprinter-ansi-terminal
, prettyprinter-configurable ^>= 1.15
, prettyprinter-configurable ^>= 1.21
, random
, safe-exceptions
, scientific
Expand Down Expand Up @@ -282,10 +282,12 @@ library gen
, cardano-binary >= 1.6 && < 1.8
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-test ^>= 1.5
, cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib} >= 1.5.0
, cardano-data
, cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib} >= 1.6.0
, cardano-ledger-byron-test >= 1.5
, cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8.0
, cardano-ledger-shelley >= 1.7.0
, cardano-ledger-conway
, cardano-ledger-conway:testlib >= 1.10.0
, containers
, filepath
Expand All @@ -312,7 +314,7 @@ test-suite cardano-api-test
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-test ^>= 1.5
, cardano-crypto-tests ^>= 2.1
, cardano-ledger-api ^>= 1.7
, cardano-ledger-api ^>= 1.8
, cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8
, containers
, directory
Expand Down Expand Up @@ -361,7 +363,7 @@ test-suite cardano-api-golden
, cardano-crypto-class ^>= 2.1.2
, cardano-data >= 1.0
, cardano-ledger-alonzo
, cardano-ledger-api ^>= 1.7
, cardano-ledger-api ^>= 1.8
, cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8
, cardano-ledger-shelley
, cardano-ledger-shelley-test >= 1.2.0.1
Expand All @@ -373,8 +375,8 @@ test-suite cardano-api-golden
, hedgehog-extras ^>= 0.6.0.2
, microlens
, parsec
, plutus-core ^>= 1.15
, plutus-ledger-api ^>= 1.15
, plutus-core ^>= 1.21
, plutus-ledger-api ^>= 1.21
, tasty
, tasty-hedgehog
, time
Expand Down
8 changes: 3 additions & 5 deletions cardano-api/gen/Test/Gen/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import qualified Cardano.Ledger.Alonzo.Genesis as Alonzo
import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo
import qualified Cardano.Ledger.BaseTypes as Ledger
import qualified Cardano.Ledger.Coin as Ledger
import qualified Cardano.Ledger.Plutus.CostModels as Plutus
import qualified Cardano.Ledger.Plutus.Language as Alonzo
import Cardano.Ledger.Shelley.TxAuxData (Metadatum (..), ShelleyTxAuxData (..))

Expand Down Expand Up @@ -82,10 +83,7 @@ genExUnits = do
genCostModels :: Gen Alonzo.CostModels
genCostModels = do
alonzoCostModel <- genCostModel
Alonzo.CostModels
<$> (conv <$> Gen.list (Range.linear 1 3) (return alonzoCostModel))
<*> pure mempty
<*> pure mempty
Plutus.mkCostModels . conv <$> Gen.list (Range.linear 1 3) (return alonzoCostModel)
where
conv :: [Alonzo.CostModel] -> Map.Map Alonzo.Language Alonzo.CostModel
conv [] = mempty
Expand All @@ -105,7 +103,7 @@ genAlonzoGenesis = do

return Alonzo.AlonzoGenesis
{ Alonzo.agCoinsPerUTxOWord = Ledger.CoinPerWord coinsPerUTxOWord
, Alonzo.agCostModels = Alonzo.CostModels mempty mempty mempty
, Alonzo.agCostModels = mempty
, Alonzo.agPrices = prices'
, Alonzo.agMaxTxExUnits = maxTxExUnits'
, Alonzo.agMaxBlockExUnits = maxBlockExUnits'
Expand Down
50 changes: 36 additions & 14 deletions cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ import qualified Cardano.Crypto.Hash as Crypto
import qualified Cardano.Crypto.Hash.Class as CRYPTO
import qualified Cardano.Crypto.Seed as Crypto
import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo
import qualified Cardano.Ledger.BaseTypes as Ledger
import qualified Cardano.Ledger.Conway.Governance as L
import qualified Cardano.Ledger.Core as Ledger
import Cardano.Ledger.SafeHash (unsafeMakeSafeHash)

Expand All @@ -161,9 +163,11 @@ import qualified Data.ByteString.Short as SBS
import Data.Coerce
import Data.Int (Int64)
import Data.Maybe
import Data.OSet.Strict (OSet)
import qualified Data.OSet.Strict as OSet
import Data.Ratio (Ratio, (%))
import Data.String
import Data.Word (Word64)
import Data.Word (Word16, Word32, Word64)
import Numeric.Natural (Natural)

import Test.Gen.Cardano.Api.Era
Expand Down Expand Up @@ -872,6 +876,12 @@ genSeed n = Crypto.mkSeedFromBytes <$> Gen.bytes (Range.singleton n)
genNat :: Gen Natural
genNat = Gen.integral (Range.linear 0 10)

genWord16 :: Gen Word16
genWord16 = Gen.integral (Range.linear 0 10)

genWord32 :: Gen Word32
genWord32 = Gen.integral (Range.linear 0 10)

genRational :: Gen Rational
genRational =
(\d -> ratioToRational (1 % d)) <$> genDenominator
Expand All @@ -897,6 +907,9 @@ genRationalInt64 =
genEpochNo :: Gen EpochNo
genEpochNo = EpochNo <$> Gen.word64 (Range.linear 0 10)

genEpochInterval :: Gen Ledger.EpochInterval
genEpochInterval = Ledger.EpochInterval <$> Gen.word32 (Range.linear 0 10)

genPraosNonce :: Gen PraosNonce
genPraosNonce = makePraosNonce <$> Gen.bytes (Range.linear 0 32)

Expand All @@ -917,7 +930,7 @@ genProtocolParameters era = do
protocolParamStakeAddressDeposit <- genLovelace
protocolParamStakePoolDeposit <- genLovelace
protocolParamMinPoolCost <- genLovelace
protocolParamPoolRetireMaxEpoch <- genEpochNo
protocolParamPoolRetireMaxEpoch <- genEpochInterval
protocolParamStakePoolTargetNum <- genNat
protocolParamPoolPledgeInfluence <- genRationalInt64
protocolParamMonetaryExpansion <- genRational
Expand All @@ -944,16 +957,16 @@ genProtocolParametersUpdate era = do
protocolUpdateProtocolVersion <- Gen.maybe ((,) <$> genNat <*> genNat)
protocolUpdateDecentralization <- Gen.maybe genRational
protocolUpdateExtraPraosEntropy <- Gen.maybe genMaybePraosNonce
protocolUpdateMaxBlockHeaderSize <- Gen.maybe genNat
protocolUpdateMaxBlockBodySize <- Gen.maybe genNat
protocolUpdateMaxTxSize <- Gen.maybe genNat
protocolUpdateMaxBlockHeaderSize <- Gen.maybe genWord16
protocolUpdateMaxBlockBodySize <- Gen.maybe genWord32
protocolUpdateMaxTxSize <- Gen.maybe genWord32
protocolUpdateTxFeeFixed <- Gen.maybe genLovelace
protocolUpdateTxFeePerByte <- Gen.maybe genLovelace
protocolUpdateMinUTxOValue <- Gen.maybe genLovelace
protocolUpdateStakeAddressDeposit <- Gen.maybe genLovelace
protocolUpdateStakePoolDeposit <- Gen.maybe genLovelace
protocolUpdateMinPoolCost <- Gen.maybe genLovelace
protocolUpdatePoolRetireMaxEpoch <- Gen.maybe genEpochNo
protocolUpdatePoolRetireMaxEpoch <- Gen.maybe genEpochInterval
protocolUpdateStakePoolTargetNum <- Gen.maybe genNat
protocolUpdatePoolPledgeInfluence <- Gen.maybe genRationalInt64
protocolUpdateMonetaryExpansion <- Gen.maybe genRational
Expand Down Expand Up @@ -1066,17 +1079,26 @@ genGovernancePollAnswer =
genGovernancePollHash =
GovernancePollHash . mkDummyHash <$> Gen.int (Range.linear 0 10)

genProposals :: forall era. ConwayEraOnwards era -> Gen [Proposal era]
genProposals :: ConwayEraOnwards era -> Gen (TxProposalProcedures BuildTx era)
genProposals w =
conwayEraOnwardsTestConstraints w
$ Gen.list (Range.constant 1 10)
$ genProposal w
conwayEraOnwardsConstraints w
$ TxProposalProcedures
<$> genTxProposalsOSet w
<*> return (BuildTxWith mempty)

genTxProposalsOSet
:: ConwayEraOnwards era
-> Gen (OSet (L.ProposalProcedure (ShelleyLedgerEra era)))
genTxProposalsOSet w =
conwayEraOnwardsConstraints w
$ OSet.fromFoldable <$> Gen.list (Range.constant 1 10) (genProposal w)

genProposal :: ConwayEraOnwards era -> Gen (Proposal era)
genProposal :: ConwayEraOnwards era -> Gen (L.ProposalProcedure (ShelleyLedgerEra era))
genProposal w =
conwayEraOnwardsTestConstraints w $ fmap Proposal Q.arbitrary
conwayEraOnwardsTestConstraints w Q.arbitrary

genVotingProcedures :: ConwayEraOnwards era -> Gen (ShelleyApi.VotingProcedures era)
-- TODO: Generate map of script witnesses
genVotingProcedures :: ConwayEraOnwards era -> Gen (Api.TxVotingProcedures BuildTx era)
genVotingProcedures w =
conwayEraOnwardsConstraints w
$ ShelleyApi.VotingProcedures <$> Q.arbitrary
$ Api.TxVotingProcedures <$> Q.arbitrary <*> return (BuildTxWith mempty)
8 changes: 4 additions & 4 deletions cardano-api/internal/Cardano/Api/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ import Cardano.Api.Utils

import qualified Cardano.Chain.Common as Byron
import qualified Cardano.Ledger.Address as Shelley
import qualified Cardano.Ledger.Alonzo.Plutus.TxInfo as Plutus
import qualified Cardano.Ledger.BaseTypes as Shelley
import qualified Cardano.Ledger.Credential as Shelley
import Cardano.Ledger.Crypto (StandardCrypto)
import qualified Cardano.Ledger.Plutus.TxInfo as Plutus
import qualified PlutusLedgerApi.V1 as PlutusAPI

import Control.Applicative ((<|>))
Expand Down Expand Up @@ -224,7 +224,7 @@ instance SerialiseAsRawBytes (Address ByronAddr) where
$ addr

deserialiseFromRawBytes (AsAddress AsByronAddr) bs =
case Shelley.deserialiseAddr bs :: Maybe (Shelley.Addr StandardCrypto) of
case Shelley.decodeAddr bs :: Maybe (Shelley.Addr StandardCrypto) of
Nothing -> Left (SerialiseAsRawBytesError "Unable to deserialise Address ByronAddr")
Just Shelley.Addr{} -> Left (SerialiseAsRawBytesError "Unable to deserialise Address ByronAddr")
Just (Shelley.AddrBootstrap (Shelley.BootstrapAddress addr)) ->
Expand All @@ -235,7 +235,7 @@ instance SerialiseAsRawBytes (Address ShelleyAddr) where
Shelley.serialiseAddr (Shelley.Addr nw pc scr)

deserialiseFromRawBytes (AsAddress AsShelleyAddr) bs =
case Shelley.deserialiseAddr bs of
case Shelley.decodeAddr bs of
Nothing -> Left (SerialiseAsRawBytesError "Unable to deserialise bootstrap Address ShelleyAddr")
Just Shelley.AddrBootstrap{} -> Left (SerialiseAsRawBytesError "Unable to deserialise bootstrap Address ShelleyAddr")
Just (Shelley.Addr nw pc scr) -> Right (ShelleyAddress nw pc scr)
Expand Down Expand Up @@ -330,7 +330,7 @@ instance SerialiseAsRawBytes AddressAny where
serialiseToRawBytes (AddressShelley addr) = serialiseToRawBytes addr

deserialiseFromRawBytes AsAddressAny bs =
case Shelley.deserialiseAddr bs of
case Shelley.decodeAddr bs of
Nothing -> Left (SerialiseAsRawBytesError "Unable to deserialise AddressAny")
Just (Shelley.AddrBootstrap (Shelley.BootstrapAddress addr)) ->
Right (AddressByron (ByronAddress addr))
Expand Down
2 changes: 1 addition & 1 deletion cardano-api/internal/Cardano/Api/Block.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import Cardano.Api.Keys.Shelley
import Cardano.Api.Modes
import Cardano.Api.SerialiseRaw
import Cardano.Api.SerialiseUsing
import Cardano.Api.Tx
import Cardano.Api.Tx.Sign

import qualified Cardano.Crypto.Hash.Class as Crypto
import qualified Cardano.Crypto.Hashing
Expand Down
15 changes: 9 additions & 6 deletions cardano-api/internal/Cardano/Api/Certificate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE ScopedTypeVariables #-}
Expand Down Expand Up @@ -91,12 +90,14 @@ import Cardano.Api.Utils (noInlineMaybeToStrictMaybe)
import Cardano.Api.Value

import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.Foldable as Foldable
import Data.IP (IPv4, IPv6)
import Data.Maybe
import qualified Data.Sequence.Strict as Seq
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.Encoding as Text
import Data.Typeable
import Network.Socket (PortNumber)
Expand Down Expand Up @@ -632,13 +633,15 @@ toShelleyPoolParams StakePoolParameters {
}

toShelleyDnsName :: ByteString -> Ledger.DnsName
toShelleyDnsName = fromMaybe (error "toShelleyDnsName: invalid dns name. TODO: proper validation")
. Ledger.textToDns
. Text.decodeLatin1
toShelleyDnsName name =
fromMaybe (error "toShelleyDnsName: invalid dns name. TODO: proper validation")
. Ledger.textToDns (BS.length name)
$ Text.decodeLatin1 name

toShelleyUrl :: Text -> Ledger.Url
toShelleyUrl = fromMaybe (error "toShelleyUrl: invalid url. TODO: proper validation")
. Ledger.textToUrl
toShelleyUrl url =
fromMaybe (error "toShelleyUrl: invalid url. TODO: proper validation")
$ Ledger.textToUrl (Text.length url) url


fromShelleyPoolParams :: Ledger.PoolParams StandardCrypto
Expand Down
6 changes: 3 additions & 3 deletions cardano-api/internal/Cardano/Api/Convenience/Construction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import Cardano.Api.Eon.ShelleyBasedEra
import Cardano.Api.Fees
import Cardano.Api.ProtocolParameters
import Cardano.Api.Query
import Cardano.Api.Tx
import Cardano.Api.TxBody
import Cardano.Api.Tx.Body
import Cardano.Api.Tx.Sign
import Cardano.Api.Utils
import Cardano.Api.Value

Expand Down Expand Up @@ -54,7 +54,7 @@ constructBalancedTx :: ()
-> Map.Map StakeCredential Lovelace
-> Map.Map (L.Credential L.DRepRole L.StandardCrypto) Lovelace
-> [ShelleyWitnessSigningKey]
-> Either TxBodyErrorAutoBalance (Tx era)
-> Either (TxBodyErrorAutoBalance era) (Tx era)
constructBalancedTx sbe txbodcontent changeAddr mOverrideWits utxo lpp
ledgerEpochInfo systemStart stakePools
stakeDelegDeposits drepDelegDeposits shelleyWitSigningKeys = do
Expand Down
7 changes: 4 additions & 3 deletions cardano-api/internal/Cardano/Api/Convenience/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Cardano.Api.NetworkId
import Cardano.Api.ProtocolParameters
import Cardano.Api.Query
import Cardano.Api.Query.Expr
import Cardano.Api.TxBody
import Cardano.Api.Tx.Body
import Cardano.Api.Utils
import Cardano.Api.Value

Expand All @@ -35,6 +35,7 @@ import Cardano.Ledger.CertState (DRepState (..))
import qualified Cardano.Ledger.Credential as L
import qualified Cardano.Ledger.Keys as L
import Ouroboros.Consensus.HardFork.Combinator.AcrossEras (EraMismatch (..))
import Ouroboros.Network.Protocol.LocalStateQuery.Type (Target (..))

import Control.Monad.Trans (MonadTrans (..))
import Control.Monad.Trans.Except (ExceptT (..), runExceptT)
Expand Down Expand Up @@ -130,7 +131,7 @@ determineEra :: ()
=> LocalNodeConnectInfo
-> IO (Either AcquiringFailure AnyCardanoEra)
determineEra localNodeConnInfo =
queryNodeLocalState localNodeConnInfo Nothing QueryCurrentEra
queryNodeLocalState localNodeConnInfo VolatileTip QueryCurrentEra

-- | Execute a query against the local node. The local
-- node must be in CardanoMode.
Expand All @@ -155,6 +156,6 @@ executeQueryAnyMode :: forall result. ()
-> QueryInMode (Either EraMismatch result)
-> IO (Either QueryConvenienceError result)
executeQueryAnyMode localNodeConnInfo q = runExceptT $ do
lift (queryNodeLocalState localNodeConnInfo Nothing q)
lift (queryNodeLocalState localNodeConnInfo VolatileTip q)
& onLeft (left . AcqFailure)
& onLeft (left . QueryEraMismatch)
Loading
Loading