Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,39 @@ Specifically, you will probably want to say `nix flake lock --update-input <inpu

Do *not* use `nix flake update`, as that will update all the inputs, which we typically don't want to do.

[[update-ghc]]
=== How to upgrade GHC

Using Nix, we build all packages in `marconi` using the GHC version specified in link:nix/cells/marconi/ghc-compiler-nix-name.nix[].
Eventually, you might want to upgrade GHC to a later version.

The first thing to do is to change the GHC version in link:nix/cells/marconi/ghc-compiler-nix-name.nix[] (ex. change `ghc8107` to `ghc927`).
Then, you should update the constraints specified in link:nix/cells/marconi/library/haskell-language-server-project.nix[].
For example, when updating from `ghc8107` to `ghc927`, we needed to change:

```
cabalProjectLocal = ''
constraints: stylish-haskell==0.13.0.0, hlint==3.2.8
'';
```

to

```
cabalProjectLocal = ''
constraints: stylish-haskell==0.14.2.0, hlint==3.4.1
'';
```

Afterwards, you need to restart your Nix shell.
Doing so *will* rebuild GHC and all of the Haskell packages.
That is inevitable, and it takes around 24h.

Then, you need to compile all of the Cabal projects in the repository, and fix any compilation warnings and errors.

Finally, you can submit a PR and CI system will also rebuild GHC.
Once it's done, it will cache the compiled packages, so that they can be reused when users open a Nix shell.

=== How to build the code with profiling

TODO: Currently not available, coming soon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

{ inputs, cell }:

cell.library.plutus-apps-project.index-state
cell.library.plutus-apps-project.index-state-max
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

{ inputs, cell }:

"ghc8107"
"ghc928"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cell.library.pkgs.haskell-nix.cabalProject' {
# b) Pull out the tools themselves from the HLS project so we can use
# them elsewhere
cabalProjectLocal = ''
constraints: stylish-haskell==0.13.0.0, hlint==3.2.8
constraints: stylish-haskell==0.14.2.0, hlint==3.4.1
'';

src = inputs.haskell-language-server;
Expand Down
153 changes: 55 additions & 98 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ repository cardano-haskell-packages
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

index-state: 2023-04-20T00:00:00Z

-- See CONTRIBUTING.adoc for how to update index-state
index-state:
, hackage.haskell.org 2023-04-20T00:00:00Z
, cardano-haskell-packages 2023-05-10T00:00:00Z
, hackage.haskell.org 2023-08-23T00:00:00Z
, cardano-haskell-packages 2023-08-23T00:00:00Z

packages: cardano-node-emulator
cardano-node-socket-emulator
Expand All @@ -28,7 +26,6 @@ packages: cardano-node-emulator
plutus-contract
plutus-contract-certification
plutus-contract-model
plutus-example
plutus-ledger
plutus-pab
plutus-pab-executables
Expand All @@ -47,6 +44,9 @@ benchmarks: true
-- 'tasty' output.
test-show-details: direct

package cardano-crypto-praos
flags: -external-libsodium-vrf

allow-newer:
-- cardano-ledger packages need aeson >2, the following packages have a
-- too restictive upper bounds on aeson, so we relax them here. The hackage
Expand All @@ -58,42 +58,42 @@ allow-newer:
, servant:aeson
, servant-client-core:aeson
, servant-server:aeson
, persistent:aeson
, servant-foreign:lens
, blockfrost-api:lens
, plutus-core:dependent-sum-template
, docopt:template-haskell
, *:vector
-- temporary
, cardano-wallet:cardano-api
, cardano-testnet:cardano-api
, ouroboros-consensus-byron:*

constraints:
-- cardano-prelude-0.1.0.0 needs
, protolude <0.3.1

-- cardano-ledger-byron-0.1.0.0 needs
, cardano-binary <1.5.0.1

-- plutus-core-1.0.0.1 needs
, cardano-crypto-class >2.0.0.0
, algebraic-graphs <0.7

-- cardano-ledger-core-0.1.0.0 needs
, cardano-crypto-class <2.0.0.1

-- cardano-crypto-class-2.0.0.0.1 needs
, cardano-prelude <0.1.0.1

-- dbvar from cardano-wallet needs
, io-classes <0.3.0.0

-- newer typed-protocols need io-classes>=0.3.0.0 which is incompatible with dbvar's constraint above
, typed-protocols==0.1.0.0

, aeson >= 2

, hedgehog >= 1.1
allow-older:
strict-containers:binary,containers

, resource-pool <0.4.0.0

, http2 <4.0.0

-- ouroboros-consensus-shelley-0.1.0.1 needs
, ouroboros-consensus-protocol==0.1.0.1
constraints:
dependent-sum-template >= 0.2
, quickcheck-contractmodel >= 0.1.5.0
, quickcheck-threatmodel >= 1.1.0
, docopt >= 0.7.0.7
, strict-containers ^>= 0.2,
plutus-tx >= 1.5.0 && < 1.6,
cardano-api >= 8.2.0 && < 8.3,
cardano-strict-containers >= 0.1.2 && < 0.2,
cardano-slotting >= 0.1.1 && < 0.2,
cardano-ledger-binary >= 1.1.1 && < 1.2,
cardano-ledger-allegra >= 1.1.1 && < 1.2,
cardano-ledger-core >= 1.2.0 && < 1.3,
cardano-ledger-shelley >= 1.2.0 && < 1.3,
cardano-ledger-alonzo >= 1.2.1 && < 1.3,
cardano-ledger-api >= 1.2.0 && < 1.3,
cardano-ledger-babbage >= 1.2.1 && < 1.3,
ouroboros-consensus >= 0.7.0 && < 0.8,
ouroboros-consensus-cardano >= 0.6.0 && < 0.7,

optparse-applicative-fork < 0.18,
optparse-applicative < 0.18

-- The plugin will typically fail when producing Haddock documentation. However,
-- in this instance you can simply tell it to defer any errors to runtime (which
Expand All @@ -116,8 +116,6 @@ package plutus-contract-model
-- For dev work we don't care about performance so much, so this is okay.
package cardano-ledger-alonzo
optimization: False
package ouroboros-consensus-shelley
optimization: False
package ouroboros-consensus-cardano
optimization: False
package cardano-api
Expand All @@ -130,83 +128,42 @@ package cardano-wallet-cli
optimization: False
package cardano-wallet-launcher
optimization: False
package cardano-wallet-core-integration
optimization: False

-- Direct dependency.
-- Compared to others, cardano-wallet doesn't bump dependencies very often.
-- Making it a good place to start when bumping dependencies.
-- As, for example, bumping the node first highly risks breaking API with the wallet.
-- Unless early bug fixes are required, this is fine as the wallet tracks stable releases of the node.
-- And it is indeed nice for plutus-apps to track stable releases of the node too.
--
-- The current version is dated 2022/08/10
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-wallet
tag: 18a931648550246695c790578d4a55ee2f10463e
tag: 3f0d2f3abe706958fab8cdc528184068bd0453c9
--sha256: 1xbr5qrz716mh3vhng64m4v6zhp03x5lcf0kld5mmm1yij0fadwa
subdir:
lib/cli
lib/core
lib/core-integration
lib/dbvar
lib/balance-tx
lib/coin-selection
lib/delta-store
lib/delta-table
lib/delta-types
lib/launcher
lib/numeric
lib/shelley
lib/strict-non-empty-containers
lib/primitive
lib/test-utils
lib/text-class
lib/wai-middleware-logging
lib/wallet
lib/wallet-benchmarks

-- Should follow cardano-wallet.
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-addresses
tag: b7273a5d3c21f1a003595ebf1e1f79c28cd72513
tag: 6b55f96d57a181f898eb2a50531d3ae4280c549c
--sha256: 0yygam995i3mawk6hfgxb6v918phvqzyipzhjflff0l6zfrldy7f
subdir:
-- cardano-addresses-cli
command-line
-- cardano-addresses
core

-- This is needed because we rely on an unreleased branch of
-- cardano-ledger-alonzo. The feature we need
-- (evaluateTransactionExecutionUnitsWithLogs) in only included from
-- cardano-ledger-alonzo version 1.0.0.0
-- See https://github.com/input-output-hk/cardano-ledger/pull/3111
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: da3e9ae10cf9ef0b805a046c84745f06643583c2
subdir:
eras/alonzo/impl
eras/alonzo/test-suite
eras/babbage/impl
eras/babbage/test-suite
eras/byron/chain/executable-spec
eras/byron/crypto
eras/byron/crypto/test
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
eras/byron/ledger/impl/test
eras/shelley/impl
eras/shelley/test-suite
eras/shelley-ma/impl
eras/shelley-ma/test-suite
libs/cardano-ledger-core
libs/cardano-ledger-pretty
libs/cardano-protocol-tpraos
libs/cardano-data
libs/vector-map
libs/set-algebra
libs/small-steps
libs/small-steps-test
libs/non-integral

source-repository-package
type: git
location: https://github.com/input-output-hk/marconi
tag: 7285a3bc1ae53bf672c7cc2359210c6c29fbce44
location: https://github.com/input-output-hk/quickcheck-contractmodel
tag: 268e3efccbc851912b1859a0dca977e39e3a6878
--sha256: sha256-jOQvqhOj1huYTkl7K+f0UHlQuVL+bv/Ab4+c4l3ZCiw=
subdir:
cardano-streaming
marconi-chain-index
marconi-core
quickcheck-contractmodel
quickcheck-threatmodel
24 changes: 14 additions & 10 deletions cardano-node-emulator/cardano-node-emulator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,52 @@ library
-- Local components
--------------------
build-depends:
, freer-extras >=1.2.0
, plutus-ledger >=1.2.0
, freer-extras >=1.2.0
, plutus-ledger >=1.2.0
, plutus-script-utils >=1.2.0

--------------------------
-- Other IOG dependencies
--------------------------
build-depends:
, cardano-api:{cardano-api, gen} >=1.35
, cardano-api:{cardano-api, gen} ^>=8.2
, cardano-crypto
, cardano-ledger-allegra
, cardano-ledger-alonzo
, cardano-ledger-api
, cardano-ledger-babbage
, cardano-ledger-core
, cardano-ledger-mary
, cardano-ledger-shelley
, cardano-ledger-shelley-ma
, cardano-slotting
, mtl
, ouroboros-consensus
, plutus-core >=1.0.0
, plutus-ledger-api >=1.0.0
, plutus-tx >=1.0.0
, quickcheck-contractmodel >=0.1.4.0

-- , quickcheck-contractmodel >=0.1.4.0

------------------------
-- Non-IOG dependencies
------------------------
build-depends:
, aeson >=2
, aeson >=2
, array
, base >=4.9 && <5
, base >=4.9 && <5
, bytestring
, cardano-strict-containers
, containers
, data-default
, either
, freer-simple
, hedgehog
, lens
, mtl
, prettyprinter >=1.1.0.1
, prettyprinter >=1.1.0.1
, QuickCheck
, quickcheck-contractmodel
, quickcheck-dynamic
, serialise
, strict-containers
, text
, time

Expand Down
Loading