Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
NanuIjaz committed Feb 3, 2024
2 parents 9f0f5d1 + 91317d4 commit 4673b2d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 40 deletions.
1 change: 1 addition & 0 deletions cardano-testnet/src/Testnet/Components/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ createSPOGenesisAndFiles (NumPools numPoolNodes) era shelleyGenesis (TmpAbsolute
, "--supply-delegated", "1000000000000"
, "--stake-delegators", show @Int numStakeDelegators
, "--utxo-keys", show numSeededUTxOKeys
, "--drep-keys", "3"
, "--start-time", DTC.formatIso8601 startTime
, "--out-dir", tempAbsPath'
]
Expand Down
68 changes: 39 additions & 29 deletions cardano-testnet/src/Testnet/Start/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,38 +113,48 @@ cardanoTestnetDefault opts conf = do
-- > ├── configuration.yaml
-- > ├── current-stake-pools.json
-- > ├── delegate-keys
-- > │   ├── delegate{1,2,3}.counter
-- > │   ├── delegate{1,2,3}.kes.{skey,vkey}
-- > │   ├── delegate{1,2,3}.{kes,vrf}.{skey,vkey}
-- > │   └── opcert{1,2,3}.cert
-- > ├── genesis.alonzo.spec.json
-- > ├── genesis.conway.spec.json
-- > │   ├── delegate{1,2,3}
-- > │   │   ├── kes.{skey,vkey}
-- > │   │   ├── key.{skey,vkey}
-- > │   │   ├── opcert.{cert,counter}
-- > │   │   └── vrf.{skey,vkey}
-- > │   └── README.md
-- > ├── drep-keys
-- > │   └── drep{1,2,3}
-- > │   └── drep.{skey,vkey}
-- > ├── genesis.{alonzo,conway}.spec.json
-- > ├── genesis-keys
-- > │   ── genesis{1,2,3}.{skey,vkey}
-- > ── genesis.spec.json
-- > ── node-spo{1,2,3}
-- > │   ├── byron-delegate.key
-- > │   ── byron-delegation.cert
-- > │   ── db
-- > │   │   └── ...
-- > │   ├── kes.skey
-- > │   ├── opcert.cert
-- > │   ├── port
-- > │   ├── topology.json
-- > │   ── vrf.skey
-- > ├── pools
-- > │   ├── cold{1,2,3}.{skey,vkey}
-- > │   ├── kes{1,2,3}.vkey
-- > │   ├── opcert{1,2,3}.counter
-- > │   ── staking-reward{1,2,3}.{skey,vkey}
-- > │   └── vrf{1,2,3}.vkey
-- > │   ── genesis{1,2,3}
-- > │   │   └── key.{skey,vkey}
-- > │   └── README.md
-- > ├── logs
-- > │   ── pool3
-- > │   ── {stderr,stdout}.log
-- > ── module
-- > ├── pools-keys
-- > │   ├── pool{1,2,3}
-- > │   │   ├── byron-delegate.key
-- > │   │   ├── byron-delegation.cert
-- > │   │   ├── cold.{skey,vkey}
-- > │   │   ├── kes.{skey,vkey}
-- > │   │   ├── opcert.{cert,counter}
-- > │   │   ├── staking-reward.{skey,vkey}
-- > │   │   ├── topology.json
-- > │   │   └── vrf.{skey,vkey}
-- > │   └── README.md
-- > ├── shelley
-- > │   ├── genesis.{alonzo,conway}.json
-- > │   └── genesis.json
-- > │   └── genesis.{alonzo,conway,shelley}.json
-- > ├── socket
-- > │   └── node-spo{1,2,3}
-- > └── utxo-keys
-- >    └── utxo{1,2,3}.{addr,skey,vkey}
-- > │   └── pool{1,2,3}
-- > │   └── sock
-- > ├── stake-delegators
-- > │   └── delegator{1,2,3}
-- > │   ├── payment.{skey,vkey}
-- > │   └── staking.{skey,vkey}
-- > └─── utxo-keys
-- >    ├── README.md
-- >    └── utxo{1,2,3}
-- >    └── utxo.{addr,skey,vkey}
cardanoTestnet :: ()
=> CardanoTestnetOptions -- ^ The options to use. Must be consistent with the genesis files.
-> Conf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ import Testnet.Property.Assert
import qualified Testnet.Property.Utils as H
import Testnet.Runtime

-- | Execute me with:
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/leadership-schedule/"'@
hprop_leadershipSchedule :: Property
hprop_leadershipSchedule = H.integrationRetryWorkspace 2 "babbage-leadership-schedule" $ \tempAbsBasePath' -> do
H.note_ SYS.os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ newtype AdditionalCatcher
= IOE IOException
deriving Show


-- | Execute me with:
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/ProposeAndRatifyNewConstitution/"'@
hprop_ledger_events_propose_new_constitution :: Property
hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-new-constitution" $ \tempAbsBasePath' -> do
-- Start a local test net
Expand Down Expand Up @@ -110,18 +111,10 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n
}

let drepVkeyFp :: Int -> FilePath
drepVkeyFp n = gov </> "drep-keys" <>"drep" <> show n <> ".vkey"
drepVkeyFp n = tempAbsPath' </> "drep-keys" </> ("drep" <> show n) </> "drep.vkey"

drepSKeyFp :: Int -> FilePath
drepSKeyFp n = gov </> "drep-keys" <>"drep" <> show n <> ".skey"

-- Create DReps -- TODO: Refactor with shelleyKeyGen
forM_ [1..3] $ \n -> do
H.execCli' execConfig
[ "conway", "governance", "drep", "key-gen"
, "--verification-key-file", drepVkeyFp n
, "--signing-key-file", drepSKeyFp n
]
drepSKeyFp n = tempAbsPath' </> "drep-keys" </> ("drep" <> show n) </> "drep.skey"

-- Create Drep registration certificates
let drepCertFile :: Int -> FilePath
Expand Down

0 comments on commit 4673b2d

Please sign in to comment.