diff --git a/cabal.project b/cabal.project index 6cd175bb0a4..c32dc769acd 100644 --- a/cabal.project +++ b/cabal.project @@ -116,25 +116,25 @@ source-repository-package source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger - tag: 98048d95823b72e409b07481761b8a59c892c56c + tag: e8475e33772e7408e83ff22e4406673ea73f93fd subdir: cardano-ledger source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger - tag: 98048d95823b72e409b07481761b8a59c892c56c + tag: e8475e33772e7408e83ff22e4406673ea73f93fd subdir: crypto source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger - tag: 98048d95823b72e409b07481761b8a59c892c56c + tag: e8475e33772e7408e83ff22e4406673ea73f93fd subdir: cardano-ledger/test source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger - tag: 98048d95823b72e409b07481761b8a59c892c56c + tag: e8475e33772e7408e83ff22e4406673ea73f93fd subdir: crypto/test -- version number matching the one specified in the stack resolver file diff --git a/nix/.stack.nix/cardano-crypto-test.nix b/nix/.stack.nix/cardano-crypto-test.nix index c98489c4272..bcb18219bc9 100644 --- a/nix/.stack.nix/cardano-crypto-test.nix +++ b/nix/.stack.nix/cardano-crypto-test.nix @@ -34,8 +34,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger"; - rev = "98048d95823b72e409b07481761b8a59c892c56c"; - sha256 = "1cjr8kwa9h807l119hfmqiy5m5kvz6y1dqgb61hlf8ny1zjqywsw"; + rev = "e8475e33772e7408e83ff22e4406673ea73f93fd"; + sha256 = "1pb6fr91g4nmgds71av767hzwfmmkpmp9ldvdkr14v1hv7cqg4kx"; }); postUnpack = "sourceRoot+=/crypto/test; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-crypto-wrapper.nix b/nix/.stack.nix/cardano-crypto-wrapper.nix index 263e2b57e49..5511ef3faa5 100644 --- a/nix/.stack.nix/cardano-crypto-wrapper.nix +++ b/nix/.stack.nix/cardano-crypto-wrapper.nix @@ -59,8 +59,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger"; - rev = "98048d95823b72e409b07481761b8a59c892c56c"; - sha256 = "1cjr8kwa9h807l119hfmqiy5m5kvz6y1dqgb61hlf8ny1zjqywsw"; + rev = "e8475e33772e7408e83ff22e4406673ea73f93fd"; + sha256 = "1pb6fr91g4nmgds71av767hzwfmmkpmp9ldvdkr14v1hv7cqg4kx"; }); postUnpack = "sourceRoot+=/crypto; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-ledger-test.nix b/nix/.stack.nix/cardano-ledger-test.nix index d523228fa82..66717496def 100644 --- a/nix/.stack.nix/cardano-ledger-test.nix +++ b/nix/.stack.nix/cardano-ledger-test.nix @@ -55,8 +55,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger"; - rev = "98048d95823b72e409b07481761b8a59c892c56c"; - sha256 = "1cjr8kwa9h807l119hfmqiy5m5kvz6y1dqgb61hlf8ny1zjqywsw"; + rev = "e8475e33772e7408e83ff22e4406673ea73f93fd"; + sha256 = "1pb6fr91g4nmgds71av767hzwfmmkpmp9ldvdkr14v1hv7cqg4kx"; }); postUnpack = "sourceRoot+=/cardano-ledger/test; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-ledger.nix b/nix/.stack.nix/cardano-ledger.nix index 9b23619acaf..3ce3a8405c4 100644 --- a/nix/.stack.nix/cardano-ledger.nix +++ b/nix/.stack.nix/cardano-ledger.nix @@ -118,8 +118,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger"; - rev = "98048d95823b72e409b07481761b8a59c892c56c"; - sha256 = "1cjr8kwa9h807l119hfmqiy5m5kvz6y1dqgb61hlf8ny1zjqywsw"; + rev = "e8475e33772e7408e83ff22e4406673ea73f93fd"; + sha256 = "1pb6fr91g4nmgds71av767hzwfmmkpmp9ldvdkr14v1hv7cqg4kx"; }); postUnpack = "sourceRoot+=/cardano-ledger; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/ouroboros-consensus/src/Ouroboros/Consensus/Protocol/PBFT.hs b/ouroboros-consensus/src/Ouroboros/Consensus/Protocol/PBFT.hs index 7218bd09ff4..0ded8164e72 100644 --- a/ouroboros-consensus/src/Ouroboros/Consensus/Protocol/PBFT.hs +++ b/ouroboros-consensus/src/Ouroboros/Consensus/Protocol/PBFT.hs @@ -3,7 +3,6 @@ {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE PatternSynonyms #-} @@ -50,6 +49,8 @@ import qualified Data.Bimap as Bimap import Data.Proxy (Proxy (..)) import Data.Set (Set) import qualified Data.Set as Set +import Data.Text (Text) +import qualified Data.Text as Text import Data.Typeable (Typeable) import Data.Word (Word64) import GHC.Generics (Generic) @@ -314,7 +315,7 @@ instance PBftCrypto c => OuroborosTag (PBft c) where signed pbftSignature of Right () -> return () - Left err -> throwError $ PBftInvalidSignature err + Left err -> throwError $ PBftInvalidSignature (Text.pack err) -- FIXME confirm that non-strict inequality is ok in general. -- It's here because EBBs have the same slot as the first block of their @@ -461,11 +462,13 @@ genesisKeyHashes = CC.Genesis.unGenesisKeyHashes PBFT specific types -------------------------------------------------------------------------------} +-- | NOTE: this type is stored in the state, so it must be in normal form to +-- avoid space leaks. data PBftValidationErr c - = PBftInvalidSignature String - | PBftNotGenesisDelegate (PBftVerKeyHash c) (PBftLedgerView c) + = PBftInvalidSignature !Text + | PBftNotGenesisDelegate !(PBftVerKeyHash c) !(PBftLedgerView c) -- | We record how many slots this key signed - | PBftExceededSignThreshold (PBftVerKeyHash c) Word64 + | PBftExceededSignThreshold !(PBftVerKeyHash c) !Word64 | PBftInvalidSlot deriving (Generic, NoUnexpectedThunks) diff --git a/stack.yaml b/stack.yaml index ddc77d48fd7..1e3d1f2e5cd 100644 --- a/stack.yaml +++ b/stack.yaml @@ -50,7 +50,7 @@ extra-deps: - gray-code-0.3.1 - git: https://github.com/input-output-hk/cardano-ledger - commit: 98048d95823b72e409b07481761b8a59c892c56c + commit: e8475e33772e7408e83ff22e4406673ea73f93fd subdirs: - cardano-ledger - cardano-ledger/test