forked from kadena-io/chainweb-node
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDevelopment.hs
More file actions
71 lines (63 loc) · 2.56 KB
/
Development.hs
File metadata and controls
71 lines (63 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{-# language LambdaCase #-}
{-# language NumericUnderscores #-}
{-# language OverloadedStrings #-}
{-# language PatternSynonyms #-}
{-# language QuasiQuotes #-}
{-# language ViewPatterns #-}
module Chainweb.Version.Development(devnet, pattern Development) where
import qualified Data.Set as Set
import Chainweb.BlockCreationTime
import Chainweb.ChainId
import Chainweb.Difficulty
import Chainweb.Pact5.InitialGasModel
import Chainweb.Graph
import Chainweb.Time
import Chainweb.Utils
import Chainweb.Utils.Rule
import Chainweb.Version
import Pact.Types.Verifier
import qualified Chainweb.BlockHeader.Genesis.Development0Payload as DN0
import qualified Chainweb.BlockHeader.Genesis.Development1to19Payload as DNN
pattern Development :: ChainwebVersion
pattern Development <- ((== devnet) -> True) where
Development = devnet
devnet :: ChainwebVersion
devnet = ChainwebVersion
{ _versionCode = ChainwebVersionCode 0x00000002
, _versionName = ChainwebVersionName "development"
, _versionForks = tabulateHashMap $ \case
_ -> AllChains ForkAtGenesis
, _versionUpgrades = AllChains mempty
, _versionGraphs = Bottom (minBound, twentyChainGraph)
, _versionBlockDelay = BlockDelay 30_000_000
, _versionWindow = WindowWidth 120
, _versionHeaderBaseSizeBytes = 318 - 110
, _versionBootstraps = []
, _versionGenesis = VersionGenesis
{ _genesisBlockTarget = AllChains $ HashTarget (maxBound `div` 100_000)
, _genesisTime = AllChains $ BlockCreationTime [timeMicrosQQ| 2019-07-17T18:28:37.613832 |]
, _genesisBlockPayload = onChains $ concat
[ [(unsafeChainId 0, DN0.payloadBlock)]
, [(unsafeChainId i, DNN.payloadBlock) | i <- [1..19]]
]
}
-- still the *default* block gas limit is set, see
-- defaultChainwebConfiguration._configBlockGasLimit
, _versionMaxBlockGasLimit = Bottom (minBound, Nothing)
, _versionSpvProofRootValidWindow = Bottom (minBound, Nothing)
, _versionInitialGasModel = AllChains $ Bottom (minBound, post32GasModel)
, _versionCheats = VersionCheats
{ _disablePow = True
, _fakeFirstEpochStart = True
, _disablePact = False
}
, _versionDefaults = VersionDefaults
{ _disablePeerValidation = True
, _disableMempoolSync = False
}
, _versionVerifierPluginNames = AllChains $ Bottom
(minBound, Set.fromList $ map VerifierName ["hyperlane_v3_message", "allow", "signed_list"])
, _versionQuirks = noQuirks
, _versionForkNumber = 0
, _versionForkVoteCastingLength = 120 * 119 -- 5 days
}