Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 31 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
## Unreleased

### Added

### Removed

### Changed

### Fixed

## [[9.0.0]](https://github.com/tweag/cooked-validators/releases/tag/v9.0.0) - 2026-05-28

### Added

- New `LtlNot` primtive, to negate `Ltl` expressions. This allows to ensure a
specific tweak will result in `mzero` and marks a new milestone in the
expressiveness of the Tweak/Attack DSL.
Expand All @@ -12,7 +23,7 @@
arbitrary effects, while the associated tweaks will also have access to the
added effects.
- A new capability in a mockchain run, which allows to take note (basically log)
anything. Functions `Note(|p|s|w|l)` support this functionality.
anything. Functions `note(|p|s|w|l)` support this functionality.
- A new capability in a mockchain run, which allows to make assertions which
will be displayed in the final result, and taken into account during
tests. Functions `assert(|')` support his functionality.
Expand All @@ -22,8 +33,17 @@
`testCookedQCFromInitDistTemplate` to build tests from the initial
distribution template (the old default initial distribution).
- The ability to enable/disable everything from the printing of the final result
of running a mockchain. The pretty printer has also been improved;
- The `HList` type for heterogeneous lists.
of running a mockchain. The pretty printer per se has also been improved.
- New `HList` type for heterogeneous lists, used to return type-retaining
results for Utxo searches.
- New `TxSkel` option `txSkelOptDeferFailures` to defer validation failures
occurring during the balancing process. This has the upside of visualizing the
last modified transaction sent for validation in the log, with the downside of
a (huge) loss in performance. To be used for debugging purpose only.
- New `TxSkel` option `txSkelOptMaxNbOfBalancingUtxos` to limit the total
maximum number of UTxOs that can be picked as extra inputs during
balancing. This will only matter if the number of UTxOs owned by the balancing
wallet is huge, to limit exponential growth, which rarely happens.

### Removed

Expand Down Expand Up @@ -75,6 +95,14 @@

### Fixed

- The condition for which a balancing solution is considered optimal: The main
balancing function `reachValue` which picks the inputs to add and creates an
additionnal output when needed has been updated. It used to pick the optimal
result based on how small the additional UTxO was, and it now properly
minimizes the total overhead in terms of size (and thus cost) that balancing
adds to the transaction. This process is more involved but also more accurate.
- An optimization bug in the optimal fee computation.

## [[8.0.0]](https://github.com/tweag/cooked-validators/releases/tag/v8.0.0) - 2026-01-19

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ There are two ways for this integration:
.
```

where `myTag` is either a commit hash in the repo, or a tag, such as v8.0.0
where `myTag` is either a commit hash in the repo, or a tag, such as v9.0.0
(see [available
releases](https://github.com/tweag/cooked-validators/releases)).

Expand Down
2 changes: 1 addition & 1 deletion cooked-validators.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.4

-- This file has been generated from package.yaml by hpack version 0.38.2.
-- This file has been generated from package.yaml by hpack version 0.38.3.
--
-- see: https://github.com/sol/hpack

Expand Down
31 changes: 7 additions & 24 deletions flake.lock

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

8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/6dc87b326cef973e51ed3d2ffbdbe6240917a7be";
nixpkgs-haskell.url = "github:NixOS/nixpkgs/haskell-updates";
nixpkgs.url = "github:NixOS/nixpkgs/b86751bc4085f48661017fa226dee99fab6c651b";
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -11,15 +10,14 @@
{
self,
nixpkgs,
nixpkgs-haskell,
flake-utils,
pre-commit-hooks,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
hpkgs = nixpkgs-haskell.legacyPackages.${system}.haskell.packages.ghc96;
hpkgs = pkgs.haskell.packages.ghc96;

## We change the way 'blst' is built so that it takes into
## account the current architecture of the processor. This
Expand Down Expand Up @@ -102,7 +100,7 @@
buildInputs = buildInputs ++ [
pkgs.hpack
pkgs.hlint
hpkgs.ormolu
pkgs.ormolu
hpkgs.haskell-language-server
];

Expand Down
2 changes: 1 addition & 1 deletion src/Cooked/MockChain/State.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import PlutusLedgerApi.V3 qualified as Api
-- | The state used to run the simulation in 'Cooked.MockChain.Direct'
data MockChainState where
MockChainState ::
{ -- | The parametors of the emulated blockchain
{ -- | The parameters of the emulated blockchain
mcstParams :: Emulator.Params,
-- | The ledger state of the emulated blockchain
mcstLedgerState :: Emulator.EmulatedLedgerState,
Expand Down
12 changes: 6 additions & 6 deletions src/Cooked/Skeleton/Output.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ import PlutusLedgerApi.V3 qualified as Api
-- | An output to be put into a 'Cooked.Skeleton.TxSkel'
data TxSkelOut where
TxSkelOut ::
{ -- The owner of this payment
{ -- | The owner of this payment
txSkelOutOwner :: User IsEither Allocation,
-- What staking credential should be attached to this payment
-- | What staking credential should be attached to this payment
txSkelOutStakingCredential :: Maybe Api.StakingCredential,
-- What datum should be placed in this payment
-- | What datum should be placed in this payment
txSkelOutDatum :: TxSkelOutDatum,
-- What value should be paid
-- | What value should be paid
txSkelOutValue :: Api.Value,
-- Whether the paid value can be auto-adjusted for min ADA
-- | Whether the paid value can be auto-adjusted for min ADA
txSkelOutValueAutoAdjust :: Bool,
-- What reference script should be attached to this payment
-- | What reference script should be attached to this payment
txSkelOutReferenceScript :: Maybe VScript
} ->
TxSkelOut
Expand Down