From c5b6a561346222b0a0b5d34d8d5c215f216e4d3f Mon Sep 17 00:00:00 2001 From: DaisukeFlowers <86377375+DaisukeFlowers@users.noreply.github.com> Date: Fri, 3 Jul 2026 04:31:33 -0400 Subject: [PATCH] Fix development version: stage MigratePlatformShare above genesis The development version sets every fork ForkAtGenesis, but MigratePlatformShare's guard (atNotGenesis) hard-errors on ForkAtGenesis and is consulted by applyUpgrades on every block. The pact service therefore dies on the first execNewBlock and a development devnet can never mine a block, fresh or seeded. Stage the one-shot migration at block height 2 (as recap-development does at 700); every other fork stays genesis-active. Verified with a fresh-genesis 20-chain devnet: blocks mine past the migration height, the platform-share keyset reset applies, and coin transfers plus SPV cross-chain succeed. --- src/Chainweb/Version/Development.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Chainweb/Version/Development.hs b/src/Chainweb/Version/Development.hs index 9084dd81e3..4b7bf3c679 100644 --- a/src/Chainweb/Version/Development.hs +++ b/src/Chainweb/Version/Development.hs @@ -10,6 +10,7 @@ module Chainweb.Version.Development(devnet, pattern Development) where import qualified Data.Set as Set import Chainweb.BlockCreationTime +import Chainweb.BlockHeight import Chainweb.ChainId import Chainweb.Difficulty import Chainweb.Graph @@ -32,6 +33,9 @@ devnet = ChainwebVersion { _versionCode = ChainwebVersionCode 0x00000002 , _versionName = ChainwebVersionName "development" , _versionForks = tabulateHashMap $ \case + -- MigratePlatformShare is a one-shot migration guarded by + -- 'atNotGenesis', which errors on 'ForkAtGenesis'. + MigratePlatformShare -> AllChains $ ForkAtBlockHeight $ BlockHeight 2 _ -> AllChains ForkAtGenesis , _versionUpgrades = AllChains mempty , _versionGraphs = Bottom (minBound, twentyChainGraph)