Skip to content

Commit

Permalink
Merge pull request #4003 from cardano-foundation/yura/ADP-2956/ghc928…
Browse files Browse the repository at this point in the history
…node811

[ADP-2956] Upgrade `cardano-node` to 8.1.1 and `ghc`  to `9.2.8`
  • Loading branch information
Unisay authored Jun 29, 2023
2 parents 28232f7 + b3c9299 commit 828b7dd
Show file tree
Hide file tree
Showing 130 changed files with 3,791 additions and 11,836 deletions.
26 changes: 19 additions & 7 deletions .buildkite/bench-restore.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p nix coreutils gnugrep gawk time haskellPackages.hp2pretty buildkite-agent gnuplot
#! nix-shell -i bash -p coreutils gnugrep gawk time haskellPackages.hp2pretty buildkite-agent gnuplot

set -euo pipefail

Expand Down Expand Up @@ -30,16 +30,28 @@ bench="./bench-restore/bin/restore $network --node-db $node_db"

echo "--- Run benchmarks - $network"

command time -o $total_time -v $bench +RTS -N2 -qg -A1m -I0 -T -M16G -h -RTS 2>&1 | tee $log
command time -o $total_time -v $bench +RTS -N2 -qg -A1m -I0 -T -M16G -RTS 2>&1 | tee $log

grep -v INFO $log | awk '/All results/,EOF { print $0 }' >$results

echo "+++ Results - $network"

cat $results

mv restore.hp $artifact_name.hp
hp2pretty $artifact_name.hp
# https://input-output.atlassian.net/browse/ADP-3078
#
# With GHC 8.10.7 we used to use the -h flag to generate a heap profile file
# restore.hp which was then converted to a pretty graph.
#
# With the GHC 9.2.8 using the -h flag (or -hT) causes the benchmark to
# become many times slower so the code below is commented out to unblock
# the migration to 9.2.8.
#
# In the long run we shouldn't benchmark with -h anyway, but rather
# perform profiling separately.

# mv restore.hp $artifact_name.hp
# hp2pretty $artifact_name.hp

GNUPLOT_PROGRAM=$(
cat <<EOP
Expand Down Expand Up @@ -67,7 +79,7 @@ EOP

if [ -n "${BUILDKITE:-}" ]; then
echo "--- Upload"
buildkite-agent artifact upload $artifact_name.svg
# buildkite-agent artifact upload $artifact_name.svg
buildkite-agent artifact upload $results

for file in *.timelog; do
Expand All @@ -85,8 +97,8 @@ if [ -n "${BUILDKITE:-}" ]; then
echo $GNUPLOT_PROGRAM | gnuplot
buildkite-agent artifact upload plot.svg

echo "+++ Heap profile"
printf '\033]1338;url='"artifact://$artifact_name.svg"';alt='"Heap profile"'\a\n'
# echo "+++ Heap profile"
# printf '\033]1338;url='"artifact://$artifact_name.svg"';alt='"Heap profile"'\a\n'
echo "+++ Restore plot"
printf '\033]1338;url='"artifact://plot.svg"';alt='"Restore plot"'\a\n'
fi
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/check-stylish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -euo pipefail

echo "+++ stylish-haskell"

stylish-haskell -i `git ls-files -- '*.hs'`
stylish-haskell -v --config .stylish-haskell.yaml --inplace `git ls-files -- '*.hs'`

git diff --exit-code
2 changes: 1 addition & 1 deletion .buildkite/docker-build-push.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ in
''}
'' + concatMapStringsSep "\n" (image: ''
echo "Loading ${image}"
echo "Loading ${image.name}"
docker load -i "${image}"
# Apply tagging scheme
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
nodeTag:
description: 'Node tag (docker)'
required: true
default: '1.35.4'
default: '8.1.1'
walletTag:
description: 'Wallet tag (docker)'
required: true
Expand Down
1 change: 1 addition & 0 deletions .stylish-haskell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ language_extensions:
- FlexibleContexts
# Workaround for stylish-haskell bug (jaspervdj/stylish-haskell#103)
- MultiParamTypeClasses
- GeneralizedNewtypeDeriving
73 changes: 18 additions & 55 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

-- repeating the index-state for hackage to work around hackage.nix parsing limitation
index-state: 2023-03-06T05:24:58Z
index-state: 2023-06-06T00:00:00Z

index-state:
, hackage.haskell.org 2023-03-06T05:24:58Z
, cardano-haskell-packages 2023-02-28T09:20:07Z
, hackage.haskell.org 2023-06-06T00:00:00Z
, cardano-haskell-packages 2023-06-05T06:39:32Z

packages:
lib/balance-tx/
Expand Down Expand Up @@ -100,6 +100,9 @@ source-repository-package
subdir: command-line
core

package cardano-addresses
ghc-options: -Wno-incomplete-uni-patterns

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-sl-x509
Expand All @@ -108,28 +111,10 @@ source-repository-package

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-crypto
tag: f73079303f663e028288f9f4a9e08bcca39a923e
--sha256: 1n87i15x54s0cjkh3nsxs4r1x016cdw1fypwmr68936n3xxsjn6q

-- It seems that if we remove this source-repository-package to rely on CHaP,
-- for some reason, we're unable to retrieve the cardano-node executables in
-- our nix/haskell.nix file.

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: c02b0ab3786dce24bcd9899509be767057286f53
--sha256: 1igxway613vzgkjypk4vbn9dkws7faygbdd72x90h0n14p47i2js
subdir:
cardano-api
cardano-git-rev
cardano-cli
cardano-node
cardano-node-chairman
trace-dispatcher
trace-resources
trace-forward
location: https://github.com/input-output-hk/bech32.git
tag: e341e7f83d7b73f10baa87e946818b2c493cc5f5
--sha256: 1d891bpc1q1m1gqj02b4iv3kr4g9w7knlkq43hwbl9dn5k78aydc
subdir: bech32

-- -------------------------------------------------------------------------
-- Constraints tweaking
Expand All @@ -150,7 +135,6 @@ allow-newer:

constraints:
bimap >= 0.4.0
, cardano-binary == 1.5.*
, openapi3 >= 3.2.0
, libsystemd-journal >= 1.4.4
, systemd >= 2.3.0
Expand All @@ -162,43 +146,22 @@ constraints:
, Cabal >= 3.4.0.0
, async-timer >= 0.2.0.0
, unliftio-core >= 0.2.0.1
, cardano-api >= 1.35.6
, cardano-node >= 1.35.6
, generic-arbitrary >= 0.2.2
, iohk-monitoring >= 0.1.11

-- Could probably be bumped with minor work in the wallet
, resource-pool >= 0.2.3.2
-- lower versions of katip won't build with the Win32-2.12.0.1
-- which is shipped with the ghc-9.2.8
, katip >= 0.8.7.4

-- Cardano Node dependencies:
, cardano-api ^>=8.2
, cardano-slotting >= 0.1
, ouroboros-network ^>= 0.8.1.0

-- TH Name shadowing warnings need to be addressed when bumping to 2.13.3.5
, persistent == 2.13.3.3

-- Copied from cardano-node's cabal.project:
, systemd >= 2.3.0
-- systemd-2.3.0 requires at least network 3.1.1.0 but it doesn't declare
-- that dependency
, network >= 3.1.1.0
, HSOpenSSL >= 0.11.7.2
, cardano-prelude >= 0.1.0.0
, base-deriving-via >= 0.1.0.0
, cardano-binary >= 1.5.0
, cardano-binary-test >= 1.3.0
, cardano-crypto-class >= 2.0.0.0.1
, cardano-crypto-praos >= 2.0.0.0.1
, cardano-crypto-tests >= 2.0.0.0.1
, cardano-slotting >= 0.1.0.0
, measures >= 0.1.0.0
, orphans-deriving-via >= 0.1.0.0
, plutus-core >= 1.0.0.1
, plutus-ledger-api >= 1.0.0.1
, plutus-tx >= 1.0.0.0
, plutus-tx-plugin >= 1.0.0.0
, prettyprinter-configurable >= 0.1.0.0
, plutus-ghc-stub >= 8.6.5
, word-array >= 0.1.0.0

-- Haddock is broken in this release. Waiting for the next release
, http2 < 4.0.0

-- Related to: https://github.com/haskell/cabal/issues/8554
if impl(ghc == 8.10.7)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.5"

services:
cardano-node:
image: inputoutput/cardano-node:1.35.4
image: inputoutput/cardano-node:8.1.1
environment:
NETWORK:
CARDANO_NODE_SOCKET_PATH: /ipc/node.socket
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

| | **Supported version** | **Dependency?** |
| --- | --- | --- |
| [ghc][] | == 8.10.7 | Required |
| [ghc][] | == 9.2.8 | Required |
| [cabal][] | >= 3.4.0.0 | Required |
| [[Nix]] | >= 2.5.1 | Optional |

Expand Down
Loading

0 comments on commit 828b7dd

Please sign in to comment.