CatapultServer  v0.5.0.1 (Elephant)
catapult::sync Namespace Reference

Classes

struct  DeceleratingTaskConfiguration
 Decelerating task configuration settings. More...
 
class  RollbackInfo
 Container for both committed and ignored rollback statistics. More...
 
class  RollbackStats
 Container for rollback statistics. More...
 
struct  SpamThrottleConfiguration
 Spam throttle configuration. More...
 
struct  TasksConfiguration
 Tasks configuration settings. More...
 
struct  UniformTaskConfiguration
 Uniform task configuration settings. More...
 

Enumerations

enum  RollbackResult { RollbackResult::Committed, RollbackResult::Ignored }
 Rollback results. More...
 
enum  RollbackCounterType { RollbackCounterType::All, RollbackCounterType::Recent, RollbackCounterType::Longest }
 Rollback counter types. More...
 

Functions

DECLARE_SERVICE_REGISTRAR() Dispatcher ()
 
consumers::BlockChainSyncHandlers::CommitStepFunc CreateCommitStepHandler (const config::CatapultDataDirectory &dataDirectory)
 Creates a commit step handler around dataDirectory. More...
 
void AddSupplementalDataResiliency (consumers::BlockChainSyncHandlers &syncHandlers, const config::CatapultDataDirectory &dataDirectory, const cache::CatapultCache &cache, const extensions::LocalNodeChainScore &score)
 Updates syncHandlers to support supplemental data resiliency given dataDirectory, cache and score. More...
 
std::shared_ptr< net::PacketWritersGetPacketWriters (const extensions::ServiceLocator &locator)
 Gets the packet writers service from locator. More...
 
DECLARE_SERVICE_REGISTRAR() NetworkPacketWriters ()
 
model::MatchingEntityPredicate ToRequiresValidationPredicate (const chain::KnownHashPredicate &knownHashPredicate)
 Converts a known hash predicate (knownHashPredicate) to a requires validation predicate. More...
 
chain::UtUpdater::Throttle CreateUtUpdaterThrottle (const config::CatapultConfiguration &config)
 Creates a ut updater throttle based on config. More...
 
DECLARE_SERVICE_REGISTRAR() Scheduler (const TasksConfiguration &config)
 
DECLARE_SERVICE_REGISTRAR() Sync ()
 
chain::UtUpdater::Throttle CreateTransactionSpamThrottle (const SpamThrottleConfiguration &config, const predicate< const model::Transaction & > &isBonded)
 

Enumeration Type Documentation

◆ RollbackCounterType

Rollback counter types.

Enumerator
All 

Number of rollbacks since start of the server.

Recent 

Number of rollbacks within a time frame (configuration dependent).

Longest 

Longest rollback.

◆ RollbackResult

Rollback results.

Enumerator
Committed 

Committed rollback counters.

Ignored 

Ignored rollback counters.

Function Documentation

◆ AddSupplementalDataResiliency()

void catapult::sync::AddSupplementalDataResiliency ( consumers::BlockChainSyncHandlers syncHandlers,
const config::CatapultDataDirectory dataDirectory,
const cache::CatapultCache cache,
const extensions::LocalNodeChainScore score 
)

Updates syncHandlers to support supplemental data resiliency given dataDirectory, cache and score.

Here is the call graph for this function:

◆ CreateCommitStepHandler()

consumers::BlockChainSyncHandlers::CommitStepFunc catapult::sync::CreateCommitStepHandler ( const config::CatapultDataDirectory dataDirectory)

Creates a commit step handler around dataDirectory.

Here is the call graph for this function:

◆ CreateTransactionSpamThrottle()

chain::UtUpdater::Throttle catapult::sync::CreateTransactionSpamThrottle ( const SpamThrottleConfiguration config,
const predicate< const model::Transaction & > &  isBonded 
)

Creates a throttle using config to filter out transactions that are considered to be spam. isBonded indicates whether a transaction is bonded or not.

Here is the caller graph for this function:

◆ CreateUtUpdaterThrottle()

chain::UtUpdater::Throttle catapult::sync::CreateUtUpdaterThrottle ( const config::CatapultConfiguration config)

Creates a ut updater throttle based on config.

Here is the call graph for this function:

◆ Dispatcher()

DECLARE_SERVICE_REGISTRAR() catapult::sync::Dispatcher ( )

Creates a registrar for a dispatcher service.

Note
This service is responsible for enabling node block and transaction processing.

◆ GetPacketWriters()

std::shared_ptr< net::PacketWriters > catapult::sync::GetPacketWriters ( const extensions::ServiceLocator locator)

Gets the packet writers service from locator.

Here is the call graph for this function:

◆ NetworkPacketWriters()

DECLARE_SERVICE_REGISTRAR() catapult::sync::NetworkPacketWriters ( )

Creates a registrar for a packet writers service.

Note
This service is responsible for sending data to peers.

◆ Scheduler()

DECLARE_SERVICE_REGISTRAR() catapult::sync::Scheduler ( const TasksConfiguration config)

Creates a registrar for a scheduler service around config

Note
This service is responsible for executing scheduled tasks.

◆ Sync()

DECLARE_SERVICE_REGISTRAR() catapult::sync::Sync ( )

Creates a registrar for a sync service.

Note
This service is responsible for allowing the node to sync with sync sources.

◆ ToRequiresValidationPredicate()

model::MatchingEntityPredicate catapult::sync::ToRequiresValidationPredicate ( const chain::KnownHashPredicate knownHashPredicate)

Converts a known hash predicate (knownHashPredicate) to a requires validation predicate.