Skip to content

Commit d92db51

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents f996b81 + d93f629 commit d92db51

File tree

119 files changed

+1697
-2791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1697
-2791
lines changed

.github/workflows/github-page.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ jobs:
3232

3333
- name: Fetch nix cache and update cabal indices
3434
run: |
35-
nix develop .\#project.x86_64-linux.projectVariants.ghc963.shell --command \
35+
nix develop .\#project.x86_64-linux.projectVariants.ghc964.shell --command \
3636
cabal update
3737
3838
- name: Build whole project
3939
run: |
40-
nix develop .\#project.x86_64-linux.projectVariants.ghc963.shell --command \
40+
nix develop .\#project.x86_64-linux.projectVariants.ghc964.shell --command \
4141
cabal build all
4242
4343
- name: Build documentation
4444
run: |
45-
nix develop .\#project.x86_64-linux.projectVariants.ghc963.shell --command \
45+
nix develop .\#project.x86_64-linux.projectVariants.ghc964.shell --command \
4646
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
4747
4848
- name: Compress haddocks

.github/workflows/haskell.yml

Lines changed: 47 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
env:
4040
# Modify this value to "invalidate" the cabal cache.
41-
CABAL_CACHE_VERSION: "2024-03-07"
41+
CABAL_CACHE_VERSION: "2024-04-24"
4242

4343
concurrency:
4444
group: >
@@ -87,67 +87,51 @@ jobs:
8787
echo "# cabal.project.local"
8888
cat cabal.project.local
8989
90+
# A dry run `build all` operation does *NOT* downlaod anything, it just looks at the package
91+
# indices to generate an install plan.
9092
- name: Build dry run
91-
run: |
92-
cabal build all --dry-run --minimize-conflict-set
93+
run: cabal build all --enable-tests --dry-run --minimize-conflict-set
9394

94-
# For users who fork cardano-node and want to define a writable cache, then can set up their own
95-
# S3 bucket then define in their forked repository settings the following secrets:
96-
#
97-
# AWS_ACCESS_KEY_ID
98-
# AWS_SECRET_ACCESS_KEY
99-
# BINARY_CACHE_URI
100-
# BINARY_CACHE_REGION
101-
- name: Cabal cache over S3
102-
uses: action-works/cabal-cache-s3@v1
103-
env:
104-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
105-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
95+
# From the install plan we generate a dependency list.
96+
- name: Record dependencies
97+
id: record-deps
98+
run: |
99+
# The tests call out to msys2 commands. We generally do not want to mix toolchains, so
100+
# we are very deliberate about only adding msys64 to the path where absolutely necessary.
101+
${{ (runner.os == 'Windows' && '$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)') || '' }}
102+
cat dist-newstyle/cache/plan.json | jq -r '."install-plan" | select(.style != "local") | .id' | sort | uniq > dependencies.txt
103+
104+
# From the dependency list we restore the cached dependencies.
105+
# We use the hash of `dependencies.txt` as part of the cache key because that will be stable
106+
# until the `index-state` values in the `cabal.project` file changes.
107+
- name: Restore cached dependencies
108+
uses: actions/cache/restore@v4
109+
id: cache
106110
with:
107-
region: ${{ vars.BINARY_CACHE_REGION }}
108-
dist-dir: dist-newstyle
109-
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
110-
threads: ${{ vars.BINARY_CACHE_THREADS }}
111-
archive-uri: ${{ vars.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
112-
skip: "${{ vars.BINARY_CACHE_URI == '' }}"
113-
114-
# It's important to ensure that people who fork this repository can not only successfully build in
115-
# CI by default, but also have meaning cabal store caching.
116-
#
117-
# Because syncing with S3 requires credentials, we cannot rely on S3 for this. For this reason a
118-
# https fallback is used. The https server mirrors the content of the S3 bucket. The https cabal
119-
# store archive is read-only for security reasons.
120-
#
121-
# Users who fork this repository who want to have a writable cabal store archive are encouraged
122-
# to set up their own S3 bucket.
123-
- name: Cabal cache over HTTPS
124-
uses: action-works/cabal-cache-s3@v1
111+
path: |
112+
${{ steps.setup-haskell.outputs.cabal-store }}
113+
dist-newstyle
114+
key: cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}
115+
116+
# Now we install the dependencies. If the cache was found and restored in the previous step,
117+
# this should be a no-op, but if the cache key was not found we need to build stuff so we can
118+
# cache it for the next step.
119+
- name: Install dependencies
120+
run: cabal build all --enable-tests --only-dependencies -j --ghc-option=-j4
121+
122+
# Always store the cabal cache.
123+
# This can fail (benign failure) if there is already a hash at that key.
124+
- name: Cache Cabal store
125+
uses: actions/cache/save@v4
125126
with:
126-
dist-dir: dist-newstyle
127-
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
128-
threads: ${{ vars.BINARY_CACHE_THREADS }}
129-
archive-uri: https://iohk.cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
130-
skip: "${{ vars.BINARY_CACHE_URI != '' }}"
131-
enable-save: false
132-
133-
# The following seems like a duplicate but it is due to a bug in cabal which can sometimes
134-
# cause build intermittent build failures on Windows, so we run the build twice.
135-
#
136-
# https://github.com/haskell/cabal/issues/9587
137-
#
138-
# TODO Remove the workaround when the cabal bug is fixed.
139-
- name: Build core components
140-
continue-on-error: true
141-
run: |
142-
cabal build cardano-node cardano-cli cardano-node-chairman cardano-submit-api -j1
127+
path: |
128+
${{ steps.setup-haskell.outputs.cabal-store }}
129+
dist-newstyle
130+
key: cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}
143131

144-
- name: Build core components
145-
run: |
146-
cabal build cardano-node cardano-cli cardano-node-chairman cardano-submit-api -j1
147-
148-
- name: Build remaining components
149-
run: |
150-
cabal build all
132+
# Now we build.
133+
- name: Build all
134+
run: cabal build all --enable-tests
151135

152136
- name: Run tests
153137
env:
@@ -168,7 +152,7 @@ jobs:
168152
169153
- name: Upload workspaces on tests failure
170154
if: ${{ failure() }}
171-
uses: actions/upload-artifact@v3
155+
uses: actions/upload-artifact@v4
172156
with:
173157
name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz
174158
path: ${{ runner.temp }}/workspaces.tgz
@@ -198,7 +182,8 @@ jobs:
198182
find "${{ runner.temp }}/chairman" -type s -exec rm -f {} \;
199183
fi
200184
201-
- uses: actions/upload-artifact@v2
185+
- name: Save Artifact
186+
uses: actions/upload-artifact@v4
202187
if: ${{ always() }}
203188
continue-on-error: true
204189
with:
@@ -217,9 +202,9 @@ jobs:
217202
# and will silently fail if msys2 is not in path. See the "Run tests" step.
218203
#
219204
# - name: Setup tmate session
220-
# if: ${{ failure() }}
221-
# uses: mxschmitt/action-tmate@v3
222-
# with:
205+
# if: ${{ failure() }}
206+
# uses: mxschmitt/action-tmate@v3
207+
# with:
223208
# limit-access-to-actor: true
224209

225210
build-complete:

README.rst

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ Network Configuration, Genesis and Topology Files
4040

4141
The latest supported networks can be found at `<https://book.world.dev.cardano.org/environments.html>`_
4242

43-
****
43+
**************************
4444
Obtaining ``cardano-node``
45-
****
45+
**************************
4646

4747
Building from source
48-
====
48+
====================
4949

5050
Documentation for building the node can be found `here <https://docs.cardano.org/getting-started/installing-the-cardano-node>`_.
5151

@@ -56,7 +56,7 @@ You can download the hydra binaries of ``cardano-node`` and ``cardano-cli`` from
5656

5757

5858
Running the node on Windows
59-
----
59+
---------------------------
6060

6161
The download includes cardano-node.exe and a .dll. To run the node with cardano-node run you need to reference a few files and directories as arguments. These can be copied from the cardano-node repo into the executables directory. The command to run the node on mainnet looks like this:
6262

@@ -73,12 +73,13 @@ You can pull the docker image with the latest version of cardano-node from `here
7373
7474
docker pull inputoutput/cardano-node
7575
76-
****
76+
**********************
7777
Using ``cardano-node``
78-
****
78+
**********************
7979

8080
Command line summary: ``cardano-node``
81-
====
81+
======================================
82+
8283
This refers to the client that is used for running a node.
8384

8485
The general synopsis is as follows:
@@ -132,7 +133,7 @@ The general synopsis is as follows:
132133
* ``--validate-db`` - Flag to revalidate all on-disk database files
133134

134135
Configuration
135-
====
136+
=============
136137

137138
The ``--config`` flag points to a ``.yaml`` (or a structurally equivalent ``.json``) file that is responsible to configuring the logging & other important settings for the node. E.g. see the Byron mainnet configuration in this
138139
`configuration.yaml <https://github.com/intersectmbo/cardano-node/blob/master/configuration/defaults/byron-mainnet/configuration.yaml>`_.
@@ -148,9 +149,9 @@ Scripts
148149

149150
Please see ``scripts/README.md`` for information on the various scripts.
150151

151-
****
152+
*********************
152153
Using ``cardano-cli``
153-
****
154+
*********************
154155

155156
A CLI utility to support a variety of key material operations (genesis, migration, pretty-printing..) for different system generations.
156157
Usage documentation can be found at ``https://github.com/input-output-hk/cardano-cli/tree/master/cardano-cli/README.md``.
@@ -165,7 +166,7 @@ The general synopsis is as follows:
165166
before ``cardano-cli``. We henceforth assume that the necessary environment-specific adjustment has been made, so we only mention ``cardano-cli``.
166167

167168
Command line options: ``cardano-cli``
168-
====
169+
=====================================
169170

170171
The subcommands are subdivided in groups, and their full list can be seen in the output of ``cardano-cli --help``.
171172

@@ -190,7 +191,7 @@ All subcommands have help available. For example:
190191
191192
192193
Genesis generation
193-
====
194+
==================
194195

195196
The Byron genesis generation operations will create a directory that contains:
196197

@@ -421,9 +422,9 @@ Note: When developing locally, for any package you are working on, in **cabal.pr
421422

422423
Otherwise GHC might complain about unused packages.
423424

424-
****
425+
*************
425426
Native Tokens
426-
****
427+
*************
427428

428429
Native tokens is a new feature that enables the transacting of multi-assets on Cardano. Native tokens are now supported on mainnet and users can transact with ada, and an unlimited number of user-defined (custom) tokens natively. Note that users who do not need to create new assets (“token holders”) will be able to send and receive existing multi-asset tokens using a wallet such as Daedalus or Yoroi, and with no requirement to use any CLI commands.
429430

@@ -439,33 +440,33 @@ To help you get started, see:
439440

440441
To start, please ensure that you are familiar with setting up and operating the `Cardano node <https://github.com/intersectmbo/cardano-node>`_. Alternatively, see instructions on how to `start your node <https://github.com/input-output-hk/cardano-node-wiki/wiki/2_start_your_nodes>`_ to submit the commands. You will not need to set up and start a full block producing node ('stake pool'), just a much simpler relay node. This node will need to connect to a Cardano network that is capable of processing native tokens (e.g., the native token pre-production environment (PPE), or the Cardano mainnet).
441442

442-
****
443+
*****************
443444
API Documentation
444-
****
445+
*****************
445446

446447
The API documentation is published `here <https://cardano-node.cardano.intersectmbo.org/>`_.
447448

448449
The documentation is built with each push, but is only published from ``master`` branch. In order to
449450
test if the documentation is working, build the documentation locally with ``cabal haddock-project --local --output=./haddocks`` and
450451
open ``haddocks/index.html`` in the browser.
451452

452-
****
453+
*******************************************
453454
Using the ``cardano-node`` Haskell packages
454-
****
455+
*******************************************
455456

456457
If you want to use the ``cardano-node`` Haskell packages from another project, you should use `CHaP <https://github.com/input-output-hk/cardano-haskell-packages>`_ to get the packages defined in this repository.
457458
Please note that you may need to use any ``source-repository-package`` stanzas defined in ``cabal.project``, although we will endeavour to keep these to an absolute minimum.
458459

459-
****
460+
***********
460461
Style guide
461-
****
462+
***********
462463

463464
The `style guide <https://github.com/input-output-hk/cardano-node-wiki/wiki/Style-guide>`_ for can be found
464465
on the `cardano-node repository's wiki <https://github.com/input-output-hk/cardano-node-wiki/wiki>`_.
465466

466-
****
467+
***************************************
467468
Troubleshooting ``cardano-node`` issues
468-
****
469+
***************************************
469470

470471
For some troubleshooting help with building or running ``cardano-node``, the wiki has a
471472
`troubleshooting page <https://github.com/input-output-hk/cardano-node-wiki/wiki/Troubleshooting>`_

bench/locli/locli.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ library
101101
, attoparsec
102102
, attoparsec-iso8601
103103
, bytestring
104-
, cardano-git-rev
104+
, cardano-git-rev ^>= 0.2.2
105105
, cardano-ledger-core
106106
, cardano-prelude
107107
, cardano-slotting
@@ -121,7 +121,7 @@ library
121121
, optparse-generic
122122
, ouroboros-consensus
123123
-- for Data.SOP.Strict:
124-
, ouroboros-network ^>= 0.12
124+
, ouroboros-network ^>= 0.13
125125
, ouroboros-network-api
126126
, process
127127
, quiet

bench/locli/src/Cardano/Analysis/API/LocliVersion.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE DeriveAnyClass #-}
2+
{-# LANGUAGE TemplateHaskell #-}
23
module Cardano.Analysis.API.LocliVersion (module Cardano.Analysis.API.LocliVersion) where
34

45
import Cardano.Prelude (NFData, mconcat)
@@ -22,7 +23,7 @@ data LocliVersion =
2223
getLocliVersion :: LocliVersion
2324
getLocliVersion =
2425
LocliVersion
25-
Cardano.Git.Rev.gitRev
26+
$(Cardano.Git.Rev.gitRev)
2627
(pack (showVersion Paths_locli.version))
2728

2829
renderProgramAndVersion :: LocliVersion -> Text

bench/locli/src/Cardano/Analysis/API/Types.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ testSlotStats :: Genesis -> SlotStats a -> SlotCond -> Bool
443443
testSlotStats g SlotStats{..} = \case
444444
SlotGEq s -> slSlot >= s
445445
SlotLEq s -> slSlot <= s
446-
EpochGEq s -> fromIntegral (unEpochNo slEpoch) >= s
447-
EpochLEq s -> fromIntegral (unEpochNo slEpoch) <= s
446+
EpochGEq s -> slEpoch >= s
447+
EpochLEq s -> slEpoch <= s
448448
SlotHasLeaders -> slCountLeads > 0
449449
EpochSafeIntGEq i -> slEpochSafeInt >= i
450450
EpochSafeIntLEq i -> slEpochSafeInt <= i

bench/locli/src/Cardano/Analysis/MachPerf.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ timelineFromLogObjects run@Run{genesis} (f, xs') =
7474
zeroSlotStats =
7575
SlotStats
7676
{ slSlot = impliedSlot genesis firstRelevantLogObjectTime
77-
, slEpoch = 0
77+
, slEpoch = EpochNo 0
7878
, slEpochSlot = 0
7979
, slEpochSafeInt = 0
8080
, slStart = SlotStart firstRelevantLogObjectTime

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ library
7373
-- IOG dependencies
7474
--------------------------
7575
build-depends:
76-
, cardano-api ^>= 8.39.2.0
76+
, cardano-api ^>= 8.44
7777
, plutus-ledger-api >=1.0.0
7878
, plutus-tx >=1.0.0
79-
, plutus-tx-plugin ^>=1.21
79+
, plutus-tx-plugin ^>=1.23
8080

8181
------------------------
8282
-- Non-IOG dependencies

0 commit comments

Comments
 (0)