From 149a11d43a82a1b5bda262e20f42d8c474e678a0 Mon Sep 17 00:00:00 2001 From: Henrique A Klein Date: Sun, 25 Feb 2024 17:24:10 -0300 Subject: [PATCH] Feat: Adding new registrations on validating node. --- app/CMakeLists.txt | 6 ++++++ .../impl/validating_node_application.cpp | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 93cfbb6a..b2563ea0 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -19,6 +19,12 @@ add_executable (sgns_demo clock rocksdb hasher + vrf_provider + block_storage + production_lottery + changes_tracker + trie_serializer + supergenius_trie_factory p2p::p2p_basic_host p2p::p2p_default_network p2p::p2p_peer_repository diff --git a/src/application/impl/validating_node_application.cpp b/src/application/impl/validating_node_application.cpp index 521deb48..0fdc6347 100644 --- a/src/application/impl/validating_node_application.cpp +++ b/src/application/impl/validating_node_application.cpp @@ -6,7 +6,16 @@ #include "integration/BufferStorageFactory.hpp" #include "integration/HasherFactory.hpp" #include "integration/BlockHeaderRepositoryFactory.hpp" +#include "integration/VRFProviderFactory.hpp" +#include "integration/ProductionLotteryFactory.hpp" +#include "integration/StorageChangesTrackerFactory.hpp" +#include "integration/TrieStorageBackendFactory.hpp" +#include "integration/TrieSerializerFactory.hpp" +#include "integration/BlockStorageFactory.hpp" +#include "integration/TrieStorageFactory.hpp" +#include "storage/trie/supergenius_trie/supergenius_trie_factory_impl.hpp" +#include "storage/trie/serialization/supergenius_codec.hpp" #include "verification/production/impl/production_impl.hpp" #include "verification/finality/impl/finality_impl.hpp" @@ -36,7 +45,16 @@ namespace sgns::application component_factory->Register( BufferStorageFactory::create( "rocksdb", app_config->rocksdb_path() ), "BufferStorage", boost::make_optional(std::string("rocksdb")) ); component_factory->Register( HasherFactory::create(), "Hasher", boost::none ); + component_factory->Register( VRFProviderFactory::create(), "VRFProvider", boost::none ); + component_factory->Register( ProductionLotteryFactory::create(), "ProductionLottery", boost::none ); component_factory->Register( BlockHeaderRepositoryFactory::create( "rocksdb" ), "BlockHeaderRepository", boost::none ); + component_factory->Register( std::make_shared(), "SuperGeniusTrieFactory", boost::none ); + component_factory->Register( std::make_shared(), "Codec", boost::none ); + component_factory->Register( StorageChangesTrackerFactory::create(), "ChangesTracker", boost::none ); + component_factory->Register( TrieStorageBackendFactory::create(), "TrieStorageBackend", boost::none ); + component_factory->Register( TrieSerializerFactory::create(), "TrieSerializer", boost::none ); + component_factory->Register( TrieStorageFactory::create(), "TrieStorage", boost::none ); + component_factory->Register( BlockStorageFactory::create(), "BlockStorage", boost::none ); auto result = component_factory->GetComponent( "AppStateManager", boost::none ); if ( result )