Skip to content

Commit

Permalink
Merge pull request #643 from IntersectMBO/lehins/use-new-ledger-and-c…
Browse files Browse the repository at this point in the history
…onsensus

Node 10.0 integration
  • Loading branch information
smelc authored Oct 16, 2024
2 parents 07e859c + 59cc089 commit 26fb32d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 36 deletions.
8 changes: 6 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-08-15T08:53:32Z
, cardano-haskell-packages 2024-09-03T00:18:11Z
, hackage.haskell.org 2024-10-10T08:11:33Z
, cardano-haskell-packages 2024-10-14T23:19:53Z

packages:
cardano-api
Expand Down Expand Up @@ -48,3 +48,7 @@ write-ghc-environment-files: always
-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

constraints:
Cabal < 3.14,
cardano-ledger-shelley ^>= 1.14.1
20 changes: 10 additions & 10 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ library internal
cardano-ledger-alonzo >=1.10.2,
cardano-ledger-api ^>=1.9.3,
cardano-ledger-babbage >=1.9,
cardano-ledger-binary ^>=1.3,
cardano-ledger-binary >=1.3,
cardano-ledger-byron >=1.0.1,
cardano-ledger-conway >=1.16,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
Expand All @@ -198,19 +198,19 @@ library internal
microlens-aeson,
mtl,
network,
ouroboros-consensus ^>=0.20,
ouroboros-consensus-cardano ^>=0.19,
ouroboros-consensus-diffusion ^>=0.17,
ouroboros-consensus-protocol ^>=0.9.0.1,
ouroboros-consensus ^>=0.21,
ouroboros-consensus-cardano ^>=0.20,
ouroboros-consensus-diffusion ^>=0.18,
ouroboros-consensus-protocol ^>=0.9.0.2,
ouroboros-network,
ouroboros-network-api ^>=0.9,
ouroboros-network-api ^>=0.10,
ouroboros-network-framework,
ouroboros-network-protocols,
parsec,
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.32,
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.36,
prettyprinter,
prettyprinter-ansi-terminal,
prettyprinter-configurable ^>=1.32.1,
prettyprinter-configurable ^>=1.36,
random,
safe-exceptions,
scientific,
Expand Down Expand Up @@ -400,8 +400,8 @@ test-suite cardano-api-golden
hedgehog-extras ^>=0.6.1.0,
microlens,
parsec,
plutus-core ^>=1.32,
plutus-ledger-api ^>=1.32,
plutus-core ^>=1.36,
plutus-ledger-api ^>=1.36,
tasty,
tasty-hedgehog,
text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ toLedgerEventConway evt =
case conwayLedgerEvent of
Conway.UtxowEvent utxowEvent -> handleConwayUTxOWEvent utxowEvent
Conway.CertsEvent{} -> Nothing
Conway.MempoolEvent{} -> Nothing
Conway.GovEvent govEvent ->
case govEvent of
Conway.GovNewProposals txid props ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ handleConwayNEWEPOCHEvents conwayNewEpochEvent =
(convertRetiredPoolsMap unclaimedPools)
Conway.SnapEvent _ -> Nothing
Conway.GovInfoEvent{} -> Nothing
Conway.HardForkEvent{} -> Nothing
Conway.TotalAdaPotsEvent _ -> Nothing
9 changes: 4 additions & 5 deletions cardano-api/internal/Cardano/Api/LedgerState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,7 @@ nextEpochEligibleLeadershipSlots sbe sGen serCurrEpochState ptclState poolid (Vr
)
sbe
where
globals = shelleyBasedEraConstraints sbe $ constructGlobals sGen eInfo $ pp ^. Core.ppProtocolVersionL
globals = shelleyBasedEraConstraints sbe $ constructGlobals sGen eInfo

f :: Ledger.ActiveSlotCoeff
f = activeSlotCoeff globals
Expand Down Expand Up @@ -1985,18 +1985,17 @@ currentEpochEligibleLeadershipSlots sbe sGen eInfo pp ptclState poolid (VrfSigni
)
sbe
where
globals = shelleyBasedEraConstraints sbe $ constructGlobals sGen eInfo $ pp ^. Core.ppProtocolVersionL
globals = shelleyBasedEraConstraints sbe $ constructGlobals sGen eInfo

f :: Ledger.ActiveSlotCoeff
f = activeSlotCoeff globals

-- TODO remove me?
constructGlobals
:: ShelleyGenesis Consensus.StandardCrypto
-> EpochInfo (Either Text)
-> Ledger.ProtVer
-> Globals
constructGlobals sGen eInfo (Ledger.ProtVer majorPParamsVer _) =
Ledger.mkShelleyGlobals sGen eInfo majorPParamsVer
constructGlobals = Ledger.mkShelleyGlobals

--------------------------------------------------------------------------

Expand Down
38 changes: 19 additions & 19 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 26fb32d

Please sign in to comment.