From 252b08428490ae160bc30a62cece25909bf85539 Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Thu, 8 Feb 2024 15:36:47 +0000 Subject: [PATCH] Update to cardano-node 8.8.0 --- .../workflows/explorer/docker-compose.yaml | 2 +- CHANGELOG.md | 2 + docs/docs/tutorial/index.md | 8 +- flake.lock | 151 +++++++++++++----- flake.nix | 2 +- .../config/devnet/genesis-conway.json | 29 ++-- hydra-cluster/test/Test/CardanoNodeSpec.hs | 19 +-- .../test/Test/Hydra/Cluster/CardanoCliSpec.hs | 2 +- 8 files changed, 143 insertions(+), 72 deletions(-) diff --git a/.github/workflows/explorer/docker-compose.yaml b/.github/workflows/explorer/docker-compose.yaml index f847ad83f77..0f75a791ca8 100644 --- a/.github/workflows/explorer/docker-compose.yaml +++ b/.github/workflows/explorer/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3.9" services: cardano-node: - image: ghcr.io/input-output-hk/cardano-node:8.7.3 + image: ghcr.io/input-output-hk/cardano-node:8.8.0 volumes: - /srv/var/cardano/state-preview:/data environment: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6436dc43683..325677fe768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ changes. - Add `--sanchonet` option to `hydra-cluster` binary. +- **BREAKING** Update to cardano-node 8.8.0 and remove Mainnet compatibility. Application is now only tested against Sanchonet. + ## [0.15.0] - 2024-01-18 - Tested with `cardano-node 8.7.3` and `cardano-cli 8.17.0.0`. diff --git a/docs/docs/tutorial/index.md b/docs/docs/tutorial/index.md index c2bfd77dc1b..44af0b3e22d 100644 --- a/docs/docs/tutorial/index.md +++ b/docs/docs/tutorial/index.md @@ -44,7 +44,7 @@ mkdir -p bin version=0.15.0 curl -L -O https://github.com/input-output-hk/hydra/releases/download/${version}/hydra-x86_64-linux-${version}.zip unzip -d bin hydra-x86_64-linux-${version}.zip -curl -L -o - https://github.com/input-output-hk/cardano-node/releases/download/8.7.3/cardano-node-8.7.3-linux.tar.gz \ +curl -L -o - https://github.com/input-output-hk/cardano-node/releases/download/8.8.0/cardano-node-8.8.0-linux.tar.gz \ | tar xz -C bin ./cardano-node ./cardano-cli curl -L -o - https://github.com/input-output-hk/mithril/releases/download/2347.0/mithril-2347.0-linux-x64.tar.gz \ | tar xz -C bin mithril-client @@ -59,9 +59,9 @@ mkdir -p bin version=0.15.0 curl -L -O https://github.com/input-output-hk/hydra/releases/download/${version}/hydra-aarch64-darwin-${version}.zip unzip -d bin hydra-aarch64-darwin-${version}.zip -curl -L -o - https://github.com/input-output-hk/hydra/releases/download/${version}/cardano-node-aarch-darwin-8.7.3.zip -unzip -d bin cardano-node-8.7.3-linux.zip -curl -L -o - https://github.com/input-output-hk/cardano-node/releases/download/8.7.3/cardano-node-8.7.3-macos.tar.gz \ +curl -L -o - https://github.com/input-output-hk/hydra/releases/download/${version}/cardano-node-aarch-darwin-8.8.0.zip +unzip -d bin cardano-node-8.8.0-linux.zip +curl -L -o - https://github.com/input-output-hk/cardano-node/releases/download/8.8.0/cardano-node-8.8.0-macos.tar.gz \ | tar xz -C bin --wildcards ./cardano-node ./cardano-cli '*.dylib' chmod +x bin/* ``` diff --git a/flake.lock b/flake.lock index b59a9e9327b..93be3dfc2ca 100644 --- a/flake.lock +++ b/flake.lock @@ -20,15 +20,15 @@ "CHaP_2": { "flake": false, "locked": { - "lastModified": 1702593630, - "narHash": "sha256-IWu27+sfPtazjIZiWLUm8G4BKvjXmIL+/1XT/ETnfhg=", - "owner": "input-output-hk", + "lastModified": 1707293988, + "narHash": "sha256-UAa4nL8qhPyI133IJOPMBgLECa91CPPwwhypFXKm7Fw=", + "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "9783a177efcea5beb8808aab7513098bdab185ba", + "rev": "501510e79f9cf76012cba0e86f88fa0b8b053fbd", "type": "github" }, "original": { - "owner": "input-output-hk", + "owner": "intersectmbo", "ref": "repo", "repo": "cardano-haskell-packages", "type": "github" @@ -305,17 +305,17 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1702654749, - "narHash": "sha256-fIzSNSKWC7qMRjHUMHfrMnEzHiFu7ac/UUgfofXqaFY=", + "lastModified": 1707399758, + "narHash": "sha256-pWXI8dyqKQ3HncbBtd54wdHi3Pj7J5y+nybqpzMXOj4=", "owner": "intersectmbo", "repo": "cardano-node", - "rev": "a4a8119b59b1fbb9a69c79e1e6900e91292161e7", + "rev": "4bb2048db77d623ee6e3678618c2d8b6c4676333", "type": "github" }, "original": { "owner": "intersectmbo", - "ref": "8.7.3", "repo": "cardano-node", + "rev": "4bb2048db77d623ee6e3678618c2d8b6c4676333", "type": "github" } }, @@ -866,11 +866,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1697054644, - "narHash": "sha256-kKarOuXUaAH3QWv7ASx+gGFMHaHKe0pK5Zu37ky2AL4=", + "lastModified": 1701580282, + "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", "ref": "refs/heads/master", - "rev": "f383a242c76f90bcca8a4d7ee001dcb49c172a9a", - "revCount": 62040, + "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", + "revCount": 62197, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -937,11 +937,11 @@ "hackageNix": { "flake": false, "locked": { - "lastModified": 1701303758, - "narHash": "sha256-8XqVEQwmJBxRPFa7SizJuZxbG+NFEZKWdhtYPTQ7ZKM=", + "lastModified": 1707178947, + "narHash": "sha256-zK4s98xucxwefNtf7Ewc42lQkb5ZXNzFV4sOliif8Rg=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "8a0e3ae9295b7ef8431b9be208dd06aa2789be53", + "rev": "ef22972dd06ed3359945489b582849fdf680c583", "type": "github" }, "original": { @@ -970,9 +970,12 @@ "hls-2.2": "hls-2.2", "hls-2.3": "hls-2.3", "hls-2.4": "hls-2.4", + "hls-2.5": "hls-2.5", + "hls-2.6": "hls-2.6", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", + "nix-tools-static": "nix-tools-static", "nixpkgs": [ "cardano-node", "nixpkgs" @@ -983,16 +986,17 @@ "nixpkgs-2205": "nixpkgs-2205", "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-2305": "nixpkgs-2305", + "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1700441391, - "narHash": "sha256-oJqP1AUskUvr3GNUH97eKwaIUHdYgENS2kQ7GI9RI+c=", + "lastModified": 1707180591, + "narHash": "sha256-MR/sPRfbtab9AEgvTb70VU94MDqEXFNM3RnMfb10gT8=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "3b6056f3866f88d1d16eaeb2e810d3ac0df0e7cd", + "rev": "0a4c42df4321e510f38affa11a2109e84a5399e4", "type": "github" }, "original": { @@ -1018,12 +1022,12 @@ "hls-2.2": "hls-2.2_2", "hls-2.3": "hls-2.3_2", "hls-2.4": "hls-2.4_2", - "hls-2.5": "hls-2.5", - "hls-2.6": "hls-2.6", + "hls-2.5": "hls-2.5_2", + "hls-2.6": "hls-2.6_2", "hpc-coveralls": "hpc-coveralls_2", "hydra": "hydra_2", "iserv-proxy": "iserv-proxy_2", - "nix-tools-static": "nix-tools-static", + "nix-tools-static": "nix-tools-static_2", "nixpkgs": [ "haskellNix", "nixpkgs-unstable" @@ -1034,7 +1038,7 @@ "nixpkgs-2205": "nixpkgs-2205_2", "nixpkgs-2211": "nixpkgs-2211_2", "nixpkgs-2305": "nixpkgs-2305_2", - "nixpkgs-2311": "nixpkgs-2311", + "nixpkgs-2311": "nixpkgs-2311_2", "nixpkgs-unstable": "nixpkgs-unstable_2", "old-ghc-nix": "old-ghc-nix_2", "stackage": "stackage_2" @@ -1228,16 +1232,16 @@ "hls-2.4": { "flake": false, "locked": { - "lastModified": 1696939266, - "narHash": "sha256-VOMf5+kyOeOmfXTHlv4LNFJuDGa7G3pDnOxtzYR40IU=", + "lastModified": 1699862708, + "narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=", "owner": "haskell", "repo": "haskell-language-server", - "rev": "362fdd1293efb4b82410b676ab1273479f6d17ee", + "rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57", "type": "github" }, "original": { "owner": "haskell", - "ref": "2.4.0.0", + "ref": "2.4.0.1", "repo": "haskell-language-server", "type": "github" } @@ -1276,6 +1280,23 @@ "type": "github" } }, + "hls-2.5_2": { + "flake": false, + "locked": { + "lastModified": 1701080174, + "narHash": "sha256-fyiR9TaHGJIIR0UmcCb73Xv9TJq3ht2ioxQ2mT7kVdc=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "27f8c3d3892e38edaef5bea3870161815c4d014c", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.5.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hls-2.6": { "flake": false, "locked": { @@ -1293,6 +1314,23 @@ "type": "github" } }, + "hls-2.6_2": { + "flake": false, + "locked": { + "lastModified": 1705325287, + "narHash": "sha256-+P87oLdlPyMw8Mgoul7HMWdEvWP/fNlo8jyNtwME8E8=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "6e0b342fa0327e628610f2711f8c3e4eaaa08b1e", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.6.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -1451,11 +1489,11 @@ "sodium": "sodium" }, "locked": { - "lastModified": 1698746924, - "narHash": "sha256-8og+vqQPEoB2KLUtN5esGMDymT+2bT/rCHZt1NAe7y0=", + "lastModified": 1707337252, + "narHash": "sha256-sliOZlzvx3sG+YqkgcXqK7Va0OyYFD+VPWiEK+qeoNI=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "af551ca93d969d9715fa9bf86691d9a0a19e89d9", + "rev": "3358489541bdc1228afaa678c2adf4bb891f560e", "type": "github" }, "original": { @@ -1686,6 +1724,23 @@ "type": "github" } }, + "nix-tools-static_2": { + "flake": false, + "locked": { + "lastModified": 1706266250, + "narHash": "sha256-9t+GRk3eO9muCtKdNAwBtNBZ5dH1xHcnS17WaQyftwA=", + "owner": "input-output-hk", + "repo": "haskell-nix-example", + "rev": "580cb6db546a7777dad3b9c0fa487a366c045c4e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "nix", + "repo": "haskell-nix-example", + "type": "github" + } + }, "nix2container": { "inputs": { "flake-utils": "flake-utils_2", @@ -1993,11 +2048,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1695416179, - "narHash": "sha256-610o1+pwbSu+QuF3GE0NU5xQdTHM3t9wyYhB9l94Cd8=", + "lastModified": 1701362232, + "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "715d72e967ec1dd5ecc71290ee072bcaf5181ed6", + "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", "type": "github" }, "original": { @@ -2039,6 +2094,22 @@ "type": "github" } }, + "nixpkgs-2311_2": { + "locked": { + "lastModified": 1701386440, + "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-23.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "dir": "lib", @@ -2091,17 +2162,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1695318763, - "narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=", + "lastModified": 1694822471, + "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e12483116b3b51a185a33a272bf351e357ba9a99", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", "repo": "nixpkgs", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, @@ -2676,11 +2747,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1700438989, - "narHash": "sha256-x+7Qtboko7ds8CU8pq2sIZiD45DauYoX9LxBfwQr/hs=", + "lastModified": 1707178218, + "narHash": "sha256-3JatI3pDGahu+k5povDpQWBnMbngfL/8aKPLU4PsAxM=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "9c2015334cc77837b8454b3b10ef4f711a256f6f", + "rev": "43eb3859170423a3c1f048815070ed10099f7e5c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5ff471df347..2d27f2f9f15 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ url = "github:cardano-scaling/haskell-language-server?ref=2.6-patched"; flake = false; }; - cardano-node.url = "github:intersectmbo/cardano-node/8.7.3"; + cardano-node.url = "github:intersectmbo/cardano-node/4bb2048db77d623ee6e3678618c2d8b6c4676333"; mithril.url = "github:input-output-hk/mithril/2347.0"; }; diff --git a/hydra-cluster/config/devnet/genesis-conway.json b/hydra-cluster/config/devnet/genesis-conway.json index 5bad6d55103..4410964d59f 100644 --- a/hydra-cluster/config/devnet/genesis-conway.json +++ b/hydra-cluster/config/devnet/genesis-conway.json @@ -1,22 +1,23 @@ { "genDelegs": {}, "poolVotingThresholds": { - "pvtCommitteeNormal": 0.51, - "pvtCommitteeNoConfidence": 0.51, - "pvtHardForkInitiation": 0.51, - "pvtMotionNoConfidence": 0.51 + "committeeNormal": 0.51, + "committeeNoConfidence": 0.51, + "hardForkInitiation": 0.51, + "motionNoConfidence": 0.51, + "ppSecurityGroup": 0.51 }, "dRepVotingThresholds": { - "dvtMotionNoConfidence": 0.51, - "dvtCommitteeNormal": 0.51, - "dvtCommitteeNoConfidence": 0.51, - "dvtUpdateToConstitution": 0.51, - "dvtHardForkInitiation": 0.51, - "dvtPPNetworkGroup": 0.51, - "dvtPPEconomicGroup": 0.51, - "dvtPPTechnicalGroup": 0.51, - "dvtPPGovGroup": 0.51, - "dvtTreasuryWithdrawal": 0.51 + "motionNoConfidence": 0.51, + "committeeNormal": 0.51, + "committeeNoConfidence": 0.51, + "updateToConstitution": 0.51, + "hardForkInitiation": 0.51, + "ppNetworkGroup": 0.51, + "ppEconomicGroup": 0.51, + "ppTechnicalGroup": 0.51, + "ppGovGroup": 0.51, + "treasuryWithdrawal": 0.51 }, "committeeMinSize": 0, "committeeMaxTermLength": 200, diff --git a/hydra-cluster/test/Test/CardanoNodeSpec.hs b/hydra-cluster/test/Test/CardanoNodeSpec.hs index 64464474898..a960f403b06 100644 --- a/hydra-cluster/test/Test/CardanoNodeSpec.hs +++ b/hydra-cluster/test/Test/CardanoNodeSpec.hs @@ -12,7 +12,6 @@ import CardanoNode ( import CardanoClient (RunningNode (..), queryTipSlotNo) import Hydra.Cardano.Api (NetworkId (Testnet), NetworkMagic (NetworkMagic), unFile) -import Hydra.Cardano.Api qualified as NetworkId import Hydra.Cluster.Fixture (KnownNetwork (..)) import Hydra.Logging (Tracer, showLogsOnFailure) import System.Directory (doesFileExist) @@ -23,7 +22,7 @@ spec = do -- false positives test errors in case someone uses an "untested" / -- different than in shell.nix version of cardano-node and cardano-cli. it "has expected cardano-node version available" $ - getCardanoNodeVersion >>= (`shouldContain` "8.7.3") + getCardanoNodeVersion >>= (`shouldContain` "8.8.0") around (failAfter 5 . setupTracerAndTempDir) $ do it "withCardanoNodeDevnet does start a block-producing devnet within 5 seconds" $ \(tr, tmp) -> @@ -39,11 +38,13 @@ spec = do slot2 <- queryTipSlotNo networkId nodeSocket slot2 `shouldSatisfy` (> slot1) - it "withCardanoNodeOnKnownNetwork on mainnet starts synchronizing within 5 seconds" $ \(tr, tmp) -> + it "withCardanoNodeOnKnownNetwork on mainnet starts synchronizing within 5 seconds" $ \(_, _) -> pendingWith "not yet supported" + + it "withCardanoNodeOnKnownNetwork on sanchonet starts synchronizing within 5 seconds" $ \(tr, tmp) -> -- NOTE: This implies that withCardanoNodeOnKnownNetwork does not -- synchronize the whole chain before continuing. - withCardanoNodeOnKnownNetwork tr tmp Mainnet $ \RunningNode{nodeSocket, networkId, blockTime} -> do - networkId `shouldBe` NetworkId.Mainnet + withCardanoNodeOnKnownNetwork tr tmp Sanchonet $ \RunningNode{nodeSocket, networkId, blockTime} -> do + networkId `shouldBe` Testnet (NetworkMagic 4) blockTime `shouldBe` 20 -- Should synchronize blocks (tip advances) slot1 <- queryTipSlotNo networkId nodeSocket @@ -52,13 +53,9 @@ spec = do slot2 `shouldSatisfy` (> slot1) describe "findRunningCardanoNode" $ do - it "returns Nothing on non-matching network" $ \(tr, tmp) -> do - withCardanoNodeOnKnownNetwork tr tmp Preview $ \_ -> do - findRunningCardanoNode tmp Preproduction `shouldReturn` Nothing + it "returns Nothing on non-matching network" $ const $ pendingWith "No other valid network to test against." - it "returns Just running node on matching network" $ \(tr, tmp) -> do - withCardanoNodeOnKnownNetwork tr tmp Preview $ \runningNode -> do - findRunningCardanoNode tmp Preview `shouldReturn` Just runningNode + it "returns Just running node on matching network" $ const $ pendingWith "No other valid network to test against." setupTracerAndTempDir :: ToJSON msg => ((Tracer IO msg, FilePath) -> IO a) -> IO a setupTracerAndTempDir action = diff --git a/hydra-cluster/test/Test/Hydra/Cluster/CardanoCliSpec.hs b/hydra-cluster/test/Test/Hydra/Cluster/CardanoCliSpec.hs index ae6385ec1d1..69020d742dc 100644 --- a/hydra-cluster/test/Test/Hydra/Cluster/CardanoCliSpec.hs +++ b/hydra-cluster/test/Test/Hydra/Cluster/CardanoCliSpec.hs @@ -36,7 +36,7 @@ spec = Just something -> something == "Witnessed Tx BabbageEra" it "has expected cardano-cli version available" $ - readProcess "cardano-cli" ["--version"] "" >>= (`shouldContain` "8.17.0.0") + readProcess "cardano-cli" ["--version"] "" >>= (`shouldContain` "8.20.0.0") around (showLogsOnFailure "CardanoCliSpec") $ do it "query protocol-parameters is compatible with our FromJSON instance" $ \tracer ->