Skip to content

Commit 887fd73

Browse files
committed
Update to node-10.7.1
1 parent 1e2e49f commit 887fd73

5 files changed

Lines changed: 51 additions & 27 deletions

File tree

cabal.project

Lines changed: 7 additions & 6 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 2026-02-17T10:15:41Z
14-
, cardano-haskell-packages 2026-03-30T15:30:34Z
13+
, hackage.haskell.org 2026-03-26T20:21:33Z
14+
, cardano-haskell-packages 2026-04-14T21:25:56Z
1515
active-repositories:
1616
, :rest
1717
, cardano-haskell-packages:override
@@ -106,19 +106,20 @@ if impl (ghc >= 9.12)
106106
source-repository-package
107107
type: git
108108
location: https://github.com/IntersectMBO/cardano-node
109-
tag: 1e6d8228693ab2aa4e1d7305e7bdcc57cdd278e4
110-
--sha256: sha256-6b9fX1RNmHdBRpmE4WYFCf13vwZZGg1LHRhHP7GRJHE=
109+
tag: 045bc187a36ef0cbd236db902b85dd8f202fb059
110+
--sha256: sha256-D2HMIr65q0RM9+ZAjbtA9xNKyoKYfr3Kc4Vv4+s64uY=
111111
subdir:
112112
cardano-node
113113
trace-forward
114114
trace-resources
115115

116116
if impl(ghc >= 9.12)
117+
-- GHC 9.12 support - master branch
117118
source-repository-package
118119
type: git
119120
location: https://github.com/google/proto-lens
120-
tag: 20de5227947b0c37dd6852dcc6f2db1cd5889cee
121-
--sha256: sha256-VUYU2swjU7L8Zdu6Zfz6jo2ulW5uPhAamt2GjH5hZRY=
121+
tag: 13ce67409ad87e8c29eea58b31aa37f44e82457c
122+
--sha256: sha256-8XPGLheOo5ZStL7YD5x29GechWFjubw+in5GsUrKWPc=
122123
subdir:
123124
discrimination-ieee754
124125
proto-lens-arbitrary

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import qualified Cardano.Ledger.State as Ledger
2828
import Cardano.Ledger.Val ((<+>))
2929
import Cardano.Prelude
3030
import qualified Data.Map.Strict as Map
31-
import Data.VMap (VB, VMap (..))
31+
import Data.VMap (VB, VMap (..), VS)
3232
import qualified Data.VMap as VMap
3333
import qualified Data.Vector.Generic as VG
3434
import Lens.Micro
@@ -49,12 +49,12 @@ data StakeSliceRes
4949

5050
data StakeSlice = StakeSlice
5151
{ sliceEpochNo :: !EpochNo
52-
, sliceDistr :: !(Map StakeCred (Coin, PoolKeyHash))
52+
, sliceDistr :: ![(StakeCred, (Coin, PoolKeyHash))]
5353
}
5454
deriving (Eq)
5555

5656
emptySlice :: EpochNo -> StakeSlice
57-
emptySlice epoch = StakeSlice epoch Map.empty
57+
emptySlice epoch = StakeSlice epoch []
5858

5959
getSecurityParameter ::
6060
ConsensusProtocol (BlockProtocol blk) =>
@@ -120,7 +120,7 @@ genericStakeSlice pInfo epochBlockNo lstate isMigration
120120
Ledger.ssStakeMark . Shelley.esSnapshots . Shelley.nesEs $
121121
Consensus.shelleyLedgerState lstate
122122

123-
activeStakeEntries :: VMap.KVVector VB VB (Credential Staking, StakeWithDelegation)
123+
activeStakeEntries :: VMap.KVVector VB VS (Credential Staking, StakeWithDelegation)
124124
activeStakeEntries = VMap.unVMap $ Ledger.unActiveStake $ Ledger.ssActiveStake stakeSnapshot
125125

126126
delegationsLen :: Word64
@@ -162,13 +162,12 @@ genericStakeSlice pInfo epochBlockNo lstate isMigration
162162
, sliceDistr = distribution
163163
}
164164
where
165-
activeStakeSliced :: VMap VB VB (Credential Staking) StakeWithDelegation
165+
activeStakeSliced :: VMap VB VS (Credential Staking) StakeWithDelegation
166166
activeStakeSliced = VMap $ VG.slice (fromIntegral index) (fromIntegral actualSize) activeStakeEntries
167167

168-
distribution :: Map StakeCred (Coin, PoolKeyHash)
168+
distribution :: [(StakeCred, (Coin, PoolKeyHash))]
169169
distribution =
170-
VMap.toMap $
171-
VMap.map (\swd -> (Ledger.fromCompact (unNonZero (swdStake swd)), swdDelegation swd)) activeStakeSliced
170+
VMap.foldlWithKey (\acc cred swd -> (cred, (Ledger.fromCompact (unNonZero (swdStake swd)), swdDelegation swd)) : acc) [] activeStakeSliced
172171

173172
countEpochStake ::
174173
ExtLedgerState CardanoBlock mk ->
@@ -198,7 +197,7 @@ genericCountEpochStake lstate =
198197
Ledger.ssStakeMark . Shelley.esSnapshots . Shelley.nesEs $
199198
Consensus.shelleyLedgerState lstate
200199

201-
activeStake :: VMap VB VB (Credential Staking) StakeWithDelegation
200+
activeStake :: VMap VB VS (Credential Staking) StakeWithDelegation
202201
activeStake = Ledger.unActiveStake $ Ledger.ssActiveStake stakeSnapshot
203202

204203
-- ActiveStake only contains entries with non-zero stake, so no filtering needed
@@ -237,7 +236,7 @@ genericFullStakeSlice lstate =
237236
Ledger.ssStakeMark . Shelley.esSnapshots . Shelley.nesEs $
238237
Consensus.shelleyLedgerState lstate
239238

240-
activeStakeEntries :: VMap.KVVector VB VB (Credential Staking, StakeWithDelegation)
239+
activeStakeEntries :: VMap.KVVector VB VS (Credential Staking, StakeWithDelegation)
241240
activeStakeEntries = VMap.unVMap $ Ledger.unActiveStake $ Ledger.ssActiveStake stakeSnapshot
242241

243242
delegationsLen :: Word64
@@ -254,13 +253,12 @@ genericFullStakeSlice lstate =
254253
, sliceDistr = distribution
255254
}
256255
where
257-
activeStakeSliced :: VMap VB VB (Credential Staking) StakeWithDelegation
256+
activeStakeSliced :: VMap VB VS (Credential Staking) StakeWithDelegation
258257
activeStakeSliced = VMap $ VG.slice (fromIntegral index) (fromIntegral delegationsLen) activeStakeEntries
259258

260-
distribution :: Map StakeCred (Coin, PoolKeyHash)
259+
distribution :: [(StakeCred, (Coin, PoolKeyHash))]
261260
distribution =
262-
VMap.toMap $
263-
VMap.map (\swd -> (Ledger.fromCompact (unNonZero (swdStake swd)), swdDelegation swd)) activeStakeSliced
261+
VMap.foldlWithKey (\acc cred swd -> (cred, (Ledger.fromCompact (unNonZero (swdStake swd)), swdDelegation swd)) : acc) [] activeStakeSliced
264262

265263
getPoolDistr ::
266264
ExtLedgerState CardanoBlock mk ->

cardano-db-sync/src/Cardano/DbSync/Era/Universal/Epoch.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ insertStakeSlice ::
195195
ExceptT SyncNodeError DB.DbM ()
196196
insertStakeSlice _ Generic.NoSlices = pure ()
197197
insertStakeSlice syncEnv (Generic.Slice slice finalSlice) = do
198-
insertEpochStake syncEnv network (Generic.sliceEpochNo slice) (Map.toList $ Generic.sliceDistr slice)
198+
insertEpochStake syncEnv network (Generic.sliceEpochNo slice) (Generic.sliceDistr slice)
199199
when finalSlice $ do
200200
lift $ DB.updateStakeProgressCompleted $ unEpochNo $ Generic.sliceEpochNo slice
201201
size <- lift $ DB.queryEpochStakeCount (unEpochNo $ Generic.sliceEpochNo slice)

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@
245245
buildInputs = with nixpkgs.pkgsBuildBuild; [
246246
git
247247
protobuf
248+
liburing
248249
];
249250

250251
withHoogle = true;
@@ -282,6 +283,30 @@
282283
[ "../schema/*.sql" ];
283284
})
284285

286+
# TODO remove this module when removing proto-lens SRP
287+
# Override proto-lens source to use fixed symlinks (inputMap provides the fixed
288+
# source for plan computation; this module provides it for the build phase)
289+
({lib, config, ...}: let
290+
protoLensPackages = [
291+
"proto-lens"
292+
"proto-lens-arbitrary"
293+
"proto-lens-discrimination"
294+
"proto-lens-optparse"
295+
"proto-lens-protobuf-types"
296+
"proto-lens-protoc"
297+
"proto-lens-runtime"
298+
"proto-lens-setup"
299+
"proto-lens-tests-dep"
300+
"proto-lens-tests"
301+
"discrimination-ieee754"
302+
"proto-lens-benchmarks"
303+
];
304+
in {
305+
packages = lib.genAttrs
306+
(builtins.filter (p: config.packages ? ${p}) protoLensPackages)
307+
(p: { src = lib.mkForce (protoLensSrcFixed + "/${p}"); });
308+
})
309+
285310
({ lib, pkgs, config, ... }: {
286311
# lib:ghc is a bit annoying in that it comes with it's own build-type:Custom, and then tries
287312
# to call out to all kinds of silly tools that GHC doesn't really provide.

0 commit comments

Comments
 (0)