From 9b0aee678aa491dc6e9832f318c244971c72566e Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Wed, 7 Feb 2024 09:28:44 +0100 Subject: [PATCH] Bump CHaP, remove SRP, fix --supply error in CLI in testnet tests, increase testnet initial total supply --- .github/workflows/haskell.yml | 2 +- bench/tx-generator/tx-generator.cabal | 2 +- cabal.project | 9 +-------- cardano-node-chairman/cardano-node-chairman.cabal | 2 +- cardano-submit-api/cardano-submit-api.cabal | 2 +- cardano-testnet/cardano-testnet.cabal | 2 +- .../src/Testnet/Components/Configuration.hs | 11 ++++++----- flake.lock | 6 +++--- scripts/babbage/mkfiles.sh | 4 ++-- 9 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 43846fdff9d..53563dcc5cb 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -38,7 +38,7 @@ jobs: env: # Modify this value to "invalidate" the cabal cache. - CABAL_CACHE_VERSION: "2024-02-05" + CABAL_CACHE_VERSION: "2024-02-07" concurrency: group: > diff --git a/bench/tx-generator/tx-generator.cabal b/bench/tx-generator/tx-generator.cabal index 5fb2e828042..d801f5ec65b 100644 --- a/bench/tx-generator/tx-generator.cabal +++ b/bench/tx-generator/tx-generator.cabal @@ -100,7 +100,7 @@ library , bytestring , cardano-api ^>= 8.38 , cardano-binary - , cardano-cli ^>= 8.19.0.0 + , cardano-cli ^>= 8.20.0.0 , cardano-crypto-class , cardano-crypto-wrapper , cardano-data diff --git a/cabal.project b/cabal.project index 5373b8ad026..e723895ecaf 100644 --- a/cabal.project +++ b/cabal.project @@ -14,7 +14,7 @@ repository cardano-haskell-packages -- you need to run if you change them index-state: , hackage.haskell.org 2024-02-06T15:14:59Z - , cardano-haskell-packages 2024-02-06T15:25:20Z + , cardano-haskell-packages 2024-02-07T07:51:35Z packages: cardano-git-rev @@ -60,10 +60,3 @@ package plutus-scripts-bench -- temporary! Please read the section in CONTRIBUTING about updating dependencies. -- `smtp-mail` should depend on `crypton-connection` rather than `connection`! - -source-repository-package - type: git - location: https://github.com/IntersectMBO/cardano-cli.git - tag: 760a6f5c84a5ad4480fcb10bec52faea6c3d73a1 - subdir: cardano-cli - --sha256: sha256-xXqbKL9nUHwj4VLOFSNTL1RA/bdDCcvBLg8DnmjGcSw= diff --git a/cardano-node-chairman/cardano-node-chairman.cabal b/cardano-node-chairman/cardano-node-chairman.cabal index aae13c72b28..b4710d0a02a 100644 --- a/cardano-node-chairman/cardano-node-chairman.cabal +++ b/cardano-node-chairman/cardano-node-chairman.cabal @@ -89,5 +89,5 @@ test-suite chairman-tests ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T build-tool-depends: cardano-node:cardano-node - , cardano-cli:cardano-cli ^>= 8.19.0.0 + , cardano-cli:cardano-cli ^>= 8.20 , cardano-node-chairman:cardano-node-chairman diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index d59e74c89b9..d23b152e8ad 100644 --- a/cardano-submit-api/cardano-submit-api.cabal +++ b/cardano-submit-api/cardano-submit-api.cabal @@ -41,7 +41,7 @@ library , bytestring , cardano-api ^>= 8.38 , cardano-binary - , cardano-cli ^>= 8.19.0.0 + , cardano-cli ^>= 8.20.0.0 , cardano-crypto-class ^>= 2.1.2 , http-media , iohk-monitoring diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index 5ebc5715ee0..6277c13f40a 100644 --- a/cardano-testnet/cardano-testnet.cabal +++ b/cardano-testnet/cardano-testnet.cabal @@ -35,7 +35,7 @@ library , ansi-terminal , bytestring , cardano-api ^>= 8.38 - , cardano-cli ^>= 8.19.0.0 + , cardano-cli ^>= 8.20.0.0 , cardano-crypto-class , cardano-crypto-wrapper , cardano-ledger-alonzo diff --git a/cardano-testnet/src/Testnet/Components/Configuration.hs b/cardano-testnet/src/Testnet/Components/Configuration.hs index a6a4aa2fab3..44dcd933d0f 100644 --- a/cardano-testnet/src/Testnet/Components/Configuration.hs +++ b/cardano-testnet/src/Testnet/Components/Configuration.hs @@ -1,5 +1,6 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} @@ -116,11 +117,11 @@ createSPOGenesisAndFiles (NumPools numPoolNodes) era shelleyGenesis (TmpAbsolute -- 50 second epochs -- Epoch length should be "10 * k / f" where "k = securityParam, f = activeSlotsCoeff" H.rewriteJsonFile genesisShelleyFpAbs $ \o -> o + & L.key "protocolParams" . L.key "rho" . L._Number .~ 0.1 + & L.key "protocolParams" . L.key "tau" . L._Number .~ 0.1 + & L.key "protocolParams" . L.key "protocolVersion" . L.key "major" . L._Integer .~ 8 & L.key "securityParam" . L._Integer .~ 5 - & L.key "rho" . L._Double .~ 0.1 - & L.key "tau" . L._Double .~ 0.1 & L.key "updateQuorum" . L._Integer .~ 2 - & L.key "protocolParams" . L.key "protocolVersion" . L.key "major" . L._Integer .~ 8 -- TODO: create-testnet-data should have arguments for -- Alonzo and Conway genesis that are optional and if not @@ -134,8 +135,8 @@ createSPOGenesisAndFiles (NumPools numPoolNodes) era shelleyGenesis (TmpAbsolute , "--spec-shelley", genesisShelleyFpAbs , "--testnet-magic", show @Word32 testnetMagic , "--pools", show @Int numPoolNodes - , "--supply", "1000000000000" - , "--supply-delegated", "1000000000000" + , "--total-supply", show @Int 2_000_000_000_000 + , "--delegated-supply", show @Int 1_000_000_000_000 , "--stake-delegators", show @Int numStakeDelegators , "--utxo-keys", show numSeededUTxOKeys , "--drep-keys", "3" diff --git a/flake.lock b/flake.lock index 66901cf88bc..46b8a2e88fa 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1707233847, - "narHash": "sha256-qKxufDdwSWx/5Qq2YnZysBqCMJ8n2xrhnyNvyCaMzg4=", + "lastModified": 1707293988, + "narHash": "sha256-UAa4nL8qhPyI133IJOPMBgLECa91CPPwwhypFXKm7Fw=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "2ec70a5d10b1d7e1befa6a59814a727b7f879a40", + "rev": "501510e79f9cf76012cba0e86f88fa0b8b053fbd", "type": "github" }, "original": { diff --git a/scripts/babbage/mkfiles.sh b/scripts/babbage/mkfiles.sh index dce3cd1705f..6ed8d78fb43 100755 --- a/scripts/babbage/mkfiles.sh +++ b/scripts/babbage/mkfiles.sh @@ -109,8 +109,8 @@ $SED -i "${ROOT}/configuration.yaml" \ $CARDANO_CLI genesis create-staked --genesis-dir "${ROOT}" \ --testnet-magic "${NETWORK_MAGIC}" \ --gen-pools 3 \ - --supply 2000000000000 \ - --supply-delegated 240000000002 \ + --supply 2000000000000 \ + --supply-delegated 240000000002 \ --gen-stake-delegs 3 \ --gen-utxo-keys 3