From 5a48d282586f9c5f1fd8429d9315540abf270012 Mon Sep 17 00:00:00 2001 From: chessai Date: Thu, 6 Jun 2024 14:07:05 -0500 Subject: [PATCH] expand info endpoint with more information Change-Id: I7999b4200ce823be0a0466291852d159824cc16f --- test/Chainweb/Test/Orphans/Internal.hs | 3 +-- test/Chainweb/Test/TestVersions.hs | 1 + tools/ea/Ea/Genesis.hs | 32 +++++++++++++------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/Chainweb/Test/Orphans/Internal.hs b/test/Chainweb/Test/Orphans/Internal.hs index 411b3b6cc0..a2170e3b8e 100644 --- a/test/Chainweb/Test/Orphans/Internal.hs +++ b/test/Chainweb/Test/Orphans/Internal.hs @@ -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 @@ -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 diff --git a/test/Chainweb/Test/TestVersions.hs b/test/Chainweb/Test/TestVersions.hs index 09925d55b3..fc3773913f 100644 --- a/test/Chainweb/Test/TestVersions.hs +++ b/test/Chainweb/Test/TestVersions.hs @@ -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) diff --git a/tools/ea/Ea/Genesis.hs b/tools/ea/Ea/Genesis.hs index d852cb2390..9dc11320c7 100644 --- a/tools/ea/Ea/Genesis.hs +++ b/tools/ea/Ea/Genesis.hs @@ -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] -- ---------------------------------------------------------------------- -- @@ -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" @@ -246,7 +246,7 @@ instantCPM0 = Genesis instantCPMN :: Genesis instantCPMN = instantCPM0 & txChainIds .~ mkChainIdRange 1 9 - & coinbase .~ Just fastNGrants + & coinbase ?~ fastNGrants fastTimedCPM0 :: Genesis fastTimedCPM0 = Genesis @@ -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" @@ -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" @@ -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