File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed
cardano-db-sync/src/Cardano/DbSync Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ coalesceConfig pcfg ncfg adjustGenesisPath = do
92
92
, dncMaryHardFork = ncMaryHardFork ncfg
93
93
, dncAlonzoHardFork = ncAlonzoHardFork ncfg
94
94
, dncBabbageHardFork = ncBabbageHardFork ncfg
95
+ , dncConwayHardFork = ncConwayHardFork ncfg
95
96
}
96
97
97
98
mkAdjustPath :: SyncPreConfig -> (FilePath -> FilePath )
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ import Cardano.Ledger.Conway.Genesis
30
30
import Cardano.Ledger.Keys
31
31
import Cardano.Ledger.Shelley.Translation (emptyFromByronTranslationContext )
32
32
import Cardano.Prelude (panic )
33
- import Cardano.Slotting.Slot
34
33
import Control.Monad.Trans.Except (ExceptT )
35
34
import Data.Word (Word64 )
36
35
import Ouroboros.Consensus.Block.Forging
@@ -133,7 +132,7 @@ mkProtocolInfoCardano ge shelleyCred =
133
132
(Consensus. ProtocolTransitionParamsShelleyBased () $ dncMaryHardFork dnc)
134
133
(Consensus. ProtocolTransitionParamsShelleyBased alonzoGenesis $ dncAlonzoHardFork dnc)
135
134
(Consensus. ProtocolTransitionParamsShelleyBased () $ dncBabbageHardFork dnc)
136
- (Consensus. ProtocolTransitionParamsShelleyBased (ConwayGenesis (GenDelegs mempty )) ( Consensus. TriggerHardForkAtEpoch ( EpochNo 34 )) ) -- TODO: Conway Fix
135
+ (Consensus. ProtocolTransitionParamsShelleyBased (ConwayGenesis (GenDelegs mempty )) $ dncConwayHardFork dnc ) -- TODO: Conway Fix
137
136
138
137
shelleyPraosNonce :: ShelleyConfig -> Nonce
139
138
shelleyPraosNonce sCfg = Nonce (Crypto. castHash . unGenesisHashShelley $ scGenesisHash sCfg)
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ data NodeConfig = NodeConfig
45
45
ncAlonzoHardFork :: ! Shelley. TriggerHardFork
46
46
, -- Babbage hardfok parameters
47
47
ncBabbageHardFork :: ! Shelley. TriggerHardFork
48
+ , -- Conway hardfok parameters
49
+ ncConwayHardFork :: ! Shelley. TriggerHardFork
48
50
}
49
51
50
52
parseNodeConfig :: ByteString -> NodeConfig
@@ -77,6 +79,7 @@ instance FromJSON NodeConfig where
77
79
<*> parseMaryHardForkEpoch o
78
80
<*> parseAlonzoHardForkEpoch o
79
81
<*> parseBabbageHardForkEpoch o
82
+ <*> parseConwayHardForkEpoch o
80
83
81
84
parseByronProtocolVersion :: Object -> Parser Byron. ProtocolVersion
82
85
parseByronProtocolVersion o =
@@ -119,3 +122,10 @@ instance FromJSON NodeConfig where
119
122
[ Shelley. TriggerHardForkAtEpoch <$> o .: " TestBabbageHardForkAtEpoch"
120
123
, pure $ Shelley. TriggerHardForkAtVersion 7 -- Mainnet default
121
124
]
125
+
126
+ parseConwayHardForkEpoch :: Object -> Parser Shelley. TriggerHardFork
127
+ parseConwayHardForkEpoch o =
128
+ asum
129
+ [ Shelley. TriggerHardForkAtEpoch <$> o .: " TestConwayHardForkAtEpoch"
130
+ , pure $ Shelley. TriggerHardForkAtVersion 9 -- Mainnet default
131
+ ]
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ data SyncNodeConfig = SyncNodeConfig
105
105
, dncMaryHardFork :: ! TriggerHardFork
106
106
, dncAlonzoHardFork :: ! TriggerHardFork
107
107
, dncBabbageHardFork :: ! TriggerHardFork
108
+ , dncConwayHardFork :: ! TriggerHardFork
108
109
}
109
110
110
111
data SyncPreConfig = SyncPreConfig
You can’t perform that action at this time.
0 commit comments