CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace cache {
class CatapultCacheDelta; }
28 namespace extensions {
struct LocalNodeStateRef; }
30 struct BlockChainConfiguration;
32 class NotificationPublisher;
34 namespace plugins {
class PluginManager; }
35 namespace state {
struct CatapultState; }
38 namespace catapult {
namespace extensions {
56 std::unique_ptr<const observers::NotificationObserver>&& pObserver);
model::ResolverContext createResolverContext(const cache::ReadOnlyCatapultCache &cache) const
Creates a resolver context given cache.
Definition: PluginManager.cpp:210
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
bool ShouldEnableVerifiableReceipts
true if block chain should calculate receipts so that state changes are fully verifiable at each bloc...
Definition: BlockChainConfiguration.h:42
std::unique_ptr< const observers::EntityObserver > m_pObserver
Definition: NemesisBlockLoader.h:88
const model::BlockChainConfiguration BlockChain
Block chain configuration.
Definition: CatapultConfiguration.h:48
constexpr void HexFormat(const ByteArray< N, TTag > &)
Block chain configuration settings.
Definition: BlockChainConfiguration.h:33
NemesisFundingState m_nemesisFundingState
Definition: NemesisBlockLoader.h:87
utils::BaseValue< uint64_t, Amount_tag > Amount
Definition: src/catapult/types.h:76
Loads and executes a nemesis block.
Definition: NemesisBlockLoader.h:50
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
Amount get(MosaicId mosaicId) const
Returns amount of funds of a given mosaic (mosaicId).
Definition: AccountBalances.cpp:54
Key m_nemesisPublicKey
Definition: NemesisBlockLoader.h:86
Delta on top of a catapult cache.
Definition: CatapultCacheDelta.h:31
const plugins::PluginManager & m_pluginManager
Definition: NemesisBlockLoader.h:85
const model::Block & Block
Block entity.
Definition: Elements.h:63
A reference to a local node's basic state.
Definition: LocalNodeStateRef.h:34
std::shared_ptr< const model::BlockElement > loadBlockElement(Height height) const
Returns the block element (owning a block) at height.
Definition: BlockStorageCache.cpp:97
State hash verification disabled.
A manager for registering plugins.
Definition: PluginManager.h:51
const config::CatapultConfiguration & Config
Catapult configuration.
Definition: LocalNodeStateRef.h:53
NetworkInfo Network
Block chain network.
Definition: BlockChainConfiguration.h:36
State hash verification enabled.
Importance TotalChainImportance
Total whole importance units available in the network.
Definition: BlockChainConfiguration.h:85
state::CatapultState & State
Local node state.
Definition: LocalNodeStateRef.h:56
BlockStorageView view() const
Gets a read only view of the storage.
Definition: BlockStorageCache.cpp:176
Hash256 CalculateMerkleHash(const BlockStatement &statement)
Calculates the merkle hash for statement.
Definition: BlockStatement.cpp:83
Verbosity
Definition: NemesisBlockLoader.h:74
MosaicId CurrencyMosaicId
Mosaic id used as primary chain currency.
Definition: BlockChainConfiguration.h:45
Block independent mutable state passed to all observers.
Definition: ObserverContext.h:54
Key Signer
Entity signer's public key.
Definition: EntityBody.h:36
State used by the nemesis funding observer.
Definition: NemesisFundingState.h:39
NemesisBlockLoader(cache::CatapultCacheDelta &cacheDelta, const plugins::PluginManager &pluginManager, std::unique_ptr< const observers::NotificationObserver > &&pObserver)
Creates a loader around cacheDelta, pluginManager and pObserver.
Definition: NemesisBlockLoader.cpp:140
def info(*args)
Definition: forwardsValidation.py:12
StateHashVerification
State hash verification.
Definition: NemesisBlockLoader.h:41
Collection of receipts scoped to a block.
Definition: BlockStatementBuilder.h:27
plugins::PluginManager & m_pluginManager
Definition: Broker.cpp:123
StateHashInfo calculateStateHash(Height height) const
Calculates the cache state hash given height.
Definition: CatapultCache.cpp:130
Stateful catapult information.
Definition: CatapultState.h:27
void commit(Height height)
Commits all pending changes to the underlying storage and sets the cache height to height.
Definition: CatapultCache.cpp:269
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
cache::CatapultCache & Cache
Local node cache.
Definition: LocalNodeStateRef.h:59
std::unique_ptr< const model::NotificationPublisher > m_pPublisher
Definition: NemesisBlockLoader.h:89
ReadOnlyCatapultCache toReadOnly() const
Creates a read-only view of this delta.
Definition: CatapultCache.cpp:155
utils::BaseValue< uint32_t, BlockFeeMultiplier_tag > BlockFeeMultiplier
Definition: src/catapult/types.h:91
Amount MaxMosaicAtomicUnits
Maximum atomic units (total-supply * 10 ^ divisibility) of a mosaic allowed in the network.
Definition: BlockChainConfiguration.h:82
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
Processing element for a block composed of a block and metadata.
Definition: Elements.h:55
Binary layout for a block.
Definition: Block.h:69
cache::CatapultCacheDelta & m_cacheDelta
Definition: NemesisBlockLoader.h:84
Amount InitialCurrencyAtomicUnits
Initial currency atomic units available in the network.
Definition: BlockChainConfiguration.h:79
Hash256 StateHash
State hash.
Definition: StateHashInfo.h:30
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
Definition: AddressExtractionExtension.cpp:28
bool Verify(const Key &publicKey, const RawBuffer &dataBuffer, const Signature &signature)
Definition: Signer.cpp:136
io::BlockStorageCache & Storage
Local node storage.
Definition: LocalNodeStateRef.h:62
const model::TransactionRegistry & transactionRegistry() const
Gets the transaction registry.
Definition: PluginManager.cpp:67
state::AccountBalances TotalFundedMosaics
Definition: NemesisFundingState.h:48
void executeAndCommit(const LocalNodeStateRef &stateRef, StateHashVerification stateHashVerification=StateHashVerification::Enabled)
Definition: NemesisBlockLoader.cpp:161
MosaicId HarvestingMosaicId
Mosaic id used to provide harvesting ability.
Definition: BlockChainConfiguration.h:48
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
BasicRawBuffer< const uint8_t > RawBuffer
A const binary buffer.
Definition: RawBuffer.h:62
void execute(const LocalNodeStateRef &stateRef, StateHashVerification stateHashVerification)
Loads the nemesis block from storage, updates state in stateRef and verifies state hash (stateHashVer...
Definition: NemesisBlockLoader.cpp:152
void ExecuteBlock(const model::BlockElement &blockElement, const BlockExecutionContext &executionContext)
Executes blockElement using the specified execution context (executionContext).
Definition: BlockExecutor.cpp:45