Skip to content

Commit 7b6a78e

Browse files
committed
Integrate latest ledger
1 parent fadec9f commit 7b6a78e

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
@@ -62,6 +62,7 @@ source-repository-package
6262
type: git
6363
location: https://github.com/IntersectMBO/cardano-ledger
6464
tag: d48965e0dc1a324f432f1ee01bc0cf2d60a8a702
65+
--sha256: sha256-UFIQ1qinge1TMtqU2e0Nyjdpj42yj+lLKrpnXeqo1mI=
6566
subdir:
6667
eras/allegra/impl
6768
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)
@@ -170,7 +171,7 @@ class ( Core.EraSegWits era
170171
getConwayEraGovDict :: proxy era -> Maybe (ConwayEraGovDict era)
171172

172173
data ConwayEraGovDict era where
173-
ConwayEraGovDict :: CG.ConwayEraGov era => ConwayEraGovDict era
174+
ConwayEraGovDict :: (ConwayEraCertState era, CG.ConwayEraGov era) => ConwayEraGovDict era
174175

175176
isBeforeConway :: forall era. L.Era era => Proxy era -> Bool
176177
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
@@ -586,7 +586,7 @@ applyHelper f cfg blk stBefore = do
586586
-- means the value must not be serialized. We're only passing it to
587587
-- 'STS.applyBlockOpts', which does not serialize it. So this is a
588588
-- safe use.
589-
in SL.UnsafeUnserialisedBlock h' (SL.bbody b)
589+
in SL.Block h' (SL.bbody b)
590590
)
591591

592592
let track ::

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
@@ -47,20 +47,20 @@ import Cardano.Binary (FromCBOR (..), ToCBOR (..), encodeListLen,
4747
enforceSize)
4848
import Cardano.Ledger.Address
4949
import qualified Cardano.Ledger.Api.State.Query as SL
50-
import Cardano.Ledger.CertState (lookupDepositDState)
51-
import qualified Cardano.Ledger.CertState as SL
50+
import Cardano.Ledger.State (lookupDepositDState)
51+
import qualified Cardano.Ledger.State as SL
5252
import Cardano.Ledger.Coin (Coin)
5353
import Cardano.Ledger.Compactible (Compactible (fromCompact))
5454
import qualified Cardano.Ledger.Conway.Governance as CG
5555
import qualified Cardano.Ledger.Core as SL
56+
import Cardano.Ledger.Conway.State (ConwayEraCertState)
5657
import Cardano.Ledger.Credential (StakeCredential)
5758
import Cardano.Ledger.Keys (KeyHash, KeyRole (..))
5859
import qualified Cardano.Ledger.Shelley.API as SL
5960
import qualified Cardano.Ledger.Shelley.Core as LC
6061
import Cardano.Ledger.Shelley.LedgerState (AccountState)
6162
import qualified Cardano.Ledger.Shelley.RewardProvenance as SL
6263
(RewardProvenance)
63-
import qualified Cardano.Ledger.State as SL
6464
import Cardano.Ledger.UMap (UMap (..), rdReward, umElemDRep,
6565
umElemRDPair, umElemSPool)
6666
import Cardano.Protocol.Crypto (Crypto)
@@ -266,7 +266,7 @@ data instance BlockQuery (ShelleyBlock proto era) fp result where
266266
--
267267
-- Not supported in eras before Conway.
268268
GetDRepState
269-
:: CG.ConwayEraGov era
269+
:: (ConwayEraCertState era, CG.ConwayEraGov era)
270270
=> Set (SL.Credential 'DRepRole)
271271
-> BlockQuery (ShelleyBlock proto era)
272272
QFNoTables
@@ -292,7 +292,7 @@ data instance BlockQuery (ShelleyBlock proto era) fp result where
292292
--
293293
-- Not supported in eras before Conway.
294294
GetCommitteeMembersState
295-
:: CG.ConwayEraGov era
295+
:: (ConwayEraCertState era, CG.ConwayEraGov era)
296296
=> Set (SL.Credential 'ColdCommitteeRole)
297297
-> Set (SL.Credential 'HotCommitteeRole)
298298
-> Set SL.MemberStatus
@@ -899,7 +899,7 @@ decodeShelleyQuery = do
899899

900900
requireCG ::
901901
forall s ans.
902-
(CG.ConwayEraGov era => Decoder s ans)
902+
((ConwayEraCertState era, CG.ConwayEraGov era) => Decoder s ans)
903903
-> Decoder s ans
904904
requireCG k = case SE.getConwayEraGovDict (Proxy @era) of
905905
Just SE.ConwayEraGovDict -> k

0 commit comments

Comments
 (0)