Skip to content

Commit

Permalink
Merge pull request #191 from ConcealNetwork/6.4.2
Browse files Browse the repository at this point in the history
6.4.2
  • Loading branch information
cryptokatz authored Dec 29, 2020
2 parents 4b92821 + 5ea6fbc commit a82fe78
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 124 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/arm32.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/arm64.yml

This file was deleted.

34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![](https://github.com/bomb-on/conceal-core/workflows/Ubuntu%2016.04/badge.svg) ![](https://github.com/bomb-on/conceal-core/workflows/Ubuntu%2018.04/badge.svg) ![](https://github.com/bomb-on/conceal-core/workflows/Windows/badge.svg) ![](https://github.com/bomb-on/conceal-core/workflows/macOS/badge.svg) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4b47060713f444b8afb5f5284d4b9716)](https://www.codacy.com/manual/cryptokatz/conceal-core?utm_source=github.com&utm_medium=referral&utm_content=cryptokatz/conceal-core&utm_campaign=Badge_Grade)

# Conceal Core (CLI)
Latest Release: v6.4.1
Latest Release: v6.4.2
Maintained by Conceal Developers.

## Information
Expand All @@ -14,7 +14,7 @@ Conceal is based on the Cryptonote protocol and runs on a secure peer-to-peer ne
Conceal is open-source, community driven and truly decentralized. No one owns it, everyone can take part.

## Resources
- Web: [http://conceal.network](https://conceal.network/)
- 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)
Expand Down Expand Up @@ -56,7 +56,7 @@ For example if you have 8GB of RAM, then your SWAP size should be 5GB

### Linux / Ubuntu

##### Prerequisites
#### Prerequisites

- You will need the following dependencies to build the Conceal CLI: boost, cmake, git, gcc, g++, python, and make.
- On Ubuntu: `sudo apt-get install -y build-essential python-dev gcc g++ git cmake libboost-all-dev`
Expand All @@ -69,7 +69,7 @@ For example if you have 8GB of RAM, then your SWAP size should be 5GB
- `cmake ..`
- `make`

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

### Raspberry Pi / ARM

Expand All @@ -81,26 +81,26 @@ Other ARM CPU/OS combinations should be possible if the CPU supports Neon/AES.

### Windows 10

##### Prerequisites
#### 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.
- Use the premade binaries for [MSVC 14.2](https://github.com/ConcealNetwork)
- Install [Boost 1.70.0](https://sourceforge.net/projects/boost/files/boost-binaries/1.70.0/boost_1_70_0-msvc-14.1-64.exe/download), ensuring you download the installer for MSVC 14.2.
- 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**.

##### Building
#### 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.

- `git clone https://github.com/ConcealNetwork/conceal-core`
- `cd conceal-core`
- `mkdir build`
- `cd build`
- `cmake -G "Visual Studio 16 2017" -A x64 -DBOOST_LIBRARYDIR="c:\local\boost_1_70_0\lib64-msvc-14.2 ..` (Or your boost installed dir.)
- `msbuild concealX.sln /p:Configuration=Release /m`
```bash
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
```

If the build is successful the binaries will be in the src/Release folder.
If the build is successful the binaries will be in the `src/Release` folder.

### macOS

Expand All @@ -121,6 +121,8 @@ After that, proceed with installing dependencies:
$ brew install git python cmake gcc boost
```

#### Building

When all dependencies are installed, build Conceal Core binaries:

```bash
Expand Down
5 changes: 4 additions & 1 deletion src/CryptoNoteConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ and the minimum version for communication between nodes */
{610000, "9c95678a27c5bde2b53efdae5c20a5528f134c4ff75737dee3e3d63b4d79c7ba"},
{620000, "e5de278b0ea676855873663a32a2d21bc6d98cffcb133e249c8219fb0fcdc3eb"},
{630000, "762c8269af35d53408d806d453b8ca6f19fc9e83048bb8d985502344f1d5e08a"},
{640000, "24e1ac8aff3e1e7850c06a377c68b2ea3afe53477b710b988b6b456383a50081"}
{640000, "24e1ac8aff3e1e7850c06a377c68b2ea3afe53477b710b988b6b456383a50081"},
{650000, "4587f3196487cdf12e701bebe30340669374e39b6e0ca7a3c32d6b522be44570"},
{660000, "8d8338dab606e4010f1fa53bc0ef268c98f63bf727150184bfedbea37c40026d"},
{665000, "79c1520e1e5b18d44cca35f7baa567a98236253afe3188e3f8b1f311976505ce"}

};

Expand Down
3 changes: 2 additions & 1 deletion src/CryptoNoteCore/ICore.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

#include <cstdint>
#include <list>
#include <memory>
#include <system_error>
#include <utility>
#include <vector>
#include <system_error>

#include <CryptoNote.h>
#include "CryptoNoteCore/Difficulty.h"
Expand Down
12 changes: 6 additions & 6 deletions src/crypto/cryptonight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ namespace Crypto {

void cn_slow_hash_v0(cn_context &context, const void *data, size_t length, Hash &hash) {
if(hw_check_aes())
cryptonight_hash<true, CRYPTONIGHT>(data, length, reinterpret_cast<char *>(&hash), context);
else
cryptonight_hash<false, CRYPTONIGHT>(data, length, reinterpret_cast<char *>(&hash), context);
else
cryptonight_hash<true, CRYPTONIGHT>(data, length, reinterpret_cast<char *>(&hash), context);
}

void cn_fast_slow_hash_v1(cn_context &context, const void *data, size_t length, Hash &hash) {
if(hw_check_aes())
cryptonight_hash<true, CRYPTONIGHT_FAST_V8>(data, length, reinterpret_cast<char *>(&hash), context);
else
cryptonight_hash<false, CRYPTONIGHT_FAST_V8>(data, length, reinterpret_cast<char *>(&hash), context);
else
cryptonight_hash<true, CRYPTONIGHT_FAST_V8>(data, length, reinterpret_cast<char *>(&hash), context);
}

void cn_conceal_slow_hash_v0(cn_context &context, const void *data, size_t length, Hash &hash) {
if(hw_check_aes())
cryptonight_hash<true, CRYPTONIGHT_CONCEAL>(data, length, reinterpret_cast<char *>(&hash), context);
else
cryptonight_hash<false, CRYPTONIGHT_CONCEAL>(data, length, reinterpret_cast<char *>(&hash), context);
else
cryptonight_hash<true, CRYPTONIGHT_CONCEAL>(data, length, reinterpret_cast<char *>(&hash), context);
}

void cn_gpu_hash_v0(cn_context &context, const void *data, size_t length, Hash &hash) {
Expand Down
24 changes: 24 additions & 0 deletions src/crypto/pow_hash/cn_slow_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,25 @@ inline void cpuid(uint32_t eax, int32_t ecx, int32_t val[4])
#endif
}

/**
* @brief Check if hardware aes is supported
*
* @return true when hardware aes is supported
* @return false when hardware aes is not supported
*/
inline bool hw_check_aes()
{
int32_t cpu_info[4];
cpuid(1, 0, cpu_info);
return (cpu_info[2] & (1 << 25)) != 0;
}

/**
* @brief Check if avx2 is supported
*
* @return true when avx2 is supported
* @return false when avx2 is not supported
*/
inline bool check_avx2()
{
int32_t cpu_info[4];
Expand All @@ -76,13 +88,25 @@ inline bool check_avx2()
#endif

#ifdef HAS_ARM_HW
/**
* @brief Check if hardware aes is supported
*
* @return true when hardware aes is supported
* @return false when hardware aes is not supported
*/
inline bool hw_check_aes()
{
return (getauxval(AT_HWCAP) & HWCAP_AES) != 0;
}
#endif

#if !defined(HAS_INTEL_HW) && !defined(HAS_ARM_HW)
/**
* @brief Check if hardware aes is supported
*
* @return true when hardware aes is supported
* @return false when hardware aes is not supported
*/
inline bool hw_check_aes()
{
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/version.h.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define BUILD_COMMIT_ID "@VERSION@"
#define PROJECT_VERSION "6.4.1"
#define PROJECT_VERSION_BUILD_NO "Apollo"
#define PROJECT_VERSION "6.4.2"
#define PROJECT_VERSION_BUILD_NO "Demeter"
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO "(" BUILD_COMMIT_ID ")"

0 comments on commit a82fe78

Please sign in to comment.