Skip to content

Commit

Permalink
Compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundnoble committed Nov 20, 2023
1 parent ed1ba11 commit 2c8cb3c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ library
, Chainweb.Utils.RequestLog
, Chainweb.Utils.Rule
, Chainweb.Utils.Serialization
, Chainweb.VerifierPlugin
, Chainweb.Version
, Chainweb.Version.Development
, Chainweb.Version.FastDevelopment
Expand Down
1 change: 1 addition & 0 deletions src/Chainweb/VerifierPlugin.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# language DerivingStrategies #-}
{-# language EmptyCase #-}
{-# language GeneralizedNewtypeDeriving #-}
{-# language OverloadedStrings #-}
{-# language TupleSections #-}
{-# language TypeApplications #-}

Expand Down
6 changes: 1 addition & 5 deletions src/Chainweb/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module Chainweb.Version
, versionName
, versionWindow
, versionGenesis
, versionVerifierPlugins
, genesisBlockPayload
, genesisBlockPayloadHash
, genesisBlockTarget
Expand Down Expand Up @@ -134,11 +135,6 @@ import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.Map.Strict(Map)
import qualified Data.Map.Strict as Map
import qualified Data.Map.Merge.Strict as Merge
import Data.Set(Set)
import qualified Data.Set as Set
import Data.Maybe
import Data.Proxy
import qualified Data.Text as T
import Data.Word
Expand Down
2 changes: 2 additions & 0 deletions src/Chainweb/Version/Development.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ devnet = ChainwebVersion
Chainweb219Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 550
Chainweb220Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 560
Chainweb221Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 580
EnableVerifiers -> AllChains ForkNever

, _versionUpgrades = foldr (chainZip HM.union) (AllChains mempty)
[ forkUpgrades devnet
Expand Down Expand Up @@ -109,4 +110,5 @@ devnet = ChainwebVersion
{ _disablePeerValidation = True
, _disableMempoolSync = False
}
, _versionVerifierPlugins = AllChains $ End $ mempty
}
1 change: 1 addition & 0 deletions src/Chainweb/Version/FastDevelopment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ fastDevnet = ChainwebVersion
{ _disablePeerValidation = True
, _disableMempoolSync = False
}
, _versionVerifierPlugins = AllChains $ End $ mempty
}
2 changes: 2 additions & 0 deletions src/Chainweb/Version/Mainnet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ mainnet = ChainwebVersion
Chainweb219Pact -> AllChains (ForkAtBlockHeight $ BlockHeight 3_774_423) -- 2023-06-02 00:00:00+00:00
Chainweb220Pact -> AllChains (ForkAtBlockHeight $ BlockHeight 4_056_499) -- 2023-09-08 00:00:00+00:00
Chainweb221Pact -> AllChains (ForkAtBlockHeight $ BlockHeight 4_177_889) -- 2023-10-20 00:00:00+00:00
EnableVerifiers -> AllChains ForkNever

, _versionGraphs =
(to20ChainsMainnet, twentyChainGraph) `Above`
Expand Down Expand Up @@ -201,4 +202,5 @@ mainnet = ChainwebVersion
{ _disablePeerValidation = False
, _disableMempoolSync = False
}
, _versionVerifierPlugins = AllChains $ End $ mempty
}
2 changes: 2 additions & 0 deletions src/Chainweb/Version/Testnet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ testnet = ChainwebVersion
Chainweb219Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 3_299_753 -- 2023-06-01 12:00:00+00:00
Chainweb220Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 3_580_964 -- 2023-09-08 12:00:00+00:00
Chainweb221Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 3_702_250 -- 2023-10-19 12:00:00+00:00
EnableVerifiers -> AllChains ForkNever

, _versionGraphs =
(to20ChainsTestnet, twentyChainGraph) `Above`
Expand Down Expand Up @@ -172,4 +173,5 @@ testnet = ChainwebVersion
{ _disablePeerValidation = False
, _disableMempoolSync = False
}
, _versionVerifierPlugins = AllChains $ End $ mempty
}
4 changes: 3 additions & 1 deletion test/Chainweb/Test/TestVersions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ testVersionTemplate v = v
& versionWindow .~ WindowWidth 120
& versionMaxBlockGasLimit .~ End (Just 2_000_000)
& versionBootstraps .~ [testBootstrapPeerInfos]
& versionVerifierPlugins .~ AllChains (End mempty)

-- | A set of fork heights which are relatively fast, but not fast enough to break anything.
fastForks :: HashMap Fork (ChainMap ForkHeight)
Expand Down Expand Up @@ -139,6 +140,7 @@ fastForks = tabulateHashMap $ \case
Chainweb219Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 27
Chainweb220Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 30
Chainweb221Pact -> AllChains $ ForkAtBlockHeight $ BlockHeight 33
EnableVerifiers -> AllChains $ ForkAtBlockHeight $ BlockHeight 35

-- | A test version without Pact or PoW, with only one chain graph.
barebonesTestVersion :: ChainGraph -> ChainwebVersion
Expand Down Expand Up @@ -260,6 +262,7 @@ slowForkingCpmTestVersion g = buildTestVersion $ \v -> v
Chainweb219Pact -> AllChains $ ForkAtBlockHeight (BlockHeight 71)
Chainweb220Pact -> AllChains $ ForkAtBlockHeight (BlockHeight 85)
Chainweb221Pact -> AllChains $ ForkAtBlockHeight (BlockHeight 100)
EnableVerifiers -> AllChains $ ForkAtBlockHeight (BlockHeight 110)

-- | CPM version (see `cpmTestVersion`) with forks and upgrades quickly enabled.
fastForkingCpmTestVersion :: ChainGraph -> ChainwebVersion
Expand All @@ -275,4 +278,3 @@ noBridgeCpmTestVersion g = buildTestVersion $ \v -> v
& cpmTestVersion g
& versionName .~ ChainwebVersionName ("nobridge-CPM-" <> toText g)
& versionForks .~ (fastForks & at SPVBridge ?~ AllChains ForkNever)

0 comments on commit 2c8cb3c

Please sign in to comment.