Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
project: cardano-api
pr: 1379
kind:
- breaking
description: |
`readNodeConfig` and `initialLedgerState` now read node configurations with cardano-config. They accept both the old flat format and the new cardano-config format.
`readNodeConfig` now also reads the genesis files, and genesis hashes are now required.
A configuration is also rejected if it sets `ExperimentalHardForksEnabled` without a `DijkstraGenesisFile`, or if its tracing section cannot be read.
With `ExperimentalHardForksEnabled`, the Dijkstra genesis that is used is the one that the configuration specifies, instead of the example one.
Without `ExperimentalHardForksEnabled`, `TestDijkstraHardForkAtEpoch` is now ignored, as in the node.
`readNodeConfig` now fails with a `NodeConfigError` instead of `Text`; it carries cardano-config's errors.
`readNodeConfig` now also returns cardano-config's warnings, such as unknown keys.
`NodeConfig` is now a newtype around cardano-config's `NodeConfiguration` (`ncConfiguration`); its old fields are now functions with the same names.
`NodeConfig` no longer has a `FromJSON` instance: use `readNodeConfig`.
`PBftSignatureThreshold` and `LastKnownBlockVersion-Major`/`-Minor`/`-Alt` are no longer read, so `ncPBftSignatureThreshold` is always `Nothing` (the consensus default) and `ncByronProtocolVersion` is always 1.0.0; both are deprecated. `cardano-api` does not use these two values when reading or applying blocks.
`readByronGenesisConfig`, `readShelleyGenesisConfig`, `readAlonzoGenesisConfig` and `readConwayGenesisConfig` are now plain functions of `NodeConfig`.
`ncByronGenesisHash`, `ncShelleyGenesisHash`, `ncAlonzoGenesisHash` and `ncConwayGenesisHash` now return the hash, not a `Maybe`.
`GenesisConfigError` keeps only `NECardanoConfig`.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
cardano-rpc/gen/** linguist-generated=true
cardano-rpc/gen/** no-prettify

# Genesis hashes are taken over the raw file bytes, so a CRLF checkout on
# Windows would not match the hashes the node configuration tests pin.
cardano-api/test/cardano-api-test/files/input/node-config/*.json text eol=lf
24 changes: 24 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,30 @@ jobs:
f+${{ matrix.sys.os }}
g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }}

- name: "[macOS] Use the default Xcode's toolchain and SDK"
if: runner.os == 'macOS'
# The macos-26 image 20261013.0424 updated the Command Line Tools to 27.0, whose
# macOS 27 SDK the default Xcode's linker cannot read ("tapi error: malformed file",
# "unknown architecture arm64e.x1-macos"). Builds still reach that SDK through
# the Command Line Tools' MacOSX.sdk link even with SDKROOT set, so point that
# link at the default Xcode's SDK too. Remove once the image's toolchain and
# SDK match again.
run: |
developer_dir=/Applications/Xcode.app/Contents/Developer
sdkroot="$(DEVELOPER_DIR="$developer_dir" xcrun --sdk macosx --show-sdk-path)"
echo "DEVELOPER_DIR=$developer_dir" >> "$GITHUB_ENV"
echo "SDKROOT=$sdkroot" >> "$GITHUB_ENV"
echo "xcode-select -p: $(xcode-select -p)"
echo "Using DEVELOPER_DIR=$developer_dir SDKROOT=$sdkroot"
DEVELOPER_DIR="$developer_dir" xcrun ld -v 2>&1 | head -1
clt_sdk=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
ls -l /Library/Developer/CommandLineTools/SDKs/
if [ -e "$clt_sdk" ] || [ -L "$clt_sdk" ]; then
sudo mv "$clt_sdk" "$clt_sdk.ci-original"
fi
sudo ln -s "$sdkroot" "$clt_sdk"
echo "$clt_sdk -> $(readlink "$clt_sdk")"
Comment thread
palas marked this conversation as resolved.

- name: Install Haskell
uses: input-output-hk/actions/haskell@latest
id: setup-haskell
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository cardano-haskell-packages
-- you need to run if you change them
index-state:
, hackage.haskell.org 2026-09-02T14:05:07Z
, cardano-haskell-packages 2026-10-06T15:10:52Z
, cardano-haskell-packages 2026-10-16T09:27:03Z

packages:
cardano-api
Expand Down
5 changes: 4 additions & 1 deletion cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ library
cardano-addresses ^>=4.0.0,
cardano-base ^>=0.1,
cardano-binary,
cardano-config ^>=2.2.2,
cardano-crypto,
cardano-crypto-class ^>=2.6,
cardano-crypto-wrapper ^>=1.8,
Expand Down Expand Up @@ -204,7 +205,6 @@ library
transformers-except ^>=0.1.3,
typed-protocols ^>=1.2,
validation,
yaml,

other-modules:
Cardano.Api.Byron.Internal.Key
Expand Down Expand Up @@ -374,6 +374,7 @@ test-suite cardano-api-test
cardano-api,
cardano-api:gen,
cardano-binary,
cardano-config,
cardano-crypto,
cardano-crypto-class:{cardano-crypto-class, testlib} ^>=2.6,
cardano-crypto-wrapper:testlib,
Expand All @@ -382,6 +383,7 @@ test-suite cardano-api-test
cardano-ledger-api ^>=1.15,
cardano-ledger-babbage,
cardano-ledger-binary,
cardano-ledger-byron,
cardano-ledger-conway,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.22,
cardano-ledger-dijkstra,
Expand All @@ -395,6 +397,7 @@ test-suite cardano-api-test
data-default,
directory,
filepath,
fs-api,
hedgehog >=1.1,
hedgehog-extras,
hedgehog-quickcheck,
Expand Down
Loading
Loading