Skip to content

Commit

Permalink
expand info endpoint with more information
Browse files Browse the repository at this point in the history
Change-Id: I7999b4200ce823be0a0466291852d159824cc16f
  • Loading branch information
chessai committed Jun 13, 2024
1 parent 53f3695 commit 5a48d28
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
3 changes: 1 addition & 2 deletions test/Chainweb/Test/Orphans/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.Type.Equality
import qualified Data.Vector as V
import Data.Word (Word32)

import GHC.Stack

Expand Down Expand Up @@ -296,7 +295,7 @@ instance Arbitrary NodeInfo where
, nodeNumberOfChains = length curChains
, nodeGraphHistory = graphs
, nodeLatestBehaviorHeight = latestBehaviorAt v
, nodeGenesisHeights = map (\c -> (chainIdToText c, genesisHeight v c)) $ map (unsafeChainId . int @Int @Word32) curChains
, nodeGenesisHeights = map (\c -> (chainIdToText c, genesisHeight v c)) $ HS.toList $ chainIds v
, nodeHistoricalChains = fmap (HS.toList . G.vertices . (^. chainGraphGraph)) (_versionGraphs v)
, nodeServiceDate = T.pack <$> _versionServiceDate v
, nodeBlockDelay = _versionBlockDelay v
Expand Down
1 change: 1 addition & 0 deletions test/Chainweb/Test/TestVersions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ testVersionTemplate v = v
& versionBootstraps .~ [testBootstrapPeerInfos]
& versionVerifierPluginNames .~ AllChains (End mempty)
& versionQuirks .~ noQuirks
& versionServiceDate .~ Nothing

-- | A set of fork heights which are relatively fast, but not fast enough to break anything.
fastForks :: HashMap Fork (ChainMap ForkHeight)
Expand Down
32 changes: 16 additions & 16 deletions tools/ea/Ea/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ recapDevelopment0 = Genesis
recapDevelopmentN :: Genesis
recapDevelopmentN = recapDevelopment0
& txChainIds .~ mkChainIdRange 1 9
& coinbase .~ Just devNGrants
& coinbase ?~ devNGrants

recapDevelopmentKAD :: Genesis
recapDevelopmentKAD = recapDevelopment0
& txChainIds .~ mkChainIdRange 10 19
& coinbase .~ Just devnetKadOps
& coinbase ?~ devnetKadOps
& keysets .~ Nothing
& allocations .~ Nothing
& namespaces .~ Just devNs
& namespaces ?~ devNs
& coinContract .~ [fungibleAssetV1, fungibleAssetV2, coinContractV2Install, gasPayer]

-- ---------------------------------------------------------------------- --
Expand All @@ -205,7 +205,7 @@ fastDevelopment0 = Genesis
fastDevelopmentN :: Genesis
fastDevelopmentN = fastDevelopment0
& txChainIds .~ mkChainIdRange 1 19
& coinbase .~ (Just devNGrants)
& coinbase ?~ devNGrants

devNs2 :: FilePath
devNs2 = "pact/genesis/ns-v2.yaml"
Expand Down Expand Up @@ -246,7 +246,7 @@ instantCPM0 = Genesis
instantCPMN :: Genesis
instantCPMN = instantCPM0
& txChainIds .~ mkChainIdRange 1 9
& coinbase .~ Just fastNGrants
& coinbase ?~ fastNGrants

fastTimedCPM0 :: Genesis
fastTimedCPM0 = Genesis
Expand All @@ -263,7 +263,7 @@ fastTimedCPM0 = Genesis
fastTimedCPMN :: Genesis
fastTimedCPMN = fastTimedCPM0
& txChainIds .~ mkChainIdRange 1 9
& coinbase .~ Just fastNGrants
& coinbase ?~ fastNGrants

fastNs :: FilePath
fastNs = "pact/genesis/ns-v1.yaml"
Expand Down Expand Up @@ -298,7 +298,7 @@ testnet0 = Genesis
testnetN :: Genesis
testnetN = testnet0
& txChainIds .~ mkChainIdRange 1 19
& coinbase .~ (Just testNGrants)
& coinbase ?~ testNGrants

test0Grants :: FilePath
test0Grants = "pact/genesis/testnet/grants0.yaml"
Expand Down Expand Up @@ -333,47 +333,47 @@ mainnet0 = Genesis
mainnet1 :: Genesis
mainnet1 = mainnet0
& txChainIds .~ onlyChainId 1
& allocations .~ (Just mainnetAllocations1)
& allocations ?~ mainnetAllocations1

mainnet2 :: Genesis
mainnet2 = mainnet0
& txChainIds .~ onlyChainId 2
& allocations .~ (Just mainnetAllocations2)
& allocations ?~ mainnetAllocations2

mainnet3 :: Genesis
mainnet3 = mainnet0
& txChainIds .~ onlyChainId 3
& allocations .~ (Just mainnetAllocations3)
& allocations ?~ mainnetAllocations3

mainnet4 :: Genesis
mainnet4 = mainnet0
& txChainIds .~ onlyChainId 4
& allocations .~ (Just mainnetAllocations4)
& allocations ?~ mainnetAllocations4

mainnet5 :: Genesis
mainnet5 = mainnet0
& txChainIds .~ onlyChainId 5
& allocations .~ (Just mainnetAllocations5)
& allocations ?~ mainnetAllocations5

mainnet6 :: Genesis
mainnet6 = mainnet0
& txChainIds .~ onlyChainId 6
& allocations .~ (Just mainnetAllocations6)
& allocations ?~ mainnetAllocations6

mainnet7 :: Genesis
mainnet7 = mainnet0
& txChainIds .~ onlyChainId 7
& allocations .~ (Just mainnetAllocations7)
& allocations ?~ mainnetAllocations7

mainnet8 :: Genesis
mainnet8 = mainnet0
& txChainIds .~ onlyChainId 8
& allocations .~ (Just mainnetAllocations8)
& allocations ?~ mainnetAllocations8

mainnet9 :: Genesis
mainnet9 = mainnet0
& txChainIds .~ onlyChainId 9
& allocations .~ (Just mainnetAllocations9)
& allocations ?~ mainnetAllocations9

mainnetKAD :: Genesis
mainnetKAD = Genesis
Expand Down

0 comments on commit 5a48d28

Please sign in to comment.