diff --git a/chainweb.cabal b/chainweb.cabal index 590ee3174c..1363a3893f 100644 --- a/chainweb.cabal +++ b/chainweb.cabal @@ -110,7 +110,7 @@ common warning-flags custom-setup setup-depends: - Cabal >= 3.8 + , Cabal >= 3.8 , base >= 4.12 && < 5 , bytestring >= 0.10.12 , directory >= 1.3 @@ -132,7 +132,7 @@ library c-sources: c/shathree.c cc-options: -DSQLITE_CORE exposed-modules: - Chainweb.Backup + , Chainweb.Backup , Chainweb.BlockCreationTime , Chainweb.BlockHash , Chainweb.BlockHeader @@ -356,7 +356,7 @@ library , Utils.Logging.Trace build-depends: - Decimal >= 0.4.2 + , Decimal >= 0.4.2 , aeson >= 2.2 , asn1-encoding >=0.9 , asn1-types >=0.3 @@ -373,7 +373,7 @@ library , chronos >= 1.1 , clock >= 0.7 , configuration-tools >= 0.6 - , crypton-connection >= 0.2 && < 0.4 + , crypton-connection >= 0.4 , containers >= 0.5 , crypton >= 0.31 , cuckoo >= 0.3 @@ -441,8 +441,8 @@ library , tls-session-manager >= 0.0 , token-bucket >= 0.1 , transformers >= 0.5 - , unliftio ^>= 0.2 - , unordered-containers >= 0.2.16 + , unliftio >= 0.2 + , unordered-containers >= 0.2.20 , uuid >= 1.3.15 , wai >= 3.2.2.1 , wai-app-static >= 3.1.6.3 @@ -547,6 +547,7 @@ test-suite chainweb-tests Data.Test.Word.Encoding -- P2P + P2P.Test.Node P2P.Test.Orphans P2P.Test.TaskQueue @@ -568,7 +569,7 @@ test-suite chainweb-tests , bytestring >= 0.10.12 , case-insensitive >= 1.2 , chainweb-storage >= 0.1 - , crypton-connection >=0.2 + , crypton-connection >=0.4 , containers >= 0.5 , crypton >= 0.31 , data-default >=0.7 @@ -620,7 +621,7 @@ test-suite chainweb-tests , time >= 1.12.2 , transformers >= 0.5 , unliftio >= 0.2.25 - , unordered-containers >= 0.2.16 + , unordered-containers >= 0.2.20 , vector >= 0.12.2 , wai >= 3.2 , wai-middleware-validation @@ -663,7 +664,7 @@ executable chainweb-node PkgInfo build-depends: -- internal - chainweb + , chainweb -- external , async >= 2.2 @@ -710,14 +711,18 @@ executable cwtool main-is: CwTool.hs other-modules: Allocations + Chainweb.Test.Cut + Chainweb.Test.Cut.TestBlockDb Chainweb.Test.HostAddress Chainweb.Test.MultiNode Chainweb.Test.Orphans.Internal Chainweb.Test.Orphans.Pact Chainweb.Test.Orphans.Time - Chainweb.Test.Pact.Utils Chainweb.Test.P2P.Peer.BootstrapConfig + Chainweb.Test.Pact.Utils + Chainweb.Test.TestVersions Chainweb.Test.Utils + Chainweb.Test.Utils.APIValidation Chainweb.Test.Utils.BlockHeader CheckpointerDBChecksum Ea @@ -736,7 +741,7 @@ executable cwtool build-depends: -- internal - chainweb + , chainweb -- external , QuickCheck >= 2.14 @@ -753,7 +758,7 @@ executable cwtool , chainweb-storage >= 0.1 , chronos >= 1.1 , configuration-tools >= 0.6 - , crypton-connection >=0.2 + , crypton-connection >=0.4 , containers >= 0.5 , crypton >= 0.31 , data-default >=0.7 @@ -802,7 +807,7 @@ executable cwtool , time >= 1.9 , text >= 2.0 , unliftio >= 0.2.25 - , unordered-containers >= 0.2.16 + , unordered-containers >= 0.2.20 , vector >= 0.12.2 , wai >= 3.2 , wai-middleware-validation @@ -836,10 +841,11 @@ benchmark bench Chainweb.Test.Orphans.Internal Chainweb.Test.Orphans.Pact Chainweb.Test.Orphans.Time + Chainweb.Test.TestVersions P2P.Test.Orphans build-depends: - Decimal >= 0.4.2 + , Decimal >= 0.4.2 , aeson >= 2.2 , async >= 2.2 , base >= 4.12 && < 5 @@ -868,6 +874,6 @@ benchmark bench , crypton >= 0.31 , quickcheck-instances >= 0.3 , streaming-commons >= 0.2 - , unordered-containers >= 0.2.16 + , unordered-containers >= 0.2.20 , yet-another-logger >= 0.4.1 , pact-json >= 0.1 diff --git a/src/Chainweb/Utils.hs b/src/Chainweb/Utils.hs index 1f58ea1e85..a274191420 100644 --- a/src/Chainweb/Utils.hs +++ b/src/Chainweb/Utils.hs @@ -249,6 +249,7 @@ import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Lazy as BL import qualified Data.Csv as CSV import Data.Decimal +import Data.Default (def) import Data.Functor.Of import Data.Hashable import qualified Data.HashMap.Strict as HM @@ -1348,12 +1349,12 @@ manager micros = HTTP.newManager unsafeManager :: Int -> IO HTTP.Manager unsafeManager micros = HTTP.newTlsManagerWith $ setManagerRequestTimeout micros - $ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True) Nothing + $ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True def) Nothing unsafeManagerWithSettings :: (HTTP.ManagerSettings -> HTTP.ManagerSettings) -> IO HTTP.Manager unsafeManagerWithSettings settings = HTTP.newTlsManagerWith $ settings - $ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True) Nothing + $ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True def) Nothing setManagerRequestTimeout :: Int -> HTTP.ManagerSettings -> HTTP.ManagerSettings setManagerRequestTimeout micros settings = settings diff --git a/test/Chainweb/Test/Utils.hs b/test/Chainweb/Test/Utils.hs index 328de94b22..c607b44735 100644 --- a/test/Chainweb/Test/Utils.hs +++ b/test/Chainweb/Test/Utils.hs @@ -137,6 +137,7 @@ import Data.Bifunctor hiding (second) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.Coerce (coerce) +import Data.Default (def) import Data.Foldable import qualified Data.HashMap.Strict as HashMap import Data.IORef @@ -1132,7 +1133,7 @@ getClientEnv :: BaseUrl -> IO ClientEnv getClientEnv url = flip mkClientEnv url <$> HTTP.newTlsManagerWith mgrSettings where mgrSettings = HTTP.mkManagerSettings - (HTTP.TLSSettingsSimple True False False) + (HTTP.TLSSettingsSimple True False False def) Nothing -- | Backoff up to a constant 250ms, limiting to ~40s diff --git a/tools/cwtool/TxSimulator.hs b/tools/cwtool/TxSimulator.hs index 472d9abc4f..eb55695951 100644 --- a/tools/cwtool/TxSimulator.hs +++ b/tools/cwtool/TxSimulator.hs @@ -270,7 +270,7 @@ setupClient :: SimConfig -> IO ClientEnv setupClient sc = flip mkClientEnv (scApiHostUrl sc) <$> newTlsManagerWith mgrSettings where mgrSettings = mkManagerSettings - (TLSSettingsSimple True False False) + (TLSSettingsSimple True False False def) Nothing -- | note, fetches [low - 1, hi] to have parent headers