cardano-testnet-8.8.0: The cardano full node
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Testnet

Description

This module provides a library interface for initiating a local testnet

Synopsis

Testnets

Start a testnet

cardanoTestnet Source #

Arguments

:: CardanoTestnetOptions

The options to use. Must be consistent with the genesis files.

-> Conf 
-> UTCTime

The starting time. Must be the same as the one in the shelley genesis.

-> ShelleyGenesis StandardCrypto

The shelley genesis to use, for example defaultShelleyGenesis. Some fields are overridden by the accompanying CardanoTestnetOptions.

-> AlonzoGenesis

The alonzo genesis to use, for example defaultAlonzoGenesis.

-> ConwayGenesis StandardCrypto

The conway genesis to use, for example defaultConwayGenesis.

-> Integration TestnetRuntime 

Setup a number of credentials and pools, like this:

├── byron
│   └── genesis.json
├── byron-gen-command
│   └── genesis-keys.00{0,1,2}.key
├── byron.genesis.spec.json
├── configuration.yaml
├── current-stake-pools.json
├── delegate-keys
│   ├── 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}
│   │   └── 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,shelley}.json
├── socket
│   └── 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}

cardanoTestnetDefault :: CardanoTestnetOptions -> Conf -> Integration TestnetRuntime Source #

Like cardanoTestnet, but using defaults for all configuration files. See cardanoTestnet for additional documentation.

Testnet options

data CardanoTestnetOptions Source #

Constructors

CardanoTestnetOptions 

Fields

data TestnetNodeOptions Source #

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

Constructors

SpoTestnetNodeOptions (Maybe NodeConfigurationYaml) [String]

These arguments will be appended to the default set of CLI options when starting the node.

Configuration

newtype Conf Source #

Constructors

Conf 

Instances

Instances details
Show Conf Source # 
Instance details

Defined in Testnet.Start.Types

Eq Conf Source # 
Instance details

Defined in Testnet.Start.Types

Methods

(==) :: Conf -> Conf -> Bool Source #

(/=) :: Conf -> Conf -> Bool Source #

mkConf :: (HasCallStack, MonadTest m) => FilePath -> m Conf Source #

Create a Conf from a temporary absolute path. Logs the argument in the test.

Processes

procChairman Source #

Arguments

:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack) 
=> [String]

Arguments to the CLI command

-> m CreateProcess

Captured stdout

Create a CreateProcess describing how to start the cardano-node-chairman process and an argument list.

Utils

waitUntilEpoch Source #

Arguments

:: (MonadCatch m, MonadIO m, MonadTest m, HasCallStack) 
=> FilePath

Output file

-> Int

Testnet magic

-> ExecConfig 
-> EpochNo

Desired epoch

-> m EpochNo 

Submit the desired epoch to wait to.

Runtime