From 0ae7466c6c558d9be1f6332f4922c47bb9f65919 Mon Sep 17 00:00:00 2001 From: Dmitry Puzyrkov <dmitry.puzyrkov@demlabs.net> Date: Fri, 11 Nov 2022 07:40:11 +0000 Subject: [PATCH] [*] pkg and build structure like master --- .gitlab-ci.yml | 31 +- CMakeLists.txt | 300 ++++-------------- cellframe-sdk | 2 +- debian | 1 - dist.darwin/etc/network/Backbone/chain-0.cfg | 31 -- dist.darwin/etc/network/Backbone/main.cfg | 39 --- .../etc/network/kelvpn-minkowski/chain-0.cfg | 32 -- .../kelvpn-minkowski/support-chain.cfg | 31 -- dist.darwin/etc/network/mileena/chain-0.cfg | 31 -- dist.darwin/etc/network/subzero/chain-0.cfg | 27 -- .../etc/network/subzero/support-chain.cfg | 27 -- dist.linux/share/cellframe-node.service | 11 +- dist.linux/share/logrotate/cellframe-node | 6 +- dist.linux/share/logrotate/logrotate.timer | 11 + .../etc/network/Backbone/chain-0.cfg | 2 +- .../etc/network/Backbone/main.cfg | 4 +- .../etc/network/kelvpn-minkowski/chain-0.cfg | 2 +- .../etc/network/kelvpn-minkowski}/main.cfg | 17 +- .../kelvpn-minkowski/support-chain.cfg | 2 +- .../etc/network/mileena/chain-0.cfg | 13 +- .../etc/network/mileena/main.cfg | 8 +- .../etc/network/subzero/chain-0.cfg | 2 +- .../etc/network/subzero/support-chain.cfg | 2 +- .../ca/kelvpn-minkowski.root.0.pub.dcert | Bin 0 -> 1285 bytes .../ca/kelvpn-minkowski.root.1.pub.dcert | Bin 0 -> 1285 bytes .../ca/kelvpn-minkowski.root.2.pub.dcert | Bin 0 -> 1285 bytes dist/share/ca/mileena.master.0.dcert | Bin 0 -> 1285 bytes dist/share/ca/mileena.master.1.dcert | Bin 0 -> 1285 bytes dist/share/ca/minkowski.master.0.dcert | Bin 0 -> 1285 bytes dist/share/ca/minkowski.master.1.dcert | Bin 0 -> 1285 bytes dist/share/ca/minkowski.master.2.dcert | Bin 0 -> 1285 bytes dist/share/configs/cellframe-node.cfg.tpl | 15 +- dist/share/configs/network/Backbone.cfg.tpl | 10 +- .../configs/network/kelvpn-minkowski.cfg.tpl | 12 +- dist/share/configs/network/mileena.cfg.tpl | 19 +- dist/share/configs/network/subzero.cfg.tpl | 2 + os/debian/config | 71 +++++ os/debian/postinst | 199 ++++++++++++ os/debian/postrm | 11 + os/debian/prerm | 29 ++ os/debian/rules | 10 + os/debian/templates | 133 ++++++++ prod_build | 2 +- python-cellframe | 2 +- 44 files changed, 626 insertions(+), 521 deletions(-) delete mode 120000 debian delete mode 100755 dist.darwin/etc/network/Backbone/chain-0.cfg delete mode 100755 dist.darwin/etc/network/Backbone/main.cfg delete mode 100755 dist.darwin/etc/network/kelvpn-minkowski/chain-0.cfg delete mode 100755 dist.darwin/etc/network/kelvpn-minkowski/support-chain.cfg delete mode 100644 dist.darwin/etc/network/mileena/chain-0.cfg delete mode 100644 dist.darwin/etc/network/subzero/chain-0.cfg delete mode 100644 dist.darwin/etc/network/subzero/support-chain.cfg create mode 100644 dist.linux/share/logrotate/logrotate.timer rename {dist.linux => dist}/etc/network/Backbone/chain-0.cfg (90%) rename {dist.linux => dist}/etc/network/Backbone/main.cfg (84%) rename {dist.linux => dist}/etc/network/kelvpn-minkowski/chain-0.cfg (90%) rename {dist.darwin/etc/network/mileena => dist/etc/network/kelvpn-minkowski}/main.cfg (60%) mode change 100644 => 100755 rename {dist.linux => dist}/etc/network/kelvpn-minkowski/support-chain.cfg (90%) rename {dist.linux => dist}/etc/network/mileena/chain-0.cfg (62%) rename {dist.linux => dist}/etc/network/mileena/main.cfg (78%) rename {dist.linux => dist}/etc/network/subzero/chain-0.cfg (90%) rename {dist.linux => dist}/etc/network/subzero/support-chain.cfg (90%) create mode 100755 dist/share/ca/kelvpn-minkowski.root.0.pub.dcert create mode 100755 dist/share/ca/kelvpn-minkowski.root.1.pub.dcert create mode 100755 dist/share/ca/kelvpn-minkowski.root.2.pub.dcert create mode 100755 dist/share/ca/mileena.master.0.dcert create mode 100755 dist/share/ca/mileena.master.1.dcert create mode 100755 dist/share/ca/minkowski.master.0.dcert create mode 100755 dist/share/ca/minkowski.master.1.dcert create mode 100755 dist/share/ca/minkowski.master.2.dcert create mode 100755 os/debian/config create mode 100755 os/debian/postinst create mode 100755 os/debian/postrm create mode 100755 os/debian/prerm create mode 100755 os/debian/rules create mode 100755 os/debian/templates diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8261d8261..8ab05bbe8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ stages: .deploy: extends: .ci-polygon - image: demlabs/amd64/debian-bullseye:cellframe-node + image: demlabs/amd64/debian-buster:linuxbuilder stage: deploy before_script: /opt/buildtools/prepare_environment.sh @@ -38,20 +38,28 @@ macos-amd64: script: - ./prod_build/build.sh --target osx release -linux-amd64-debian-bullseye-dbg: +linux-amd64-debian-buster-dbg: extends: .build - image: demlabs/amd64/debian-bullseye:linuxbuilder + image: demlabs/amd64/debian-buster:linuxbuilder before_script: /opt/buildtools/prepare_environment.sh amd64-linux script: - - ./prod_build/build.sh --target linux debug + - ./prod_build/build.sh --target linux debug -DBUILD_WITH_PYTHON_ENV=ON - ./prod_build/pack.sh --target linux debug -linux-amd64-debian-bullseye: +linux-amd64-debian-buster-rwd: extends: .build - image: demlabs/amd64/debian-bullseye:linuxbuilder + image: demlabs/amd64/debian-buster:linuxbuilder + before_script: /opt/buildtools/prepare_environment.sh amd64-linux + script: + - ./prod_build/build.sh --target linux rwd -DBUILD_WITH_PYTHON_ENV=ON + - ./prod_build/pack.sh --target linux rwd + +linux-amd64-debian-buster: + extends: .build + image: demlabs/amd64/debian-buster:linuxbuilder before_script: /opt/buildtools/prepare_environment.sh amd64-linux script: - - ./prod_build/build.sh --target linux release + - ./prod_build/build.sh --target linux release -DBUILD_WITH_PYTHON_ENV=ON - ./prod_build/pack.sh --target linux release linux-armhf-debian-bullseye: @@ -75,13 +83,16 @@ linux-arm64-debian-bullseye: deploy: extends: .deploy needs: - - linux-amd64-debian-bullseye - - linux-amd64-debian-bullseye-dbg + - linux-amd64-debian-buster + - linux-amd64-debian-buster-dbg - linux-armhf-debian-bullseye - linux-arm64-debian-bullseye + - linux-amd64-debian-buster-rwd script: - - /opt/buildtools/deploy_files.sh pub_cellframe linux/$CI_COMMIT_REF_NAME/ build_*/*.deb + - anybadge -l "node version" -v "$(source version.mk; echo "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH")" -f node-version-badge.svg -c blue + - /opt/buildtools/deploy_files.sh pub_cellframe linux/cellframe-node/$CI_COMMIT_REF_NAME/ ./node-version-badge.svg || true + - /opt/buildtools/deploy_files.sh pub_cellframe linux/cellframe-node/$CI_COMMIT_REF_NAME/ build_*/*.deb diff --git a/CMakeLists.txt b/CMakeLists.txt index e834e0890..fa230135d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.10) project(cellframe-node C) include(cellframe-sdk/cmake/ReadMKFile.cmake) +include(FetchContent) set(CMAKE_ENABLE_EXPORTS ON) set(CMAKE_VERBOSE_MAKEFILE ON) @@ -15,6 +16,10 @@ SET( CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) SET( CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) SET( CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) +SET(CMAKE_INSTALL_PREFIX "/opt/${PROJECT_NAME}") +SET(CPACK_INSTALL_PREFIX "/opt/${PROJECT_NAME}") +SET(DESTDIR "/opt/${PROJECT_NAME}") + #possible need be setted during crosscompily #by default it uses dpkg --print-architecture #we ok with it on native builds. @@ -26,29 +31,22 @@ add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_ set(SUBMODULES_NO_BUILD ON) include (cellframe-sdk/cmake/OS_Detection.cmake) - -#set(BUILD_WITH_GDB_DRIVER_PGSQL ON) -if(NOT WIN32) +if (WIN32) + set(BUILD_WITH_GDB_DRIVER_MDBX OFF) +else() set(BUILD_WITH_GDB_DRIVER_MDBX ON) endif() +#set(BUILD_WITH_GDB_DRIVER_PGSQL ON) #set(BUILD_CRYPTO_TESTS ON) -if(DARWIN) - set(BUILD_PYTHON_FROM_SRC ON) -else() - set(BUILD_WITH_SYSTEM_PYTHON ON) #link with system python3. If OFF - will user prebuilds or src. -endif() - -#set(BUILD_PYTHON_FROM_SRC ON) #build Python from sources; if OFF - will use a prebuilds. -#set(BUILD_PYTHON_СUSTOM_LIBFFI ON) #use libffi from source archive. -#set(BUILD_PYTHON_СUSTOM_ZLIB ON) #use zlib from source arcivie. -#set(BUILD_PYTHON_СUSTOM_OPENSSL ON) #use openssl from source archive. -#set(BUILD_PYTHON_SHARED OFF) #use python with shared lib (or link staticaly). +set(BUILD_WITH_ZIP OFF) if(LINUX) -# set(SUPPORT_PYTHON_PLUGINS ON) +set(BUILD_WITH_PYTHON_ENV ON) +set(SUPPORT_PYTHON_PLUGINS ON) endif() + set(CELLFRAME_MODULES "core chains mining network srv cs-dag-poa cs-block-poa cs-dag-pos cs-block-pos cs-block-ton cs-none srv-app srv-app-db srv-datum srv-stake-pos-delegate srv-stake-lock srv-xchange") if(LINUX OR DARWIN) @@ -79,15 +77,13 @@ if(UNIX) set(IMPORTSDIR ${BINDIR}) add_definitions("-DDAP_DARWIN_LIBRARY") - else() - SET(CMAKE_INSTALL_PREFIX "/opt/${PROJECT_NAME}") - SET(CPACK_INSTALL_PREFIX "/opt/${PROJECT_NAME}") - SET(DESTDIR "/opt/${PROJECT_NAME}") + endif() if(LINUX) + message("[*] Linux package setup") SET( CPACK_GENERATOR "DEB") SET( CPACK_SYSTEM_TYPE "${DEBIAN_OS_RELEASE_NAME}") @@ -109,9 +105,13 @@ if(UNIX) else() set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CPACK_TARGET_ARCHITECTURE}) endif() - + + if ( CPACK_DEBIAN_PACKAGE_ARCHITECTURE MATCHES "arm") + SET( BUILD_WITH_PYTHON_ENV OFF ) + endif() + if(NOT CPACK_SYSTEM_NAME) - set(CPACK_SYSTEM_NAME ${CPACK_SYSTEM_TYPE}-${CPACK_SYSTEM_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) + set(CPACK_SYSTEM_NAME ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) endif() SET( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-${CPACK_PACKAGE_VERSION_PATCH}") @@ -122,7 +122,9 @@ if(UNIX) if(CMAKE_BUILD_TYPE MATCHES Debug) SET( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-dbg" ) endif() - + if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + SET( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-rwd" ) + endif() SET( CPACK_DEBIAN_PACKAGE_MAINTAINER "Dmitriy Gerasimov <naeper@demlabs.net>" ) SET( CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY "CellFrame Node software https://cellframe.net" ) SET( CPACK_DEBIAN_PACKAGE_DESCRIPTION "CellFrame Node" ) @@ -137,7 +139,7 @@ if(UNIX) message("[*] Debian package setup pkgarch=${CPACK_DEBIAN_PACKAGE_ARCHITECTURE} version=${CPACK_PACKAGE_VERSION}") SET( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA - "${CMAKE_CURRENT_SOURCE_DIR}/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debian/prerm;${CMAKE_CURRENT_SOURCE_DIR}/debian/postrm;${CMAKE_CURRENT_SOURCE_DIR}/debian/templates;${CMAKE_CURRENT_SOURCE_DIR}/debian/config;") + "${CMAKE_CURRENT_SOURCE_DIR}/os/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/os/debian/prerm;${CMAKE_CURRENT_SOURCE_DIR}/os/debian/postrm;${CMAKE_CURRENT_SOURCE_DIR}/os/debian/templates;${CMAKE_CURRENT_SOURCE_DIR}/os/debian/config;") elseif(BSD) message("[*] BSD family system ${CMAKE_SYSTEM} ") elseif(DARWIN) @@ -216,219 +218,42 @@ if(UNIX AND NOT WIN32) if (SUPPORT_PYTHON_PLUGINS) message("[+] Build with python plugins support") - add_definitions("-DDAP_SUPPORT_PYTHON_PLUGINS") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDAP_SUPPORT_PYTHON_PLUGINS") - - set(PYTHON_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/python) + add_definitions("-DDAP_SUPPORT_PYTHON_PLUGINS") - if (BUILD_WITH_SYSTEM_PYTHON) - message("[!] Using system python") - set(Python_ADDITIONAL_VERSION 3.9 3.8 3.7 3.6 3.5 3.4) - find_package(PythonLibs REQUIRED) - - add_library( PYTHON_LIBRARY SHARED IMPORTED ) - set_target_properties( PYTHON_LIBRARY PROPERTIES IMPORTED_LOCATION ${PYTHON_LIBRARY}) - - elseif (BUILD_PYTHON_FROM_SRC) - message("[!] Building python from source") - include(ExternalProject) - - set(LIBFFI_URL "https://pub.cellframe.net/3rdparty/python/libffi-3.3.tar.gz") - set(LIBFFI_HASH "SHA256=72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056") - - set(ZLIB_URL "https://pub.cellframe.net/3rdparty/python/zlib-1.2.12.tar.gz") - set(ZLIB_HASH "SHA256=91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9") - - set(LIBSSL_URL "https://pub.cellframe.net/3rdparty/python/openssl-1.1.1o.tar.gz") - set(LIBSSL_HASH "SHA256=9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f") - - if(LINUX) - set(PYTHON_URL "https://pub.cellframe.net/3rdparty/python/Python-3.9.12.tgz") - set(PYTHON_HASH "SHA256=70e08462ebf265012bd2be88a63d2149d880c73e53f1712b7bbbe93750560ae8") - set(PYTHON_LIBNAME "python3.9") - else() - set(PYTHON_URL "https://pub.cellframe.net/3rdparty/python/Python-3.10.5.tgz") - set(PYTHON_HASH "SHA256=18f57182a2de3b0be76dfc39fdcfd28156bb6dd23e5f08696f7492e9e3d0bf2d") - set(PYTHON_LIBNAME "python3.10") - endif() - - if(BUILD_PYTHON_СUSTOM_LIBFFI) - message("[+] Building libffi from source") - - set(LIBFFI_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libffi) - set(WRP_CFLAGS "-fPIC") - set(WRP_CPPFLAGS "-fPIC") - - configure_file(cfg.python.wrapper.in ffi.cfg.wrapper.sh @ONLY) - - ExternalProject_Add( - LIBFFI - URL ${LIBFFI_URL} - URL_HASH ${LIBFFI_HASH} - PREFIX ${LIBFFI_PREFIX} - INSTALL_DIR ${LIBFFI_PREFIX} - BUILD_COMMAND ${MAKE} - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_OUTPUT_ON_FAILURE ON - CONFIGURE_HANDLED_BY_BUILD ON - CONFIGURE_COMMAND /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/ffi.cfg.wrapper.sh <SOURCE_DIR>/configure --disable-shared --prefix=${LIBFFI_PREFIX} - ) - - - set(PYTHON_WRP_CFLAGS "${PYTHON_WRP_CFLAGS} -I${LIBFFI_PREFIX}/include") - set(PYTHON_WRP_CPPFLAGS "${PYTHON_WRP_CPPFLAGS} -I${LIBFFI_PREFIX}/include") - - - set(PYTHON_WRP_CFLAGS "${PYTHON_WRP_CFLAGS} ${LIBFFI_PREFIX}/lib/libffi.a") - set(PYTHON_WRP_CPPFLAGS "${PYTHON_WRP_CPPFLAGS} ${LIBFFI_PREFIX}/lib/libffi.a") - set(PYTHON_WRP_LDFLAGS "${PYTHON_WRP_LDFLAGS} ${LIBFFI_PREFIX}/lib/libffi.a") - endif() - - if(BUILD_PYTHON_СUSTOM_ZLIB) - message("[+] Building zlib from source") - - set(ZLIB_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/zlib) - set(WRP_CFLAGS "-fPIC") - set(WRP_CPPFLAGS "-fPIC") - - configure_file(cfg.python.wrapper.in zlib.cfg.wrapper.sh @ONLY) - - ExternalProject_Add( - ZLIB - URL ${ZLIB_URL} - URL_HASH ${ZLIB_HASH} - PREFIX ${ZLIB_PREFIX} - INSTALL_DIR ${ZLIB_PREFIX} - BUILD_COMMAND ${MAKE} - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_OUTPUT_ON_FAILURE ON - CONFIGURE_HANDLED_BY_BUILD ON - CONFIGURE_COMMAND /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/zlib.cfg.wrapper.sh <SOURCE_DIR>/configure --static --prefix=${ZLIB_PREFIX} - ) - - set(PYTHON_WRP_CFLAGS "${PYTHON_WRP_CFLAGS} -I${ZLIB_PREFIX}/include") - set(PYTHON_WRP_CPPFLAGS "${PYTHON_WRP_CPPFLAGS} -I${ZLIB_PREFIX}/include") - set(PYTHON_WRP_LDFLAGS "${PYTHON_WRP_LDFLAGS} -L${ZLIB_PREFIX}/lib/ ${ZLIB_PREFIX}/lib/libz.a") - - endif() - - if(BUILD_PYTHON_СUSTOM_OPENSSL) - - message("[+] Building openssl from source") - - set(LIBSSL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libssl) - - ExternalProject_Add( - LIBSSL - URL ${LIBSSL_URL} - URL_HASH ${LIBSSL_HASH} - PREFIX ${LIBSSL_PREFIX} - INSTALL_DIR ${LIBSSL_PREFIX} - BUILD_COMMAND ${MAKE} - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_OUTPUT_ON_FAILURE ON - CONFIGURE_HANDLED_BY_BUILD ON - CONFIGURE_COMMAND <SOURCE_DIR>/config --prefix=${LIBSSL_PREFIX} - ) - - set(WITH_OPENSSL "--with-openssl=${LIBSSL_PREFIX}") - - endif() - - if(CMAKE_BUILD_TYPE MATCHES Debug) - #to fix pycore_byteswap.h not found error. - set(PYTHON_WRP_CFLAGS "${PYTHON_WRP_CFLAGS} -I${PYTHON_PREFIX}/src/PYTHON/Include/internal/") - set(PYTHON_WRP_CPPFLAGS "${PYTHON_WRP_CPPFLAGS} -I${PYTHON_PREFIX}/src/PYTHON/Include/internal/") - - if (BUILD_PYTHON_SHARED) - message("[*] Building python as shared lib") - set(PYTHON_LIBRARY ${CMAKE_BINARY_DIR}/python/lib/lib${PYTHON_LIBNAME}d.so) - else() - message("[*] Building python as static lib") - set(PYTHON_LIBRARY ${CMAKE_BINARY_DIR}/python/lib/lib${PYTHON_LIBNAME}d.a) - endif() - set(PYTHON_INCLUDE_DIR ${PYTHON_PREFIX}/include/${PYTHON_LIBNAME}d) - set(PYTHON_WITH_PYDEBUG "--with-pydebug") - else() - if (BUILD_PYTHON_SHARED) - message("[*] Building python as shared lib") - set(PYTHON_LIBRARY ${CMAKE_BINARY_DIR}/python/lib/lib${PYTHON_LIBNAME}.so) - else() - message("[*] Building python as static lib") - set(PYTHON_LIBRARY ${CMAKE_BINARY_DIR}/python/lib/lib${PYTHON_LIBNAME}.a) - endif() - set(PYTHON_INCLUDE_DIR ${PYTHON_PREFIX}/include/${PYTHON_LIBNAME}) - endif() - - if(NOT BUILD_PYTHON_SHARED) - set(PYTHON_SHARED "--disable-shared") - else() - set(PYTHON_SHARED "--enable-shared") - endif() - - set(WRP_CFLAGS ${PYTHON_WRP_CFLAGS}) - set(WRP_CPPFLAGS ${PYTHON_WRP_CPPFLAGS}) - set(WRP_LDFLAGS ${PYTHON_WRP_LDFLAGS}) - - configure_file(cfg.python.wrapper.in python.cfg.wrapper.sh @ONLY) - - ExternalProject_Add( - PYTHON - URL ${PYTHON_URL} - URL_HASH ${PYTHON_HASH} - PREFIX ${PYTHON_PREFIX} - INSTALL_DIR ${PYTHON_PREFIX} - BUILD_COMMAND ${MAKE} - BUILD_BYPRODUCTS ${PYTHON_INCLUDE_DIR} ${PYTHON_LIBRARY} - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_OUTPUT_ON_FAILURE ON - CONFIGURE_HANDLED_BY_BUILD ON - CONFIGURE_COMMAND /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/python.cfg.wrapper.sh <SOURCE_DIR>/configure ${PYTHON_WITH_PYDEBUG} --with-ensurepip=install ${PYTHON_SHARED} ${WITH_OPENSSL} --prefix=${PYTHON_PREFIX} + if (BUILD_WITH_PYTHON_ENV) + + message("[+] Build with python environment") + message(" Downloading static prebuild cpython3.7...") + #this python was build by compiling and installing static python distrip to /opt/cellframe-node/ and + # installing pip in it, then tared all back. + FetchContent_Declare( + CPython37Static + URL https://pub.cellframe.net/3rdparty/python/cpython.tar.xz ) - if(NOT BUILD_PYTHON_SHARED) - add_library( PYTHON_LIBRARY STATIC IMPORTED ) - else() - add_library( PYTHON_LIBRARY SHARED IMPORTED ) - endif() - - set_target_properties( PYTHON_LIBRARY PROPERTIES IMPORTED_LOCATION ${PYTHON_LIBRARY}) - - if(BUILD_PYTHON_СUSTOM_ZLIB) - add_dependencies(PYTHON ZLIB) - endif() - - if(BUILD_PYTHON_СUSTOM_OPENSSL) - add_dependencies(PYTHON LIBSSL) - endif() + FetchContent_MakeAvailable(CPython37Static) - if(BUILD_PYTHON_СUSTOM_LIBFFI) - add_dependencies(PYTHON LIBFFI) - endif() - - if (BUILD_PYTHON_SHARED) - set(CMAKE_SKIP_RPATH TRUE) - set_target_properties(${NODE_TARGET} PROPERTIES LINK_FLAGS "-Wl,-rpath,\$ORIGIN/python/lib/") - endif() + set(CMAKE_PREFIX_PATH ${cpython37static_SOURCE_DIR}) + + set(Python_ADDITIONAL_VERSIONS 3.7) + find_package(PythonLibs REQUIRED) - add_dependencies(dap_core PYTHON) + add_definitions("-DDAP_BUILD_WITH_PYTHON_ENV") + set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} -lssl -lcrypto -lcrypt -lnsl -lz -lutil -lexpat ) + else() + set(Python_ADDITIONAL_VERSION 3.9 3.8 3.7 3.6 3.5 3.4) + find_package(PythonLibs REQUIRED) endif() - get_target_property(PYTHON_LIBRARY_PATH PYTHON_LIBRARY IMPORTED_LOCATION) - message("[!] Python includes path: " ${PYTHON_INCLUDE_DIR}) message("[!] Python library path: " ${PYTHON_LIBRARY_PATH}) - include_directories(${PYTHON_INCLUDE_DIR}) - set(NODE_LIBRARIES ${NODE_LIBRARIES} dap_plugins_python PYTHON_LIBRARY -lutil) - + include_directories(${PYTHON_INCLUDE_DIR} include/) add_subdirectory(python-cellframe) - + + set(NODE_LIBRARIES ${NODE_LIBRARIES} dap_plugins_python ${PYTHON_LIBRARIES}) endif() if(ANDROID ) @@ -436,8 +261,7 @@ if(UNIX AND NOT WIN32) list(REMOVE_DUPLICATES ALL_LIBRARIES) target_link_libraries(${NODE_TARGET} ${ALL_LIBRARIES}) else() - - target_link_libraries(${NODE_TARGET} ${NODE_LIBRARIES} pthread ) + target_link_libraries(${NODE_TARGET} ${NODE_LIBRARIES} pthread ) target_link_libraries(${NODE_CLI_TARGET} ${NODE_CLI_LIBRARIES} pthread ) target_link_libraries(${NODE_TOOL_TARGET} ${NODE_TOOL_LIBRARIES} pthread ) endif() @@ -452,33 +276,31 @@ endif() if(DARWIN) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist/ DESTINATION ${SHAREDIR} FILES_MATCHING PATTERN "*" PATTERN "*") - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist.darwin/ DESTINATION ${SHAREDIR} FILES_MATCHING PATTERN "*" PATTERN "*") INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR} ) INSTALL(TARGETS ${NODE_CLI_TARGET} DESTINATION ${BINDIR} ) INSTALL(TARGETS ${NODE_TOOL_TARGET} DESTINATION ${BINDIR} ) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ DESTINATION ${BINDIR} FILES_MATCHING PATTERN "*" PATTERN "*" PERMISSIONS OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;WORLD_READ;GROUP_READ ) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts.darwin/ DESTINATION ${BINDIR} FILES_MATCHING PATTERN "*" PATTERN "*" PERMISSIONS OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;WORLD_READ;GROUP_READ ) - + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ DESTINATION ${SHAREDIR} FILES_MATCHING PATTERN "*" PATTERN "*" PERMISSIONS OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;WORLD_READ;GROUP_READ ) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts.darwin/ DESTINATION ${SHAREDIR} FILES_MATCHING PATTERN "*" PATTERN "*" PERMISSIONS OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;WORLD_READ;GROUP_READ ) else() INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist/ DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*" PATTERN "*") if(LINUX) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist.linux/ DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*" PATTERN "*") - elseif(DARWIN) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist.darwin/ DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*" PATTERN "*") elseif(BSD) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist.bsd/ DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*" PATTERN "*") endif() - + INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - - if(UNIX AND NOT ANDROID) - INSTALL(TARGETS ${NODE_CLI_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - INSTALL(TARGETS ${NODE_TOOL_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - - if (SUPPORT_PYTHON_PLUGINS AND NOT BUILD_WITH_SYSTEM_PYTHON) #install python environment if not system python in use - INSTALL(DIRECTORY ${PYTHON_PREFIX} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin USE_SOURCE_PERMISSIONS) + INSTALL(TARGETS ${NODE_CLI_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) + INSTALL(TARGETS ${NODE_TOOL_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) + + if(NOT ANDROID) + #install all python-specific files back to its original location + if (SUPPORT_PYTHON_PLUGINS AND BUILD_WITH_PYTHON_ENV) + + INSTALL(FILES ${cpython37static_SOURCE_DIR}/bin/pip3 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/pip3 ) + INSTALL(DIRECTORY ${cpython37static_SOURCE_DIR}/lib/python3.7 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/ USE_SOURCE_PERMISSIONS) endif() endif() diff --git a/cellframe-sdk b/cellframe-sdk index 6bb7ffbf7..c11ef834e 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit 6bb7ffbf7b233181c093ae5a92887dd8be7f0424 +Subproject commit c11ef834eb5d440d8f3f4d03c0823be8ac77986d diff --git a/debian b/debian deleted file mode 120000 index 013cd0eee..000000000 --- a/debian +++ /dev/null @@ -1 +0,0 @@ -./prod_build/packaging/deb/ \ No newline at end of file diff --git a/dist.darwin/etc/network/Backbone/chain-0.cfg b/dist.darwin/etc/network/Backbone/chain-0.cfg deleted file mode 100755 index c620d2feb..000000000 --- a/dist.darwin/etc/network/Backbone/chain-0.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[chain] -id=0x0000000000000000 -shard_id=0x0000000000000000 -name=zerochain -load_priority=0 -# Possible values [token, emission, transaction, ca] -datum_types=[token,emission,ca,transaction] -mempool_auto_types=[] -consensus=dag_poa - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/scorpion/zerochain/ - -[dag] -is_single_line=true -is_celled=false -is_add_directly=false -datum_add_hashes_count=1 - -is_static_genesis_event=true -static_genesis_event=0x6DD5EB423B94EECE44F6DA39D82D7BD2B4DD33744AC4DFB1D2E2971DAB40431A - -[dag-poa] -auth_certs_prefix=scorpion.root -auth_certs_number=5 -auth_certs_number_verify=3 -auth_certs_dir=/Applications/Cellframe.app/Contents/Resources/share/ca -confirmations_timeout=60 -auto_confirmation=true -auto_round_complete=true -wait_sync_before_complete=120 diff --git a/dist.darwin/etc/network/Backbone/main.cfg b/dist.darwin/etc/network/Backbone/main.cfg deleted file mode 100755 index 7584e7aa8..000000000 --- a/dist.darwin/etc/network/Backbone/main.cfg +++ /dev/null @@ -1,39 +0,0 @@ -[chain] -id=0x0000000000000002 -shard_id=0x0000000000000000 -name=main -load_priority=2 -# Possible values [token, emission, transaction, ca] -datum_types=[transaction] -mempool_auto_types=[transaction] -consensus=block_ton - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/scorpion/main/ - -[blocks] -is_celled=false - -is_static_genesis_event=true -static_genesis_event=0xD3E07282FC1C4FC733AEE7898BA1017DF7659CA7B64047886FA12EDD82759C23 - -[block-ton] -stake_tokens=0 -stake_tokens_value=0 -# verifications_minimum=1 - -ton_nodes_addrs=[DFAB::CDC2::A6BA::48FB,D05E::E083::A665::37A8,BC53::9462::EF3A::E47D] -auth_certs_prefix=scorpion.master -auth_certs_number=3 -consensus_debug=false -validators_list_by_stake=false -round_start_sync_timeout=10 -round_start_multiple_of=35 -allowed_clock_offset=10 -session_idle_min=10 -round_candidates_max=5 -next_candidate_delay=2 -round_attempts_max=5 -round_attempt_duration=20 -first_message_delay=2 -my_candidate_attempts_max=2 diff --git a/dist.darwin/etc/network/kelvpn-minkowski/chain-0.cfg b/dist.darwin/etc/network/kelvpn-minkowski/chain-0.cfg deleted file mode 100755 index 7949727e3..000000000 --- a/dist.darwin/etc/network/kelvpn-minkowski/chain-0.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[chain] -id=0x0000000000000000 -shard_id=0x0000000000000000 -name=zerochain -load_priority=0 -# Possible values [token, emission, transaction, ca] -datum_types=[token,emission,ca,transaction] -mempool_auto_types=[emission,ca,transaction] -consensus=dag_poa - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/kelvpn-minkowski/zerochain/ - -[dag] -is_single_line=true -is_celled=false -is_add_directly=false -datum_add_hashes_count=1 - -is_static_genesis_event=true -static_genesis_event=0xD5FF5786E048ECF7B70C245D3E4EDE007F0495D108D0D29C4EC34B207E776F09 - -[dag-poa] -auth_certs_prefix=kelvpn-minkowski.root -auth_certs_dir=/Applications/Cellframe.app/Contents/Resources/share/ca - -auth_certs_number=3 -auth_certs_number_verify=2 -confirmations_timeout=300 -auto_confirmation=true -auto_round_complete=true -wait_sync_before_complete=180 diff --git a/dist.darwin/etc/network/kelvpn-minkowski/support-chain.cfg b/dist.darwin/etc/network/kelvpn-minkowski/support-chain.cfg deleted file mode 100755 index 5fe586fb2..000000000 --- a/dist.darwin/etc/network/kelvpn-minkowski/support-chain.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[chain] -id=0x0000000000000001 -shard_id=0x0000000000000000 -name=support -load_priority=1 -# Possible values [token, emission, transaction, ca] -datum_types=[ca,transaction] -# mempool_auto_types=[transaction] -consensus=dag_poa - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/kelvpn-minkowski/support/ - -[dag] -is_single_line=true -is_celled=false -is_add_directly=false -datum_add_hashes_count=1 - -is_static_genesis_event=true -static_genesis_event=0x76C4EC7B555FD41694941F994C769442AB1BC3883A4B124ECBAB9D3296F09C59 - -[dag-poa] -auth_certs_prefix=kelvpn-minkowski.root -auth_certs_number=3 -auth_certs_number_verify=2 -auth_certs_dir=/Applications/Cellframe.app/Contents/Resources/share/ca -confirmations_timeout=300 -auto_confirmation=true -auto_round_complete=true -wait_sync_before_complete=180 diff --git a/dist.darwin/etc/network/mileena/chain-0.cfg b/dist.darwin/etc/network/mileena/chain-0.cfg deleted file mode 100644 index 891b9ac4d..000000000 --- a/dist.darwin/etc/network/mileena/chain-0.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[chain] -id=0x0000000000000000 -shard_id=0x0000000000000000 -name=zerochain -load_priority=0 -# Possible values [token, emission, transaction, ca] -datum_types=[token,emission,ca,transaction] -mempool_auto_types=[] -consensus=dag_poa - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/mileena/zerochain/ - -[dag] -is_single_line=true -is_celled=false -is_add_directly=false -datum_add_hashes_count=1 - -is_static_genesis_event=true -static_genesis_event=0xB168ACEA8542A1011D808013B9BE4924B0157B118944FE8785ED42943118BF2E - -[dag-poa] -auth_certs_prefix=mileena -auth_certs_dir=/Applications/Cellframe.app/Contents/Resources/share/ca -auth_certs_number=5 -confirmations_timeout=60 -auto_confirmation=true -auto_round_complete=true -wait_sync_before_complete=120 -auth_certs_number_verify=3 diff --git a/dist.darwin/etc/network/subzero/chain-0.cfg b/dist.darwin/etc/network/subzero/chain-0.cfg deleted file mode 100644 index 7a26761ac..000000000 --- a/dist.darwin/etc/network/subzero/chain-0.cfg +++ /dev/null @@ -1,27 +0,0 @@ -[chain] -id=0x0000000000000000 -shard_id=0x0000000000000000 -name=zerochain -load_priority=1 -# Possible values [token, emission, transaction] -datum_types=[token,emission,ca,transaction] -mempool_auto_types=[emission,ca,transaction] -consensus=dag_poa - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/subzero/zerochain/ - -[dag] -is_single_line=true -is_celled=false -is_add_directly=true -datum_add_hashes_count=1 - -is_static_genesis_event=true -static_genesis_event=0x17546F64F432EA2C5166C3710C1777F135FF8D70D7EE4D52157B9A05F8A580A1 - -[dag-poa] -auth_certs_prefix=subzero.cellframe.root -auth_certs_number=5 -auth_certs_number_verify=1 -auth_certs_dir=/Applications/Cellframe.app/Contents/Resources/share/ca diff --git a/dist.darwin/etc/network/subzero/support-chain.cfg b/dist.darwin/etc/network/subzero/support-chain.cfg deleted file mode 100644 index 8147229a2..000000000 --- a/dist.darwin/etc/network/subzero/support-chain.cfg +++ /dev/null @@ -1,27 +0,0 @@ -[chain] -id=0x0000000000000001 -shard_id=0x0000000000000000 -name=support -load_priority=1 -# Possible values [token, emission, transaction] -datum_types=[ca,transaction] -mempool_auto_types=[transaction] -consensus=dag_poa - -[files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/subzero/support/ - -[dag] -is_single_line=true -is_celled=false -is_add_directly=true -datum_add_hashes_count=1 - -is_static_genesis_event=true -static_genesis_event=0x53587B7B6D1E1234005DC1053A5A3C8CA1FA496560A8BB91D4D99BBB83F0C1B2 - -[dag-poa] -auth_certs_prefix=subzero.cellframe.root -auth_certs_number=5 -auth_certs_number_verify=1 -auth_certs_dir=/Applications/Cellframe.app/Contents/Resources/share/ca diff --git a/dist.linux/share/cellframe-node.service b/dist.linux/share/cellframe-node.service index b6f3539a3..6d2953861 100644 --- a/dist.linux/share/cellframe-node.service +++ b/dist.linux/share/cellframe-node.service @@ -1,14 +1,23 @@ [Unit] Description=Cellframe Node -After=network-online.target +After=network.target [Service] +#Type=forking +#OOMScoreAdjust=-1000 +#PIDFile=/opt/cellframe-node/var/run/cellframe-node.pid WorkingDirectory=/opt/cellframe-node ExecStart=/opt/cellframe-node/bin/cellframe-node & +#ExecStop=/opt/cellframe-node/bin/cellframe-node --stop ExecStop=/bin/kill -SIGTERM $MAINPID Restart=always #User=cellframe-node #Group=cellframe-node +User=root +Group=root +RestartSec=10 +LogNamespace=cellframe +CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_IPC_LOCK CAP_KILL CAP_LEASE CAP_MKNOD CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_RAWIO CAP_SYSLOG CAP_WAKE_ALARM CAP_SYS_RESOURCE CAP_DAC_READ_SEARCH [Install] WantedBy=multi-user.target diff --git a/dist.linux/share/logrotate/cellframe-node b/dist.linux/share/logrotate/cellframe-node index 651aa354e..134d4448a 100644 --- a/dist.linux/share/logrotate/cellframe-node +++ b/dist.linux/share/logrotate/cellframe-node @@ -1,9 +1,9 @@ "/opt/cellframe-node/var/log/*.log" { copytruncate - daily - rotate 7 + hourly + maxsize 10M + rotate 4 compress - delaycompress missingok notifempty } diff --git a/dist.linux/share/logrotate/logrotate.timer b/dist.linux/share/logrotate/logrotate.timer new file mode 100644 index 000000000..115cf9cbd --- /dev/null +++ b/dist.linux/share/logrotate/logrotate.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Hourly rotation of log files +Documentation=man:logrotate(8) man:logrotate.conf(5) + +[Timer] +OnCalendar=hourly +AccuracySec=1m +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/dist.linux/etc/network/Backbone/chain-0.cfg b/dist/etc/network/Backbone/chain-0.cfg similarity index 90% rename from dist.linux/etc/network/Backbone/chain-0.cfg rename to dist/etc/network/Backbone/chain-0.cfg index 15e592378..4ea76e19a 100755 --- a/dist.linux/etc/network/Backbone/chain-0.cfg +++ b/dist/etc/network/Backbone/chain-0.cfg @@ -9,7 +9,7 @@ mempool_auto_types=[] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/scorpion/zerochain/ +storage_dir=../../../var/lib/network/scorpion/zerochain/ [dag] is_single_line=true diff --git a/dist.linux/etc/network/Backbone/main.cfg b/dist/etc/network/Backbone/main.cfg similarity index 84% rename from dist.linux/etc/network/Backbone/main.cfg rename to dist/etc/network/Backbone/main.cfg index 1cad79bf7..63bd69a84 100755 --- a/dist.linux/etc/network/Backbone/main.cfg +++ b/dist/etc/network/Backbone/main.cfg @@ -9,7 +9,7 @@ mempool_auto_types=[transaction] consensus=block_ton [files] -storage_dir=/opt/cellframe-node/var/lib/network/scorpion/main/ +storage_dir=../../../var/lib/network/scorpion/main/ [blocks] is_celled=false @@ -22,7 +22,7 @@ stake_tokens=0 stake_tokens_value=0 # verifications_minimum=1 -ton_nodes_addrs=[DFAB::CDC2::A6BA::48FB,D05E::E083::A665::37A8,BC53::9462::EF3A::E47D] +ton_nodes_addrs=[DFAB::CDC2::A6BA::48FB] auth_certs_prefix=scorpion.master auth_certs_number=3 consensus_debug=false diff --git a/dist.linux/etc/network/kelvpn-minkowski/chain-0.cfg b/dist/etc/network/kelvpn-minkowski/chain-0.cfg similarity index 90% rename from dist.linux/etc/network/kelvpn-minkowski/chain-0.cfg rename to dist/etc/network/kelvpn-minkowski/chain-0.cfg index 2bb9878a5..924844f92 100755 --- a/dist.linux/etc/network/kelvpn-minkowski/chain-0.cfg +++ b/dist/etc/network/kelvpn-minkowski/chain-0.cfg @@ -9,7 +9,7 @@ mempool_auto_types=[emission,ca,transaction] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/kelvpn-minkowski/zerochain/ +storage_dir=../../../var/lib/network/kelvpn-minkowski/zerochain/ [dag] is_single_line=true diff --git a/dist.darwin/etc/network/mileena/main.cfg b/dist/etc/network/kelvpn-minkowski/main.cfg old mode 100644 new mode 100755 similarity index 60% rename from dist.darwin/etc/network/mileena/main.cfg rename to dist/etc/network/kelvpn-minkowski/main.cfg index 76681094a..74aa662a8 --- a/dist.darwin/etc/network/mileena/main.cfg +++ b/dist/etc/network/kelvpn-minkowski/main.cfg @@ -2,28 +2,29 @@ id=0x0000000000000001 shard_id=0x0000000000000000 name=main -load_priority=2 +load_priority=1 # Possible values [token, emission, transaction, ca] datum_types=[transaction] +default_datum_types=[transaction] mempool_auto_types=[transaction] consensus=block_ton [files] -storage_dir=/Applications/Cellframe.app/Contents/Resources/var/lib/network/mileena/main/ +storage_dir=../../../var/lib/network/kelvpn-minkowski/main/ [blocks] is_celled=false is_static_genesis_event=true -static_genesis_event=0x7D77B753251CE8FE438C0ACA7BD1B7237FD07F35A751625D3665D4B7B5764181 +static_genesis_event=0x5C6C3BDD89F7317A1E3D01E6C440021D81C17F16431ECF3D2BFCA0BE50143728 [block-ton] -ton_nodes_addrs=[0661::D8DA::7DD7::28C2,EBBE::EE39::8E03::B881,FBB5::EB29::C205::8A4A] -auth_certs_prefix=mileena -auth_certs_number=3 +ton_nodes_addrs=[1234::0000::0000::0000] +auth_certs_prefix=minkowski.master +auth_certs_number=2 stake_tokens=0 stake_tokens_value=0 -consensus_debug=false +consensus_debug=true validators_list_by_stake=false round_start_sync_timeout=10 round_start_multiple_of=35 @@ -32,6 +33,6 @@ session_idle_min=10 round_candidates_max=5 next_candidate_delay=2 round_attempts_max=5 -round_attempt_duration=20 +round_attempt_duration=45 first_message_delay=2 my_candidate_attempts_max=2 diff --git a/dist.linux/etc/network/kelvpn-minkowski/support-chain.cfg b/dist/etc/network/kelvpn-minkowski/support-chain.cfg similarity index 90% rename from dist.linux/etc/network/kelvpn-minkowski/support-chain.cfg rename to dist/etc/network/kelvpn-minkowski/support-chain.cfg index 1ba3c3c6c..edbaed8dd 100755 --- a/dist.linux/etc/network/kelvpn-minkowski/support-chain.cfg +++ b/dist/etc/network/kelvpn-minkowski/support-chain.cfg @@ -9,7 +9,7 @@ datum_types=[ca,transaction] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/kelvpn-minkowski/support/ +storage_dir=../../../var/lib/network/kelvpn-minkowski/support/ [dag] is_single_line=true diff --git a/dist.linux/etc/network/mileena/chain-0.cfg b/dist/etc/network/mileena/chain-0.cfg similarity index 62% rename from dist.linux/etc/network/mileena/chain-0.cfg rename to dist/etc/network/mileena/chain-0.cfg index 627c2dc6e..d79120e24 100644 --- a/dist.linux/etc/network/mileena/chain-0.cfg +++ b/dist/etc/network/mileena/chain-0.cfg @@ -3,13 +3,13 @@ id=0x0000000000000000 shard_id=0x0000000000000000 name=zerochain load_priority=0 -# Possible values [token, emission, transaction, ca] -datum_types=[token,emission,ca,transaction] -mempool_auto_types=[] +# Possible values [token, emission, shard, transaction, ca] +datum_types=[token,emission,shard,ca,transaction] +mempool_auto_types=[emission,ca,transaction] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/mileena/zerochain/ +storage_dir=../../../var/lib/network/mileena/zerochain/ [dag] is_single_line=true @@ -22,10 +22,9 @@ static_genesis_event=0xB168ACEA8542A1011D808013B9BE4924B0157B118944FE8785ED42943 [dag-poa] auth_certs_prefix=mileena -auth_certs_dir=/opt/cellframe-node/share/ca -auth_certs_number=5 +auth_certs_number=2 +auth_certs_number_verify=1 confirmations_timeout=60 auto_confirmation=true auto_round_complete=true wait_sync_before_complete=120 -auth_certs_number_verify=3 diff --git a/dist.linux/etc/network/mileena/main.cfg b/dist/etc/network/mileena/main.cfg similarity index 78% rename from dist.linux/etc/network/mileena/main.cfg rename to dist/etc/network/mileena/main.cfg index 1bd09dade..f1a28ad99 100644 --- a/dist.linux/etc/network/mileena/main.cfg +++ b/dist/etc/network/mileena/main.cfg @@ -9,7 +9,7 @@ mempool_auto_types=[transaction] consensus=block_ton [files] -storage_dir=/opt/cellframe-node/var/lib/network/mileena/main/ +storage_dir=../../../var/lib/network/mileena/main/ [blocks] is_celled=false @@ -17,9 +17,9 @@ is_static_genesis_event=true static_genesis_event=0x7D77B753251CE8FE438C0ACA7BD1B7237FD07F35A751625D3665D4B7B5764181 [block-ton] -ton_nodes_addrs=[0661::D8DA::7DD7::28C2,EBBE::EE39::8E03::B881,FBB5::EB29::C205::8A4A] -auth_certs_prefix=mileena -auth_certs_number=3 +ton_nodes_addrs=[CCCC::1234::0000::0000,CCCC::1234::0000::0001] +auth_certs_prefix=mileena.master +auth_certs_number=2 stake_tokens=0 stake_tokens_value=0 diff --git a/dist.linux/etc/network/subzero/chain-0.cfg b/dist/etc/network/subzero/chain-0.cfg similarity index 90% rename from dist.linux/etc/network/subzero/chain-0.cfg rename to dist/etc/network/subzero/chain-0.cfg index 43eeb1d8b..d60d2341c 100644 --- a/dist.linux/etc/network/subzero/chain-0.cfg +++ b/dist/etc/network/subzero/chain-0.cfg @@ -9,7 +9,7 @@ mempool_auto_types=[emission,ca,transaction] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/subzero/zerochain/ +storage_dir=../../../var/lib/network/subzero/zerochain/ [dag] is_single_line=true diff --git a/dist.linux/etc/network/subzero/support-chain.cfg b/dist/etc/network/subzero/support-chain.cfg similarity index 90% rename from dist.linux/etc/network/subzero/support-chain.cfg rename to dist/etc/network/subzero/support-chain.cfg index 8d544c5fe..e6708d4b3 100644 --- a/dist.linux/etc/network/subzero/support-chain.cfg +++ b/dist/etc/network/subzero/support-chain.cfg @@ -9,7 +9,7 @@ mempool_auto_types=[transaction] consensus=dag_poa [files] -storage_dir=/opt/cellframe-node/var/lib/network/subzero/support/ +storage_dir=../../../var/lib/network/subzero/support/ [dag] is_single_line=true diff --git a/dist/share/ca/kelvpn-minkowski.root.0.pub.dcert b/dist/share/ca/kelvpn-minkowski.root.0.pub.dcert new file mode 100755 index 0000000000000000000000000000000000000000..74c0f8d2cf1f045cb60b7d20abf32aa0af8cf038 GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000Yh`S9aBeMaX>Mz8cXMlLE^=>gbS^M1aCKq;000000000000000tONi600000 z0RR91d}Y}_j&-pyeDK2k%1Ub@$m90<FTjjSCwJ&$m5xGWtOg-JDQUE;n+eE}m|pkG zJ2XPLk0B!S1IIBbK%l`g2qON*>wi;o$hWC;t^QlGrd6~&KO$HY^c1c3efT4-unly$ zTUCc&k_didK3b(KXkD8o550UcWlz`ef1;eWm;|8s8a=cKse%S3X;f;-`K&3ey4OPy z<hbP=)?GbjLk0MPftd5eyT4%nJO4w^nSy=VPV1FL<kcpz7~v>)ej8s0Q}XMQcHB6? zOFs(VjIUEin{8pS88o-ORsRI4BAB6avtMVAMZ2{vLCoW0DOo@|hDZ5i4KIXT+&M!0 zl{*}gqi6?y0qe17apuy(?qZhs1=vBI#xr`feGoiTu99XTPN&r(GEJJGm#o{02lxJC zG}Y>nZ7+5?8B~>|q#^gDmFPOj*8#y&r_%({iJ?oIxhays&|t;qiPTuzZIT$8I!}GQ zzT0%}^=>p1Qkvxo%rk}NFnp~HY>HYSV`|`xvn^r+YpG}$7K6PdAHfQ2`f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b/dist/share/ca/kelvpn-minkowski.root.1.pub.dcert new file mode 100755 index 0000000000000000000000000000000000000000..eb03a5259f6801d2656151ea3c811975b295223b GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000Yh`S9aBeMaX>Mz8cXMlLE^=>gbS^P2aCKq;000000000000000tONi600000 z0RR91kZn^J5f%516Nt}az?vtIW48d2&e{I@BXQ})sHX7+dhOZ3<qVywAwVj|cG3WQ zmj;0sxotWEjMjKEjMQ>qm<~{mrCOZ^B?gAnQK!pPN=Whm1(77;C&C)h`yTohpG_a_ zUlmy)t7wIe%f(nhyfqO<T2IAeRa)r5oCF^jof2DX3==MayXqI2FZBH8d_}{C+<0{@ zBEyXI%+`0=f$a!<AGUABT3iGHx-&<OWNK7};7H8hLnZWWw?0?@XOj6I8%!&?5Y)C! zPJ&)stDk0M^VcmzioJlKg`QRiItJ@EpiR1L=7~253c_jb!&#U8=Stp8%=XwIi2FU( zxRp(_f}+}|4BO6J94Bw7wVAGSYNhG1r1(!#dsT(8XP!bgGszfIlHm==H|-amS%9G+ zy^I6_NHLQ6j{&+mVx(-a_`~We&No(f87~piH^%Q8i$YsWHan?EuY}W;_gk3vA3rWx zioEYaM#gcGZFs#w7aY10R^8ORJmQA@0S~h?>oeJ>QL(7oV`KR*k8uWk%<7kgEw_f# zF(l(^zP_TOf<(dy9F^<?bJEK-kL5JMJGW<OGoAO&Unv^#4PN1!)!~fGgl9F|^nrKl zc`LqNtSwO?UnCpzSt}wtM*Ls|;d<~z{07cqQI6~gBYS=9r&>2hkVv~RIMCuTS*7?o zrRVa>twOm?D0v5%IJqg>#<x)L;Pm)jd7*3}{dPjE<X0-6$55cOqtBN2vc&d=Jl^S> zc)Ld8D{}4W>*JUeCn`}6);eB9v5)Ps92@+E8Tm-e%-Rd=84XJksNa}_<QWPwiQaR) zuiS@i<BNV~mT_qH`~S}4Hdao{VK^0iLtS?&>>vtRfYyV9nmIOK8uB@9)i*luRQdVz z(d)Bkd_@qc?phqJlGBm$>X@)5QbTG9n8tVc3x!7=BcB)ZlQwBx^Uuy{+aB|48}I{y ze)>MleNqSwy(s!`nR!GF5yHJlQwW31$sy+xgulrI(P$!0|I*_tem&JPMGA9$-L#_p zGqwAehKAU;V}vW%!#GUr_B<Sa5LjUfNep`8<x19DH?O>15_c0CYO;P3Y(4x~?2`q{ zR2&Q!p+`$!t?eqHNs8e>J*ga8%BS9TZ3KgPrl`4*KaOEZuxnO6fXNv4Z;CM4-SeVk z3kI|o%L2iE&{9t>&_I0V)iiBw_azjfWs#hu_=hvI<&~7WDbuo@?V-D{Ij2riGF zLo;q68xb2{#JVyb3sV*BaG3HO&6ErQSQfgKi^306%Exk!1!k)hNqkZB1<#AZ1p1Dk zJ~SLHZOC%`P8R>TunN}$gs_#$c2F$p*YZP5l)L2}XVcDUy4*J0pW-!Tl>T@CR&0f? zNb4+zGP(JmoL!!6KUl43Vmv!ChUjzX`4FoLn7WIsmcwTWuO<e=FhH=cFKz-5xh%L{ zA<F41G6gK?1lkZ>i&LBWwp1lZeyiFLayKF0%M;|$)CU)yzCjN`#vMgOec^RTcp5MC vm@Cc*D>w3??kDxqPHrLs3(BI-hwfDF5iGCi7g!}&7?z<UmM1nteD`Z*#EDdx literal 0 HcmV?d00001 diff --git a/dist/share/ca/kelvpn-minkowski.root.2.pub.dcert b/dist/share/ca/kelvpn-minkowski.root.2.pub.dcert new file mode 100755 index 0000000000000000000000000000000000000000..c647db63f1a69143306dc280c4c3c59f18c1c138 GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000Yh`S9aBeMaX>Mz8cXMlLE^=>gbS^S3aCKq;000000000000000tONi600000 z0RR91?Wx`Gzk}0QA7IV@P%4kiLeiKYv8DeCx}#FCU*e3A?_^&yvCo|H%g5w~IYkhv z1P;uh16>N4-iA@z=VfoLJ4f;rrB%BAHTR|AdCyaf<FXdu(T~ZWM^<Zgd|YzRI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ch>;HCnjzPd<lSKOZiRKzU`K3xo6t^UZW)~9+iUbVLyJI<n_wbx$ z$-~>pg=sQwQnd!29+t~-cz5YSGmMAwQcIi2jJE6wrknRcOD@8+BzulLN_*ZlzpSe} z&x^&54zHfF>i;h9FrTJ609Is5{nM!p%lV((hRNVKn2<RK>D>3&4(d>FFUv<|HAYEn z2+Cbleyc5M2;2yxgJvzwPE5EAR=CW!y5?zc3^Dp35S#P>9!xHLp<^vIp8231Lr8=2 zqzqDqweNMwaOW`Ni53ERQzJvEx^Ty8o4Awba;Qj{Rj%=_Dy?XV4-bq?1+bU-LwY-Y v>)r%NrjQx;$8JhQZ*(Bb$OK!#UGRcem%`k#XF!ehgTqs9VeTfS!j++ZRrF`H literal 0 HcmV?d00001 diff --git a/dist/share/ca/mileena.master.0.dcert b/dist/share/ca/mileena.master.0.dcert new file mode 100755 index 0000000000000000000000000000000000000000..573003c682d1711dd4d2ba19a60cad3142185293 GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000ZE0*}Wo}_EZDDhCWpXYs000000000000000000000000000000tONi600000 z0RR91?i5|&0+Pd%FqPtpwbdN^4ka^bO4j>|MAGL~+5k;5x8bT$l+It}v5mvo_oAhE zjGk}LER9A)k55;#h>+pfO{N!(Wu6GssF8t}ZW`>+7)ZVWy@zZxd}nJx`C4#W2W=T{ zqdbB-5EX`8>GXY@srO|^L_8x?8CAvq8}2Zokd(w)&Aqua>UvC%H*o}f^+680Gh(3| z>BlTOd#a6a0D?N5bCTUVp)z;(jZ}Y~GyS}m^V*mVPqK?DNYwnB4)a2M12?8rM*KTi zCXn8pPw4kzxzL+}AtINgd8&tw#GYuk83S6swgTPRHZz@=BCM-kHmSeAegX{uJ9piV z7abc~sAd)dwti8pUb!s4#`?X^?w<W#n5p_a%^<7{RWY!&!9ZnI-%%dx7KSA)t30b^ zyBX;voWJmW?Keu1h|*5k$pIsAFT{#=aR3V{vBs&I^d}8Xc3{8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yd#R<`^(le4Ej7bRsXWYCHnT9Y|CShU~ literal 0 HcmV?d00001 diff --git a/dist/share/ca/mileena.master.1.dcert b/dist/share/ca/mileena.master.1.dcert new file mode 100755 index 0000000000000000000000000000000000000000..f25f0ef2781f82b9c5b0e32ab5d06a485810360b GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000ZE0*}Wo}_EZDDhCWpXYt000000000000000000000000000000tONi600000 z0RR916U+~}4pX6{zI>4#ruhA{o|IKrpVvP2lxgUdSeBgduno?9_AAL({9ef&DG_a# zsG~)HK(xV){ePZB;}mHlVkAt0!dn-u>OD6BYd`%tl|;Yy!$0ZFPA`a(gdYOSkD`ec zMM%cAi4(nK(mQb3F<iX8cFO|_9MVCxF?Z5z_E0i7F*ose_#GN)VvJGx3@r@1;KufI zN>n}xX7+=+bvxHR`Q3)SC&m0~>6rCiq@m;a-z{ybnT=~xWnht#zwyD5CC>Y~nj2-? zVK_lv_Fb}hNV{W`v^`rJUrR27N1yfuv4_wC2`OqLw3`h#960U1yO>Uy*@I#75c3Z3 zi|d8w_vTPkM5ox%4fuBVk3eoeMpa4n8(c3>-ObT9l}NS)O2ouH4p7b>bPa8ahWSs} z8y7kdv&$~<G2IPzgWo~JdEj}f!NQ>;UF;>qo6&iIWTXj2W#IIsEDnK*YgJu-WtFAj zrv~aX7z5&xwl>%sBO+Dddhq5q@Q*qZxaFU4rkzhHSl=m3#Vu%upb-Nol5s`hvXu*O zhx5F8Iv_4m)7IMRO7_FbB8YGqcTt(UPR+Vv$p~DckYG|iD5JzOvVhU=LW@NecA&>> z(9i@@-__jzPM|qBsdE&$2bP>OUwUSk>a|J>u|b??>t0QnPe>^_gPmx%O~Tx7fXtQV zSRA3<b73fafcXB!UBalz@?2o%WSmbEpJY$S7mH4TRBeBvTf5J5s9}shwYZPNpt2vE z5wFu8FBG(t(^;mm|BEu?z{VlA_ma)LA>bR^d9Sh}+=kC!&_nU9Bt@L&k?U_TfM;4m zeD<|@>hnGULWDoWP($MBBuPH@F4%CR_RQ}M$vj15_|ckfgkO~=dJ$0CwK2TN+9?y! z5h?U7T<Kl%yTYNvGzv#4n!oVQoJT5HV;<YHNI+cSqon1#HB04`vDJa5Z#!k~YX~%o z67n8YazEagR;E8Psc1fH<&D+ig~hJnH3d1q{iusX271yL2GKVE>=aFsJOACCR-w(~ zKx}@Vo*V5W=i$oZ(*s!MW`HO<SR>?E%iK>mM9uFHJP+`uzU<63^i#5$vFDRv5PYXn z%g+LuyP}ChY|6Domp(YIJ=g@U|7&}Uy<wVN6P8@>e@^1W;dDr+(Mm)$GC16E>EMu^ zhR=5^g?z6+tcpbuL1A8!l`}We%RP2rKwuB3LCPW4@_=NyF3!m5Jpf&R`p;^?1nbXI zyLHf~ZFZdd+<fS!HQz_?+dS<h+iun1#-mqBJw1T#{?0E2>NI}sZ0yiEXm_0+1_zA^ zp<1`%sg~N8?HgN`#=gAMc3p0WLope;=82J!Li;r9a_=$SUG2mZT~SuvUD6%?&DgcN zy#@U0?qsoMGG)f-1Fx&`$KQU4pa;V#o_LOyZ1EKjrYa6Aq>QqE=b|?xIrGPE#`YGq z{>cnm$*@JDy+>!(TT{c$^<Svx)K;pHK(^ASb#dmrX|qDJi|66TSt=3~(-d3T?pan! v(dDDyvBh-=<IKy5G~vC0&mTIOzK<ue=d&z0RZI}V8=1wp8W<?wuImTmkFauQ literal 0 HcmV?d00001 diff --git a/dist/share/ca/minkowski.master.0.dcert b/dist/share/ca/minkowski.master.0.dcert new file mode 100755 index 0000000000000000000000000000000000000000..2a984eef2f3f25655c4471bdf7e4af44af12309d GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000ZE0?6Z+CNRX)bMHb97~LE-(N90000000000000000000000000tONi600000 z0RR91qolTBSM9tf{;Z~vO>y1E+b)U?D=?2g1ugs|J6$madn#k})W2vJ*wEG3A&=FF z+7HFB4hx8O2Nf`yiXGky#)Y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$ckn%_^BU(7aHMK zE7D=Us`hVz*WxpR_^?_bm(xIqDOjN()U|iZh0c5ZwT|0741x5>6Fd1dPM!;D-JLFP zGGzT%kV7bn&9(Q@i>Np7sNs?|4L;^9M{0mxTDN9qr404T!4*l2Wg_3Bb}?#0FwnZ` zHi{;|I?`3kP(E57LZb&6>3ScjZQ30}e_HJer`|afYrZ5oml^T1@`Fl~Y~S!=bkU~6 zx_mY|7c3TD<zyX$G0Jp`YS;s%)k#vb2dt0`8`eQUb6Xg&n5X;gjV;YDkFJ(*IK1RD z(w}_;oHx9A<#=h6RAF<hf2e4N!Qbnf9@%ppj3a~uodAu@kWt260kJ(oq&s)aAz550 vJEYnhMH40=jz8E2$;$5#l@z^<yDZ}P(9({lHShb*(Js6+OT)DAPbyGoVjfpC literal 0 HcmV?d00001 diff --git a/dist/share/ca/minkowski.master.1.dcert b/dist/share/ca/minkowski.master.1.dcert new file mode 100755 index 0000000000000000000000000000000000000000..f8d1911a59295648e7d3de9db530638114fdfc55 GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000ZE0?6Z+CNRX)bMHb97~LE-?TA0000000000000000000000000tONi600000 z0RR91vHPQS=uquk{4SD+LJN&>&4;ieN#q5Btq}H|AYk~X1^hiA7A)BG_984P`|Y`; zy%6)uDe&kPlToNZ+H?)J+tq`Lln?D!tr^Oly6ZYe8rnXCM<e<+w`@owhE%>?laJTV zz(n|L1<;MBVhgoWe9EvrMi)^n3Wg{uOU@e&ly@3viTydRL5xVJ+?q-sE{x}fmlE3` z{nocqKjX!){1dRkn?aSdG2UVCYus*SLhE^1D;`Bqsmne2`?GeqcwgwZ`X)S=g|`5q zHSKKSevYu;ZRi+NH8HlC9!-l2r-hSPen6Giv~p=$aBe_X9BXvmF|fM9Q>5izirH(X zAA>U66HgV5!8o>~ik$0##o4}%dWgfCfw{l66(H;6Glr%d@*PiWw1|HefT>3?1@43X z0xO!Lx$2c!kCRKo7;T6p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JO%k3c~z v=51A;8Yc*Hm^napw+i}~B+q8>1*m(KHms4g{NBh$T+59mfshc3X}llUAJ1B7 literal 0 HcmV?d00001 diff --git a/dist/share/ca/minkowski.master.2.dcert b/dist/share/ca/minkowski.master.2.dcert new file mode 100755 index 0000000000000000000000000000000000000000..31763bc57a2665c511ccdb43b40b9cb4055b42a4 GIT binary patch literal 1285 zcmV+g1^W7clj0Fa3@{G?0002+0s#O3tONi6000000000000000000000000000000 z00000ZE0?6Z+CNRX)bMHb97~LE;0ZB0000000000000000000000000tONi600000 z0RR91yJ+il!4VjL*1Re~R(spC6=010QH(gB(D^(|B`XU)FRt;2_+#xq7;85&&V#bN zm-m9c{F^WgfJ8cgDY^zBR~m=v3^haTicz%jq#~`nfU^i24VQ~tk)0A1#l!0uzZG|F zsO|LVGIFOZU9ZY``?(6^yI{<`kEo_7vZN!a*Gbh>TCeQb)io7>Xjq3V4-cd!GHLC> z?*rUgYz-b9>EJ!q#$<nI)~&v5oiq+3k0rl57K~MP5fr_F6OJr+$Je(m^?aiN?2r5B z#y#-~>6uQ0jUPqd3Iq)MONuG`8Hcgj94~5}6{{rV5<mp8A0(@>NbE&jBX>VpYRb40 zggPQSm{&8bjQgIYqp8I;zaB#KQt~nl<JC|}{+r~_jybH<RT{Av;On#X2Y!>s=JfCv z8sJi7^jBF0i*vzpoRuP+4YgWx+mr9ggO^0mmr@N?d+<iD<OzvNoRj+1OFw>?YllsR z^I)2waGE3Hi98CmdP^3`fd86f0m7$?yA=y1n4E$tBz;=y^96^rWP2OS(d#2+G~qnN zWJ}P7S_4atnRpswJ*ET{epj_=q*A0VpakYc+N&AOl3dMrLZOk3Ug_+iFkd`t9L;I! zblRx~WyT^DMd3^N<-zCom?PG5Dv|o3@Mkku7_Y+)?jStM)#m72S=yxD`7NHOyu(v* z@111^V;Bqak=HK=<<g@LriN=Y<QlDRre10V$DI(SyS!K-3T_E2XfS77WLI}Sm%0>P z<m@PBgBy`>TKJuF%O!S(63m`I4A7yq=T>~7E}{EoH)HyPy)inN(U%yDXq>E4Nfq&7 zg(%>tUkgkhEj2(bPW*@bqez2!dGqkpX+Xc{C;t7=SBa(Hce&3AXBza7#aN)xV(qb= zM}c(6hI{+4pk$H4GL}d&a@jaee4KfD!_pP=@FzAXX00)aMpDr55C@dg9n1~bbg_m> zY(gP~%yM@<w%_%O&L4pgDzn)J=->x#faXA2NphogpP5>hEi-`O+Ol%9eg4YQh`MLT z^OL`4g>dG+x~8B<VaCV4owzlU$opFo9GDLtVa2=<;LCneFc79w?}t&9@n0!TQTCQ1 zJDOuWT9gTYj_Anr`GbPdGsy)$T2=y+>pNY^!M~;+%N0p3*!qWS<eoD(4<EYWTpJQ5 z(Vkr_QC#-<L$`bV!Y;6#*xm&bM7a*7;lKFm{A)MIu`61!C(U=oo{W%+PDba>X|wD= zN&vAp0Q{lD9rG;dCHPsDAT6b_<VKQK1+k2qt*ZVtgW6TBuJXisQA;sP{ca97pGAIt zJ379q$wTz(v~>(^sf8iEQs={V0@u<cIXuAB6s`mf++dWtlwdiTDp|K55(3tm`V711 z4!h$*VVoPH#hq^im_mroE>dv7g<K1@5ohsfGU1QG7L7J#Z60{IR{;{B;u9a532K&_ zf5fvAmOSxu;5SwrFeflFOf7LkbKTu}CG95yJ-<ASS6g)%;nOGAH_KTVfR6nQCQYz# vjLv(SlWQ`;vDdu-m_+oRkwJ!gtRZd{RYTlXq3fAp0CB5Li)mNV9Om@_=ag0^ literal 0 HcmV?d00001 diff --git a/dist/share/configs/cellframe-node.cfg.tpl b/dist/share/configs/cellframe-node.cfg.tpl index 32c27b944..028e0ae2f 100644 --- a/dist/share/configs/cellframe-node.cfg.tpl +++ b/dist/share/configs/cellframe-node.cfg.tpl @@ -31,6 +31,13 @@ listen_port_tcp={SERVER_PORT} # If not set - used listen_port_tcp for node table auto fill #ext_port_tcp=8089 +[notify_server] +# Listening path have priority above listening address +#listen_path={PREFIX}/var/run/node_notify +#listen_path_mode=600 +listen_address={NOTIFY_SRV_ADDR} +listen_port={NOTIFY_SRV_PORT} + [stream] # For now its IAES but thats depricated #preferred_encryption=SALSA2012 @@ -65,8 +72,8 @@ pricelist=[] # Mempool [mempool] -# Automaticaly should be true for master ad root node role -# auto_proc=false +# Automaticaly false, for enabling need role master or higher +auto_proc=false # Chain network settings [chain_net] @@ -76,6 +83,7 @@ pricelist=[] # Uncomment to have more debug information in stream channel Chain # False by default #debug_more=true +ban_list_sync_groups=[*.orders-test-stat] # Number of hashes packed into the one update packet # Increase it to reduce update latency @@ -118,7 +126,8 @@ log_file={PREFIX}/var/log/cellframe-node.log wallets_path={PREFIX}/var/lib/wallet ca_folders=[{PREFIX}/var/lib/ca,{PREFIX}/share/ca] dap_global_db_path={PREFIX}/var/lib/global_db -dap_global_db_driver=sqlite3 +#global_db_driver=mdbx +#global_db_drvmode_async=false # Plugins #[plugins] diff --git a/dist/share/configs/network/Backbone.cfg.tpl b/dist/share/configs/network/Backbone.cfg.tpl index a7b983993..1e68cc412 100755 --- a/dist/share/configs/network/Backbone.cfg.tpl +++ b/dist/share/configs/network/Backbone.cfg.tpl @@ -21,11 +21,11 @@ require_links=3 #acl_accept_ca_chains=all -#[dag-poa] -#events-sign-cert=mycert0 +[dag-poa] +#events-sign-cert=scorpion.root.0 -#[block-ton] -#blocks-sign-cert=mycert1 +[block-ton] +#blocks-sign-cert=scorpion.root.0 #[block-poa] -#blocks-sign-cert=mycert2 +#blocks-sign-cert=mycert diff --git a/dist/share/configs/network/kelvpn-minkowski.cfg.tpl b/dist/share/configs/network/kelvpn-minkowski.cfg.tpl index 78071d5d7..3cce75dff 100755 --- a/dist/share/configs/network/kelvpn-minkowski.cfg.tpl +++ b/dist/share/configs/network/kelvpn-minkowski.cfg.tpl @@ -10,7 +10,9 @@ node-role={NODE_TYPE} seed_nodes_aliases=[minkowski.kelvpn.root.0,minkowski.kelvpn.root.1,minkowski.kelvpn.root.2] seed_nodes_hostnames=[0.root.minkowski.kelvpn.com,1.root.minkowski.kelvpn.com,2.root.minkowski.kelvpn.com] seed_nodes_addrs=[AAAA::0000::0000::0000,AAAA::0000::0000::0001,AAAA::0000::0000::0002] -seed_nodes_port=[8099,8099,8099] +seed_nodes_port=[8090,8090,8090] + +private=false #[auth] #type=ca @@ -20,7 +22,9 @@ seed_nodes_port=[8099,8099,8099] #[dag-poa] -#events-sign-cert=mycert0 +#events-sign-cert=kelvpn-minkowski.root.0 + +#[block-ton] +#blocks-sign-cert=minkowski.master.pvt.0 + -#[block-poa] -#blocks-sign-cert=mycert1 diff --git a/dist/share/configs/network/mileena.cfg.tpl b/dist/share/configs/network/mileena.cfg.tpl index e84228393..af1ec45f0 100644 --- a/dist/share/configs/network/mileena.cfg.tpl +++ b/dist/share/configs/network/mileena.cfg.tpl @@ -2,16 +2,19 @@ # General section [general] +gdb_sync_nodes_addrs=[CCCC::0000::0000::0000,CCCC::0000::0000::0001,CCCC::0000::0000::0002] id=0x000000000000cccc name=mileena gdb_groups_prefix=mileena # Possible values: light, full, archive, master, root node-role={NODE_TYPE} -seed_nodes_aliases=[0.root.mileena,1.root.mileena,2.root.mileena,3.root.mileena,4.root.mileena] -seed_nodes_hostnames=[0.root.mileena.cellframe.net,1.root.mileena.cellframe.net,2.root.mileena.cellframe.net,3.root.mileena.cellframe.net,4.root.mileena.cellframe.net] -seed_nodes_addrs=[CCCC::0000::0000::0000,CCCC::0000::0000::0001,CCCC::0000::0000::0002,CCCC::0000::0000::0003,CCCC::0000::0000::0004] -seed_nodes_port=[8079,8079,8079,8079,8079] -require_links=4 +seed_nodes_aliases=[0.root.mileena,1.root.mileena,2.root.mileena] +seed_nodes_hostnames=[0.root.mileena.cellframe.net,1.root.mileena.cellframe.net,2.root.mileena.cellframe.net] +seed_nodes_addrs=[CCCC::0000::0000::0000,CCCC::0000::0000::0001,CCCC::0000::0000::0002] +seed_nodes_port=[8099,8099,8099] +require_links=2 + +private=false #[auth] #type=ca @@ -21,10 +24,10 @@ require_links=4 #[dag-poa] -#events-sign-cert=mycert0 +#events-sign-cert=mileena.0.root #[block-ton] -#blocks-sign-cert=mycert1 +#blocks-sign-cert=mileena.0.master #[block-poa] -#blocks-sign-cert=mycert2 \ No newline at end of file +#blocks-sign-cert=mycert diff --git a/dist/share/configs/network/subzero.cfg.tpl b/dist/share/configs/network/subzero.cfg.tpl index 5c72f2b76..6c29d44e1 100755 --- a/dist/share/configs/network/subzero.cfg.tpl +++ b/dist/share/configs/network/subzero.cfg.tpl @@ -12,6 +12,8 @@ seed_nodes_hostnames=[0.root.subzero.cellframe.net,1.root.subzero.cellframe.net, seed_nodes_addrs=[ACCA::0000::0000::0001,ACCA::0000::0000::0002,ACCA::0000::0000::0003,ACCA::0000::0000::0004,ACCA::0000::0000::0005] seed_nodes_port=[8099,8099,8099,8099,8099] +private=false + #[auth] #type=ca #acl_accept_ca_list=[] diff --git a/os/debian/config b/os/debian/config new file mode 100755 index 000000000..47ad739da --- /dev/null +++ b/os/debian/config @@ -0,0 +1,71 @@ +#!/bin/bash -e +. /usr/share/debconf/confmodule + + +case "$1" in +reconfigure|configure) + + db_input critical cellframe-node/auto_online || true + db_go || true + + db_input critical cellframe-node/debug_mode || true + db_go || true + + db_input critical cellframe-node/server_enabled || true + db_go || true + + db_input critical cellframe-node/server_addr || true + db_go || true + + db_input critical cellframe-node/server_port || true + db_go || true + + db_input critical cellframe-node/notify_srv_addr || true + db_go || true + + db_input critical cellframe-node/notify_srv_port || true + db_go || true + + db_input critical cellframe-node/subzero_enabled || true + db_go || true + + db_get cellframe-node/subzero_enabled + if [ "$RET" = "true" ]; then + db_input critical cellframe-node/subzero_node_type || true + db_go || true + fi + + db_input critical cellframe-node/kelvpn_minkowski_enabled || true + db_go || true + + db_get cellframe-node/kelvpn_minkowski_enabled + if [ "$RET" = "true" ]; then + db_input critical cellframe-node/kelvpn_minkowski_node_type || true + db_go || true + fi + + db_input critical cellframe-node/backbone_enabled || true + db_go || true + + db_get cellframe-node/backbone_enabled + if [ "$RET" = "true" ]; then + db_input critical cellframe-node/backbone_node_type || true + db_go || true + fi + + db_input critical cellframe-node/enable_python_plugins || true + db_go || true + + db_get cellframe-node/enable_python_plugins + if [ "$RET" = "true" ]; then + db_input critical cellframe-node/python_plugins_path || true + db_go || true + fi +;; +*) + echo "config called with unknown argument \`$1'" >&2 + exit 1 +;; +esac + + diff --git a/os/debian/postinst b/os/debian/postinst new file mode 100755 index 000000000..205c338db --- /dev/null +++ b/os/debian/postinst @@ -0,0 +1,199 @@ +#!/bin/bash -e +. /usr/share/debconf/confmodule + +DAP_CHAINS_NAME="cellframe" +DAP_APP_NAME="$DAP_CHAINS_NAME-node" +DAP_PREFIX="/opt/$DAP_APP_NAME" + +DAP_CFG_TPL="$DAP_PREFIX/share/configs/$DAP_APP_NAME.cfg.tpl" + +# Store write config to new if present smth +DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg" + +# Check profile.d symlink + +[ -e "/etc/profile.d/$DAP_APP_NAME.sh" ] || ln -sf $DAP_PREFIX/share/profile.d/$DAP_APP_NAME.sh /etc/profile.d/$DAP_APP_NAME.sh + +# Init node config +if [ -e "$DAP_CFG" ]; then + DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg.dpkg-new" +else + DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg" +fi + +cat $DAP_CFG_TPL > $DAP_CFG || true + +sed -i "s/{PREFIX}/\/opt\/$DAP_APP_NAME/g" $DAP_CFG || true + +db_get cellframe-node/debug_mode || true +sed -i "s/{DEBUG_MODE}/$RET/g" $DAP_CFG || true + +db_get cellframe-node/auto_online || true +sed -i "s/{AUTO_ONLINE}/$RET/g" $DAP_CFG || true + +db_get cellframe-node/server_enabled || true +sed -i "s/{SERVER_ENABLED}/$RET/g" $DAP_CFG || true + +db_get cellframe-node/server_port || true +sed -i "s/{SERVER_PORT}/$RET/g" $DAP_CFG || true + +db_get cellframe-node/server_addr || true +sed -i "s/{SERVER_ADDR}/$RET/g" $DAP_CFG || true + +db_get cellframe-node/notify_srv_addr || true +sed -i "s/{NOTIFY_SRV_ADDR}/$RET/g" $DAP_CFG || true + +db_get cellframe-node/notify_srv_port || true +sed -i "s/{NOTIFY_SRV_PORT}/$RET/g" $DAP_CFG || true + +# Init subzero +NET_NAME="subzero" + +db_get cellframe-node/subzero_enabled || true +if [ "$RET" = "true" ]; then + DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl" + DAP_NET_CFG="" + if [ -e "$DAP_CFG_NET" ]; then + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.dpkg-new" + else + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + fi + + cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true + db_get cellframe-node/subzero_node_type || true + NODE_TYPE=$RET + sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true + echo "[*] Enabled subzero" +fi + +# Init mileena +NET_NAME="mileena" + +db_get cellframe-node/mileena_enabled || true +if [ "$RET" = "true" ]; then + DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl" + DAP_NET_CFG="" + if [ -e "$DAP_CFG_NET" ]; then + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.dpkg-new" + else + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + fi + + cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true + db_get cellframe-node/mileena_node_type || true + NODE_TYPE=$RET + sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true + echo "[*] Enabled mileena" +fi + +# Init Minkowski +NET_NAME="kelvpn-minkowski" + +db_get cellframe-node/kelvpn_minkowski_enabled || true +if [ "$RET" = "true" ]; then + DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl" + DAP_NET_CFG="" + if [ -e "$DAP_CFG_NET" ]; then + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.dpkg-new" + else + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + fi + + cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true + db_get cellframe-node/kelvpn_minkowski_node_type || true + NODE_TYPE=$RET + sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true + echo "[*] Enabled subzero" +fi + +# Init Backbone +NET_NAME="Backbone" + +db_get cellframe-node/backbone_enabled || true +if [ "$RET" = "true" ]; then + DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl" + DAP_NET_CFG="" + if [ -e "$DAP_CFG_NET" ]; then + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.dpkg-new" + else + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + fi + + cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true + db_get cellframe-node/backbone_node_type || true + NODE_TYPE=$RET + sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true + echo "[*] Enabled Backbone" +fi + +mkdir -p $DAP_PREFIX/var/log || true +mkdir -p $DAP_PREFIX/var/plugins || true + +#Set up Python plugins +db_get cellframe-node/enable_python_plugins || true +if [ "$RET" = "true" ]; then + sed -i 's/#\[plugins\]/\[plugins\]/g' $DAP_CFG || true + sed -i 's/#py_load=.*/py_load=true/g' $DAP_CFG || true + db_get cellframe-node/python_plugins_path || true + sed -i "s|#py_path=.*|py_path=$RET|g" $DAP_CFG || true + echo "[*] Enabled Python plugins" +fi + +cat /etc/passwd| grep cellframe-node || adduser --system --no-create-home --group --home /opt/cellframe-node cellframe-node || true + +echo "[*] Check /etc/systemd/system/$DAP_APP_NAME.service file..." +if [ -e /etc/systemd/system/$DAP_APP_NAME.service ]; then + echo "[*] Restarting $DAP_APP_NAME to implement changes" + systemctl --system stop $DAP_APP_NAME >> /dev/null|| true + echo "[*] Stopped $DAP_APP_NAME" + systemctl daemon-reload || true + systemctl --system start $DAP_APP_NAME || true + echo "[*] Started $DAP_APP_NAME" +else + echo "[!] Installing $DAP_APP_NAME as systemd service (haven't found /etc/systemd/system/$DAP_APP_NAME.service)" + ln -sf $DAP_PREFIX/share/$DAP_APP_NAME.service /etc/systemd/system/$DAP_APP_NAME.service || true + systemctl --system enable $DAP_PREFIX/share/$DAP_APP_NAME.service || true +# systemctl --system start $DAP_APP_NAME + echo "[ ] Execute 'systemctl start $DAP_APP_NAME' to start $DAP_APP_NAME service" + + #USERMAN=`users | awk '{print $1}'` + + echo "[ ] Additional configuration" + adduser --system --no-create-home --group --home /opt/cellframe-node cellframe-node || true + #usermod -aG $DAP_CHAINS_NAME `users | awk '{print $1}'` + for username in $(cat /etc/passwd | grep "/home" | cut -d ':' -f1); do + usermod -aG cellframe-node $username || true + done + mkdir -p $DAP_PREFIX/var/{run,lib/wallet,lib/global_db,var/plugins} || true + #mkdir -p $DAP_PREFIX/var/{run,lib/ca,lib/wallet,lib/global_db,var/plugins} || true + touch $DAP_PREFIX/var/run/cellframe-node.pid || true + #chown -R $USERMAN:$USERMAN $DAP_PREFIX + for filename in $(find $DAP_PREFIX | grep -v bugreport); do + if [ -d $filename ]; then + chmod 0775 $filename 2>/dev/null || true + else + chmod 0664 $filename 2>/dev/null || true + fi + done + chmod 0666 $DAP_CFG + chmod 0666 $DAP_CFG_TPL + chmod 0774 $DAP_PREFIX/bin/* || true + chmod 0777 $DAP_PREFIX/bin/$DAP_APP_NAME-cli $DAP_PREFIX/bin/pip3* $DAP_PREFIX/bin/python3* || true + + service cellframe-node start || true + systemctl restart cellframe-node || true + +fi + +echo "[ ] Enabling logrotate" +chmod 644 $DAP_PREFIX/share/logrotate/$DAP_APP_NAME || true +ln -sf $DAP_PREFIX/share/logrotate/logrotate.timer /etc/systemd/system/logrotate.timer || true +ln -sf $DAP_PREFIX/share/logrotate/$DAP_APP_NAME /etc/logrotate.d/$DAP_APP_NAME || true +chmod 644 /etc/logrotate.d/$DAP_APP_NAME || true +systemctl reenable logrotate.timer || true + +echo "[!] Done" \ No newline at end of file diff --git a/os/debian/postrm b/os/debian/postrm new file mode 100755 index 000000000..d95f25eb2 --- /dev/null +++ b/os/debian/postrm @@ -0,0 +1,11 @@ +#! /bin/bash -e +if [ "$1" == "purge" ] && [ -e /usr/share/debconf/confmodule ] ; then +. /usr/share/debconf/confmodule +db_purge +fi +GROUP_RM="cellframe-node" + +systemctl stop cellframe-node || true +systemctl disable cellframe-node || true + +#this file will be merged to dashboard postinst, be aware of this diff --git a/os/debian/prerm b/os/debian/prerm new file mode 100755 index 000000000..b961ff434 --- /dev/null +++ b/os/debian/prerm @@ -0,0 +1,29 @@ +#!/bin/bash -e + +case "$1" in + remove|purge|abort-install|abort-upgrade) + echo "[*] Stopping cellframe-node.service" + systemctl stop cellframe-node || true + echo "[*] Disabling cellframe-node.service" + systemctl disable cellframe-node || true + ;; + + disappear) + ;; + + upgrade) + echo "[*] Stopping cellframe-node.service" + systemctl stop cellframe-node || true + ;; + + failed-upgrade) + echo "[*] Stopping cellframe-node.service" + systemctl stop cellframe-node || true + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1;; +esac + +exit 0 diff --git a/os/debian/rules b/os/debian/rules new file mode 100755 index 000000000..8ebdadfdb --- /dev/null +++ b/os/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +override_dh_fixperms: + dh_fixperms -X/opt/cellframe-node + chmod 777 /opt/cellframe-node/bin/cellframe-node-cli +override_dh_auto_install: + dh_auto_install -- prefix=/opt/cellframe-node +%: +# dh $@ --with=systemd + dh $@ diff --git a/os/debian/templates b/os/debian/templates new file mode 100755 index 000000000..53d7dd3a1 --- /dev/null +++ b/os/debian/templates @@ -0,0 +1,133 @@ +Template: cellframe-node/auto_online +Default: false +Choices: true, false +Type: select +Description: Auto online + Bring up links automatically and go to ONLINE network state + +Template: cellframe-node/debug_mode +Default: false +Choices: true, false +Type: select +Description: Debug mode + Debug mode for logs + +Template: cellframe-node/server_enabled +Default: false +Choices: true, false +Type: select +Description: Accept connections + Accept connections + +Template: cellframe-node/server_port +Default: 8079 +Type: string +Description: Server port + Server port to listen on, recommended 8079 + +Template: cellframe-node/server_addr +Default: 0.0.0.0 +Type: string +Description: Server address + Server address to listen on + +Template: cellframe-node/notify_srv_addr +Default: 127.0.0.1 +Type: string +Description: Notify server address + Notify server address to listen on + +Template: cellframe-node/notify_srv_port +Default: 8080 +Type: string +Description: Notify server port + Notify server port to listen on + +Template: cellframe-node/subzero_enabled +Default: true +Choices: true, false +Type: select +Description: SubZero: Enable network + Subzero Testnet: Enable network auto load on start + +Template: cellframe-node/subzero_node_type +Type: select +Default: full +Choices: full, light, master, archive, root +Description: SubZero: Node role + Select node role:. + Light - Synchronize only local wallets + full - Sync all its cell + master - Allow to store values in chains and take comission, sync all shards that will need to be synced + archive - Sync all the network + root - Special predefined root nodes, usually produces zerochain and acts like archive as well + +Template: cellframe-node/mileena_enabled +Default: true +Choices: true, false +Type: select +Description: Mileena: Enable network + Mileena Testnet: Enable network auto load on start + +Template: cellframe-node/mileena_node_type +Type: select +Default: full +Choices: full, light, master, archive, root +Description: Mileena: Node role + Select node role:. + Light - Synchronize only local wallets + full - Sync all its cell + master - Allow to store values in chains and take comission, sync all shards that will need to be synced + archive - Sync all the network + root - Special predefined root nodes, usually produces zerochain and acts like archive as well + +Template: cellframe-node/kelvpn_minkowski_enabled +Default: true +Choices: true, false +Type: select +Description: Kelvpn Minkowski: Enable network + Minkowski Testnet: Enable network auto load on start + +Template: cellframe-node/kelvpn_minkowski_node_type +Type: select +Default: full +Choices: full, light, master, archive, root +Description: Kelvpn Minkowski: Node role + Select node role:. + Light - Synchronize only local wallets + full - Sync all its cell + master - Allow to store values in chains and take comission, sync all shards that will need to be synced + archive - Sync all the network + root - Special predefined root nodes, usually produces zerochain and acts like archive as well + +Template: cellframe-node/backbone_enabled +Default: true +Choices: true, false +Type: select +Description: Backbone: Enable network + Backbone Mainnet: Enable network auto load on start + +Template: cellframe-node/backbone_node_type +Type: select +Default: full +Choices: full, light, master, archive, root +Description: Backbone: Node role + Select node role:. + Light - Synchronize only local wallets + full - Sync all its cell + master - Allow to store values in chains and take comission, sync all shards that will need to be synced + archive - Sync all the network + root - Special predefined root nodes, usually produces zerochain and acts like archive as well + +Template: cellframe-node/enable_python_plugins +Default: false +Choices: true, false +Type: select +Description: Python plugins: Enable Python plugins + Python plugins: Enable Python plugins + +Template: cellframe-node/python_plugins_path +Default: /opt/cellframe-node/var/lib/plugins +Type: string +Description: Python plugins path + Path for Python plugins \ No newline at end of file diff --git a/prod_build b/prod_build index f9dcfa089..c27f5075f 160000 --- a/prod_build +++ b/prod_build @@ -1 +1 @@ -Subproject commit f9dcfa089cff22e2368395e05558f26f5a085eb2 +Subproject commit c27f5075f58e991958ab09195bf5f285a586a1ad diff --git a/python-cellframe b/python-cellframe index 770ce1db3..abc34a5f1 160000 --- a/python-cellframe +++ b/python-cellframe @@ -1 +1 @@ -Subproject commit 770ce1db392302fc38edb425079fd8b7cfe7a868 +Subproject commit abc34a5f12d648061f04582d823c91dab70d4970 -- GitLab