Skip to content

Commit ff9531e

Browse files
committed
Integrate latest ledger
1 parent c3c162b commit ff9531e

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ source-repository-package
7777
type: git
7878
location: https://github.com/IntersectMBO/cardano-ledger
7979
tag: d48965e0dc1a324f432f1ee01bc0cf2d60a8a702
80+
--sha256: sha256-UFIQ1qinge1TMtqU2e0Nyjdpj42yj+lLKrpnXeqo1mI=
8081
subdir:
8182
eras/allegra/impl
8283
eras/alonzo/impl

ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Eras.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import qualified Cardano.Ledger.Conway.Governance as CG
5757
import qualified Cardano.Ledger.Conway.Rules as Conway
5858
import qualified Cardano.Ledger.Conway.Rules as SL
5959
(ConwayLedgerPredFailure (..))
60+
import Cardano.Ledger.Conway.State
6061
import qualified Cardano.Ledger.Conway.Translation as Conway
6162
import Cardano.Ledger.Core as Core
6263
import Cardano.Ledger.Mary (MaryEra)
@@ -171,7 +172,7 @@ class ( Core.EraSegWits era
171172
getConwayEraGovDict :: proxy era -> Maybe (ConwayEraGovDict era)
172173

173174
data ConwayEraGovDict era where
174-
ConwayEraGovDict :: CG.ConwayEraGov era => ConwayEraGovDict era
175+
ConwayEraGovDict :: (ConwayEraCertState era, CG.ConwayEraGov era) => ConwayEraGovDict era
175176

176177
isBeforeConway :: forall era. L.Era era => Proxy era -> Bool
177178
isBeforeConway _ =

ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/Ledger.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ applyHelper f cfg blk TickedShelleyLedgerState{
413413
-- means the value must not be serialized. We're only passing it to
414414
-- 'STS.applyBlockOpts', which does not serialize it. So this is a
415415
-- safe use.
416-
in SL.UnsafeUnserialisedBlock h' (SL.bbody b)
416+
in SL.Block h' (SL.bbody b)
417417
)
418418

419419
return $ ledgerResult <&> \newNewEpochState -> ShelleyLedgerState {

ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/Query.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ module Ouroboros.Consensus.Shelley.Ledger.Query (
3434
import Cardano.Binary (FromCBOR (..), ToCBOR (..), encodeListLen,
3535
enforceSize)
3636
import qualified Cardano.Ledger.Api.State.Query as SL
37-
import Cardano.Ledger.CertState (lookupDepositDState)
38-
import qualified Cardano.Ledger.CertState as SL
37+
import Cardano.Ledger.State (lookupDepositDState)
38+
import qualified Cardano.Ledger.State as SL
3939
import Cardano.Ledger.Coin (Coin)
4040
import Cardano.Ledger.Compactible (Compactible (fromCompact))
4141
import qualified Cardano.Ledger.Conway.Governance as CG
42+
import Cardano.Ledger.Conway.State (ConwayEraCertState)
4243
import Cardano.Ledger.Credential (StakeCredential)
4344
import Cardano.Ledger.Keys (KeyHash, KeyRole (..))
4445
import qualified Cardano.Ledger.Shelley.API as SL
4546
import qualified Cardano.Ledger.Shelley.Core as LC
4647
import Cardano.Ledger.Shelley.LedgerState (AccountState)
4748
import qualified Cardano.Ledger.Shelley.RewardProvenance as SL
4849
(RewardProvenance)
49-
import qualified Cardano.Ledger.State as SL
5050
import Cardano.Ledger.UMap (UMap (..), rdReward, umElemDRep,
5151
umElemRDPair, umElemSPool)
5252
import Cardano.Protocol.Crypto (Crypto)
@@ -246,7 +246,7 @@ data instance BlockQuery (ShelleyBlock proto era) :: Type -> Type where
246246
--
247247
-- Not supported in eras before Conway.
248248
GetDRepState
249-
:: CG.ConwayEraGov era
249+
:: (ConwayEraCertState era, CG.ConwayEraGov era)
250250
=> Set (SL.Credential 'DRepRole)
251251
-> BlockQuery (ShelleyBlock proto era)
252252
(Map
@@ -271,7 +271,7 @@ data instance BlockQuery (ShelleyBlock proto era) :: Type -> Type where
271271
--
272272
-- Not supported in eras before Conway.
273273
GetCommitteeMembersState
274-
:: CG.ConwayEraGov era
274+
:: (ConwayEraCertState era, CG.ConwayEraGov era)
275275
=> Set (SL.Credential 'ColdCommitteeRole)
276276
-> Set (SL.Credential 'HotCommitteeRole)
277277
-> Set SL.MemberStatus
@@ -882,7 +882,7 @@ decodeShelleyQuery = do
882882

883883
requireCG ::
884884
forall s ans.
885-
(CG.ConwayEraGov era => Decoder s ans)
885+
((ConwayEraCertState era, CG.ConwayEraGov era) => Decoder s ans)
886886
-> Decoder s ans
887887
requireCG k = case SE.getConwayEraGovDict (Proxy @era) of
888888
Just SE.ConwayEraGovDict -> k

0 commit comments

Comments
 (0)