Skip to content

Commit

Permalink
Merge pull request #261 from ConcealNetwork/development
Browse files Browse the repository at this point in the history
Conceal Core v6.6.0
  • Loading branch information
krypt0x authored Jan 19, 2022
2 parents 4a75359 + 63b5975 commit 5d5e76e
Show file tree
Hide file tree
Showing 583 changed files with 7,841 additions and 8,932 deletions.
350 changes: 241 additions & 109 deletions .github/workflows/check.yml

Large diffs are not rendered by default.

119 changes: 5 additions & 114 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.0)

include(CheckCXXCompilerFlag)
set(VERSION "6.5.2")
set(VERSION_BUILD_NO "Endovelicus")
set(VERSION "6.6.0")
set(VERSION_BUILD_NO "Ataegina")
# Packaged from main commits
set(COMMIT 72946d9)
set(REFS " (HEAD -> master)")
Expand Down Expand Up @@ -33,7 +33,7 @@ elseif(APPLE)
include_directories(src/Platform/OSX)
else()
include_directories(src/Platform/Linux)
include(TestCXXAcceptsFlag)
include(TestCXXAcceptsFlag)
include(CheckCCompilerFlag)
if (NOT ARCH)
set(ARCH native CACHE STRING "CPU to build for: -march value or 'default' to not pass -march at all")
Expand All @@ -60,55 +60,7 @@ else()
endif()
endif()

# ARCH defines the target architecture, either by an explicit identifier or
# one of the following two keywords. By default, ARCH a value of 'native':
# target arch = host arch, binary is not portable. When ARCH is set to the
# string 'default', no -march arg is passed, which creates a binary that is
# portable across processors in the same family as host processor. In cases
# when ARCH is not set to an explicit identifier, cmake's builtin is used
# to identify the target architecture, to direct logic in this cmake script.
# Since ARCH is a cached variable, it will not be set on first cmake invocation.
if (NOT ARCH_ID)
if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "default")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "")
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
set(ARCH_ID "${CMAKE_SYSTEM_PROCESSOR}")
else()
set(ARCH_ID "${ARCH}")
endif()
endif()

string(TOLOWER "${ARCH_ID}" ARM_ID)
string(SUBSTRING "${ARM_ID}" 0 3 ARM_TEST)

if (ARM_TEST STREQUAL "arm")
set(ARM 1)
string(SUBSTRING "${ARM_ID}" 0 5 ARM_TEST)
if (ARM_TEST STREQUAL "armv7")
set(ARM7 1)
endif()
endif()

if (ARM_ID STREQUAL "aarch64" OR ARM_ID STREQUAL "arm64" OR ARM_ID STREQUAL "armv8-a")
set(ARM 1)
set(ARM8 1)
endif()

# Manual ARCH options for ARM
if(ARM7) # ARMv7 Pi 3/4 32Bit
CHECK_CXX_ACCEPTS_FLAG("-march=armv7-a" TRY_ARCH)
if(TRY_ARCH)
message(STATUS "Setting march=armv7-a for ARMv7")
set(ARCH_FLAG "-march=armv7-a")
endif()
elseif(ARM8) # ARMv8 Pi 3/4 64Bit
CHECK_CXX_ACCEPTS_FLAG("-march=armv8-a+fp+simd" TRY_ARCH)
if(TRY_ARCH)
message(STATUS "Setting -march=armv8-a+fp+simd for ARMv8")
set(ARCH_FLAG "-march=armv8-a+fp+simd")
endif()
endif()
include(arm.cmake)

# Check support for AES
option(NO_AES "Explicitly disable AES support" ${NO_AES})
Expand All @@ -118,7 +70,7 @@ if(NO_AES) # No AES
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")

elseif(NOT ARM) # x86/64
elseif(NOT ARM AND NOT MSVC) # x86/64
message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
Expand All @@ -128,63 +80,6 @@ endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}")

# Check and set fpu and float settings
if(ARM)
message(STATUS "Setting FPU Flags for ARM Processors")

if(NOT ARM8)
# FPU
CHECK_CXX_COMPILER_FLAG(-mfpu=neon-vfpv4 CXX_ACCEPTS_NEON_1)
CHECK_CXX_COMPILER_FLAG(-mfpu=neon-fp-armv8 CXX_ACCEPTS_NEON_2)
# FLOAT
CHECK_CXX_ACCEPTS_FLAG(-mfloat-abi=hard CXX_ACCEPTS_MFLOAT_HARD)
endif()

if(ARM8)
CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-835769 CXX_ACCEPTS_MFIX_CORTEX_A53_835769)
CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-843419 CXX_ACCEPTS_MFIX_CORTEX_A53_843419)
endif()

if(ARM7)

if(CXX_ACCEPTS_NEON_2)
message(STATUS "Setting mfpu=neon-fp-armv8 for ARMv7")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon-fp-armv8")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon-fp-armv8")
endif()

if(CXX_ACCEPTS_NEON_1)
message(STATUS "Setting mfpu=neon-vfpv4 for ARMv7")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon-vfpv4")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon-vfpv4")
endif()

if(CXX_ACCEPTS_MFLOAT_HARD)
message(STATUS "Setting Hardware ABI for Floating Point")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=hard")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=hard")
endif()

endif(ARM7)

if(ARM8)

if(CXX_ACCEPTS_MFIX_CORTEX_A53_835769)
message(STATUS "Enabling Cortex-A53 workaround 835769")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-835769")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-835769")
endif()

if(CXX_ACCEPTS_MFIX_CORTEX_A53_843419)
message(STATUS "Enabling Cortex-A53 workaround 843419")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-843419")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-843419")
endif()

endif(ARM8)

endif(ARM)

set(STATIC ${MSVC} CACHE BOOL "Link libraries statically")

if(MSVC)
Expand Down Expand Up @@ -245,10 +140,6 @@ if(APPLE)
add_definitions(/DHAVE_ROTR)
endif()

if(ARM)
add_definitions(/DARM)
endif()

if(STATIC)
set(Boost_NO_BOOST_CMAKE ON)
set(Boost_USE_STATIC_LIBS ON)
Expand Down
125 changes: 67 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
![image](https://github.com/ConcealNetwork/conceal-imagery/blob/master/logos/splash.png)

# Conceal Core (CLI)

[![Ubuntu 20.04](https://github.com/ConcealNetwork/conceal-core/actions/workflows/ubuntu20.yml/badge.svg)](https://github.com/ConcealNetwork/conceal-core/actions/workflows/ubuntu20.yml)
[![Ubuntu 18.04](https://github.com/ConcealNetwork/conceal-core/actions/workflows/ubuntu18.yml/badge.svg)](https://github.com/ConcealNetwork/conceal-core/actions/workflows/ubuntu18.yml)
[![Windows](https://github.com/ConcealNetwork/conceal-core/actions/workflows/windows.yml/badge.svg)](https://github.com/ConcealNetwork/conceal-core/actions/workflows/windows.yml)
Expand All @@ -11,24 +12,27 @@ Latest Release: v6.5.2
Maintained by Conceal Developers, overseen by Conceal Team and driven by Conceal Community.

## Information

Conceal Network is a secure peer-to-peer privacy framework empowering individuals and organizations to anonymously communicate and interact financially in a decentralized and censorship resistant ecosystem.

Conceal is based on the original Cryptonote protocol and runs on a secure peer-to-peer network technology to operate with no central authority. You control your private keys to your funds, you control your destiny. Conceal Network is accessible by anyone in the world regardless of his/her geographic location or status. Our blockchain is resistant to any kind of analysis. All your CCX transactions and messages are anonymous. Conceal Network provides an instant secure, untraceable and unlinkable way of encrypted communication - crypto messages.

Conceal is open-source, community driven and truly decentralized. No one owns it, everyone can take part.

## Resources
- Web: [https://conceal.network](https://conceal.network/)
- GitHub: [https://github.com/ConcealNetwork/conceal-core](https://github.com/ConcealNetwork/conceal-core)
- Wiki: [https://conceal.network/wiki](https://conceal.network/wiki/doku.php)
- Explorer: [https://explorer.conceal.network](https://explorer.conceal.network)
- Paperwallet: [https://conceal.network/paperwallet](https://conceal.network/paperwallet/)
- Discord: [https://discord.gg/YbpHVSd](https://discord.gg/YbpHVSd)
- Twitter: [https://twitter.com/ConcealNetwork](https://twitter.com/ConcealNetwork)
- Medium: [https://medium.com/@ConcealNetwork](https://medium.com/@ConcealNetwork)
- Reddit: [https://www.reddit.com/r/ConcealNetwork/](https://www.reddit.com/r/ConcealNetwork/)
- Bitcoin Talk: [https://bitcointalk.org/index.php?topic=4515873](https://bitcointalk.org/index.php?topic=4515873)

- Web: <https://conceal.network>
- GitHub: <https://github.com/ConcealNetwork>
- Wiki: <https://conceal.network/wiki>
- Explorer: <https://explorer.conceal.network>
- Discord: <https://discord.gg/YbpHVSd>
- Twitter: <https://twitter.com/ConcealNetwork>
- Telegram Official (News Feed): <https://t.me/concealnetwork>
- Telegram User Group (Chat Group): <https://t.me/concealnetworkusers>
- Medium: <https://medium.com/@ConcealNetwork>
- Reddit: <https://www.reddit.com/r/ConcealNetwork>
- Bitcoin Talk: <https://bitcointalk.org/index.php?topic=4515873>
- Paperwallet: <https://conceal.network/paperwallet>

## Compiling Conceal from source

Expand All @@ -39,47 +43,49 @@ In some build scenarios it may be necessary to increase the size of the SWAP to

For example if you have 8GB of RAM, then your SWAP size should be 5GB

- Ubuntu / Linux
- Ubuntu / Linux

```bash
sudo fallocate -l 5G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo fallocate -l 5G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
```

- Rasberry Pi OS
- Rasberry Pi OS

```bash
sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=5120
sudo nano /sbin/dphys-swapfile
#CONF_MAXSWAP=2048
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=5120
sudo nano /sbin/dphys-swapfile
#CONF_MAXSWAP=2048
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
```

### Linux / Ubuntu / Debian

#### Prerequisites

- You will need the following dependencies to build the Conceal CLI: boost, cmake, git, gcc, g++, python, and make:
- You will need the following dependencies to build the Conceal CLI: boost, cmake, git, gcc, g++, python, and make:

```bash
sudo apt update
sudo apt-get install -y build-essential python-dev gcc g++ git cmake libboost-all-dev
sudo apt update
sudo apt-get install -y build-essential python-dev gcc g++ git cmake libboost-all-dev
```

#### Building

- On Ubuntu:
- On Ubuntu:

```bash
git clone https://github.com/ConcealNetwork/conceal-core
cd conceal-core
mkdir build && cd $_
cmake ..
make
git clone https://github.com/ConcealNetwork/conceal-core
cd conceal-core
mkdir build
cd build
cmake ..
make
```

If the build is successful the binaries will be in the `src` folder.
Expand All @@ -90,27 +96,29 @@ Tested on a Raspberry Pi 4 with Raspberry Pi OS (32/64bit) images.

Other ARM CPU/OS combinations should be possible if the CPU supports Neon/AES.

- Follow the Linux / Ubuntu procedure to build.
- Follow the Linux / Ubuntu procedure to build.

### Windows 10

#### Prerequisites

- Install [Visual Studio 2019 Community Edition](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16)
- Install [CMake](https://cmake.org/download/)
- When installing Visual Studio, you need to install **Desktop development with C++** and the **MSVC v142 - VS 2019 C++ x64/x86 build tools** components. The option to install the v142 build tools can be found by expanding the "Desktop development with C++" node on the right. You will need this for the project to build correctly.
- Install [Boost 1.73.0](https://sourceforge.net/projects/boost/files/boost-binaries/1.73.0/boost_1_73_0-msvc-14.2-64.exe/download), **ensuring** you download the installer for **MSVC 14.2**.
- Install [Visual Studio 2019 Community Edition](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16)
> When installing Visual Studio, you need to install **Desktop development with C++** and the **MSVC v142 - VS 2019 C++ x64/x86 build tools** components. The option to install the v142 build tools can be found by expanding the "**Desktop development with C++**" node on the right. You will need this for the project to build correctly.
- Install [CMake](https://cmake.org/download/)
- Install [Boost](https://sourceforge.net/projects/boost/files/boost-binaries/1.78.0/boost_1_78_0-msvc-14.2-64.exe/download), **ensuring** you download the installer for **MSVC 14.2**.
> The instructions will be given for Boost 1.78.0. Using a different version should be supported but you will have to change the version where required.
#### Building

- From the start menu, open 'x64 Native Tools Command Prompt for vs2019' or run "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat" from any command prompt.
- From the start menu, open 'x64 Native Tools Command Prompt for vs2019' or run "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\Tools\\VsMSBuildCmd.bat" from any command prompt.

```ps
git clone https://github.com/ConcealNetwork/conceal-core
cd conceal-core
mkdir build
cmake .. -G "Visual Studio 16 2019" -A x64 -DBOOST_LIBRARYDIR="c:\local\boost_1_73_0\lib64-msvc-14.2"
msbuild concealX.sln /p:Configuration=Release /m
git clone https://github.com/ConcealNetwork/conceal-core
cd conceal-core
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64 -DBOOST_ROOT="c:\local\boost_1_78_0"
msbuild concealX.sln /p:Configuration=Release /m
```

If the build is successful the binaries will be in the `src/Release` folder.
Expand All @@ -119,35 +127,36 @@ If the build is successful the binaries will be in the `src/Release` folder.

#### Prerequisites

- In order to install prerequisites, [XCode](https://developer.apple.com/xcode/) and [Homebrew](https://brew.sh/) needs to be installed.
Once both are ready, open Terminal app and run the following command to install additional tools:
- In order to install prerequisites, [XCode](https://developer.apple.com/xcode/) and [Homebrew](https://brew.sh/) needs to be installed.
Once both are ready, open Terminal app and run the following command to install additional tools:

```bash
xcode-select --install
xcode-select --install
```

- On newer macOS versions (v10.14 and higher) this step is done through Software Update in System Preferences.
- On newer macOS versions (v10.14 and higher) this step is done through Software Update in System Preferences.

- After that, proceed with installing dependencies:
- After that, proceed with installing dependencies:

```bash
brew install git python cmake gcc boost
brew install git cmake boost
```


#### Building

- When all dependencies are installed, build Conceal Core binaries:
- When all dependencies are installed, build Conceal Core binaries:

```bash
git clone https://github.com/ConcealNetwork/conceal-core
cd conceal-core
mkdir build && cd $_
cmake ..
make
git clone https://github.com/ConcealNetwork/conceal-core
cd conceal-core
mkdir build
cd build
cmake ..
make
```

If the build is successful the binaries will be located in `src` directory.
If the build is successful the binaries will be located in the `src` folder.

#### Special Thanks

Special thanks goes out to the developers from Cryptonote, Bytecoin, Ryo, Monero, Forknote, TurtleCoin, Karbo and Masari.
Loading

0 comments on commit 5d5e76e

Please sign in to comment.