Skip to content

Commit

Permalink
Merge branch 'lars/update/crypton-connection' into lars/ghc-9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
larskuhtz committed Jul 4, 2024
2 parents bc6a19c + 001ab16 commit 48bdc44
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 19 deletions.
7 changes: 7 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ source-repository-package
tag: b199bf6df1453af95832c2d2f9f0ef48c3622caa
--sha256: 056awkmdmkqdd5g3m8a1ibg2vp02kbppmidkfh4aildb1brq970a

-- Required for GHC-9.10
-- Remove when 0.3.0.0 is released on Hackage
source-repository-package
type: git
location: https://github.com/kadena-io/pact-time.git
tag: fe89d52c0d18ae95d47940f19341e3275779e306

-- -------------------------------------------------------------------------- --
-- Relaxed Bounds

Expand Down
36 changes: 21 additions & 15 deletions chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -547,6 +547,7 @@ test-suite chainweb-tests
Data.Test.Word.Encoding

-- P2P
P2P.Test.Node
P2P.Test.Orphans
P2P.Test.TaskQueue

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -663,7 +664,7 @@ executable chainweb-node
PkgInfo
build-depends:
-- internal
chainweb
, chainweb

-- external
, async >= 2.2
Expand Down Expand Up @@ -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
Expand All @@ -736,7 +741,7 @@ executable cwtool

build-depends:
-- internal
chainweb
, chainweb

-- external
, QuickCheck >= 2.14
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
5 changes: 3 additions & 2 deletions src/Chainweb/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/Chainweb/Test/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/cwtool/TxSimulator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48bdc44

Please sign in to comment.