You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -90,11 +91,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
90
91
91
92
### Changed
92
93
93
-
-`cardano-serialization-lib` was replaced by `cardano-data-lite` v1.0
94
+
-`cardano-serialization-lib` was replaced by `cardano-data-lite` v1.0.0
95
+
- Bumped [cardano-node to v10.1.4](https://github.com/IntersectMBO/cardano-node/releases/tag/10.1.4) capable of crossing the second Chang hardfork ([#1657](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1657))
96
+
- Bumped [Ogmios to v6.8.0](https://github.com/CardanoSolutions/ogmios/releases/tag/v6.8.0) ([#1657](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1657))
97
+
-`QueryHandle` has been renamed to `Provider` ([#1665](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1665))
98
+
-`QueryBackend` renamed to `ProviderBackend`
99
+
-`QueryBackendParams` renamed to `ProviderBackendParams`
100
+
-`queryHandleFor*Backend` renamed to `providerFor*Backend`
101
+
-`getQueryHandle` renamed to `getProvider`
102
+
-`mkQueryHandle` renamed to `mkProvider`
103
+
- Also multiple corresponding file names have changed replacing the `QueryHandle` names to `Provider` ones
104
+
- Switched to the [purescript-cardano-package-set](https://github.com/mlabs-haskell/purescript-cardano-package-set) in `packages.dhall` (see the [section on updating PureScript dependencies in the docs](./doc/ctl-as-dependency.md)) ([#1667](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1667))
105
+
- Switched to the aggregate `@mlabs-haskell/ctl-npm-meta` package for NPM dependencies (see the [section on updating JS dependencies in the docs](./doc/ctl-as-dependency.md)) ([#1666](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1666))
106
+
- Ignore **any** tx evaluation errors if tx marked invalid. Previously, certain internal evaluation errors were not properly handled, leading to unexpected behavior for a subset of explicitly marked "invalid" transactions. ([#1668](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1668))
107
+
-`Provider` (previously called `QueryHandle`) is extracted to its own package [purescript-cardano-provider](https://github.com/mlabs-haskell/purescript-cardano-provider) using module names in the format `Cardano.Provider.*` ([#1671](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1671))
108
+
- Switched from WebSocket to HTTP when interfacing with Ogmios. Note: Mempool functionality still uses WebSocket, as it requires a persistent connection to track state. ([#1575](https://github.com/Plutonomicon/cardano-transaction-lib/issues/1575))
109
+
- Blockfrost Provider has been extracted to a separate package [purescript-cardano-blockfrost-provider](https://github.com/mlabs-haskell/purescript-cardano-blockfrost-provider) using module names in the format `Cardano.Blockfrost.*` ([#1661](https://github.com/Plutonomicon/cardano-transaction-lib/issues/1661))
110
+
- Kupo + Ogmios Provider has been extracted to a separate package [purescript-cardano-kupmios-provider](https://github.com/mlabs-haskell/purescript-cardano-kupmios-provider) using module names in the format `Cardano.Kupmios.*` ([#1662](https://github.com/Plutonomicon/cardano-transaction-lib/issues/1662))
111
+
- Ogmios' mempool functionality has been extracted to a separate package [purescript-cardano-ogmios-mempool](https://github.com/mlabs-haskell/purescript-cardano-ogmios-mempool) using the module `Cardano.Ogmios.Mempool`. To use it, the user must create and manage the websocket connection (see [Test.Ctl.Testnet.Contract.OgmiosMempool](https://github.com/Plutonomicon/cardano-transaction-lib/blob/cd80e31d59b233e48ccb2a0b6635d5d8beb5b160/test/Testnet/Contract/OgmiosMempool.purs))
112
+
- Made adjustments to the [E2E testing documentation page](./doc/e2e-testing.md). Updated the [template](./templates/ctl-scaffold) to use the newly introduced `e2eConfigs` helper function that allows to define E2E configurations without unnecessary boilerplate. ([#1674](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1674))
113
+
114
+
### Removed
115
+
116
+
- References to the discontinued Nami and Flint wallets ([#1674](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1674))
94
117
95
118
### Fixed
96
119
97
120
- Fixed transaction witness set 'attach' functions. Previously, the updated witness set was incorrectly appended to the existing set, causing performance degradation when processing constraints for complex transactions. ([#1653](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1653))
121
+
- Fixed a critical bug where Blockfrost `getUtxo` would also return **spent** outputs ([#1664](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1664))
Copy file name to clipboardExpand all lines: doc/blockfrost.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ See [this example](../test/Blockfrost/Contract.purs), which can be executed with
132
132
133
133
On production, the environment should be configured on PureScript side (environment variables are not respected).
134
134
135
-
`mkBlockfrostBackendParams` can be called on a populated `BlockfrostBackendParams` record to create a `QueryBackendParams` value. `backendParams` field of `ContractParams` uses a value of this type. And `ContractParams` can in turn be used with `runContract`.
135
+
`mkBlockfrostBackendParams` can be called on a populated `BlockfrostBackendParams` record to create a `ProviderBackendParams` value. `backendParams` field of `ContractParams` uses a value of this type. And `ContractParams` can in turn be used with `runContract`.
Copy file name to clipboardExpand all lines: doc/comparisons.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ For a more in-depth explanation of the differences between PAB and CTL (with cod
45
45
46
46
### Query layer differences
47
47
48
-
Lucid uses a [`Provider` class](https://deno.land/x/lucid@0.10.5/mod.ts?s=Provider) that defines all available queries. CTL query methods are defined in [`QueryHandle`](https://github.com/Plutonomicon/cardano-transaction-lib/blob/develop/src/Internal/Contract/QueryHandle/Type.purs#L36).
48
+
Lucid uses a [`Provider` class](https://deno.land/x/lucid@0.10.5/mod.ts?s=Provider) that defines all available queries. CTL query methods are defined in [`Provider`](https://github.com/mlabs-haskell/purescript-cardano-provider/blob/e789464eac6dc18708b25f7a9008a7e6633b3f9a/src/Provider/Type.purs#L20).
49
49
50
50
CTL supports the following queries that Lucid does not:
51
51
@@ -63,7 +63,7 @@ Lucid, on the other hand, provides a way to get a UTxO that contains a specified
63
63
64
64
- Both CTL and Lucid support [Blockfrost](./blockfrost.md) and [Kupo+Ogmios](./runtime.md)
65
65
- Lucid also supports [Maestro](https://www.gomaestro.org/)
66
-
- Both CTL and Lucid allow for custom backends - Lucid via `Provider` interface implementation, and CTL via a custom`QueryHandle`.
66
+
- Both CTL and Lucid support multiple query backends through a `Provider` interface. Although CTL does not support specifying custom backends without forking, individual queries in the existing backend can still be replaced. Refer to [doc/custom-query-layers.md](./custom-query-layers.md) for more information.
67
67
68
68
### Staking support
69
69
@@ -79,6 +79,6 @@ Additionally, CTL supports [testing with real wallets](./e2e-testing.md) via hea
79
79
80
80
Lucid aims for simplicity, while CTL allows more fine-grained control over transaction building process without losing the benefits of declarativeness.
81
81
82
-
- CTL uses [`cardano-serialization-lib`](https://github.com/Emurgo/cardano-serialization-lib/), while Lucid uses a fork of [`cardano-multiplatform-lib`](https://github.com/berry-pool/cardano-multiplatform-lib). Lucid allows to use CML's `TxBuilder` or [call CML directly](https://lucid.spacebudz.io/docs/advanced/cml/), while CTL allows to alter the transaction arbitrarily as PureScript data type either before or after balancing.
82
+
- CTL uses [`cardano-serialization-lib`](https://github.com/Emurgo/cardano-serialization-lib/), while Lucid uses [`Pallas`](https://github.com/txpipe/pallas).
83
83
- In CTL, CSL types and method wrappers are used via [`purescript-cardano-serialization-lib`](https://github.com/mlabs-haskell/purescript-cardano-serialization-lib) and [`purescript-cardano-types`](https://github.com/mlabs-haskell/purescript-cardano-types). However, `TxBuilder` APIs from CSL are not provided by these packages.
84
-
- Plutus Data conversion is handled via a [schema-enabled API](https://lucid.spacebudz.io/docs/advanced/type-casting/) in Lucid. CTL allows for automatic `ToData` / `FromData` deriving for some types, via `HasPlutusSchema`.
84
+
- Plutus Data conversion is handled via a [schema-enabled API](https://github.com/spacebudz/lucid/blob/e13206b225edb0e55a7eeb98b1200223e201fbfe/examples/typed_data.ts#L15) in Lucid. CTL allows for automatic `ToData` / `FromData` deriving for some types, via `HasPlutusSchema`.
Copy file name to clipboardExpand all lines: doc/ctl-as-dependency.md
+15-24Lines changed: 15 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,7 @@ Do note that `runLocalTestnetTest` in `overlays.purescript` requires the presenc
26
26
To see an example project that uses both `overlays`, please refer to our [scaffolding template](../templates/ctl-scaffold/flake.nix). You can also use this template to conveniently initialize a new CTL-based project (`nix flake init -t github:Plutonomicon/cardano-transaction-lib` in a new directory). It will take a significant amount of time for spago to download the dependencies.
27
27
28
28
## Upgrading CTL
29
-
30
-
Unfortunately, the process of upgrading CTL is fairly involved. This is in part due to the complexity of the project and in part due to features inherent to Spago's approach to dependency management. The following assumes that you are using a project based on Nix flakes and using our overlays as outlined above.
29
+
Unfortunately, upgrading CTL remains a relatively involved process. However, it has been partially simplified with the introduction of our [Cardano domain PureScript package set](https://github.com/mlabs-haskell/purescript-cardano-package-set) and the aggregate [NPM package](https://www.npmjs.com/package/@mlabs-haskell/ctl-npm-meta). This complexity arises partly from the scale of the project itself and in part due to features inherent to Spago's approach to dependency management. The following assumes that you are using a project based on Nix flakes and using our overlays as outlined above.
31
30
32
31
Make sure to perform **all** of the following steps, otherwise you **will** encounter difficult-to-debug issues:
33
32
@@ -36,38 +35,30 @@ Make sure to perform **all** of the following steps, otherwise you **will** enco
36
35
- Update the `rev` you're using for CTL in your flake `inputs`
37
36
-**Note**: Nix might throw an error about CTL following a "non-existent input" after doing this. The best way to solve this is to upgrade the version of Nix that you're using. Otherwise, `nix flake lock --update-input <NAME>`, where `NAME` corresponds to CTL in your flake's `inputs`, should solve this
38
37
39
-
2.**Update your Purescript dependencies**
40
-
41
-
- Update the CTL `version` in your `packages.dhall`. Make sure that this is the exact same revision as in your flake inputs
42
-
- Possibly update the `dependencies` section for CTL in your `packages.dhall`
38
+
2.**Update your PureScript dependencies**
43
39
44
-
- You can find a list of CTL's dependencies in our own `spago.dhall` (but make sure to check at the correct revision)
45
-
- You might also need to add new transitive git dependencies if CTL has added any to its own direct dependencies (i.e. you need to copy the matching stanzas from CTL's `packages.dhall` to your own; these are contained in the `additions` record in CTL's `packages.dhall`)
40
+
- Make sure to set `upstream` to our PureScript package set in `packages.dhall`
46
41
47
-
- For example, if the following package `foo` is added to CTL's `additions` (in `packages.dhall`) between your old revision and the one you're upgrading to:
42
+
- Simply copy it from the CTL's `packages.dhall` at the correct revision
43
+
- This package set should include all the necessary Cardano domain packages, so you no longer need to keep track of the individual PureScript dependencies with each CTL update, as was required previously
, version ="0000000000000000000000000000000000000000"
60
-
-- ...
61
-
}
62
-
```
52
+
-Update the CTL`version`in your `packages.dhall`.Make sure that this is the exact same revision as in your flake inputs
53
+
-Possibly update the `dependencies` section for CTLin your `packages.dhall`
63
54
64
-
Youalso need to add the same package, identically, to your own `packages.dhall`, otherwise the compiler will not be able to find it
55
+
-Youcan find a list ofCTL's dependencies in our own `spago.dhall` (but make sure to check at the correct revision)
65
56
66
57
-Run `spago2nix generate` and make sure to stage and commit the resulting `spago-packages.nix` if it has changed
67
58
68
59
3.**Update your JS dependencies**
69
60
70
-
-TheNPM dependencies your project has must have the exact same versions CTL'sown `package.json` specifies.
61
+
-CTL currently has a single aggregate or meta NPMdependency that encompasses all other dependencies: `@mlabs-haskell/ctl-npm-meta`.Yourproject must use **the exact same version**of this dependency as specified inCTL's `package.json`.
71
62
-You have to update `package-lock.json` by running `npm install`.If you are in a nix shell and use our setup that symlinks `./node_modules`, npm will complain about inability to write to the filesystem, use `npm i --package-lock-only` to skip writing to `node_modules`. If your `node_modules` are managed by Nix, you will have to re-enter the shell for the changes to apply.
Copy file name to clipboardExpand all lines: doc/custom-query-layers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@
16
16
17
17
CTL can be extended with custom (user) query layers if needed. At this moment it can be done by forking.
18
18
19
-
Every query CTL uses, except of backend-specific ones, goes through a [query handle](https://github.com/Plutonomicon/cardano-transaction-lib/blob/10a88faa2e6237aafc90568e3488f3421517af63/src/Internal/Contract/QueryHandle/Type.purs#L36).
19
+
Every query CTL uses, except of backend-specific ones, goes through a [provider](https://github.com/mlabs-haskell/purescript-cardano-provider/blob/e789464eac6dc18708b25f7a9008a7e6633b3f9a/src/Provider/Type.purs#L20).
20
20
21
-
A new [backend option](https://github.com/Plutonomicon/cardano-transaction-lib/blob/10a88faa2e6237aafc90568e3488f3421517af63/src/Internal/Contract/QueryBackend.purs#L57) should be added, with corresponding [initialization code](https://github.com/Plutonomicon/cardano-transaction-lib/blob/develop/src/Internal/Contract/QueryHandle.purs)
21
+
A new [backend option](https://github.com/Plutonomicon/cardano-transaction-lib/blob/20207fcda113cdafc80ef136d4c59e1ca3fe698e/src/Internal/Contract/ProviderBackend.purs#L57) should be added, with corresponding [initialization code](https://github.com/Plutonomicon/cardano-transaction-lib/blob/develop/src/Internal/Contract/Provider.purs)
22
22
23
23
## Replacing some queries in existing backend
24
24
25
25
Substituting the query layer for a few functions only (assuming the original backend remains available for initial connection) can be done without forking CTL.
26
26
27
-
`ContractEnv` contains a QueryHandle (inside a `Reader`), so a [`local`](https://pursuit.purescript.org/packages/purescript-transformers/6.0.0/docs/Control.Monad.Reader.Class#v:local) call with a function that replaces some `QueryHandle` record entries will just work.
27
+
`ContractEnv` contains a Provider (inside a `Reader`), so a [`local`](https://pursuit.purescript.org/packages/purescript-transformers/6.0.0/docs/Control.Monad.Reader.Class#v:local) call with a function that replaces some `Provider` record entries will just work.
0 commit comments