From 6d7d23638faba59dda60b4a12ea9e659c86b7165 Mon Sep 17 00:00:00 2001 From: mmontin Date: Thu, 28 May 2026 13:12:54 +0200 Subject: [PATCH 1/4] cleaning nix conf --- cooked-validators.cabal | 2 +- flake.lock | 30 ++++++------------------------ flake.nix | 6 ++---- src/Cooked/MockChain/State.hs | 2 +- src/Cooked/Skeleton/Output.hs | 12 ++++++------ 5 files changed, 16 insertions(+), 36 deletions(-) diff --git a/cooked-validators.cabal b/cooked-validators.cabal index c56d437ae..15c4a31e3 100644 --- a/cooked-validators.cabal +++ b/cooked-validators.cabal @@ -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 diff --git a/flake.lock b/flake.lock index efccd7a1c..67f06033f 100644 --- a/flake.lock +++ b/flake.lock @@ -57,33 +57,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1766062740, - "narHash": "sha256-U9KVTNs7PvyND7gisDMiluOfwT5hvOlMH2LTYfAYpNk=", + "lastModified": 1779960825, + "narHash": "sha256-pjGlzkG1I31eOY5/vD1wuVa0ixWafuUDtOOpK31u8U4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6dc87b326cef973e51ed3d2ffbdbe6240917a7be", + "rev": "a299a63de8e57613f652fb3f8951ef1245d0c12b", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "6dc87b326cef973e51ed3d2ffbdbe6240917a7be", - "type": "github" - } - }, - "nixpkgs-haskell": { - "locked": { - "lastModified": 1771497924, - "narHash": "sha256-6GqZK85m6FIQdKw3iIka9GwQrf/PL0wN8nCUK6UYP/k=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bae984db2d1159823fd40397804ff62b973275cc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "haskell-updates", - "repo": "nixpkgs", "type": "github" } }, @@ -96,11 +79,11 @@ ] }, "locked": { - "lastModified": 1770726378, - "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", "type": "github" }, "original": { @@ -113,7 +96,6 @@ "inputs": { "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "nixpkgs-haskell": "nixpkgs-haskell", "pre-commit-hooks": "pre-commit-hooks" } }, diff --git a/flake.nix b/flake.nix index d5f59d517..531110df9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/6dc87b326cef973e51ed3d2ffbdbe6240917a7be"; - nixpkgs-haskell.url = "github:NixOS/nixpkgs/haskell-updates"; + nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; @@ -11,7 +10,6 @@ { self, nixpkgs, - nixpkgs-haskell, flake-utils, pre-commit-hooks, }: @@ -19,7 +17,7 @@ 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 diff --git a/src/Cooked/MockChain/State.hs b/src/Cooked/MockChain/State.hs index 51397681b..57cf6d108 100644 --- a/src/Cooked/MockChain/State.hs +++ b/src/Cooked/MockChain/State.hs @@ -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, diff --git a/src/Cooked/Skeleton/Output.hs b/src/Cooked/Skeleton/Output.hs index 770f74244..48c1a7e2c 100644 --- a/src/Cooked/Skeleton/Output.hs +++ b/src/Cooked/Skeleton/Output.hs @@ -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 From efb1faffcfbf3eef613a341468ee4982264313c2 Mon Sep 17 00:00:00 2001 From: mmontin Date: Thu, 28 May 2026 14:46:46 +0200 Subject: [PATCH 2/4] ormolu version --- flake.lock | 6 +++--- flake.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 67f06033f..b2787ad78 100644 --- a/flake.lock +++ b/flake.lock @@ -57,11 +57,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1779960825, - "narHash": "sha256-pjGlzkG1I31eOY5/vD1wuVa0ixWafuUDtOOpK31u8U4=", + "lastModified": 1779965984, + "narHash": "sha256-qaI9PD247A9lPEmoyk3aI8UfREkcdBFig4nM28ot10s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a299a63de8e57613f652fb3f8951ef1245d0c12b", + "rev": "c581fce6ed7c0df3e20c641d320d21d87776d21f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 531110df9..188ddc981 100644 --- a/flake.nix +++ b/flake.nix @@ -100,7 +100,7 @@ buildInputs = buildInputs ++ [ pkgs.hpack pkgs.hlint - hpkgs.ormolu + pkgs.ormolu hpkgs.haskell-language-server ]; From dc17aef136b3b439c46d26656870a0350e42fcac Mon Sep 17 00:00:00 2001 From: mmontin Date: Thu, 28 May 2026 16:59:24 +0200 Subject: [PATCH 3/4] update changelog and readme --- CHANGELOG.md | 34 +++++++++++++++++++++++++++++++--- README.md | 2 +- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22c0b7bfa..7068d3ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. @@ -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. @@ -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 @@ -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 diff --git a/README.md b/README.md index 044c6b8ad..936713ff9 100644 --- a/README.md +++ b/README.md @@ -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)). From a1811c3d24af2de45f2d0a9941b7cb7c8e8a0fb1 Mon Sep 17 00:00:00 2001 From: mmontin Date: Thu, 28 May 2026 18:37:58 +0200 Subject: [PATCH 4/4] attempting an earlier version of glibc --- flake.lock | 7 ++++--- flake.nix | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index b2787ad78..f25fcad11 100644 --- a/flake.lock +++ b/flake.lock @@ -57,16 +57,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1779965984, - "narHash": "sha256-qaI9PD247A9lPEmoyk3aI8UfREkcdBFig4nM28ot10s=", + "lastModified": 1776329215, + "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c581fce6ed7c0df3e20c641d320d21d87776d21f", + "rev": "b86751bc4085f48661017fa226dee99fab6c651b", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", + "rev": "b86751bc4085f48661017fa226dee99fab6c651b", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 188ddc981..19794dc0a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs"; + 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";