Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Feb 18, 2025
1 parent f8a7896 commit 86a2834
Show file tree
Hide file tree
Showing 26 changed files with 105 additions and 642 deletions.
124 changes: 0 additions & 124 deletions ouroboros-consensus-byron-test/ouroboros-consensus-byron-test.cabal

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ library unstable-byronspec
base >=4.14 && <4.21,
bimap >=0.4 && <0.6,
byron-spec-chain,
cardano-binary,
byron-spec-ledger,
cardano-ledger-binary,
cardano-ledger-byron-test,
Expand Down Expand Up @@ -226,7 +227,11 @@ library unstable-byron-testlib
bytestring,
cardano-crypto-class,
cardano-crypto-test,
cardano-crypto,
base64-bytestring,
text,
cardano-crypto-wrapper,
cardano-binary,
cardano-ledger-binary:{cardano-ledger-binary, testlib},
cardano-ledger-byron,
cardano-ledger-byron-test,
Expand Down Expand Up @@ -298,6 +303,7 @@ library unstable-shelley-testlib
cardano-crypto-class,
cardano-data,
cardano-ledger-allegra,
cardano-slotting,
cardano-ledger-alonzo,
cardano-ledger-alonzo-test,
cardano-ledger-babbage-test,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}

{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -Wno-orphans -Wno-missing-methods #-}

module Ouroboros.Consensus.Shelley.Eras (
-- * Eras based on the Shelley ledger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{-# LANGUAGE TypeOperators #-}

{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -Wno-missing-methods #-}

module Ouroboros.Consensus.Shelley.Node.Serialisation () where

Expand Down Expand Up @@ -207,13 +208,11 @@ instance (NoHardForks (ShelleyBlock proto era), ShelleyCompatible proto era)
unwrap = either
(error "ShelleyLedgerConfig contains a non-fixed EpochInfo")
id
ei = epochInfoWithErr (shelleyLedgerGlobals ledgerConfig)
ei = epochInfo (shelleyLedgerGlobals ledgerConfig)
epochSize = unwrap $ epochInfoSize ei (EpochNo 0)
RelativeTime t1 = unwrap $ epochInfoSlotToRelativeTime ei 1
slotLength = mkSlotLength t1

epochInfoWithErr = undefined

instance FromCBOR ActiveSlotCoeff
instance FromCBOR Network
instance ToCBOR ActiveSlotCoeff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,10 @@

module Ouroboros.Consensus.ByronDual.Node.Serialisation () where

import Cardano.Binary
import Cardano.Chain.Slotting (EpochSlots)
import qualified Data.ByteString.Lazy as Lazy
import Data.Proxy
<<<<<<< HEAD:ouroboros-consensus-cardano/src/unstable-byron-testlib/Ouroboros/Consensus/ByronDual/Node/Serialisation.hs
||||||| parent of 2726854bf... Satisfy new serialisation constraints on LedgerConfig:ouroboros-consensus-byron-test/src/Ouroboros/Consensus/ByronDual/Node/Serialisation.hs

import Cardano.Chain.Slotting (EpochSlots)

import Ouroboros.Network.Block (Serialised, unwrapCBORinCBOR,
wrapCBORinCBOR)

=======

import Cardano.Binary
import Cardano.Chain.Slotting (EpochSlots)

import Ouroboros.Network.Block (Serialised, unwrapCBORinCBOR,
wrapCBORinCBOR)

>>>>>>> 2726854bf... Satisfy new serialisation constraints on LedgerConfig:ouroboros-consensus-byron-test/src/Ouroboros/Consensus/ByronDual/Node/Serialisation.hs
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Byron.Ledger
import Ouroboros.Consensus.Byron.Node.Serialisation ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@ module Test.Consensus.Byron.Generators (
, protocolMagicId
) where

<<<<<<< HEAD:ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs
||||||| parent of 247fc7048... Add round trip tests for ledger config:ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs
import Control.Monad (replicateM)
import Data.Coerce (coerce)
import qualified Data.Map.Strict as Map

import Cardano.Binary (fromCBOR, toCBOR)
=======
import Control.Monad (replicateM)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Char8 as BSC8
import Data.Coerce (coerce)
import qualified Data.Map.Strict as Map
import Data.String (IsString (fromString))
import qualified Data.Text as T

import Cardano.Binary (fromCBOR, toCBOR)
>>>>>>> 247fc7048... Add round trip tests for ledger config:ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs
import Cardano.Chain.Block (ABlockOrBoundary (..),
ABlockOrBoundaryHdr (..))
import qualified Cardano.Chain.Block as CC.Block
Expand All @@ -45,28 +26,21 @@ import Cardano.Chain.Slotting (EpochNumber, EpochSlots (..),
import qualified Cardano.Chain.Update as CC.Update
import qualified Cardano.Chain.Update.Validation.Interface as CC.UPI
import qualified Cardano.Chain.Update.Validation.Registration as CC.Reg
<<<<<<< HEAD:ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs
import qualified Cardano.Chain.UTxO as CC.UTxO
import Cardano.Crypto (ProtocolMagicId (..))
||||||| parent of 247fc7048... Add round trip tests for ledger config:ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs
import Cardano.Crypto (ProtocolMagicId (..))
=======
import Cardano.Crypto (ProtocolMagicId (..),
RequiresNetworkMagic (..))
>>>>>>> 247fc7048... Add round trip tests for ledger config:ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs
import Cardano.Crypto.Hashing (Hash)
<<<<<<< HEAD:ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs
import Cardano.Crypto.Signing
import qualified Cardano.Crypto.Wallet as Wallet
import Cardano.Ledger.Binary (decCBOR, encCBOR)
import Control.Monad (replicateM)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Char8 as BSC8
import Data.Coerce (coerce)
import qualified Data.Map.Strict as Map
||||||| parent of 247fc7048... Add round trip tests for ledger config:ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs

=======
import Cardano.Crypto.Signing
import qualified Cardano.Crypto.Wallet as Wallet

>>>>>>> 247fc7048... Add round trip tests for ledger config:ouroboros-consensus-byron-test/src/Test/Consensus/Byron/Generators.hs
import Data.String (IsString (fromString))
import qualified Data.Text as T
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Byron.Ledger
import Ouroboros.Consensus.Byron.Protocol
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
<<<<<<< HEAD
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE RecordWildCards #-}
||||||| parent of df3890a27 (Satisfy new serialisation constraints on LedgerConfig)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE RecordWildCards #-}
=======
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
>>>>>>> df3890a27 (Satisfy new serialisation constraints on LedgerConfig)
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}

-- | Genesis config for the spec
--
Expand All @@ -33,27 +24,12 @@ module Ouroboros.Consensus.ByronSpec.Ledger.Genesis (
, toChainEnv
) where

<<<<<<< HEAD:ouroboros-consensus-cardano/src/unstable-byronspec/Ouroboros/Consensus/ByronSpec/Ledger/Genesis.hs
||||||| parent of 2726854bf... Satisfy new serialisation constraints on LedgerConfig:ouroboros-consensus-byronspec/src/Ouroboros/Consensus/ByronSpec/Ledger/Genesis.hs
import Data.Coerce (coerce)
import Data.Set (Set)
import NoThunks.Class (AllowThunk (..), NoThunks)
import Numeric.Natural (Natural)

=======
import Data.Coerce (coerce)
import Data.Set (Set)
import NoThunks.Class (AllowThunk (..), NoThunks)
import Numeric.Natural (Natural)

import Cardano.Binary
import Codec.Serialise (Serialise (..))

>>>>>>> 2726854bf... Satisfy new serialisation constraints on LedgerConfig:ouroboros-consensus-byronspec/src/Ouroboros/Consensus/ByronSpec/Ledger/Genesis.hs
import qualified Byron.Spec.Chain.STS.Rule.Chain as Spec
import qualified Byron.Spec.Ledger.Core as Spec
import qualified Byron.Spec.Ledger.Update as Spec
import qualified Byron.Spec.Ledger.UTxO as Spec
import Cardano.Binary
import Codec.Serialise (Serialise (..))
import qualified Control.State.Transition as Spec
import Data.Coerce (coerce)
import Data.Set (Set)
Expand Down
Loading

0 comments on commit 86a2834

Please sign in to comment.