Skip to content

Commit

Permalink
Merge pull request #5951 from IntersectMBO/mgalazyn/chore/upgrade-car…
Browse files Browse the repository at this point in the history
…dano-api-cli

Upgrade cardano-cli-9.3 cardano-api-9.2
  • Loading branch information
carbolymer committed Aug 21, 2024
2 parents 6aa375c + 42b783f commit e9ab511
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 38 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:
fail-fast: false
matrix:
# If you edit these versions, make sure the version in the lonely macos-latest job below is updated accordingly
ghc: ["9.6", "9.8"]
# TODO add 9.8 again to the versions list when GHC-9.8 gets released with stm > 2.5.2,
# see https://github.com/haskell/stm/issues/76
ghc: ["9.6"]
cabal: ["3.12"]
sys:
- { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
Expand Down
8 changes: 4 additions & 4 deletions bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>=9.1
, plutus-ledger-api ^>=1.30
, plutus-tx ^>=1.30
, plutus-tx-plugin ^>=1.30
, cardano-api ^>=9.2
, plutus-ledger-api ^>=1.31
, plutus-tx ^>=1.31
, plutus-tx-plugin ^>=1.31

------------------------
-- Non-IOG dependencies
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 9.1
, cardano-api ^>= 9.2
, cardano-binary
, cardano-cli ^>= 9.2.1
, cardano-cli ^>= 9.3
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
Expand Down
7 changes: 4 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-06-23T23:01:13Z
, cardano-haskell-packages 2024-07-24T14:16:32Z
, hackage.haskell.org 2024-08-15T08:53:32Z
, cardano-haskell-packages 2024-08-15T10:40:33Z

packages:
cardano-node
Expand Down Expand Up @@ -60,7 +60,8 @@ package plutus-scripts-bench
constraints:
wai-extra < 3.1.15,

allow-newer: katip:Win32
allow-newer:
katip:Win32

-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
Expand Down
4 changes: 2 additions & 2 deletions cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ executable cardano-node-chairman
"-with-rtsopts=-T"
build-depends: cardano-api
, cardano-crypto-class
, cardano-git-rev ^>=0.2.2
, cardano-git-rev ^>= 0.2.2
, cardano-node ^>= 9.1
, cardano-prelude
, containers
Expand Down Expand Up @@ -88,5 +88,5 @@ test-suite chairman-tests
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 9.2.1
, cardano-cli:cardano-cli ^>= 9.3
, cardano-node-chairman:cardano-node-chairman
5 changes: 3 additions & 2 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 9.1
, cardano-api ^>= 9.2
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
Expand Down Expand Up @@ -201,7 +201,8 @@ library
, scientific
, si-timers
, sop-core
, stm
-- avoid stm-2.5.2 https://github.com/haskell/stm/issues/76
, stm <2.5.2 || >=2.5.3
, strict-sop-core
, strict-stm
, time
Expand Down
4 changes: 2 additions & 2 deletions cardano-submit-api/cardano-submit-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ library
, aeson
, async
, bytestring
, cardano-api ^>= 9.1
, cardano-api ^>= 9.2
, cardano-binary
, cardano-cli ^>= 9.2.1
, cardano-cli ^>= 9.3
, cardano-crypto-class ^>= 2.1.2
, http-media
, iohk-monitoring
Expand Down
4 changes: 2 additions & 2 deletions cardano-testnet/cardano-testnet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ library
, aeson-pretty
, ansi-terminal
, bytestring
, cardano-api ^>= 9.1
, cardano-cli ^>= 9.2.1
, cardano-api ^>= 9.2
, cardano-cli ^>= 9.3
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>= 0.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import qualified Data.Aeson.Encode.Pretty as Aeson
import qualified Data.Aeson.Key as Aeson
import qualified Data.Aeson.KeyMap as Aeson
import Data.Bifunctor (bimap)
import qualified Data.ByteString.Lazy as LBS
import Data.Data (type (:~:) (Refl))
import qualified Data.Map as Map
import Data.String
import qualified Data.ByteString.Lazy as LBS
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
Expand All @@ -56,11 +56,11 @@ import Lens.Micro ((^.))
import System.Directory (makeAbsolute)
import System.FilePath ((</>))

import Testnet.Components.Query (checkDRepsNumber, getEpochStateView,
watchEpochStateUpdate, EpochStateView)
import Testnet.Components.Query (EpochStateView, checkDRepsNumber, getEpochStateView,
watchEpochStateUpdate)
import qualified Testnet.Defaults as Defaults
import Testnet.Process.Cli.Transaction (TxOutAddress (ReferenceScriptAddress),
retrieveTransactionId, signTx, mkSimpleSpendOutputsOnlyTx, mkSpendOutputsOnlyTx,
mkSimpleSpendOutputsOnlyTx, mkSpendOutputsOnlyTx, retrieveTransactionId, signTx,
submitTx)
import Testnet.Process.Run (execCli', execCliStdoutToJson, mkExecConfig)
import Testnet.Property.Assert (assertErasEqual)
Expand All @@ -71,7 +71,7 @@ import Testnet.Types

import Hedgehog
import qualified Hedgehog as H
import Hedgehog.Extras (readJsonFile, MonadAssertion)
import Hedgehog.Extras (MonadAssertion, readJsonFile)
import qualified Hedgehog.Extras as H
import qualified Hedgehog.Extras.Test.Golden as H

Expand Down Expand Up @@ -362,6 +362,9 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.
-- treasury
H.noteM_ $ execCli' execConfig [ eraName, "query", "treasury" ]

TestQuerySPOStakeDistributionCmd -> do
pure () -- FIXME: https://github.com/IntersectMBO/cardano-node/pull/5932

where
-- | Wait for the part of the epoch when futurePParams are known
waitForFuturePParamsToStabilise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import Cardano.Testnet

import Prelude

import Control.Monad.Catch (MonadCatch)
import Control.Monad (unless, void)
import Control.Monad.Catch (MonadCatch)
import qualified Data.Text as Text
import GHC.Stack (HasCallStack)
import System.Exit
Expand Down Expand Up @@ -95,7 +95,7 @@ doTreasuryDonation :: ()
-> Int -- ^ The amount to donate
-> m ()
doTreasuryDonation sbe execConfig work epochStateView wallet0 idx currentTreasury' treasuryDonation = do
currentTreasury <-
currentTreasury <-
case currentTreasury' of
Nothing -> do
v <- unCoin <$> getTreasuryValue epochStateView
Expand Down Expand Up @@ -133,24 +133,24 @@ doTreasuryDonation sbe execConfig work epochStateView wallet0 idx currentTreasur
-- greater or equal to zero.
ct >= 0 && td >= 0
H.noteM_ $ execCli' execConfig
[ "conway", "transaction", "view" , "--tx-file", txBodyFp
[ "debug", "transaction", "view" , "--tx-file", txBodyFp
, "--output-json", "--out-file", txViewFp]

H.noteM_ $ execCli' execConfig
[ "conway", "transaction", "sign"
, "--tx-body-file", txBodyFp
, "--signing-key-file", signingKeyFp $ paymentKeyInfoPair wallet0
, "--out-file", signedTxFp
]

H.noteM_ $ execCli' execConfig
[ "conway", "transaction", "view" , "--tx-file", signedTxFp ]
[ "debug", "transaction", "view" , "--tx-file", signedTxFp ]

H.noteM_ $ execCli' execConfig
[ "conway", "transaction", "submit" , "--tx-file", signedTxFp ]

void $ waitForEpochs epochStateView (EpochInterval 3)

L.Coin finalTreasury <- getTreasuryValue epochStateView
H.note_ $ "finalTreasury: " <> show finalTreasury
finalTreasury H.=== (currentTreasury + toInteger treasuryDonation)
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions nix/pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ in with final;
};

cabal-plan = haskell-nix.tool compiler-nix-name "cabal-plan" {
cabalProjectLocal = ''
flags: +exe
'';
};

cardanolib-py = callPackage ./cardanolib-py { };
Expand Down

0 comments on commit e9ab511

Please sign in to comment.