Skip to content

Commit f75e8d0

Browse files
committed
Update SRPs and fix compilation against new cardano-api/ledger/cli/consensus
* Update ouroboros-consensus SRP to koslambrou/leios-prototype branch * Update cardano-ledger SRP to koslambrou/add-leioskey-stakepoolparams branch * Update cardano-api SRP to koslambrou/ch1bo-palas/key-registration branch * Update cardano-cli SRP to koslambrou/ch1bo-palas/key-registration branch * Add inputMap in nix/haskell.nix for ouroboros-consensus to fetch submodules * Lower version bounds across .cabal files to match SRP versions * Add allow-newer for cardano-cli (tight upper bounds) * Fix SomeConsensusProtocol to carry SomeHasFS IO * Fix ProtocolInfoArgs* constructors * Fix foldEpochState/foldBlocks * Remove removed TraceRpcEvalTx* constructors from Rpc tracing * Fix Certificate ambiguity in DRep.hs (now exported from Cardano.Api) * Remove redundant Experimental.Certificate imports
1 parent 7b8a9e2 commit f75e8d0

33 files changed

Lines changed: 93 additions & 95 deletions

File tree

.github/workflows/haskell.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ jobs:
106106
with:
107107
persist-credentials: false
108108

109+
- name: Enable git long paths (Windows)
110+
if: runner.os == 'Windows'
111+
run: git config --global core.longpaths true
112+
109113
- name: Cache and install Cabal dependencies
110114
uses: input-output-hk/cardano-dev/actions/cabal-cache@e811e25d3927d62ba87f1762ea51c36e65f0b09a # cabal-cache-0.0.1.0
111115
with:

bench/plutus-scripts-bench/plutus-scripts-bench.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ library
8282
-- IOG dependencies
8383
--------------------------
8484
build-depends:
85-
, cardano-api ^>=11.3
85+
, cardano-api ^>=11.0
8686
, plutus-ledger-api ^>=1.65
8787
, plutus-tx ^>=1.65
8888
, plutus-tx-plugin ^>=1.65

bench/tx-generator/src/Cardano/Benchmarking/OuroborosImports.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import Prelude
3939
type CardanoBlock = Consensus.CardanoBlock StandardCrypto
4040

4141
toProtocolInfo :: SomeConsensusProtocol -> IO (ProtocolInfo CardanoBlock)
42-
toProtocolInfo (SomeConsensusProtocol CardanoBlockType info) = fst <$> protocolInfo @IO info
42+
toProtocolInfo (SomeConsensusProtocol CardanoBlockType fs info) = fst <$> protocolInfo @IO fs info
4343
toProtocolInfo _ = error "toProtocolInfo unknown protocol"
4444

4545
protocolToTopLevelConfig :: SomeConsensusProtocol -> IO (TopLevelConfig CardanoBlock)

bench/tx-generator/src/Cardano/TxGenerator/Setup/NodeConfig.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ import Data.Monoid
3131
-- NB. this helper is *only* for protocols created with this module
3232
-- as this guarantees proper error handling when trying to create a non-Cardano protocol.
3333
getGenesis :: SomeConsensusProtocol -> ShelleyGenesis
34-
getGenesis (SomeConsensusProtocol CardanoBlockType proto)
34+
getGenesis (SomeConsensusProtocol CardanoBlockType _ proto)
3535
= getConst $ Ledger.tcShelleyGenesisL Const transCfg
3636
where
37-
ProtocolInfoArgsCardano _ Consensus.CardanoProtocolParams
37+
ProtocolInfoArgsCardano Consensus.CardanoProtocolParams
3838
{ Consensus.cardanoLedgerTransitionConfig = transCfg
3939
} = proto
4040

bench/tx-generator/tx-generator.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ library
109109
, attoparsec-aeson
110110
, base16-bytestring
111111
, bytestring
112-
, cardano-api ^>= 11.3
112+
, cardano-api ^>= 11.0
113113
, cardano-binary
114-
, cardano-cli ^>= 11.1
114+
, cardano-cli ^>= 11.0
115115
, cardano-crypto-class
116116
, cardano-data
117117
, cardano-diffusion ^>= 1.0

cabal.project

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ package plutus-scripts-bench
7979
allow-newer:
8080
, io-sim:time
8181
, io-classes:time
82+
-- cardano-cli/koslambrou/ch1bo-palas/key-registration has tight upper bounds
83+
-- incompatible with the leios-prototype stack versions
84+
, cardano-cli:*
8285

8386
-- IMPORTANT
8487
-- Do NOT add more source-repository-package stanzas here unless they are strictly
@@ -91,29 +94,34 @@ source-repository-package
9194
tag: b71bd2c89d576d8112a0748adf3b890475f9d170
9295
--sha256: sha256-tIjrQkEkS79FdYarjV5Dy+U/Q7kIkOXjdFcddkwA3Us=
9396

94-
-- Points to ouroboros-ledger/leios-prototype
97+
-- Points to cardano-ledger/leios-prototype
9598
source-repository-package
9699
type: git
97100
location: https://github.com/IntersectMBO/cardano-ledger
98-
tag: 9edd1c664054803348e5f9edfa13529e4e844284
99-
--sha256: sha256-TkgeO5d1p18VwTMtuNY8SsPZXXyn1HIrZBZ4IHVTWuE=
101+
tag: fb8d6f8a83b0efb86281e0b80e7ffba160dad8b1
102+
--sha256: sha256-U/vpyZNerL1YXiQg1TIAOL5L438NNE3XkuIYD0HPTJw=
100103
subdir:
101-
libs/cardano-data
102-
libs/cardano-ledger-api
103-
libs/small-steps
104-
libs/cardano-ledger-binary
105-
libs/cardano-ledger-core
106-
libs/cardano-protocol-tpraos
107-
eras/shelley/impl
108-
eras/shelley/test-suite
109-
eras/shelley-ma/test-suite
110-
eras/mary/impl
111104
eras/allegra/impl
112105
eras/alonzo/impl
113-
eras/alonzo/test-suite
114106
eras/babbage/impl
107+
eras/byron/chain/executable-spec
108+
eras/byron/crypto
109+
eras/byron/ledger/executable-spec
110+
eras/byron/ledger/impl
115111
eras/conway/impl
116112
eras/dijkstra/impl
113+
eras/mary/impl
114+
eras/shelley-ma/test-suite
115+
eras/shelley/impl
116+
eras/shelley/test-suite
117+
libs/cardano-data
118+
libs/cardano-ledger-api
119+
libs/cardano-ledger-binary
120+
libs/cardano-ledger-core
121+
libs/cardano-protocol-tpraos
122+
libs/non-integral
123+
libs/small-steps
124+
libs/vector-map
117125

118126
-- Points to ouroboros-network/leios-prototype
119127
source-repository-package
@@ -126,23 +134,23 @@ source-repository-package
126134
cardano-diffusion
127135
network-mux
128136

129-
-- Points to cardano-api/leios-prototype
137+
-- Points to cardano-api/ch1bo-palas/key-registration
130138
source-repository-package
131139
type: git
132-
location: https://github.com/IntersectMBO/cardano-api
133-
tag: 28e2f4f085eceee4cb63c3eb9103a80e3852ce7a
134-
--sha256: sha256-9Wugp6Cd+ERSc8kfIUDFbq3QjuhIr1gu6rRSV3Yo/9M=
140+
location: https://github.com/input-output-hk/cardano-api
141+
tag: 6bd3d265aac5a968f966cdcfd2896331b53389f1
142+
--sha256: sha256-3HC8nie+gC/sxWnXuoNOXpEvBAIq8enns1LJbIp1sCQ=
135143
subdir:
136144
cardano-api
137145
cardano-api-gen
138146
cardano-rpc
139147

140-
-- Points to cardano-cli/leios-prototype
148+
-- Points to cardano-cli/koslambrou/ch1bo-palas/key-registration
141149
source-repository-package
142150
type: git
143151
location: https://github.com/IntersectMBO/cardano-cli
144-
tag: 97a1258f9654478dff6c7e7497fcc693213b1a36
145-
--sha256: sha256-e2mxwfy2pN3itQIx0+1j2XV7JTNKckIpfzaN6rOtZn0=
152+
tag: 56c3d72a1d8df6b632a06e79849ed44bac8b0c59
153+
--sha256: sha256-r7SnGBTKcQuEYW4Jh9FW5aaxr+bKbCD+t20Gf6d6iRM=
146154
subdir:
147155
cardano-cli
148156

cardano-node-chairman/app/Cardano/Chairman/Commands/Run.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ run RunOpts
114114
Right p -> pure p
115115

116116
(k , nId) <- case p of
117-
SomeConsensusProtocol _ runP -> do
118-
ProtocolInfo { pInfoConfig } <- fst <$> Api.protocolInfo @IO runP
117+
SomeConsensusProtocol _ fs runP -> do
118+
ProtocolInfo { pInfoConfig } <- fst <$> Api.protocolInfo @IO fs runP
119119
pure ( Consensus.configSecurityParam pInfoConfig
120120
, fromNetworkMagic . getNetworkMagic $ Consensus.configBlock pInfoConfig
121121
)

cardano-node-chairman/cardano-node-chairman.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ test-suite chairman-tests
8686
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"
8787

8888
build-tool-depends: cardano-node:cardano-node
89-
, cardano-cli:cardano-cli ^>= 11.1
89+
, cardano-cli:cardano-cli ^>= 11.0
9090
, cardano-node-chairman:cardano-node-chairman

cardano-node/cardano-node.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ library
124124
, async
125125
, base16-bytestring
126126
, bytestring
127-
, cardano-api ^>= 11.3
127+
, cardano-api ^>= 11.0
128128
, cardano-data
129129
, cardano-crypto-class ^>=2.5
130130
, cardano-crypto-wrapper
@@ -142,7 +142,7 @@ library
142142
, cardano-prelude
143143
, cardano-protocol-tpraos >= 1.4
144144
, cardano-slotting >= 0.2
145-
, cardano-rpc ^>= 11.0
145+
, cardano-rpc ^>= 10.2
146146
, cborg ^>= 0.2.4
147147
, containers
148148
, contra-tracer >= 0.2.1

cardano-node/src/Cardano/Node/Protocol/Byron.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ import Ouroboros.Consensus.HardFork.Combinator.AcrossEras ()
3838
import Control.Exception
3939
import qualified Data.ByteString.Lazy as LB
4040
import Data.Maybe (fromMaybe)
41+
import System.FS.API (SomeHasFS (..))
42+
import System.FS.API.Types (MountPoint (MountPoint))
43+
import System.FS.IO (ioHasFS)
4144

4245
------------------------------------------------------------------------------
4346
-- Byron protocol
@@ -70,7 +73,7 @@ mkSomeConsensusProtocolByron NodeByronProtocolConfiguration {
7073

7174
optionalLeaderCredentials <- readLeaderCredentials genesisConfig files
7275

73-
return $ SomeConsensusProtocol ByronBlockType $ ProtocolInfoArgsByron $ Consensus.ProtocolParamsByron {
76+
return $ SomeConsensusProtocol ByronBlockType (SomeHasFS $ ioHasFS $ MountPoint ".") $ ProtocolInfoArgsByron $ Consensus.ProtocolParamsByron {
7477
byronGenesis = genesisConfig,
7578
byronPbftSignatureThreshold =
7679
PBftSignatureThreshold <$> npcByronPbftSignatureThresh,

0 commit comments

Comments
 (0)