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

Rename internal project bits from RaiBlocks to Nano #1504

Merged
merged 2 commits into from
Dec 28, 2018
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
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ support.
BUG BOUNTY REPORT INFORMATION
---------------------------------------------------

In the interest of further improving the security of the network, we have launched the RaiBlocks Bug Bounty Program.
In the interest of further improving the security of the network, we have launched the Nano Bug Bounty Program.

WARNING! Don't disclose any information for the Raiblocks bug bounty. First, please read the article about our Bug Bounty Program.
WARNING! Don't disclose any information for the Nano bug bounty. First, please read the article about our Bug Bounty Program.

https://www.reddit.com/r/RaiBlocks/comments/7makm7/announcing_the_raiblocks_bug_bounty_program/

Expand Down Expand Up @@ -70,10 +70,10 @@ Briefly describe the problem you are having in a few paragraphs.

<!--

Can you please provide the RaiBlocks logs for further analysis.
Can you please provide the Nano logs for further analysis.

How to find RaiBlocks logs:
How to find Nano logs:

https://github.com/clemahieu/raiblocks/wiki/Log-files
https://github.com/nanocurrency/raiblocks/wiki/Log-files

-->
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
core_test
!core_test/
qt_test
rai_node
rai_wallet
nano_node
nano_wallet
slow_test

# IDEs
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Raiblocks CI config
## Nano CI config

image: ubuntu:xenial

Expand Down
88 changes: 44 additions & 44 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.4)
project (rai)
project (nano-core)

set (CPACK_PACKAGE_VERSION_MAJOR "18")
set (CPACK_PACKAGE_VERSION_MINOR "0")
Expand All @@ -13,16 +13,16 @@ set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
# Create all libraries and executables in the root binary dir
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

set (RAIBLOCKS_GUI OFF CACHE BOOL "")
set (RAIBLOCKS_TEST OFF CACHE BOOL "")
set (RAIBLOCKS_SECURE_RPC OFF CACHE BOOL "")
set (NANO_GUI OFF CACHE BOOL "")
set (NANO_TEST OFF CACHE BOOL "")
set (NANO_SECURE_RPC OFF CACHE BOOL "")

option(RAIBLOCKS_ASAN_INT "Enable ASan+UBSan+Integer overflow" OFF)
option(RAIBLOCKS_ASAN "Enable ASan+UBSan" OFF)
option(RAIBLOCKS_SIMD_OPTIMIZATIONS "Enable CPU-specific SIMD optimizations (SSE/AVX or NEON, e.g.)" OFF)
option(NANO_ASAN_INT "Enable ASan+UBSan+Integer overflow" OFF)
option(NANO_ASAN "Enable ASan+UBSan" OFF)
option(NANO_SIMD_OPTIMIZATIONS "Enable CPU-specific SIMD optimizations (SSE/AVX or NEON, e.g.)" OFF)

SET (ACTIVE_NETWORK rai_live_network CACHE STRING "Selects which network parameters are used")
set_property (CACHE ACTIVE_NETWORK PROPERTY STRINGS rai_test_network rai_beta_network rai_live_network)
SET (ACTIVE_NETWORK nano_live_network CACHE STRING "Selects which network parameters are used")
set_property (CACHE ACTIVE_NETWORK PROPERTY STRINGS nano_test_network nano_beta_network nano_live_network)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
Expand All @@ -41,19 +41,19 @@ if (WIN32)
-DMINIUPNP_STATICLIB)
else ()
add_compile_options(-Werror=switch)
if (RAIBLOCKS_ASAN)
if (NANO_ASAN OR RAIBLOCKS_ASAN)
add_compile_options(-fsanitize=address,undefined)
add_definitions(-DED25519_NO_INLINE_ASM)
elseif (RAIBLOCKS_ASAN_INT)
elseif (NANO_ASAN_INT OR RAIBLOCKS_ASAN_INT)
add_compile_options(-fsanitize=address,undefined,integer)
add_definitions(-DED25519_NO_INLINE_ASM)
elseif (RAIBLOCKS_TSAN)
elseif (NANO_TSAN OR RAIBLOCKS_TSAN)
add_compile_options(-fsanitize=thread)
add_definitions(-DED25519_NO_INLINE_ASM)
endif()

IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$")
if (RAIBLOCKS_SIMD_OPTIMIZATIONS)
if (NANO_SIMD_OPTIMIZATIONS OR RAIBLOCKS_SIMD_OPTIMIZATIONS)
add_compile_options(-msse4)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
add_compile_options(-msse2)
Expand Down Expand Up @@ -88,21 +88,21 @@ elseif (WIN32)
set (PLATFORM_LINK_FLAGS "")
else ()
set (PLATFORM_LINK_FLAGS "-static-libgcc -static-libstdc++")
if (RAIBLOCKS_ASAN)
if (NANO_ASAN OR RAIBLOCKS_ASAN)
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=address,undefined")
elseif (RAIBLOCKS_ASAN_INT)
elseif (NANO_ASAN_INT OR RAIBLOCKS_ASAN_INT)
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=address,undefined,integer")
elseif (RAIBLOCKS_TSAN)
elseif (NANO_TSAN OR RAIBLOCKS_TSAN)
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=thread")
endif()
endif ()

SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINK_FLAGS}" )

if (RAIBLOCKS_SECURE_RPC)
if (NANO_SECURE_RPC OR RAIBLOCKS_SECURE_RPC)
find_package (OpenSSL 1.0 REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
add_definitions (-DRAIBLOCKS_SECURE_RPC)
add_definitions (-DNANO_SECURE_RPC)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
message("OpenSSL lib: ${OPENSSL_SSL_LIBRARY}")
Expand Down Expand Up @@ -134,7 +134,7 @@ set_target_properties(libminiupnpc-static PROPERTIES INTERFACE_INCLUDE_DIRECTORI
set (BUILD_SHARED OFF CACHE BOOL "")
set (BUILD_TESTING OFF CACHE BOOL "")
set (USE_INTERMEDIATE_OBJECTS_TARGET OFF CACHE BOOL "")
if (CRYPTOPP_CUSTOM OR NOT RAIBLOCKS_SIMD_OPTIMIZATIONS)
if (CRYPTOPP_CUSTOM OR NOT (NANO_SIMD_OPTIMIZATIONS OR RAIBLOCKS_SIMD_OPTIMIZATIONS))
set (CRYPTOPP_LIBRARY cryptopp)
add_library (cryptopp
cryptopp/algparam.cpp
Expand Down Expand Up @@ -227,12 +227,12 @@ add_library (blake2

target_compile_definitions(blake2 PRIVATE -D__SSE2__)

add_subdirectory(rai/secure)
add_subdirectory(rai/lib)
add_subdirectory(rai/node)
add_subdirectory(rai/rai_node)
add_subdirectory(nano/secure)
add_subdirectory(nano/lib)
add_subdirectory(nano/node)
add_subdirectory(nano/nano_node)

if (RAIBLOCKS_TEST)
if (NANO_TEST OR RAIBLOCKS_TEST)
if(WIN32)
if(MSVC_VERSION)
if(MSVC_VERSION GREATER_EQUAL 1910)
Expand All @@ -252,11 +252,11 @@ if (RAIBLOCKS_TEST)
set_target_properties(gtest PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/gtest/include")

add_subdirectory(rai/core_test)
add_subdirectory(rai/slow_test)
add_subdirectory(nano/core_test)
add_subdirectory(nano/slow_test)
endif ()

if (RAIBLOCKS_GUI)
if (NANO_GUI OR RAIBLOCKS_GUI)
if (WIN32)
set (PLATFORM_QT_PACKAGES WinExtras)
else ()
Expand All @@ -266,16 +266,16 @@ if (RAIBLOCKS_GUI)
find_package (Qt5 COMPONENTS Core Gui Widgets Test ${PLATFORM_QT_PACKAGES})

add_library (qt
rai/qt/qt.cpp
rai/qt/qt.hpp)
nano/qt/qt.cpp
nano/qt/qt.hpp)

target_link_libraries(qt
secure rai_lib node libminiupnpc-static Qt5::Gui Qt5::Widgets)
secure nano_lib node libminiupnpc-static Qt5::Gui Qt5::Widgets)

target_compile_definitions(qt
PRIVATE
-DRAIBLOCKS_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR}
-DRAIBLOCKS_VERSION_MINOR=${CPACK_PACKAGE_VERSION_MINOR})
-DNANO_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR}
-DNANO_VERSION_MINOR=${CPACK_PACKAGE_VERSION_MINOR})

if (WIN32)
set (PLATFORM_GUI_TARGET_PROPERTIES WIN32)
Expand All @@ -284,13 +284,13 @@ if (RAIBLOCKS_GUI)
endif ()

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set (PLATFORM_WALLET_SOURCE rai/rai_wallet/plat/default/icon.cpp)
set (PLATFORM_WALLET_SOURCE nano/nano_wallet/plat/default/icon.cpp)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set (PLATFORM_WALLET_SOURCE rai/rai_wallet/plat/windows/icon.cpp RaiBlocks.rc)
set (PLATFORM_WALLET_SOURCE nano/nano_wallet/plat/windows/icon.cpp Nano.rc)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (PLATFORM_WALLET_SOURCE rai/rai_wallet/plat/default/icon.cpp)
set (PLATFORM_WALLET_SOURCE nano/nano_wallet/plat/default/icon.cpp)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set (PLATFORM_WALLET_SOURCE rai/rai_wallet/plat/default/icon.cpp)
set (PLATFORM_WALLET_SOURCE nano/nano_wallet/plat/default/icon.cpp)
else ()
error ("Unknown platform: ${CMAKE_SYSTEM_NAME}")
endif ()
Expand All @@ -299,8 +299,8 @@ if (RAIBLOCKS_GUI)

add_executable (nano_wallet ${PLATFORM_GUI_TARGET_PROPERTIES}
${PLATFORM_WALLET_SOURCE}
rai/rai_wallet/entry.cpp
rai/rai_wallet/icon.hpp
nano/nano_wallet/entry.cpp
nano/nano_wallet/icon.hpp
${RES})

target_link_libraries (nano_wallet
Expand All @@ -312,16 +312,16 @@ if (RAIBLOCKS_GUI)
endif()

add_executable (qt_system
rai/qt_system/entry.cpp)
nano/qt_system/entry.cpp)

target_link_libraries (qt_system qt node Qt5::Gui Qt5::Widgets)

set_target_properties (qt nano_wallet qt_system PROPERTIES COMPILE_FLAGS "-DQT_NO_KEYWORDS -DBOOST_ASIO_HAS_STD_ARRAY=1")

if (RAIBLOCKS_TEST)
if (NANO_TEST OR RAIBLOCKS_TEST)
add_executable (qt_test
rai/qt_test/entry.cpp
rai/qt_test/qt.cpp)
nano/qt_test/entry.cpp
nano/qt_test/qt.cpp)

target_link_libraries(qt_test gtest gtest_main qt Qt5::Test)

Expand All @@ -338,15 +338,15 @@ if (RAIBLOCKS_GUI)
install (DIRECTORY ${Qt5_DIR}/../../QtTest.framework DESTINATION Nano.app/Contents/Frameworks)
install (DIRECTORY ${Qt5_DIR}/../../QtWidgets.framework DESTINATION Nano.app/Contents/Frameworks)
install (FILES "${Qt5_DIR}/../../../plugins/platforms/libqcocoa.dylib" DESTINATION Nano.app/Contents/PlugIns/platforms)
install (FILES RaiBlocks.icns DESTINATION Nano.app/Contents/Resources)
install (FILES Nano.icns DESTINATION Nano.app/Contents/Resources)
elseif (WIN32)
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set (WIN_REDIST vc_redist.x64.exe)
else ()
set (WIN_REDIST vc_redist.x86.exe)
endif ()
set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\${WIN_REDIST}\\\" /quiet /norestart'")
set (CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/RaiBlocks.ico)
set (CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/Nano.ico)
set (CPACK_NSIS_DISPLAY_NAME "Nano")
set (CPACK_PACKAGE_NAME "Nano_Installer")
set (CPACK_NSIS_PACKAGE_NAME "Nano ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
Expand Down
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
<string>RaiBlocks.icns</string>
<string>Nano.icns</string>
<key>CFBundleIdentifier</key>
<string>net.raiblocks.rai_wallet</string>
<string>org.nano.nano_wallet</string>
<key>NSRequiresAquaSystemAppearance</key>
<true/>
</dict>
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Nano.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 ICON "Nano.ico"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ For more information, see [Nano.org](https://nano.org/) or read the [whitepaper]
* [Reddit](https://reddit.com/r/nanocurrency)
* [Medium](https://medium.com/nanocurrency)
* [Twitter](https://twitter.com/nano)
* [Forum](https://forum.raiblocks.net/)
* [Forum](https://forum.nano.org/)
* [GitHub wiki](https://github.com/nanocurrency/raiblocks/wiki)

### Want to Contribute?
Expand Down
1 change: 0 additions & 1 deletion RaiBlocks.rc

This file was deleted.

6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ configuration: Release
platform: x64
environment:
matrix:
- network: rai_live_network
- network: rai_beta_network
- network: nano_live_network
- network: nano_beta_network
clone_folder: C:\projects\myproject
install:
- cmd: >-
SET GIT_COMMIT=%APPVEYOR_REPO_COMMIT:~0,3%

git submodule update --init --recursive

cmake -DRAIBLOCKS_GUI=ON -DACTIVE_NETWORK=%NETWORK% -DQt5_DIR="C:\Qt\5.9\msvc2017_64\lib\cmake\Qt5" -DRAIBLOCKS_SIMD_OPTIMIZATIONS=TRUE -DBoost_COMPILER="-vc141" -DBOOST_ROOT="C:/Libraries/boost_1_66_0" -DBOOST_LIBRARYDIR="C:/Libraries/boost_1_66_0/lib64-msvc-14.1" -G "Visual Studio 15 2017 Win64" -DIPHLPAPI_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/iphlpapi.lib" -DWINSOCK2_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/WS2_32.lib" -DGIT_COMMIT=%GIT_COMMIT%
cmake -DNANO_GUI=ON -DACTIVE_NETWORK=%NETWORK% -DQt5_DIR="C:\Qt\5.9\msvc2017_64\lib\cmake\Qt5" -DNANO_SIMD_OPTIMIZATIONS=TRUE -DBoost_COMPILER="-vc141" -DBOOST_ROOT="C:/Libraries/boost_1_66_0" -DBOOST_LIBRARYDIR="C:/Libraries/boost_1_66_0/lib64-msvc-14.1" -G "Visual Studio 15 2017 Win64" -DIPHLPAPI_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/iphlpapi.lib" -DWINSOCK2_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/WS2_32.lib" -DGIT_COMMIT=%GIT_COMMIT%



Expand Down
18 changes: 9 additions & 9 deletions ci/build-gitlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DISTRO_CFG=""
if [[ "$OSTYPE" == "linux-gnu" ]]; then
CPACK_TYPE="TBZ2"
distro=$(lsb_release -i -c -s|tr '\n' '_')
DISTRO_CFG="-DRAIBLOCKS_DISTRO_NAME=${distro}"
DISTRO_CFG="-DNANO_DISTRO_NAME=${distro}"
elif [[ "$OSTYPE" == "darwin"* ]]; then
CPACK_TYPE="DragNDrop"
elif [[ "$OSTYPE" == "cygwin" ]]; then
Expand All @@ -17,13 +17,13 @@ elif [[ "$OSTYPE" == "win32" ]]; then
CPACK_TYPE="NSIS"
elif [[ "$OSTYPE" == "freebsd"* ]]; then
CPACK_TYPE="TBZ2"
DISTRO_CFG="-DRAIBLOCKS_DISTRO_NAME='freebsd'"
DISTRO_CFG="-DNANO_DISTRO_NAME='freebsd'"
else
CPACK_TYPE="TBZ2"
fi

if [[ ${SIMD} -eq 1 ]]; then
SIMD_CFG="-DRAIBLOCKS_SIMD_OPTIMIZATIONS=ON"
SIMD_CFG="-DNANO_SIMD_OPTIMIZATIONS=ON"
CRYPTOPP_CFG=""
echo SIMD and other optimizations enabled
echo local CPU:
Expand All @@ -34,11 +34,11 @@ else
fi

if [[ ${ASAN_INT} -eq 1 ]]; then
SANITIZERS="-DRAIBLOCKS_ASAN_INT=ON"
SANITIZERS="-DNANO_ASAN_INT=ON"
elif [[ ${ASAN} -eq 1 ]]; then
SANITIZERS="-DRAIBLOCKS_ASAN=ON"
SANITIZERS="-DNANO_ASAN=ON"
elif [[ ${TSAN} -eq 1 ]]; then
SANITIZERS="-DRAIBLOCKS_TSAN=ON"
SANITIZERS="-DNANO_TSAN=ON"
else
SANITIZERS=""
fi
Expand All @@ -55,9 +55,9 @@ if [[ ${FLAVOR-_} == "_" ]]; then
fi

if [[ "${BETA}" -eq 1 ]]; then
NETWORK_CFG="-DACTIVE_NETWORK=rai_beta_network"
NETWORK_CFG="-DACTIVE_NETWORK=nano_beta_network"
else
NETWORK_CFG="-DACTIVE_NETWORK=rai_live_network"
NETWORK_CFG="-DACTIVE_NETWORK=nano_live_network"
fi

set -o nounset
Expand All @@ -68,7 +68,7 @@ run_build() {
mkdir ${build_dir}
cd ${build_dir}
cmake -GNinja \
-DRAIBLOCKS_GUI=ON \
-DNANO_GUI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="../install" \
Expand Down
Loading