@@ -20,7 +20,7 @@ module Cardano.Ledger.Conway.Translation (
2020import Cardano.Ledger.Address (addrPtrNormalize )
2121import Cardano.Ledger.Babbage (BabbageEra )
2222import Cardano.Ledger.Binary (DecoderError )
23- import Cardano.Ledger.CertState (CommitteeState (.. ), upgradeCertState )
23+ import Cardano.Ledger.CertState (EraCertState (.. ))
2424import Cardano.Ledger.Conway.CertState ()
2525import Cardano.Ledger.Conway.Core hiding (Tx )
2626import Cardano.Ledger.Conway.Era (ConwayEra )
@@ -46,12 +46,12 @@ import Cardano.Ledger.Shelley.API (
4646 PState (.. ),
4747 StrictMaybe (.. ),
4848 UTxOState (.. ),
49- VState (.. ),
5049 )
5150import qualified Cardano.Ledger.Shelley.API as API
52- import Cardano.Ledger.Shelley.CertState (ShelleyCertState )
51+ import Cardano.Ledger.Shelley.CertState (ShelleyCertState ( .. ) )
5352import Cardano.Ledger.Shelley.LedgerState (
5453 epochStateGovStateL ,
54+ lsCertStateL ,
5555 )
5656import qualified Cardano.Ledger.UMap as UM
5757import Data.Default (Default (def ))
@@ -147,26 +147,20 @@ instance TranslateEra ConwayEra DState where
147147 , UM. umPtrs = mempty
148148 }
149149
150- instance TranslateEra ConwayEra CommitteeState where
151- translateEra _ CommitteeState {.. } = pure CommitteeState {.. }
152-
153- instance TranslateEra ConwayEra VState where
154- translateEra ctx VState {.. } = do
155- committeeState <- translateEra ctx vsCommitteeState
156- pure VState {vsCommitteeState = committeeState, .. }
157-
158150instance TranslateEra ConwayEra PState where
159151 translateEra _ PState {.. } = pure PState {.. }
160152
161- instance TranslateEra ConwayEra ShelleyCertState where
162- translateEra ConwayGenesis {} = pure . upgradeCertState
163-
164153instance TranslateEra ConwayEra API. LedgerState where
165154 translateEra conwayGenesis ls =
166155 pure
167156 API. LedgerState
168157 { API. lsUTxOState = translateEra' conwayGenesis $ API. lsUTxOState ls
169- , API. lsCertState = translateEra' conwayGenesis $ API. lsCertState ls
158+ , API. lsCertState =
159+ ShelleyCertState
160+ { shelleyCertDState = translateEra' conwayGenesis (ls ^. lsCertStateL . certDStateL)
161+ , shelleyCertPState = translateEra' conwayGenesis (ls ^. lsCertStateL . certPStateL)
162+ , shelleyCertVState = def
163+ }
170164 }
171165
172166translateGovState ::
0 commit comments