Skip to content

Fix Conway->Dijkstra LedgerView translation - #2399

Open
nfrisby wants to merge 2 commits into
mainfrom
nfrisby/leios-main-proto-followup
Open

nfrisby wants to merge 2 commits into
mainfrom
nfrisby/leios-main-proto-followup

Cardano: freshen a stale variable name

7db52aa
Select commit
Loading
Failed to load commit list.
IOG Hydra / ci/hydra-build:x86_64-linux.required.native failed Oct 9, 2026 in 4s

Build dependency failed

1 failed steps

Details

Failed Steps

Step 11

Derivation

/nix/store/yv1zv1ywfy0m5lmvk8jh3d4jdf64pnd4-check-fourmolu-exe-fourmolu.drv

Log

unpacking source archive /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source
source root is 4hvp16y0y9x32ikg62q6xjbs4dghzg86-source
The custom options for formatting this repo are:
fourmolu 0.20.0.0
using ghc-lib-parser 9.14.1.20251220
> indentation: 2
> column-limit: 100
> import-export-style: leading
> haddock-style: single-line
> single-constraint-parens: never
> single-deriving-parens: never
> import-grouping: single

Formatting haskell files...
Loaded config from: fourmolu.yaml
diff -ru /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/CanHardFork.hs ./ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/CanHardFork.hs
--- /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/CanHardFork.hs  1970-01-01 00:00:01.000000000 +0000
+++ ./ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/CanHardFork.hs    2026-10-09 22:59:59.137687164 +0000
@@ -36,6 +36,8 @@
   )
 import qualified Cardano.Ledger.BaseTypes as SL
 import qualified Cardano.Ledger.Core as SL
+import Cardano.Ledger.Dijkstra.Genesis (DijkstraGenesis (..))
+import Cardano.Ledger.Dijkstra.PParams (UpgradeDijkstraPParams (..))
 import qualified Cardano.Ledger.Genesis as SL
 import qualified Cardano.Ledger.Shelley.API as SL
 import Cardano.Ledger.Shelley.Translation
@@ -48,8 +50,6 @@
 import Data.Coerce (coerce)
 import qualified Data.Map.Strict as Map
 import Data.Proxy
-import Cardano.Ledger.Dijkstra.Genesis (DijkstraGenesis (..))
-import Cardano.Ledger.Dijkstra.PParams (UpgradeDijkstraPParams (..))
 import Data.SOP.BasicFunctors
 import Data.SOP.Functors (Flip (..))
 import Data.SOP.InPairs (RequiringBoth (..), ignoringBoth)
diff -ru /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs ./ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs
--- /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs   1970-01-01 00:00:01.000000000 +0000
+++ ./ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs     2026-10-09 22:59:59.253686198 +0000
@@ -72,8 +72,8 @@
 import Ouroboros.Consensus.Block.Forging (MkBlockForging)
 import Ouroboros.Consensus.Cardano.CanHardFork
   ( crossEraForecastAcrossShelley
-  , viaTranslateProto
   , translateChainDepStateAcrossShelley
+  , viaTranslateProto
   )
 import Ouroboros.Consensus.Cardano.Node (TriggerHardFork (..))
 import Ouroboros.Consensus.HardFork.Combinator
diff -ru /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Translation.hs ./ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Translation.hs
--- /nix/store/hpilblwsn671rn1ny783kq1iwc9g1lkm-4hvp16y0y9x32ikg62q6xjbs4dghzg86-source/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Translation.hs     1970-01-01 00:00:01.000000000 +0000
+++ ./ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Translation.hs       2026-10-09 22:59:59.329685565 +0000
@@ -18,6 +18,8 @@
 import Cardano.Ledger.Alonzo ()
 import Cardano.Ledger.BaseTypes (TxIx (..))
 import qualified Cardano.Ledger.Core as Core
+import Cardano.Ledger.Dijkstra.Genesis (DijkstraGenesis (..))
+import Cardano.Ledger.Dijkstra.PParams (UpgradeDijkstraPParams (..))
 import qualified Cardano.Ledger.Genesis as Genesis
 import Cardano.Ledger.Shelley.API
   ( NewEpochState (stashedAVVMAddresses)
@@ -36,21 +38,17 @@
 import Cardano.Ledger.Shelley.UTxO (UTxO (..))
 import Cardano.Slotting.EpochInfo (fixedEpochInfo)
 import Cardano.Slotting.Slot (EpochNo (..))
+import Control.Monad.Except (runExcept)
 import qualified Data.Map.Strict as Map
 import Data.SOP.InPairs (RequiringBoth (..), provideBoth)
+import Ouroboros.Consensus.Block (PerasRoundNo (..), succWithOrigin)
 import Ouroboros.Consensus.BlockchainTime.WallClock.Types
   ( RelativeTime (..)
   , slotLengthFromSec
   )
-import Ouroboros.Consensus.Ledger.Abstract (ledgerTipSlot)
 import Ouroboros.Consensus.Byron.Ledger (ByronBlock, byronLedgerState)
 import Ouroboros.Consensus.Cardano.Block (CardanoEras)
 import Ouroboros.Consensus.Cardano.CanHardFork ()
-import Cardano.Ledger.Dijkstra.Genesis (DijkstraGenesis (..))
-import Cardano.Ledger.Dijkstra.PParams (UpgradeDijkstraPParams (..))
-import Control.Monad.Except (runExcept)
-import Ouroboros.Consensus.HardFork.History (Bound (..))
-import Ouroboros.Consensus.Block (PerasRoundNo (..), succWithOrigin)
 import Ouroboros.Consensus.HardFork.Combinator
   ( EraTranslation (..)
   , InPairs (..)
@@ -60,6 +58,8 @@
   ( CrossEraForecaster (..)
   , TranslateLedgerState (..)
   )
+import Ouroboros.Consensus.HardFork.History (Bound (..))
+import Ouroboros.Consensus.Ledger.Abstract (ledgerTipSlot)
 import Ouroboros.Consensus.Ledger.Basics
   ( LedgerCfg
   , LedgerConfig
@@ -69,15 +69,14 @@
 import Ouroboros.Consensus.Ledger.Tables.Diff (Diff)
 import qualified Ouroboros.Consensus.Ledger.Tables.Diff as Diff
 import Ouroboros.Consensus.Protocol.Praos
-import Ouroboros.Consensus.Protocol.Praos2 (LeiosOnly (Praos2HasLeios), Praos2)
 import qualified Ouroboros.Consensus.Protocol.Praos.Views as Views
+import Ouroboros.Consensus.Protocol.Praos2 (LeiosOnly (Praos2HasLeios), Praos2)
 import Ouroboros.Consensus.Protocol.TPraos (TPraos)
 import Ouroboros.Consensus.Shelley.Eras
 import Ouroboros.Consensus.Shelley.HFEras ()
 import Ouroboros.Consensus.Shelley.Ledger
   ( BigEndianTxIn (..)
   , ShelleyBlock
-  , ShelleyLedgerConfig
   , ShelleyLedgerConfig (..)
   , mkShelleyLedgerConfig
   , shelleyLedgerState
@@ -270,7 +269,6 @@
           (WrapLedgerConfig tsSrcLedgerConfig)
           (WrapLedgerConfig tsDestLedgerConfig)
 
-
 {-------------------------------------------------------------------------------
   Forecasting across an era boundary
 -------------------------------------------------------------------------------}
@@ -284,7 +282,6 @@
         prop_conwayToDijkstraForecast
     ]
 
-
 -- | The combinator's own Conway-to-Dijkstra forecaster, as 'CanHardFork' wires it.
 conwayToDijkstraForecast ::
   RequiringBoth
*** fourmolu-exe-fourmolu-0.20.0.0 found changes that need addressed first