Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cde1b8e

Browse files
Merge remote-tracking branch 'bytecoin/master'
2 parents fbd7265 + 6c35e24 commit cde1b8e

File tree

1,181 files changed

+196983
-82776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,181 files changed

+196983
-82776
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
.DS_Store
22
/build
33
/tags
4+
.idea
5+
.ycm_extra_conf.py
6+
.ycm_extra_conf.pyc
7+
Release
8+
Debug

CMakeLists.txt

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ set(VERSION "0.1")
44
# $Format:Packaged from commit %H%nset(COMMIT %h)%nset(REFS "%d")$
55

66
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
7-
set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
7+
set(CMAKE_CONFIGURATION_TYPES Debug RelWithDebInfo Release CACHE TYPE INTERNAL)
8+
set(CMAKE_SKIP_INSTALL_RULES ON)
9+
set(CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY ON)
10+
set(CMAKE_SUPPRESS_REGENERATION ON)
811
enable_testing()
12+
# copy CTestCustom.cmake to build dir to disable long running tests in 'make test'
13+
configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR})
914

10-
include_directories(include src contrib/epee/include external "${CMAKE_BINARY_DIR}/version")
15+
project(CryptoNote)
16+
17+
include_directories(include src external "${CMAKE_BINARY_DIR}/version")
1118
if(APPLE)
1219
include_directories(SYSTEM /usr/include/malloc)
20+
enable_language(ASM)
1321
endif()
1422

1523
if(MSVC)
@@ -20,26 +28,30 @@ else()
2028
include_directories(src/Platform/Linux)
2129
endif()
2230

23-
2431
set(STATIC ${MSVC} CACHE BOOL "Link libraries statically")
2532

2633
if(MSVC)
2734
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /D_VARIADIC_MAX=8 /D__SSE4_1__")
2835
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:10485760")
2936
if(STATIC)
30-
foreach(VAR CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO)
37+
foreach(VAR CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE)
3138
string(REPLACE "/MD" "/MT" ${VAR} "${${VAR}}")
3239
endforeach()
3340
endif()
3441
include_directories(SYSTEM src/platform/msc)
3542
else()
43+
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
44+
# This option has no effect in glibc version less than 2.20.
45+
# Since glibc 2.20 _BSD_SOURCE is deprecated, this macro is recomended instead
46+
add_definitions("-D_DEFAULT_SOURCE -D_GNU_SOURCE")
47+
endif()
3648
set(ARCH native CACHE STRING "CPU to build for: -march value or default")
3749
if("${ARCH}" STREQUAL "default")
3850
set(ARCH_FLAG "")
3951
else()
4052
set(ARCH_FLAG "-march=${ARCH}")
4153
endif()
42-
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-error=unused-result")
54+
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=unused-function -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-error=unused-result")
4355
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
4456
set(WARNINGS "${WARNINGS} -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration -Wno-error=unused-function")
4557
else()
@@ -52,10 +64,16 @@ else()
5264
else()
5365
set(MINGW_FLAG "")
5466
endif()
67+
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1))
68+
set(WARNINGS "${WARNINGS} -Wno-error=odr")
69+
endif()
5570
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wold-style-definition -Wstrict-prototypes")
5671
set(CXX_WARNINGS "-Wno-reorder -Wno-missing-field-initializers")
57-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -maes")
58-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -maes")
72+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${MINGW_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -maes")
73+
if(NOT APPLE)
74+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
75+
endif()
76+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -maes")
5977
if(APPLE)
6078
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_TR1_TUPLE=0")
6179
endif()
@@ -67,6 +85,12 @@ else()
6785
set(RELEASE_FLAGS "-Ofast -DNDEBUG -Wno-unused-variable")
6886
if(NOT APPLE)
6987
# There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled
88+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux"
89+
AND CMAKE_BUILD_TYPE STREQUAL "Release" AND ((CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.9) OR (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.9)))
90+
# On linux, to build in lto mode, check that ld.gold linker is used: 'update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold HIGHEST_PRIORITY'
91+
set(CMAKE_AR gcc-ar)
92+
set(CMAKE_RANLIB gcc-ranlib)
93+
endif()
7094
set(RELEASE_FLAGS "${RELEASE_FLAGS} -flto")
7195
endif()
7296
#if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT MINGW)
@@ -85,10 +109,7 @@ if(STATIC)
85109
set(Boost_USE_STATIC_LIBS ON)
86110
set(Boost_USE_STATIC_RUNTIME ON)
87111
endif()
88-
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options coroutine context)
89-
if((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 54))
90-
message(SEND_ERROR "Boost version 1.54 is unsupported, more details are available here http://goo.gl/RrCFmA")
91-
endif()
112+
find_package(Boost 1.55 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
92113
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
93114
if(MINGW)
94115
set(Boost_LIBRARIES "${Boost_LIBRARIES};ws2_32;mswsock")
@@ -124,7 +145,6 @@ else()
124145
endif()
125146
endif()
126147

127-
add_subdirectory(contrib)
128148
add_subdirectory(external)
129149
add_subdirectory(src)
130150
add_subdirectory(tests)

CTestCustom.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set(CTEST_CUSTOM_TESTS_IGNORE
2+
CoreTests
3+
IntegrationTestLibrary
4+
TestGenerator
5+
CryptoTests
6+
IntegrationTests
7+
NodeRpcProxyTests
8+
PerformanceTests
9+
TransfersTests
10+
)
11+

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This is the reference code for [CryptoNote](https://cryptonote.org) cryptocurren
2020

2121
Name must be specified twice:
2222

23-
**1. in file src/cryptonote_config.h** - `CRYPTONOTE_NAME` constant
23+
**1. in file src/CryptoNoteConfig.h** - `CRYPTONOTE_NAME` constant
2424

2525
Example:
2626
```
@@ -39,7 +39,7 @@ set_property(TARGET daemon PROPERTY OUTPUT_NAME "furiouscoind")
3939

4040
### Second step. Emission logic
4141

42-
**1. Total money supply** (src/cryptonote_config.h)
42+
**1. Total money supply** (src/CryptoNoteConfig.h)
4343

4444
Total amount of coins to be emitted. Most of CryptoNote based coins use `(uint64_t)(-1)` (equals to 18446744073709551616). You can define number explicitly (for example `UINT64_C(858986905600000000)`).
4545

@@ -48,7 +48,7 @@ Example:
4848
const uint64_t MONEY_SUPPLY = (uint64_t)(-1);
4949
```
5050

51-
**2. Emission curve** (src/cryptonote_config.h)
51+
**2. Emission curve** (src/CryptoNoteConfig.h)
5252

5353
Be default CryptoNote provides emission formula with slight decrease of block reward with each block. This is different from Bitcoin where block reward halves every 4 years.
5454

@@ -59,7 +59,7 @@ Example:
5959
const unsigned EMISSION_SPEED_FACTOR = 18;
6060
```
6161

62-
**3. Difficulty target** (src/cryptonote_config.h)
62+
**3. Difficulty target** (src/CryptoNoteConfig.h)
6363

6464
Difficulty target is an ideal time period between blocks. In case an average time between blocks becomes less than difficulty target, the difficulty increases. Difficulty target is measured in seconds.
6565

@@ -78,7 +78,7 @@ const uint64_t DIFFICULTY_TARGET = 120;
7878

7979
**4. Block reward formula**
8080

81-
In case you are not satisfied with CryptoNote default implementation of block reward logic you can also change it. The implementation is in `src/cryptonote_core/Currency.cpp`:
81+
In case you are not satisfied with CryptoNote default implementation of block reward logic you can also change it. The implementation is in `src/CryptoNoteCore/Currency.cpp`:
8282
```
8383
bool Currency::getBlockReward(size_t medianSize, size_t currentBlockSize, uint64_t alreadyGeneratedCoins, uint64_t fee, uint64_t& reward, int64_t& emissionChange) const
8484
```
@@ -93,7 +93,7 @@ Only the first part of this function is directly related to the emission logic.
9393

9494
### Third step. Networking
9595

96-
**1. Default ports for P2P and RPC networking** (src/cryptonote_config.h)
96+
**1. Default ports for P2P and RPC networking** (src/CryptoNoteConfig.h)
9797

9898
P2P port is used by daemons to talk to each other through P2P protocol.
9999
RPC port is used by wallet and other programs to talk to daemon.
@@ -111,15 +111,15 @@ const int RPC_DEFAULT_PORT = 18236;
111111
```
112112

113113

114-
**2. Network identifier** (src/p2p/p2p_networks.h)
114+
**2. Network identifier** (src/P2p/P2pNetworks.h)
115115

116116
This identifier is used in network packages in order not to mix two different cryptocoin networks. Change all the bytes to random values for your network:
117117
```
118118
const static boost::uuids::uuid CRYPTONOTE_NETWORK = { { 0xA1, 0x1A, 0xA1, 0x1A, 0xA1, 0x0A, 0xA1, 0x0A, 0xA0, 0x1A, 0xA0, 0x1A, 0xA0, 0x1A, 0xA1, 0x1A } };
119119
```
120120

121121

122-
**3. Seed nodes** (src/cryptonote_config.h)
122+
**3. Seed nodes** (src/CryptoNoteConfig.h)
123123

124124
Add IP addresses of your seed nodes.
125125

@@ -134,7 +134,7 @@ const std::initializer_list<const char*> SEED_NODES = {
134134

135135
### Fourth step. Transaction fee and related parameters
136136

137-
**1. Minimum transaction fee** (src/cryptonote_config.h)
137+
**1. Minimum transaction fee** (src/CryptoNoteConfig.h)
138138

139139
Zero minimum fee can lead to transaction flooding. Transactions cheaper than the minimum transaction fee wouldn't be accepted by daemons. 100000 value for `MINIMUM_FEE` is usually enough.
140140

@@ -144,7 +144,7 @@ const uint64_t MINIMUM_FEE = 100000;
144144
```
145145

146146

147-
**2. Penalty free block size** (src/cryptonote_config.h)
147+
**2. Penalty free block size** (src/CryptoNoteConfig.h)
148148

149149
CryptoNote protects chain from tx flooding by reducing block reward for blocks larger than the median block size. However, this rule applies for blocks larger than `CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE` bytes.
150150

@@ -166,7 +166,7 @@ const uint64_t CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 0xe9; // addresses star
166166

167167
### Sixth step. Genesis block
168168

169-
**1. Build the binaries with blank genesis tx hex** (src/cryptonote_config.h)
169+
**1. Build the binaries with blank genesis tx hex** (src/CryptoNoteConfig.h)
170170

171171
You should leave `const char GENESIS_COINBASE_TX_HEX[]` blank and compile the binaries without it.
172172

@@ -186,9 +186,9 @@ furiouscoind --print-genesis-tx
186186
```
187187

188188

189-
**3. Copy the printed transaction hash** (src/cryptonote_config.h)
189+
**3. Copy the printed transaction hash** (src/CryptoNoteConfig.h)
190190

191-
Copy the tx hash that has been printed by the daemon to `GENESIS_COINBASE_TX_HEX` in `src/cryptonote_config.h`
191+
Copy the tx hash that has been printed by the daemon to `GENESIS_COINBASE_TX_HEX` in `src/CryptoNoteConfig.h`
192192

193193
Example:
194194
```
@@ -224,7 +224,7 @@ To build, change to a directory where this file is located, and run `make`. The
224224
* Building with Clang: it may be possible to use Clang instead of GCC, but this may not work everywhere. To build, run `export CC=clang CXX=clang++` before running `make`.
225225

226226
### On Windows
227-
Dependencies: MSVC 2012 or later, CMake 2.8.6 or later, and Boost 1.55. You may download them from:
227+
Dependencies: MSVC 2013 or later, CMake 2.8.6 or later, and Boost 1.55. You may download them from:
228228

229229
* http://www.microsoft.com/
230230
* http://www.cmake.org/
@@ -234,7 +234,7 @@ To build, change to a directory where this file is located, and run theas comman
234234
```
235235
mkdir build
236236
cd build
237-
cmake -G "Visual Studio 11 Win64" ..
237+
cmake -G "Visual Studio 12 Win64" ..
238238
```
239239

240240
And then do Build.

ReleaseNotes.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
Release notes 1.1.0
2+
3+
- CryptoNote RPC Wallet
4+
- Aggregate multi-addresses for CryptoNote RPC Wallet
5+
- Fusion transactions
6+
- Transactions pool synchronization
7+
- Wallet synchronization speed increase
8+
- High-level API update
9+
10+
- Full network layer refactoring
11+
- New multithreading library
12+
- Improved console logging
13+
- JSON RPC improvements
14+
115
Release notes 1.0.2
216

317
- Multisignature with API

contrib/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

contrib/epee/LICENSE.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

contrib/epee/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

contrib/epee/demo/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

contrib/epee/demo/CMakeLists.txt

Lines changed: 0 additions & 49 deletions
This file was deleted.

contrib/epee/demo/README.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)