Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nano pow server #4043

Merged
merged 4 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
[submodule "cpptoml"]
path = cpptoml
url = https://github.com/cryptocode/cpptoml.git
[submodule "nano-pow-server"]
path = nano-pow-server
url = https://github.com/nanocurrency/nano-pow-server.git
[submodule "flatbuffers"]
path = flatbuffers
url = https://github.com/google/flatbuffers.git
Expand Down
22 changes: 0 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ set(NANO_TEST
set(NANO_SECURE_RPC
OFF
CACHE BOOL "")
set(NANO_POW_SERVER
OFF
CACHE BOOL "")
set(NANO_WARN_TO_ERR
OFF
CACHE BOOL "")
Expand Down Expand Up @@ -571,9 +568,6 @@ add_library(blake2 crypto/blake2/blake2-config.h crypto/blake2/blake2-impl.h

target_compile_definitions(blake2 PRIVATE -D__SSE2__)

if(NANO_POW_SERVER)
add_subdirectory(nano-pow-server)
endif()
add_subdirectory(nano/crypto_lib)
add_subdirectory(nano/secure)
add_subdirectory(nano/lib)
Expand Down Expand Up @@ -772,12 +766,6 @@ if(NANO_GUI OR RAIBLOCKS_GUI)
endif()
endforeach(boost_lib)
endif()
if(NANO_POW_SERVER)
install(TARGETS nano_pow_server
DESTINATION ${NANO_OSX_PACKAGE_NAME}.app/Contents/MacOS)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/nano-pow-server/public
DESTINATION ${NANO_OSX_PACKAGE_NAME}.app/Contents/MacOS)
endif()
install(FILES Nano.icns
DESTINATION ${NANO_OSX_PACKAGE_NAME}.app/Contents/Resources)
elseif(WIN32)
Expand Down Expand Up @@ -825,11 +813,6 @@ if(NANO_GUI OR RAIBLOCKS_GUI)
endif()
endforeach(boost_lib)
endif()
if(NANO_POW_SERVER)
install(TARGETS nano_pow_server DESTINATION .)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/nano-pow-server/public
DESTINATION .)
endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${WIN_REDIST} DESTINATION .)
install(FILES ${Qt5_bin_DIR}/libGLESv2.dll DESTINATION .)
install(FILES ${Qt5_bin_DIR}/Qt5Core.dll DESTINATION .)
Expand All @@ -852,11 +835,6 @@ if(NANO_GUI OR RAIBLOCKS_GUI)
endif()
endforeach(boost_lib)
endif()
if(NANO_POW_SERVER)
install(TARGETS nano_pow_server DESTINATION ./bin)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/nano-pow-server/public
DESTINATION ./bin)
endif()
set(DEBIAN_POSTINST postinst.in)
set(DEBIAN_POSTRM postrm.in)

Expand Down
1 change: 0 additions & 1 deletion ci/build-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fi
cmake \
-G'Unix Makefiles' \
-DACTIVE_NETWORK=nano_${NETWORK_CFG}_network \
-DNANO_POW_SERVER=ON \
-DNANO_GUI=ON \
-DPORTABLE=1 \
-DCMAKE_BUILD_TYPE=${CONFIGURATION} \
Expand Down
5 changes: 1 addition & 4 deletions docker/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ RUN \
cmake /tmp/src \
-DCI_BUILD=${CI_BUILD} \
-DPORTABLE=1 \
-DACTIVE_NETWORK=nano_${NETWORK}_network \
-DNANO_POW_SERVER=ON
-DACTIVE_NETWORK=nano_${NETWORK}_network

RUN \
make nano_node -j $(nproc) && \
make nano_rpc -j $(nproc) && \
make nano_pow_server -j $(nproc) && \
cd .. && \
echo ${NETWORK} >/etc/nano-network

Expand All @@ -30,7 +28,6 @@ useradd --uid 1000 --gid nanocurrency --shell /bin/bash --create-home nanocurren

COPY --from=0 /tmp/build/nano_node /usr/bin
COPY --from=0 /tmp/build/nano_rpc /usr/bin
COPY --from=0 /tmp/build/nano_pow_server /usr/bin
COPY --from=0 /tmp/src/api/ /usr/bin/api/
COPY --from=0 /etc/nano-network /etc
COPY docker/node/entry.sh /usr/bin/entry.sh
Expand Down
1 change: 0 additions & 1 deletion nano-pow-server
Submodule nano-pow-server deleted from 00591a
13 changes: 0 additions & 13 deletions nano/nano_node/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,6 @@ void nano_daemon::daemon::run (boost::filesystem::path const & data_path, nano::
node->start ();
nano::ipc::ipc_server ipc_server (*node, config.rpc);
std::unique_ptr<boost::process::child> rpc_process;
std::unique_ptr<boost::process::child> nano_pow_server_process;

/*if (config.pow_server.enable)
{
if (!boost::filesystem::exists (config.pow_server.pow_server_path))
{
std::cerr << std::string ("nano_pow_server is configured to start as a child process, however the file cannot be found at: ") + config.pow_server.pow_server_path << std::endl;
std::exit (1);
}

nano_pow_server_process = std::make_unique<boost::process::child> (config.pow_server.pow_server_path, "--config_path", data_path / "config-nano-pow-server.toml");
}*/

std::unique_ptr<nano::rpc> rpc;
std::unique_ptr<nano::rpc_handler_interface> rpc_handler;
if (config.rpc_enable)
Expand Down
18 changes: 0 additions & 18 deletions nano/nano_wallet/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,6 @@ int run_wallet (QApplication & application, int argc, char * const * argv, boost
nano::ipc::ipc_server ipc (*node, config.rpc);

std::unique_ptr<boost::process::child> rpc_process;
std::unique_ptr<boost::process::child> nano_pow_server_process;

if (config.pow_server.enable)
{
if (!boost::filesystem::exists (config.pow_server.pow_server_path))
{
splash->hide ();
show_error (std::string ("nano_pow_server is configured to start as a child process, however the file cannot be found at: ") + config.pow_server.pow_server_path);
std::exit (1);
}

nano_pow_server_process = std::make_unique<boost::process::child> (config.pow_server.pow_server_path, "--config_path", data_path / "config-nano-pow-server.toml");
}
std::unique_ptr<nano::rpc> rpc;
std::unique_ptr<nano::rpc_handler_interface> rpc_handler;
if (config.rpc_enable)
Expand Down Expand Up @@ -220,11 +207,6 @@ int run_wallet (QApplication & application, int argc, char * const * argv, boost
{
rpc_process->terminate ();
}

if (nano_pow_server_process)
{
nano_pow_server_process->terminate ();
}
#endif
runner.stop_event_processing ();
});
Expand Down
2 changes: 0 additions & 2 deletions nano/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ add_library(
portmapping.cpp
prioritization.cpp
prioritization.hpp
node_pow_server_config.hpp
node_pow_server_config.cpp
repcrawler.hpp
repcrawler.cpp
request_aggregator.hpp
Expand Down
11 changes: 0 additions & 11 deletions nano/node/daemonconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ nano::error nano::daemon_config::serialize_toml (nano::tomlconfig & toml)
opencl_l.put ("enable", opencl_enable);
toml.put_child ("opencl", opencl_l);

nano::tomlconfig pow_server_l;
pow_server.serialize_toml (pow_server_l);
nano::tomlconfig pow_server (pow_server_l);
toml.put_child ("nano_pow_server", pow_server);

return toml.get_error ();
}

Expand All @@ -62,12 +57,6 @@ nano::error nano::daemon_config::deserialize_toml (nano::tomlconfig & toml)
opencl.deserialize_toml (*opencl_l);
}

auto pow_l (toml.get_optional_child ("nano_pow_server"));
if (!toml.get_error () && pow_l)
{
pow_server.deserialize_toml (*pow_l);
}

return toml.get_error ();
}

Expand Down
2 changes: 0 additions & 2 deletions nano/node/daemonconfig.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include <nano/lib/errors.hpp>
#include <nano/node/node_pow_server_config.hpp>
#include <nano/node/node_rpc_config.hpp>
#include <nano/node/nodeconfig.hpp>
#include <nano/node/openclconfig.hpp>
Expand All @@ -23,7 +22,6 @@ class daemon_config
nano::node_config node;
bool opencl_enable{ false };
nano::opencl_config opencl;
nano::node_pow_server_config pow_server;
boost::filesystem::path data_path;
};

Expand Down
17 changes: 0 additions & 17 deletions nano/node/node_pow_server_config.cpp

This file was deleted.

38 changes: 0 additions & 38 deletions nano/node/node_pow_server_config.hpp

This file was deleted.