CatapultServer  v0.5.0.1 (Elephant)
catapult::tools::nemgen Namespace Reference

Classes

struct  BlockExecutionHashesInfo
 Information about block execution dependent hashes. More...
 
struct  MosaicSeed
 A mosaic seed. More...
 
struct  NemesisConfiguration
 Nemesis configuration. More...
 
struct  NemesisExecutionHashesDescriptor
 Nemesis block execution dependent hashes information. More...
 
class  PluginLoader
 Loads plugins into a plugin manager. More...
 

Typedefs

using NamespaceIdToNameMap = std::unordered_map< NamespaceId, std::string, utils::BaseValueHasher< NamespaceId > >
 Mapping of namespace ids to human readable names. More...
 
using NamespaceIdToRootNamespaceMap = std::unordered_map< NamespaceId, state::RootNamespace, utils::BaseValueHasher< NamespaceId > >
 Mapping of namespace ids to root namespaces. More...
 
using MosaicNameToMosaicEntryMap = std::vector< std::pair< std::string, state::MosaicEntry > >
 Mapping of mosaic names to mosaic entries. More...
 
using AddressToMosaicSeedsMap = std::vector< std::pair< std::string, std::vector< MosaicSeed > >>
 Mapping of addresses to mosaic seeds. More...
 

Enumerations

enum  CacheDatabaseCleanupMode { CacheDatabaseCleanupMode::None, CacheDatabaseCleanupMode::Purge }
 Possible cache database cleanup modes. More...
 

Functions

std::unique_ptr< model::BlockCreateNemesisBlock (const NemesisConfiguration &config)
 Creates a nemesis block according to config. More...
 
Hash256 UpdateNemesisBlock (const NemesisConfiguration &config, model::Block &block, NemesisExecutionHashesDescriptor &executionHashesDescriptor)
 Updates nemesis block according to config with executionHashesDescriptor. More...
 
model::BlockElement CreateNemesisBlockElement (const NemesisConfiguration &config, const model::Block &block)
 Wraps a block element around block according to config. More...
 
BlockExecutionHashesInfo CalculateNemesisBlockExecutionHashes (const model::BlockElement &blockElement, const config::CatapultConfiguration &config)
 Calculates the block execution dependent hashes after executing nemesis blockElement for network configured with config. More...
 
void SaveNemesisBlockElement (const model::BlockElement &blockElement, const NemesisConfiguration &config)
 Saves nemesis blockElement according to config. More...
 
NemesisConfiguration LoadNemesisConfiguration (const std::string &configPath)
 Loads nemesis configuration from configPath. More...
 
bool LogAndValidateNemesisConfiguration (const NemesisConfiguration &config)
 Logs and validates nemesis config. More...
 
NemesisExecutionHashesDescriptor CalculateAndLogNemesisExecutionHashes (const model::BlockElement &blockElement, const config::CatapultConfiguration &config, CacheDatabaseCleanupMode databaseCleanupMode)
 
model::TransactionRegistry CreateTransactionRegistry ()
 Creates a transaction registry that has basic transaction types registered. More...
 

Typedef Documentation

◆ AddressToMosaicSeedsMap

using catapult::tools::nemgen::AddressToMosaicSeedsMap = typedef std::vector<std::pair<std::string, std::vector<MosaicSeed> >>

Mapping of addresses to mosaic seeds.

◆ MosaicNameToMosaicEntryMap

using catapult::tools::nemgen::MosaicNameToMosaicEntryMap = typedef std::vector<std::pair<std::string, state::MosaicEntry> >

Mapping of mosaic names to mosaic entries.

◆ NamespaceIdToNameMap

Mapping of namespace ids to human readable names.

◆ NamespaceIdToRootNamespaceMap

Mapping of namespace ids to root namespaces.

Enumeration Type Documentation

◆ CacheDatabaseCleanupMode

Possible cache database cleanup modes.

Enumerator
None 

Perform no cleanup.

Purge 

Purge after execution.

Function Documentation

◆ CalculateAndLogNemesisExecutionHashes()

NemesisExecutionHashesDescriptor catapult::tools::nemgen::CalculateAndLogNemesisExecutionHashes ( const model::BlockElement blockElement,
const config::CatapultConfiguration config,
CacheDatabaseCleanupMode  databaseCleanupMode 
)

Calculates and logs the nemesis block execution dependent hashes after executing nemesis blockElement for network configured with config with specified cache database cleanup mode (databaseCleanupMode).

Here is the call graph for this function:

◆ CalculateNemesisBlockExecutionHashes()

BlockExecutionHashesInfo catapult::tools::nemgen::CalculateNemesisBlockExecutionHashes ( const model::BlockElement blockElement,
const config::CatapultConfiguration config 
)

Calculates the block execution dependent hashes after executing nemesis blockElement for network configured with config.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateNemesisBlock()

std::unique_ptr< model::Block > catapult::tools::nemgen::CreateNemesisBlock ( const NemesisConfiguration config)

Creates a nemesis block according to config.

Here is the call graph for this function:

◆ CreateNemesisBlockElement()

model::BlockElement catapult::tools::nemgen::CreateNemesisBlockElement ( const NemesisConfiguration config,
const model::Block block 
)

Wraps a block element around block according to config.

Here is the call graph for this function:

◆ CreateTransactionRegistry()

model::TransactionRegistry catapult::tools::nemgen::CreateTransactionRegistry ( )

Creates a transaction registry that has basic transaction types registered.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadNemesisConfiguration()

NemesisConfiguration catapult::tools::nemgen::LoadNemesisConfiguration ( const std::string &  configPath)

Loads nemesis configuration from configPath.

Here is the call graph for this function:

◆ LogAndValidateNemesisConfiguration()

bool catapult::tools::nemgen::LogAndValidateNemesisConfiguration ( const NemesisConfiguration config)

Logs and validates nemesis config.

Here is the call graph for this function:

◆ SaveNemesisBlockElement()

void catapult::tools::nemgen::SaveNemesisBlockElement ( const model::BlockElement blockElement,
const NemesisConfiguration config 
)

Saves nemesis blockElement according to config.

Here is the call graph for this function:

◆ UpdateNemesisBlock()

Hash256 catapult::tools::nemgen::UpdateNemesisBlock ( const NemesisConfiguration config,
model::Block block,
NemesisExecutionHashesDescriptor executionHashesDescriptor 
)

Updates nemesis block according to config with executionHashesDescriptor.

Here is the call graph for this function: