Skip to content

Commit

Permalink
Merge pull request #5243 from input-output-hk/jc/update-chaps
Browse files Browse the repository at this point in the history
update chaps & integration
  • Loading branch information
disassembler authored Jun 1, 2023
2 parents 87a9caa + e70aee0 commit 6fff7d8
Show file tree
Hide file tree
Showing 43 changed files with 313 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2023-04-30"
CABAL_CACHE_VERSION: "2023-06-01"

# Modify this value to "invalidate" the secp cache.
SECP_CACHE_VERSION: "2022-12-30"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2023-04-30"
CABAL_CACHE_VERSION: "2023-06-01"

# Modify this value to "invalidate" the secp cache.
SECP_CACHE_VERSION: "2022-12-30"
Expand Down
2 changes: 1 addition & 1 deletion bench/locli/locli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ library
, optparse-generic
, ouroboros-consensus
-- for Data.SOP.Strict:
, ouroboros-network
, ouroboros-network ^>= 0.8.1.0
, ouroboros-network-api
, process
, quiet
Expand Down
6 changes: 5 additions & 1 deletion bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ common project-config
if os(windows)
buildable: False

if impl(ghc < 9)
buildable: False


common common-definitions
build-depends: base >= 4.14 && < 4.17
default-language: Haskell2010
Expand Down Expand Up @@ -68,7 +72,7 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, plutus-ledger-api >=1.0.0
, plutus-tx >=1.0.0
, plutus-tx-plugin >=1.0.0
Expand Down
5 changes: 5 additions & 0 deletions bench/tx-generator/scripts-fallback/CustomCall.plutus
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "PlutusScriptV2",
"description": "",
"cborHex": "5904485904450100003233223232323232323232323232323232323232323222323225335533353550032200213301333355300e1200132335012223335003220020020013500122001123300101401b253333350012101c2213335017501a002332335530101200135014001350130013350147149101000012101c101b2213335017501900233233553012120013350152233350032200200200135001220012001123300122337000040029000000a801199a80a1a980a89000a80928011aa8059a8030028999a80a280b19aa806980709000a80119aa8069807090009aa8059a8030028999a80a1a980a89000a80928011aa8059a80300288050b09aa8009100089a80180089911919191999ab9a3370e0029000119191991091980080180119191999ab9a3370e00290021091100191999ab9a3370e00490011091100091999ab9a3370e00690001091100111931900799ab9c00f01100d00c00b35573a0026ea8008c020004d5d09aba2500435742a006464c6401066ae70020028018d55ce80109aab9e00137540026a0064646464646666ae68cdc3800a40104646466442444446600800e00c6eb8008cd402dd70009aba135744a0086ae85400c8cccd5cd19b87002480188c8c8cc88488888cc00401c018dd680119a8063ad001357426ae894018d5d0a80291999ab9a3370e00690021191909111118028031bae001357426aae7801c8cccd5cd19b87004480088c8c8488888c00c018dd68009aba135573c01046666ae68cdc3802a40004244444004464c6401866ae7003003802802402001c018d55ce80189aab9e002135573c0026ea800526491035054310012322300237580026aa026446666aae7c00484880088cc88488cc00401000cc010d5d080118019aba200200412001112350012200135500f22112225335001100222133005002333553007120010050040011122333355002323350072233350080030010023500500133500622230033002001200122337000029001000a40006aa01a4422444a66a00226a00c006442666a01200a6008004666aa600e2400200a008002246a00244002246a002440042442466002006004244a66666a00442a66666a00442666a00ca01200400244260169310980524c26012931109805a4c442a66666a0064260169311099803999a8042805802001199a8041a980489000a805801800909805a4c2601493110980624c42a66666a004426014931109805a4c42666a00ca01000400226012931109805a4c2a66666a00242601293110980524c426012930805110980524c442a66666a00642601693110980624c426016930980524c4426600e666a010a014008004666a0106a601224002a01400600244a66a00420022010240026aa00c442444a66a0042a66a0022014442016442a66a0062016442a66a6600e0080042666a60122400200e006002201a244666ae68cdc3801000803002891199ab9a3371e00400200a0084004244004244002224646002002446600660040040021"
}
5 changes: 5 additions & 0 deletions bench/tx-generator/scripts-fallback/EcdsaSecp256k1Loop.plutus
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "PlutusScriptV2",
"description": "",
"cborHex": "5901ea5901e7010000323232332232332232223232323232253353232323333333574801446666ae68cdc39aab9d500a480008cccd55cfa8051280811999aab9f500a25011233335573ea0144a02446666aae7d40289404c8cccd55cf9aba2500b2533532333333357480024a02c4a02c4a02c46a02e6eb400894058070d5d0a80790a99a98059aba1500f215335300b35742a01e42a66a60166ae85403c84d406448cccc00401401000c0085405c5405854054540509405006806406005c0589403c05094038940389403894038051402d4029402484d400488894cd4ccd5cd19b880044820225e804c0484d40512411572656465656d6572206973203c2031303030303030001333301100400300200113500f49011d5472616365206572726f723a20496e76616c69642072656465656d657200135744a00226ae8940044d5d1280089aab9e500113754002246666666ae900049400c9400c9400c9400c8d4010dd700100489091180100188910009918008009119111299a999ab9a3370e00a904044bd00400388058a99a999ab9a33376800600400201000e2666600866e040152002003002001135009491245472616365206572726f723a2045434453412076616c69646174696f6e206661696c65640030020021220021220011232632003335738002006930900081"
}
5 changes: 5 additions & 0 deletions bench/tx-generator/scripts-fallback/Loop.plutus
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "PlutusScriptV1",
"description": "",
"cborHex": "587a58780100003322323222322533532333573466e200052080897a0090085002132632498cd5ce24811572656465656d6572206973203c2031303030303030000061300550021375a0026460020024464a66a666ae68cdc38012410112f400c00a2008264600400266e04009200230020021200112200212200101"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "PlutusScriptV2",
"description": "",
"cborHex": "5901ec5901e9010000323232332232332232223232323232253353232323333333574801446666ae68cdc39aab9d500a480008cccd55cfa8051280811999aab9f500a25011233335573ea0144a02446666aae7d40289404c8cccd55cf9aba2500b2533532333333357480024a02c4a02c4a02c46a02e6eb400894058070d5d0a80790a99a98059aba1500f215335300b35742a01e42a66a60166ae85403c84d406448cccc00401401000c0085405c5405854054540509405006806406005c0589403c05094038940389403894038051402d4029402484d400488894cd4ccd5cd19b880044820225e804c0484d40512411572656465656d6572206973203c2031303030303030001333301100400300200113500f49011d5472616365206572726f723a20496e76616c69642072656465656d657200135744a00226ae8940044d5d1280089aab9e500113754002246666666ae900049400c9400c9400c9400c8d4010dd700100489091180100188910009918008009119111299a999ab9a3370e00a904044bd00400388058a99a999ab9a33376a00600400201000e2666600866e040152002003002001135009491265472616365206572726f723a205363686e6f72722076616c69646174696f6e206661696c65640030020021220021220011232632003335738002006930900081"
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ benchmarkConnectTxSubmit ioManager handshakeTracer submissionTracer codecConfig
{ NtN.networkMagic = networkMagic
, NtN.diffusionMode = NtN.InitiatorOnlyDiffusionMode
, NtN.peerSharing = ownPeerSharing
, NtN.query = False
}) $
mkApp $
NtN.nodeToNodeProtocols NtN.defaultMiniProtocolParameters ( \them _ ->
Expand Down
17 changes: 15 additions & 2 deletions bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
Expand All @@ -10,7 +11,7 @@ module Cardano.TxGenerator.Setup.Plutus
)
where

import Data.Bifunctor (bimap)
import Data.Bifunctor
import Data.Map.Strict as Map (lookup)

import Control.Monad.Trans.Except
Expand All @@ -27,19 +28,31 @@ import Cardano.Ledger.Alonzo.TxInfo (exBudgetToExUnits)
import qualified PlutusLedgerApi.V1 as PlutusV1
import qualified PlutusLedgerApi.V2 as PlutusV2

import Cardano.Benchmarking.PlutusScripts(findPlutusScript)
import Cardano.TxGenerator.Types

#ifdef WITH_LIBRARY
import Cardano.Benchmarking.PlutusScripts (findPlutusScript)
#else
import Control.Exception (SomeException(..), try)
import Paths_tx_generator
#endif

type ProtocolVersion = (Int, Int)


readPlutusScript :: Either String FilePath -> IO (Either TxGenError ScriptInAnyLang)
readPlutusScript (Left s)
#ifdef WITH_LIBRARY
= pure
$ maybe (Left . TxGenError $ "readPlutusScript: " ++ s ++ " not found.")
Right
(findPlutusScript s)
#else
= try (getDataFileName $ "scripts-fallback/" ++ s ++ ".plutus") >>= either
(\(SomeException e) -> pure $ Left $ TxGenError $ show e)
(readPlutusScript . Right)
#endif

readPlutusScript (Right fp)
= runExceptT $ do
script <- firstExceptT ApiError $
Expand Down
8 changes: 8 additions & 0 deletions bench/tx-generator/test/ApiTest.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -44,8 +45,10 @@ import Cardano.Benchmarking.Script.Aeson (prettyPrint, prettyPrintOrde
import Cardano.Benchmarking.Script.Selftest (testScript)
import Cardano.Benchmarking.Script.Types (SubmitMode (..))

#ifdef WITH_LIBRARY
import Cardano.Benchmarking.PlutusScripts
import Cardano.Benchmarking.PlutusScripts.CustomCallTypes
#endif

import Cardano.Node.Protocol.Types

Expand Down Expand Up @@ -121,6 +124,10 @@ checkFund = genesisInitialFundForKey Mainnet

checkPlutusBuiltin ::
IO ()
#ifndef WITH_LIBRARY
checkPlutusBuiltin
= putStrLn "* checkPlutusBuiltin: skipped - no library available"
#else
checkPlutusBuiltin
= do
let script = case findPlutusScript "CustomCall.hs" of
Expand Down Expand Up @@ -149,6 +156,7 @@ checkPlutusBuiltin

toApiData :: CustomCallArg -> ScriptData
toApiData = fromPlutusData . PlutusTx.toData
#endif

checkPlutusLoop ::
Maybe TxGenPlutusParams
Expand Down
23 changes: 15 additions & 8 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,21 @@ data-files: data/protocol-parameters.json
data/loop.redeemer.json
data/ecdsa-secp256k1-loop.redeemer.json
data/schnorr-secp256k1-loop.redeemer.json
scripts-fallback/*.plutus

common project-config
if os(windows)
buildable: False

common with-library
if impl(ghc >= 9)
build-depends: plutus-scripts-bench
cpp-options: -DWITH_LIBRARY


library
import: project-config
import: project-config, with-library

hs-source-dirs: src
ghc-options: -Wall
-Wcompat
Expand Down Expand Up @@ -89,7 +97,7 @@ library
, attoparsec
, base16-bytestring
, bytestring
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-binary
, cardano-cli
, cardano-crypto-class
Expand Down Expand Up @@ -118,12 +126,11 @@ library
, ouroboros-consensus >= 0.6
, ouroboros-consensus-cardano >= 0.5
, ouroboros-consensus-diffusion >= 0.5.1
, ouroboros-network
, ouroboros-network ^>= 0.8.1.0
, ouroboros-network-api
, ouroboros-network-framework
, ouroboros-network-protocols
, plutus-ledger-api
, plutus-scripts-bench
, plutus-tx
, random
, serialise
Expand Down Expand Up @@ -170,7 +177,8 @@ executable tx-generator
, tx-generator

test-suite tx-generator-apitest
import: project-config
import: project-config, with-library

hs-source-dirs: test
main-is: ApiTest.hs
type: exitcode-stdio-1.0
Expand All @@ -185,10 +193,9 @@ test-suite tx-generator-apitest
, bytestring
, filepath
, optparse-applicative-fork
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-cli
, cardano-node
, plutus-scripts-bench
, plutus-tx
, transformers
, transformers-except
Expand All @@ -202,7 +209,7 @@ test-suite tx-generator-apitest
, bytestring
, filepath
, optparse-applicative-fork
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-cli
, cardano-node
, transformers
Expand Down
3 changes: 1 addition & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository cardano-haskell-packages
-- you need to run if you change them
index-state:
, hackage.haskell.org 2023-05-10T10:34:57Z
, cardano-haskell-packages 2023-05-25T10:00:00Z
, cardano-haskell-packages 2023-05-31T18:00:00Z

packages:
cardano-cli
Expand Down Expand Up @@ -106,4 +106,3 @@ package snap-server
-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

4 changes: 4 additions & 0 deletions cardano-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
- Fix `toEraInMode` for conway. This means for example that `query utxo`
works in Conway.
([PR5175](https://github.com/input-output-hk/cardano-node/pull/5175))
- Update ledger dependency bounds.
([PR 5243](https://github.com/input-output-hk/cardano-node/pull/5243))
- Add the query flag in `Ping` parser. See [here](https://github.com/input-output-hk/ouroboros-network/issues/3907) for more details.
([PR 5243](https://github.com/input-output-hk/cardano-node/pull/5243))

## 8.0.0 -- May 2023

Expand Down
12 changes: 6 additions & 6 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ library
, binary
, bytestring
, canonical-json
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-binary
, cardano-crypto
, cardano-crypto-class >= 2.1.1
Expand All @@ -120,7 +120,7 @@ library
, cardano-ledger-alonzo >= 1.1.1
, cardano-ledger-byron >= 1.0
, cardano-ledger-binary >= 1.0
, cardano-ledger-core >= 1.1
, cardano-ledger-core >= 1.2
, cardano-ledger-conway >= 1.1
, cardano-ledger-shelley >= 1.1.1
, cardano-ping ^>= 0.1.0.1
Expand All @@ -142,8 +142,8 @@ library
, microlens
, network
, optparse-applicative-fork
, ouroboros-consensus >= 0.6
, ouroboros-consensus-cardano >= 0.5
, ouroboros-consensus >= 0.7
, ouroboros-consensus-cardano >= 0.6
, ouroboros-consensus-protocol >= 0.5
, ouroboros-network-api
, ouroboros-network-protocols
Expand Down Expand Up @@ -198,7 +198,7 @@ test-suite cardano-cli-test
, base16-bytestring
, bech32 >= 1.1.0
, bytestring
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-api-gen ^>= 8.1.0.2
, cardano-cli
, cardano-cli:cardano-cli-test-lib
Expand Down Expand Up @@ -240,7 +240,7 @@ test-suite cardano-cli-golden
build-depends: aeson >= 1.5.6.0
, base16-bytestring
, bytestring
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-cli
, cardano-cli:cardano-cli-test-lib
, cardano-crypto-class ^>= 2.1
Expand Down
6 changes: 3 additions & 3 deletions cardano-client-demo/StakeCredentialHistory.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Cardano.Ledger.Crypto (StandardCrypto)
import qualified Cardano.Ledger.Shelley.API as L
import qualified Cardano.Ledger.Shelley.Rewards as L
import qualified Cardano.Ledger.Shelley.RewardUpdate as L
import qualified Cardano.Ledger.UMapCompact as UM
import qualified Cardano.Ledger.UMap as UM
import qualified Ouroboros.Consensus.Shelley.Ledger as Shelley

import qualified Codec.Binary.Bech32 as Bech32
Expand Down Expand Up @@ -258,8 +258,8 @@ main = do
let getGoSnapshot = L.unStake . L.ssStake . L.ssStakeGo . L.esSnapshots . L.nesEs
getBalances = UM.rewView
. L.dsUnified
. L.dpsDState
. L.lsDPState
. L.certDState
. L.lsCertState
. L.esLState
. L.nesEs
getPV :: LC.EraPParams era => L.NewEpochState era -> L.ProtVer
Expand Down
10 changes: 5 additions & 5 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 8.1.0.1
, cardano-api ^>= 8.2
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev
Expand Down Expand Up @@ -179,8 +179,8 @@ library
, ouroboros-consensus-diffusion >= 0.5.1
, ouroboros-consensus-protocol >= 0.5
, ouroboros-network-api
, ouroboros-network >= 0.6
, ouroboros-network-framework >= 0.5
, ouroboros-network ^>= 0.8.1.0
, ouroboros-network-framework >= 0.6
, ouroboros-network-protocols
, prettyprinter
, prettyprinter-ansi-terminal
Expand Down Expand Up @@ -233,8 +233,8 @@ test-suite cardano-node-test
build-depends: base >= 4.14 && < 4.17
, aeson >= 1.5.6.0
, bytestring
, cardano-api ^>= 8.1.0.1
, cardano-crypto-class
, cardano-api ^>= 8.2
, cardano-ledger-core
, cardano-node
, cardano-slotting >= 0.1
Expand All @@ -248,7 +248,7 @@ test-suite cardano-node-test
, ouroboros-consensus
, ouroboros-consensus-cardano
, ouroboros-consensus-diffusion
, ouroboros-network
, ouroboros-network ^>= 0.8.1.0
, ouroboros-network-api
, text
, time
Expand Down
Loading

0 comments on commit 6fff7d8

Please sign in to comment.