Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .changes/pin-cardano-keys-extraction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project: cardano-cli
pr: 1444
kind:
- maintenance
description: |
Pinned the cardano-keys extraction (IntersectMBO/cardano-keys#4) and its cardano-api adoption (IntersectMBO/cardano-api#1332) as temporary source-repository-packages, and adapted to the two API changes: `getKesPeriod` returns `KESPeriod` instead of `Word`, and `textEnvelopeType` is a free function rather than a class method.
2 changes: 2 additions & 0 deletions .github/master-check-exceptions.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/IntersectMBO/cardano-keys
https://github.com/IntersectMBO/cardano-api
Comment thread
palas marked this conversation as resolved.
9 changes: 9 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ jobs:

- uses: actions/checkout@v6

# Git for Windows refuses paths longer than 260 characters unless
# core.longpaths is set; cabal clones source-repository-packages into
# dist-newstyle/src/<name>-<hash>/, deep enough for the pinned
# cardano-api's golden files to exceed the limit. Drop once
# input-output-hk/actions#44 ships this in the base action.
- name: Enable long file paths for Git on Windows
if: ${{ matrix.sys.os == 'windows-latest' }}
run: git config --system core.longpaths true

- name: Cache and install Cabal dependencies
uses: input-output-hk/cardano-dev/actions/cabal-cache@cabal-cache-0.0.1.0
with:
Expand Down
22 changes: 22 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,28 @@ semaphore: True
-- Always write GHC env files, because they are needed for ghci.
write-ghc-environment-files: always

-- Temporary, until the cardano-keys extraction lands in CHaP: the key layer
-- extracted from cardano-api (IntersectMBO/cardano-keys#4) and the cardano-api
-- change that adopts it (IntersectMBO/cardano-api#1332).
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-keys
tag: df20ae67e89920fdc65cd3c30a720dbcbf9e5344
subdir: cardano-keys
--sha256: sha256-TILlrhcfUOgVkrG5vi6QL8sjTaFvBKJIrnPvURG94A4=

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api
tag: a6fec2be2c931a8ebaeeb4ee934cc67c144eb29c
subdir: cardano-api
--sha256: sha256-Ox31/CCDgmHjLQDhJR9wG3DpRncZ331yp5v2pb7p/9k=

Comment thread
palas marked this conversation as resolved.
constraints:
-- cardano-crypto-class caps crypton below 1.1; without this the GHC 9.14
-- solver greedily picks crypton 1.1.4 and cannot resolve the plan.
, crypton < 1.1

-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.
Expand Down
3 changes: 2 additions & 1 deletion cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import Cardano.Ledger.Address qualified as L
import Cardano.Ledger.Api.State.Query qualified as L
import Cardano.Ledger.Api.Tx qualified as L
import Cardano.Ledger.Conway.State (ChainAccountState (..))
import Cardano.Protocol.TPraos.OCert (unKESPeriod)
import Cardano.Slotting.EpochInfo (EpochInfo (..), epochInfoSlotToUTCTime, hoistEpochInfo)
import Cardano.Slotting.Time (RelativeTime (..), toRelativeTime)

Expand Down Expand Up @@ -427,7 +428,7 @@ runQueryKesPeriodInfoCmd
in CurrentKesPeriod $ unSlotNo currSlot `div` slotsPerKesPeriod

opCertStartingKesPeriod :: OperationalCertificate -> OpCertStartingKesPeriod
opCertStartingKesPeriod = OpCertStartingKesPeriod . fromIntegral . getKesPeriod
opCertStartingKesPeriod = OpCertStartingKesPeriod . fromIntegral . unKESPeriod . getKesPeriod

opCertEndKesPeriod :: GenesisParameters era -> OperationalCertificate -> OpCertEndingKesPeriod
opCertEndKesPeriod gParams oCert =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Test.Golden.Shelley.TextEnvelope.Certificates.Operational where

import Cardano.Api (HasTextEnvelope (..))
import Cardano.Api (textEnvelopeType)
import Cardano.Api.Experimental.Certificate (AsType (AsOperationalCertificate))

import Control.Monad (void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.ExtendedPaymentKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)
import Text.Regex.TDFA ((=~))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.GenesisDelegateKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)
import Cardano.Api.Experimental.Certificate (AsType (AsOperationalCertificateIssueCounter))

import Control.Monad (void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.GenesisKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.GenesisUTxOKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.KESKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)
import Text.Regex.TDFA ((=~))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.PaymentKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)
import Text.Regex.TDFA ((=~))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.StakeKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)
import Text.Regex.TDFA ((=~))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Test.Golden.Shelley.TextEnvelope.Keys.VRFKeys where

import Cardano.Api (AsType (..), HasTextEnvelope (..))
import Cardano.Api (AsType (..), textEnvelopeType)

import Control.Monad (void)
import Text.Regex.TDFA ((=~))
Expand Down
Loading