chore: bump dependencies and adapt code for cardano-node 10.7.1 (#5250)
## Summary
Bump all dependencies to cardano-node 10.7.1 and adapt wallet code to
upstream API changes.
## Upstream pins (both on main)
- **cardano-ledger-read**:
cardano-foundation/cardano-ledger-read@cc9ca75 (10.7.1)
- **cardano-balance-tx**:
cardano-foundation/cardano-balance-transaction@5d69cc9 (main HEAD — [PR
#40](https://github.com/cardano-foundation/cardano-balance-transaction/pull/40)
merged 2026-04-17, added `SafeToHash (NativeScript era)` to
`RecentEraConstraints`)
## Code changes
### Deprecated API migrations
- `ppMinFeeAL` → `ppTxFeePerByteL` (returns `CoinPerByte`, unwrap with
`fromCompact . unCoinPerByte`)
- `ppMinFeeBL` → `ppTxFeeFixedL`
- `StakeCredential` → `Credential Staking`
- `PaymentCredential` → `Credential Payment`
- `RewardAccount` → `AccountAddress` with `AccountId` wrapper
- `decodeRewardAccount` → `decodeAccountAddress`
- `serialiseRewardAccount` → `serialiseAccountAddress`
- `raNetwork` → `aaNetworkId`, `raCredential` → `unAccountId . aaId`
- `PoolParams` pattern `pp*` fields → `StakePoolParams` with `spp*`
fields
- `Ouroboros.Network.NodeToClient` →
`Cardano.Network.NodeToClient.Version`
### Other fixes
- Removed redundant imports (`Cardano.Ledger.Plutus.Language`,
`Cardano.Ledger.Shelley.API`, `Cardano.Ledger.Keys`,
`Cardano.Ledger.MemoBytes`)
- Added `BangPatterns` for unbanged strict patterns (`SBS.SBS ba`,
`BA.ByteArray ba`)
- Added `GuardNativeScriptNotSupportedInConway` pattern match in API
error handler
- Fixed `HF.Bound` construction (new `boundPerasRound` field via record
update from `initBound`)
- Replaced `ouroboros-network` dep with `cardano-diffusion:api` /
`ouroboros-network:api` where needed
- cabal-fmt applied to all changed `.cabal` files
- Dijkstra era stubs remain (`error "TODO"`)
## nix/haskell.nix changes
Three distinct concerns, kept in separate commits:
**1. `28a9e5f9` — Adapt nix shell for ouroboros-consensus 1.0**
ouroboros-consensus 1.0.0.0 absorbed `consensus-cardano`, `protocol`,
`diffusion` into sublibraries
(`ouroboros-consensus:{cardano,protocol,diffusion}`), and
ouroboros-network 1.1.0.0 absorbed `network-api`, `framework`,
`protocols` (`ouroboros-network:{api,framework,protocols}`). Two
problems:
- **Sublibraries missing in the dev shell's GHC package db**
(haskell.nix
[#1662](https://github.com/input-output-hk/haskell.nix/issues/1662)).
Added `shell.additional` to explicitly register the sublibraries we
consume. Also switched `withHoogle = false` because Hoogle index
generation trips on the sublibrary resolution.
- **`lmdb` / `liburing` system libs**. haskell.nix evaluates every
sublibrary of `ouroboros-consensus` during plan resolution (including
`lmdb` and `lsm`), even though the wallet doesn't use them. Without the
C libs on `nativeBuildInputs` via `pkg-config`, nix eval fails. The libs
are not linked into the wallet binary.
- **shellHook CHaP workaround**. Even with `additional`, `cabal build`
inside `nix develop` still fails to resolve the sublibraries against the
installed package db. Workaround: materialize CHaP as a local repo via
`mkLocalHackageRepo` and write a `cabal.project.local` that points cabal
at it, bypassing the broken GHC package db. Added `cabal.project.local`
to `.gitignore`.
**2. `24a4c552` — cabal 3.16 / haskell.nix index mismatch**
cabal 3.16 expects `00-index.tar.gz` in a local repo, but
`mkLocalHackageRepo` only writes `01-index.tar.gz`. Two workarounds:
- In the shell hook, clear
`~/.cache/cabal/packages/cardano-haskell-packages-local` before
recreating the project.local — stale caches referenced the old
(non-existent) tarball path and caused cabal to try to download packages
that only live as an index.
- In `scripts/ci/check-haskell-nix-cabal.sh`, copy the CHaP repo to a
writable temp dir and symlink `00-index.tar.gz` → `01-index.tar.gz` so
`cabal update` succeeds under 3.16.
**3. `68166a09` — balance-tx pin bump**
cabal.project tag + sha256, plus the matching `inputMap` /
`extra-hackages` references in `nix/haskell.nix`.
**4. `3fb88c5e` — HLS CI step fix**
The "Check HLS Works" CI step was loading the shellHook-generated
`cabal.project.local` and re-running resolution against the local CHaP
repo, which HLS can't load. Remove the file before invoking HLS.
## Known issues (follow-ups, not blockers)
- haskell.nix sublibrary resolution bug:
https://github.com/input-output-hk/haskell.nix/issues/1662 (the
shellHook workaround above is in place until fixed upstream)
- ProtocolParameters type alignment:
https://github.com/cardano-foundation/cardano-wallet/issues/5252
Closes https://github.com/cardano-foundation/cardano-wallet/issues/5247