Skip to content

Commit 25bebb3

Browse files
committed
try take into account variable k
1 parent 314caf3 commit 25bebb3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

cardano-testnet/src/Testnet/Defaults.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ module Testnet.Defaults
3232
, plutusV3Script
3333
) where
3434

35-
import Cardano.Api (CardanoEra (..), File (..), pshow, ShelleyBasedEra (..),
36-
toCardanoEra, unsafeBoundedRational, AnyShelleyBasedEra (..))
35+
import Cardano.Api (AnyShelleyBasedEra (..), CardanoEra (..), File (..),
36+
ShelleyBasedEra (..), pshow, toCardanoEra, unsafeBoundedRational)
3737
import qualified Cardano.Api.Shelley as Api
3838

3939
import Cardano.Ledger.Alonzo.Core (PParams (..))
@@ -433,7 +433,7 @@ defaultShelleyGenesis asbe startTime maxSupply options = do
433433
activeSlotsCoeff = round (shelleyActiveSlotsCoeff * 100) % 100
434434
-- make security param k satisfy: epochLength = 10 * k / f
435435
-- TODO: find out why this actually degrates network stability - turned off for now
436-
-- securityParam = ceiling $ fromIntegral epochLength * cardanoActiveSlotsCoeff / 10
436+
securityParam = ceiling $ fromIntegral epochLength * shelleyActiveSlotsCoeff / 10
437437
pVer = eraToProtocolVersion asbe
438438
protocolParams = Api.sgProtocolParams Api.shelleyGenesisDefaults
439439
protocolParamsWithPVer = protocolParams & ppProtocolVersionL' .~ pVer
@@ -444,7 +444,7 @@ defaultShelleyGenesis asbe startTime maxSupply options = do
444444
, Api.sgNetworkMagic = fromIntegral magic
445445
, Api.sgProtocolParams = protocolParamsWithPVer
446446
-- using default from shelley genesis k = 2160
447-
-- , Api.sgSecurityParam = securityParam
447+
, Api.sgSecurityParam = securityParam
448448
, Api.sgSlotLength = secondsToNominalDiffTimeMicro $ realToFrac slotLength
449449
, Api.sgSystemStart = startTime
450450
}

cardano-testnet/src/Testnet/Start/Types.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ data ShelleyTestnetOptions = ShelleyTestnetOptions
8787
instance Default ShelleyTestnetOptions where
8888
def = ShelleyTestnetOptions
8989
{ shelleyTestnetMagic = 42
90-
, shelleyEpochLength = 500
91-
, shelleySlotLength = 0.1
92-
, shelleyActiveSlotsCoeff = 0.05
90+
, shelleyEpochLength = 150_000
91+
, shelleySlotLength = 0.15
92+
, shelleyActiveSlotsCoeff = 0.1
9393
}
9494

9595
-- | Specify a BFT node (Pre-Babbage era only) or an SPO (Shelley era onwards only)

cardano-testnet/test/cardano-testnet-golden/files/golden/help/cardano.cli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Available options:
4646
Enable new epoch state logging to
4747
logs/ledger-epoch-state.log
4848
--testnet-magic INT Specify a testnet magic id.
49-
--epoch-length SLOTS Epoch length, in number of slots (default: 500)
50-
--slot-length SECONDS Slot length (default: 0.1)
49+
--epoch-length SLOTS Epoch length, in number of slots (default: 150000)
50+
--slot-length SECONDS Slot length (default: 0.15)
5151
--active-slots-coeff DOUBLE
52-
Active slots co-efficient (default: 5.0e-2)
52+
Active slots co-efficient (default: 0.1)
5353
-h,--help Show this help text

0 commit comments

Comments
 (0)