Skip to content

Commit

Permalink
Merge pull request #1624 from Plutonomicon/dshuiski/conway
Browse files Browse the repository at this point in the history
Add Conway support, Replace Plutip with cardano-testnet
  • Loading branch information
klntsky authored Jul 30, 2024
2 parents 26c4a25 + 1961c3a commit bcbfb9b
Show file tree
Hide file tree
Showing 143 changed files with 25,358 additions and 11,490 deletions.
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ node_modules
plutip-server/dist-newstyle/
plutip-server/dist/
plutip-server/.stack-work/
nixos.qcow2
80 changes: 56 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,98 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [[v9.0.0]](#v900)
- [Deprecated](#deprecated)
- [[v9.1.0]](#v910)
- [Added](#added)
- [Removed](#removed)
- [Changed](#changed)
- [Removed](#removed)
- [Fixed](#fixed)
- [[v8.0.0]](#v800)
- [[v9.0.0]](#v900)
- [Deprecated](#deprecated)
- [Added](#added-1)
- [Removed](#removed-1)
- [Changed](#changed-1)
- [Fixed](#fixed-1)
- [Removed](#removed-1)
- [[v7.0.0]](#v700)
- [[v8.0.0]](#v800)
- [Added](#added-2)
- [Changed](#changed-2)
- [Fixed](#fixed-2)
- [Removed](#removed-2)
- [[v6.0.0]](#v600)
- [[v7.0.0]](#v700)
- [Added](#added-3)
- [Changed](#changed-3)
- [Fixed](#fixed-3)
- [Removed](#removed-3)
- [[v5.0.0]](#v500)
- [[v6.0.0]](#v600)
- [Added](#added-4)
- [Changed](#changed-4)
- [Removed](#removed-4)
- [Fixed](#fixed-4)
- [Runtime Dependencies](#runtime-dependencies)
- [[v4.0.2] - 2023-01-17](#v402---2023-01-17)
- [Fixed](#fixed-5)
- [[v4.0.1] - 2022-12-20](#v401---2022-12-20)
- [Removed](#removed-4)
- [[v5.0.0]](#v500)
- [Added](#added-5)
- [[v4.0.0] - 2022-12-15](#v400---2022-12-15)
- [Added](#added-6)
- [Changed](#changed-5)
- [Removed](#removed-5)
- [Fixed](#fixed-5)
- [Runtime Dependencies](#runtime-dependencies)
- [[v4.0.2] - 2023-01-17](#v402---2023-01-17)
- [Fixed](#fixed-6)
- [Runtime Dependencies](#runtime-dependencies-1)
- [[3.0.0] - 2022-11-21](#300---2022-11-21)
- [[v4.0.1] - 2022-12-20](#v401---2022-12-20)
- [Added](#added-6)
- [[v4.0.0] - 2022-12-15](#v400---2022-12-15)
- [Added](#added-7)
- [Changed](#changed-6)
- [Removed](#removed-6)
- [Fixed](#fixed-7)
- [Runtime Dependencies](#runtime-dependencies-2)
- [[2.0.0] - 2022-09-12](#200---2022-09-12)
- [Runtime Dependencies](#runtime-dependencies-1)
- [[3.0.0] - 2022-11-21](#300---2022-11-21)
- [Added](#added-8)
- [Changed](#changed-7)
- [Removed](#removed-7)
- [Fixed](#fixed-8)
- [[2.0.0-alpha] - 2022-07-05](#200-alpha---2022-07-05)
- [Runtime Dependencies](#runtime-dependencies-2)
- [[2.0.0] - 2022-09-12](#200---2022-09-12)
- [Added](#added-9)
- [Removed](#removed-8)
- [Changed](#changed-8)
- [Removed](#removed-8)
- [Fixed](#fixed-9)
- [[1.1.0] - 2022-06-30](#110---2022-06-30)
- [[2.0.0-alpha] - 2022-07-05](#200-alpha---2022-07-05)
- [Added](#added-10)
- [Removed](#removed-9)
- [Changed](#changed-9)
- [Fixed](#fixed-10)
- [[1.0.1] - 2022-06-17](#101---2022-06-17)
- [[1.1.0] - 2022-06-30](#110---2022-06-30)
- [Fixed](#fixed-11)
- [[1.0.1] - 2022-06-17](#101---2022-06-17)
- [Fixed](#fixed-12)
- [[1.0.0] - 2022-06-10](#100---2022-06-10)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## [v9.1.0]

This version provides basic Conway support and replaces Plutip with `cardano-testnet`.

- `cardano-node`: 9.1.0
- `ogmios`: 6.5.0
- `kupo`: 2.9.0
- `@mlabs-haskell/cardano-serialization-lib-gc`: `12.0.0-alpha.31` (wraps the same version of [CSL](https://github.com/Emurgo/cardano-serialization-lib/))
- `@mlabs-haskell/uplc-apply-args`: `1.0.29-alpha` (wraps the same version of the [`uplc` crate](https://github.com/aiken-lang/aiken/tree/main/crates/uplc))

### Added

- `Contract.Transaction.getTxAuxiliaryData` for querying transaction data ([#1624](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1624)).

### Changed

- `Contract.Test.Plutip` is replaced with `Contract.Test.Testnet` that uses `cardano-testnet` instead of Plutip. As a result, we reduced the dependency footprint (`cardano-testnet` is distributed with `cardano-node`, so there are no internal Haskell components anymore in CTL) ([#1624](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1624))

### Removed

- `Contract.Transaction.getTxMetadata` - use `getTxAuxiliaryData` ([#1624](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1624))

### Fixed

- Non-deterministic `ClientHttpError` raised during tests on rare occasions ([#1624](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1624)).

## [v9.0.0]

### Deprecated
Expand All @@ -94,6 +125,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Changed

- Bumped Ogmios to version 6.0.3 ([#1626](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1626))
- `Contract.Transaction.mkUnbalancedTx` now returns a tuple: a transaction and the UTxOs it used.
- `Contract.Transaction.balanceTx` accepts two extra argument: a list of used UTxOs (set to `Data.Map.empty` if none of them are coming from the outside of the wallet) and balancer constraints (set to `mempty` if not needed)
- Default synchronization parameters: all [wallet <-> query layer synchronization primitives](./doc/query-layers.md) are now off by default. The reason is that the runtime overhead made the users unhappy and it was not worth it for most of the users. If your dApp sends transactions in quick succession, consider enabling the synchronization again by using `softSynchronizationParams` (old behavior) or `strictSynchronizationParams`.
Expand Down Expand Up @@ -129,7 +161,7 @@ Starting from this version, CTL does not use Plutus-domain types anymore. This c
- Sharing wallets between Plutip tests - see [the docs for this feature](./doc/plutip-testing.md#sharing-wallet-state-between-tests) ([#1585](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1585))
- `runPlutipTestPlan` is a new function that executes a `ContractTestPlan`.
- `sameWallets` is a new function that creates a `ContractTestPlan` from a `UtxoDistribution` and a `TestPlanM` of the same wallets running different `Contract`s.
- new `onClusterStartup` hook that allows to get cluster startup parameters (private keys, `cardano-node` socket and config paths). See [`Test.Ctl.Plutip.Contract.ClusterParameters`](./test/Plutip/Contract/ClusterParameters.purs). ([#1610](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1610))
- new `onClusterStartup` hook that allows to get cluster startup parameters (private keys, `cardano-node` socket and config paths). See [`Test.Ctl.Plutip.Contract.ClusterParameters`](https://github.com/Plutonomicon/cardano-transaction-lib/blob/a5f9947/test/Plutip/Contract/ClusterParameters.purs). ([#1610](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1610))


### Changed
Expand Down
27 changes: 14 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
SHELL := bash
.ONESHELL:
.PHONY: esbuild-bundle esbuild-serve webpack-bundle webpack-serve check-format format query-testnet-tip clean check-explicit-exports spago-build create-bundle-entrypoint create-html-entrypoint delete-bundle-entrypoint run-template-checks
.PHONY: esbuild-bundle esbuild-serve webpack-bundle webpack-serve check-format \
format query-preview-testnet-tip query-preprod-testnet-tip \
clean check-explicit-exports build create-bundle-entrypoint \
create-html-entrypoint delete-bundle-entrypoint
.SHELLFLAGS := -eu -o pipefail -c

ps-sources := $(shell fd --no-ignore-parent -epurs)
nix-sources := $(shell fd --no-ignore-parent -enix --exclude='spago*')
js-sources := $(shell fd --no-ignore-parent -ejs -ecjs)
purs-args := "--stash --censor-lib --censor-codes=UserDefinedWarning,ImplicitImport,ImplicitQualifiedImport,ImplicitQualifiedImportReExport"

### Bundler setup

Expand All @@ -21,8 +25,8 @@ preview-node-ipc = $(shell docker volume inspect store_node-preview-ipc | jq -r
preprod-node-ipc = $(shell docker volume inspect store_node-preprod-ipc | jq -r '.[0].Mountpoint')
serve-port := 4008

spago-build:
@spago build
build:
@spago build --purs-args ${purs-args}

create-bundle-entrypoint:
@mkdir -p dist/
Expand All @@ -40,20 +44,20 @@ create-html-entrypoint:
</html>
EOF

esbuild-bundle: spago-build create-bundle-entrypoint
esbuild-bundle: build create-bundle-entrypoint
@mkdir -p dist/
BROWSER_RUNTIME=${browser-runtime} node esbuild/bundle.js ./dist/entrypoint.js dist/index.js
@make delete-bundle-entrypoint

esbuild-serve: spago-build create-bundle-entrypoint create-html-entrypoint
esbuild-serve: build create-bundle-entrypoint create-html-entrypoint
BROWSER_RUNTIME=1 node esbuild/serve.js ./dist/entrypoint.js dist/index.js dist/ ${serve-port}

webpack-bundle: spago-build create-bundle-entrypoint
webpack-bundle: build create-bundle-entrypoint
BROWSER_RUNTIME=${browser-runtime} webpack --mode=production \
-o dist/ --env entry=./dist/entrypoint.js
@make delete-bundle-entrypoint

webpack-serve: spago-build create-bundle-entrypoint create-html-entrypoint
webpack-serve: build create-bundle-entrypoint create-html-entrypoint
BROWSER_RUNTIME=1 webpack-dev-server --progress \
--port ${serve-port} \
-o dist/ --env entry=./dist/entrypoint.js
Expand All @@ -78,7 +82,7 @@ check-format: check-explicit-exports check-examples-imports check-whitespace
@purs-tidy check ${ps-sources}
@nixpkgs-fmt --check ${nix-sources}
@prettier --log-level warn -c ${js-sources}
@eslint --quiet ${js-sources} --parser-options 'sourceType: module'
@eslint --quiet ${js-sources}

format:
@purs-tidy format-in-place ${ps-sources}
Expand All @@ -97,14 +101,11 @@ query-preprod-testnet-tip:
CARDANO_NODE_SOCKET_PATH=${preprod-node-ipc}/node.socket cardano-cli query tip \
--testnet-magic 1

run-ci-actions:
run-ci-actions: run-template-checks
nix build -L .#checks.x86_64-linux.formatting-check
nix build -L .#checks.x86_64-linux.template-deps-json
nix build -L .#checks.x86_64-linux.template-dhall-diff
nix build -L .#checks.x86_64-linux.template-version
nix build -L .#checks.x86_64-linux.ctl-unit-test
nix build -L .#checks.x86_64-linux.ctl-e2e-test
nix build -L .#checks.x86_64-linux.ctl-plutip-test
nix build -L .#checks.x86_64-linux.ctl-local-testnet-test
nix build -L .#checks.x86_64-linux.ctl-staking-test
nix build -L .#checks.x86_64-linux.examples-imports-check

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Please explore our documentation to discover how to use CTL, how to set up its r
- [Importing Plutus Scripts](./doc/importing-scripts.md)
- [Migrating from Plutus Application Backend to CTL](./doc/plutus-comparison.md)
- [Overview of testing approaches](./doc/testing.md)
- [Testing on local testnets with Plutip](./doc/plutip-testing.md)
- [Testing on local Cardano testnets](./doc/cardano-testnet-testing.md)
- [End-to-end dApp testing with headless browsers](./doc/e2e-testing.md)
- [Assertion utilities for testing](./doc/test-utils.md)
- [Using a directory with private keys to run tests](./doc/keydir.md)
Expand Down
Loading

0 comments on commit bcbfb9b

Please sign in to comment.