| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Tools.DBSynthesizer.Run
Synopsis
- type CardanoProtocol = (ProtocolInfo (CardanoBlock StandardCrypto), Tracer IO KESAgentClientTrace → IO [MkBlockForging IO (CardanoBlock StandardCrypto)])
- initialize ∷ FilePath → Credentials → IO (ShelleyGenesis, CardanoProtocol)
- synthesize ∷ (TopLevelConfig (CardanoBlock StandardCrypto) → GenTxs (CardanoBlock StandardCrypto)) → DBSynthesizerOptions → ShelleyGenesis → FilePath → CardanoProtocol → IO ForgeResult
Documentation
type CardanoProtocol = (ProtocolInfo (CardanoBlock StandardCrypto), Tracer IO KESAgentClientTrace → IO [MkBlockForging IO (CardanoBlock StandardCrypto)]) Source #
A Cardano protocol ready to forge with: the ProtocolInfo and the block
forgers that protocolInfoCardano produces alongside it.
Arguments
| ∷ FilePath | The node configuration file. |
| → Credentials | The credential files, as named on the command line. |
| → IO (ShelleyGenesis, CardanoProtocol) |
Build the protocol to forge with from a node configuration file and the forging credentials named on the command line.
The reading is done elsewhere: cardano-config resolves the configuration and
loads every era's genesis, and Cardano.Tools.Credentials decodes the
credentials. What is left here is the mapping onto the consensus types.
A problem with either is thrown as a ConfigError, as in
the other tools, so the user gets a message rather than a backtrace.
The Shelley genesis comes back too because synthesize needs its epoch
length.
Arguments
| ∷ (TopLevelConfig (CardanoBlock StandardCrypto) → GenTxs (CardanoBlock StandardCrypto)) | |
| → DBSynthesizerOptions | |
| → ShelleyGenesis | The same Shelley genesis the |
| → FilePath | The directory of the ChainDB to forge into. |
| → CardanoProtocol | |
| → IO ForgeResult |
Forge a ChainDB from a ready-made Cardano ProtocolInfo and its block
forgers (as produced by initialize). Constructing the protocol from a node
configuration is the caller's responsibility, keeping this function free of
any configuration machinery. In particular, the caller is also responsible
for having validated the genesis (see
validateGenesis).