Skip to content

Commit 3fba987

Browse files
committed
Bump to node 8.1.1
1 parent 848b874 commit 3fba987

File tree

11 files changed

+35
-52
lines changed

11 files changed

+35
-52
lines changed

cabal.project

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ repository cardano-haskell-packages
1010
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
1111

1212
index-state:
13-
, hackage.haskell.org 2023-04-29T00:00:00Z
14-
, cardano-haskell-packages 2023-04-30T00:28:07Z
13+
, hackage.haskell.org 2023-05-10T10:34:57Z
14+
, cardano-haskell-packages 2023-06-06T08:18:38Z
1515

1616
packages:
1717
cardano-db
@@ -67,11 +67,9 @@ package snap-server
6767
source-repository-package
6868
type: git
6969
location: https://github.com/input-output-hk/cardano-node
70-
tag: 69a117b7be3db0f4ce6d9fc5cd4c16a2a409dcb8
70+
tag: 6f79e5c3ea109a70cd01910368e011635767305a
7171
--sha256: 1yaf3jk6rgmivgi730ljd8sjpdnzasncxnj8ypgzcdshyp1id25q
7272
subdir:
73-
cardano-api
74-
cardano-cli
7573
cardano-git-rev
7674
cardano-node
7775
trace-dispatcher

cardano-chain-gen/cardano-chain-gen.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ test-suite cardano-chain-gen
184184
, base >= 4.14 && < 4.17
185185
, bytestring
186186
, cardano-api
187-
, cardano-cli
188187
, cardano-crypto-class
189188
, cardano-db
190189
, cardano-db-sync

cardano-chain-gen/src/Cardano/Mock/ChainSync/Server.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ runLocalServer iom codecConfig netMagic localDomainSock chainProdState =
223223
blockVersion = fromJust $ Map.lookup version allVersions
224224
in simpleSingletonVersions
225225
version
226-
(NodeToClientVersionData netMagic)
226+
(NodeToClientVersionData netMagic False)
227227
(NTC.responder version $ mkApps state version blockVersion (NTC.defaultCodecs codecConfig blockVersion version))
228228

229229
mkApps ::

cardano-chain-gen/src/Cardano/Mock/Forging/Tx/Generic.hs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Cardano.Ledger.Shelley.LedgerState hiding (LedgerState)
3838
import Cardano.Ledger.Shelley.TxBody
3939
import Cardano.Ledger.Shelley.UTxO
4040
import Cardano.Ledger.TxIn (TxIn (..))
41-
import qualified Cardano.Ledger.UMapCompact as UMap
41+
import qualified Cardano.Ledger.UMap as UMap
4242
import Cardano.Mock.Forging.Tx.Alonzo.ScriptsExamples
4343
import Cardano.Mock.Forging.Types
4444
import Cardano.Prelude hiding (length, (.))
@@ -124,25 +124,25 @@ resolveStakeCreds indx st = case indx of
124124
Map.toList $
125125
UMap.rewView $
126126
dsUnified $
127-
dpsDState $
128-
lsDPState $
127+
certDState $
128+
lsCertState $
129129
esLState $
130130
nesEs $
131131
Consensus.shelleyLedgerState st
132132

133133
poolParams =
134134
psStakePoolParams $
135-
dpsPState $
136-
lsDPState $
135+
certPState $
136+
lsCertState $
137137
esLState $
138138
nesEs $
139139
Consensus.shelleyLedgerState st
140140

141141
delegs = UMap.delView $ dsUnified dstate
142142

143143
dstate =
144-
dpsDState $
145-
lsDPState $
144+
certDState $
145+
lsCertState $
146146
esLState $
147147
nesEs $
148148
Consensus.shelleyLedgerState st
@@ -174,8 +174,8 @@ resolvePool pix st = case pix of
174174
poolParams =
175175
Map.elems $
176176
psStakePoolParams $
177-
dpsPState $
178-
lsDPState $
177+
certPState $
178+
lsCertState $
179179
esLState $
180180
nesEs $
181181
Consensus.shelleyLedgerState st
@@ -187,8 +187,8 @@ allPoolStakeCert st =
187187
poolParms =
188188
Map.elems $
189189
psStakePoolParams $
190-
dpsPState $
191-
lsDPState $
190+
certPState $
191+
lsCertState $
192192
esLState $
193193
nesEs $
194194
Consensus.shelleyLedgerState st

cardano-chain-gen/test/Test/Cardano/Db/Mock/Config.hs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ module Test.Cardano.Db.Mock.Config (
2727
queryDBSync,
2828
recreateDir,
2929
rootTestDir,
30-
setupTestsDir,
3130
stopDBSync,
3231
stopDBSyncIfRunning,
3332
startDBSync,
@@ -38,10 +37,7 @@ module Test.Cardano.Db.Mock.Config (
3837
withFullConfig',
3938
) where
4039

41-
import Cardano.Api (NetworkId (..), NetworkMagic (..))
42-
import Cardano.CLI.Shelley.Commands (GenesisCmd (..))
43-
import qualified Cardano.CLI.Shelley.Commands as CLI
44-
import qualified Cardano.CLI.Shelley.Run.Genesis as CLI
40+
import Cardano.Api (NetworkMagic (..))
4541
import qualified Cardano.Db as Db
4642
import Cardano.DbSync
4743
import Cardano.DbSync.Config
@@ -205,26 +201,6 @@ getPoolLayer env = do
205201
nullTracer
206202
pool
207203

208-
setupTestsDir :: FilePath -> IO ()
209-
setupTestsDir dir = do
210-
eitherM (panic . textShow) pure $
211-
runExceptT $
212-
CLI.runGenesisCmd $
213-
GenesisCreateStaked
214-
(CLI.GenesisDir dir)
215-
3
216-
3
217-
3
218-
3
219-
Nothing
220-
(Just 3000000)
221-
3000000
222-
(Testnet $ NetworkMagic 42)
223-
1
224-
3
225-
0
226-
Nothing
227-
228204
mkConfig :: FilePath -> FilePath -> CommandLineArgs -> IO Config
229205
mkConfig staticDir mutableDir cmdLineArgs = do
230206
config <- readSyncNodeConfig $ ConfigFile (staticDir </> "test-db-sync-config.json")

cardano-db-sync/src/Cardano/DbSync/Config/Alonzo.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module Cardano.DbSync.Config.Alonzo (
77
readAlonzoGenesisConfig,
88
) where
99

10-
import Cardano.Api.Orphans ()
1110
import qualified Cardano.Crypto.Hash as Crypto
1211
import Cardano.Db (textShow)
1312
import Cardano.DbSync.Config.Types

cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Generic/Tx/Alonzo.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ mkTxScript (hsh, script) =
287287
Alonzo.TimelockScript {} -> Timelock
288288
Alonzo.PlutusScript Alonzo.PlutusV1 _s -> PlutusV1
289289
Alonzo.PlutusScript Alonzo.PlutusV2 _s -> PlutusV2
290+
Alonzo.PlutusScript Alonzo.PlutusV3 _s -> PlutusV3
290291

291292
timelockJsonScript :: Maybe ByteString
292293
timelockJsonScript =

cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ getRegisteredPoolShelley ::
702702
getRegisteredPoolShelley lState =
703703
Map.keysSet $
704704
Shelley.psStakePoolParams $
705-
Shelley.dpsPState $
706-
Shelley.lsDPState $
705+
Shelley.certPState $
706+
Shelley.lsCertState $
707707
Shelley.esLState $
708708
Shelley.nesEs $
709709
Consensus.shelleyLedgerState lState

cardano-db-sync/src/Cardano/DbSync/Sync.hs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ import Ouroboros.Consensus.Cardano.Node ()
5959

6060
import Ouroboros.Consensus.Config (configCodec)
6161
import Ouroboros.Consensus.Network.NodeToClient (
62-
ClientCodecs,
6362
Codecs' (..),
6463
cChainSyncCodec,
64+
clientCodecs,
6565
cStateQueryCodec,
6666
cTxSubmissionCodec,
6767
)
@@ -118,6 +118,7 @@ import Ouroboros.Network.Protocol.ChainSync.Type (ChainSync)
118118
import Ouroboros.Network.Protocol.LocalStateQuery.Client (localStateQueryClientPeer)
119119
import qualified Ouroboros.Network.Snocket as Snocket
120120
import Ouroboros.Network.Subscription (SubscriptionTrace)
121+
import Ouroboros.Consensus.Node.NetworkProtocolVersion (BlockNodeToClientVersion, supportedNodeToClientVersions)
121122

122123
runSyncNodeClient ::
123124
MetricSetters ->
@@ -132,15 +133,18 @@ runSyncNodeClient metricsSetters syncEnv iomgr trce tc (SocketPath socketPath) =
132133
void $
133134
subscribe
134135
(localSnocket iomgr)
135-
codecConfig
136136
(envNetworkMagic syncEnv)
137+
(supportedNodeToClientVersions (Proxy @CardanoBlock))
137138
networkSubscriptionTracers
138139
clientSubscriptionParams
139-
(dbSyncProtocols syncEnv metricsSetters tc)
140+
(dbSyncProtocols syncEnv metricsSetters tc codecConfig)
140141
where
141142
codecConfig :: CodecConfig CardanoBlock
142143
codecConfig = configCodec $ getTopLevelConfig syncEnv
143144

145+
-- nonExperimentalVersions =
146+
-- filter (\a -> Just a <= snd (lastReleasedNodeVersion Proxy)) $ supportedNodeToClientVersions (Proxy @CardanoBlock)
147+
144148
clientSubscriptionParams =
145149
ClientSubscriptionParams
146150
{ cspAddress = Snocket.localAddressFromPath socketPath
@@ -178,11 +182,12 @@ dbSyncProtocols ::
178182
SyncEnv ->
179183
MetricSetters ->
180184
ThreadChannels ->
185+
CodecConfig CardanoBlock ->
181186
Network.NodeToClientVersion ->
182-
ClientCodecs CardanoBlock IO ->
187+
BlockNodeToClientVersion CardanoBlock ->
183188
ConnectionId LocalAddress ->
184189
NodeToClientProtocols 'InitiatorMode BSL.ByteString IO () Void
185-
dbSyncProtocols syncEnv metricsSetters tc _version codecs _connectionId =
190+
dbSyncProtocols syncEnv metricsSetters tc codecConfig version bversion _connectionId =
186191
NodeToClientProtocols
187192
{ localChainSyncProtocol = localChainSyncPtcl
188193
, localTxSubmissionProtocol = dummylocalTxSubmit
@@ -191,6 +196,8 @@ dbSyncProtocols syncEnv metricsSetters tc _version codecs _connectionId =
191196
InitiatorProtocolOnly $ MuxPeer Logging.nullTracer (cTxMonitorCodec codecs) localTxMonitorPeerNull
192197
}
193198
where
199+
codecs = clientCodecs codecConfig bversion version
200+
194201
localChainSyncTracer :: Tracer IO (TraceSendRecv (ChainSync CardanoBlock (Point CardanoBlock) (Tip CardanoBlock)))
195202
localChainSyncTracer = toLogObject $ appendName "ChainSync" tracer
196203

cardano-db/cardano-db.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ test-suite test
126126
, cardano-db
127127
, cardano-ledger-byron
128128
, cardano-ledger-core
129-
, cardano-ledger-mary == 1.1.0.0
129+
, cardano-ledger-mary
130130
, persistent
131131
, hedgehog
132132
, text

0 commit comments

Comments
 (0)