Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
fba49fa
Messages 2.0
xdn-project May 30, 2016
c2369c4
Simplewallet console message sending
xdn-project May 31, 2016
95f2f30
Block upgrade
aivve Apr 21, 2018
350c8f2
Simplified Zawy LWMA Difficulty
aivve Apr 21, 2018
637c691
PoW CryptoNight v1
aivve Apr 21, 2018
1032eb8
Block upgrade and pow fixes
aivve Apr 21, 2018
cc83355
Additional RPC methods
aivve Apr 22, 2018
ca64a5f
Update CryptoNoteConfig.h
cntemple Apr 22, 2018
cdd4128
Update CryptoNoteConfig.h
cntemple Apr 22, 2018
8ac8362
fix
cntemple Apr 22, 2018
79e77a3
void
cntemple Apr 22, 2018
cc1ddca
Update CMakeLists.txt
cntemple Apr 22, 2018
515c384
Connectivity_Tool removed from C
cntemple Apr 22, 2018
6748257
connectivity_tool removed from cmakelists.txt
cntemple Apr 22, 2018
bc1e328
ConnectivityTool removed from list
cntemple Apr 22, 2018
521bbb1
New seednode
cntemple Apr 22, 2018
296daa5
Fix signed unsigned conversion
aivve Apr 23, 2018
7c05abb
Don't generate a block template with invalid timestamp
aivve May 1, 2018
7732855
Delete RpcServer - copy.cpp
cntemple May 3, 2018
96d1c8b
BipCot
cntemple May 5, 2018
c53cb9e
Bipcot - bipcot.org
cntemple May 5, 2018
88e2cf3
Max mixin limit
aivve May 6, 2018
9eb84ea
Merge branch 'update' of https://github.com/cntemple/bitcedi into update
aivve May 6, 2018
808c6a7
Remove outdated seednodes, adding new ones.
cntemple May 6, 2018
2c2024e
Citadel Rebrand
cntemple May 31, 2018
f264459
Citadel Rebrand
cntemple May 31, 2018
65395eb
CITADEL REBRAND
cntemple May 31, 2018
c6b842e
WIP. One way of changing deposit rate
aivve Jul 1, 2018
1558396
Change interest rate calculation
aivve Jul 5, 2018
b6bd0d4
Update CryptoNoteConfig.h
cntemple Jul 5, 2018
4d11809
Update CryptoNoteConfig.h
cntemple Jul 5, 2018
c998259
Tests directory removed.
cntemple Jul 9, 2018
2c578a6
Get transaction inputs/outputs
cntemple Jul 9, 2018
0608b88
Set derate fork height
cntemple Jul 9, 2018
0b52b14
Update.
cntemple Jul 9, 2018
b2aab2d
Update.
cntemple Jul 9, 2018
699ba62
Burning Transactions fix
cntemple Oct 2, 2018
05af342
Update CMakeLists.txt
cntemple Oct 2, 2018
b636014
Update crypto.cpp
cntemple Oct 2, 2018
fc74134
Burning Transactions fix.
cntemple Oct 2, 2018
511a7f0
Extra
cntemple Oct 2, 2018
cfe7b1e
Update TransfersConsumer.cpp
cntemple Oct 2, 2018
b99346f
Min reward shift.
cntemple Oct 2, 2018
c54deaa
Update Currency.cpp
cntemple Oct 2, 2018
f525607
Update Currency.cpp
cntemple Oct 2, 2018
0ec529a
Create Documents
cntemple Oct 2, 2018
aff920c
Changes to be committed:
cntemple Oct 2, 2018
01aefb9
Burn!! :)
cntemple Oct 4, 2018
c8e8712
Still burning!
cntemple Oct 5, 2018
9815426
Burning#
cntemple Oct 7, 2018
3d679a5
Fix zawy evil bug
cntemple Oct 23, 2018
c0d6c43
Evil may cry.
cntemple Oct 29, 2018
f51b70d
Set evil may cry fork height.
cntemple Oct 29, 2018
42100f1
Update Currency.cpp
cntemple Oct 29, 2018
14d960d
Update Currency.cpp
cntemple Oct 29, 2018
aedc5ae
Update Blockchain.cpp
cntemple Oct 29, 2018
3f892ed
Update Currency.h
cntemple Oct 29, 2018
34c2bc9
Update version.h.in
cntemple Oct 29, 2018
361a846
Update Blockchain.cpp
cntemple Oct 29, 2018
1a65857
Update Currency.cpp
cntemple Oct 29, 2018
feceac4
Set Evil may cry fork height.
cntemple Oct 29, 2018
07b55de
Temp
cntemple Oct 29, 2018
cde79ca
Add checkpoint.
cntemple Nov 5, 2018
b1cd03c
Update CryptoNoteConfig.h
cntemple Nov 5, 2018
f087299
Checkpoint.
cntemple Nov 5, 2018
014ad93
Update CryptoNoteConfig.h
cntemple Nov 5, 2018
268c4b4
Update Blockchain.cpp
cntemple Nov 14, 2018
9d264fc
Update Checkpoints.cpp
cntemple Nov 14, 2018
ac1e872
some chords
Jan 9, 2019
4313205
fix typo
foRevp2p Jan 9, 2019
c338958
reset synth
Jan 24, 2019
df1c4be
Merge pull request #2 from foRevp2p/derate
cntemple Jan 24, 2019
dbc0470
Update CryptoNoteConfig.h
cntemple Feb 11, 2019
bd2c3e1
Keys Function
Mar 23, 2019
32bd0c9
Merge pull request #3 from foRevp2p/derate
cntemple Mar 23, 2019
fe5be9b
Update CryptoNoteConfig.h
cntemple May 12, 2019
26aa0c1
Mnemonics
cntemple May 14, 2019
068414f
“rughasnets.jpg.”
cntemple Jun 26, 2019
4f17d28
“authors.mp4”
cntemple Jun 26, 2019
608a5d7
“SetNetPowHeightLikeAPussy”
cntemple Jun 26, 2019
81d2e7e
“typov5”
cntemple Jun 26, 2019
4c7a6b9
“thereitgoes”
cntemple Jun 26, 2019
3845a6a
“.algo”
cntemple Jun 26, 2019
1fda660
Merge pull request #4 from foRevp2p/derate
cntemple Jun 26, 2019
fbddf93
Update Currency.cpp
cntemple Jun 27, 2019
ce90bf7
Fix fee calculation
aivve Jul 22, 2019
f9d8f4a
Update nodes.
cntemple Oct 30, 2019
93198d0
Update Context.c
cntemple Nov 6, 2019
c56e451
Update Checkpoints.cpp
cntemple Nov 10, 2019
1ceabb0
Update seed-nodes.
cntemple Dec 26, 2019
1864be4
Update CryptoNoteConfig.h
cntemple Jul 24, 2020
df68416
Update CryptoNoteConfig.h
cntemple Feb 10, 2021
4b57ffc
Update NetNode.cpp
cntemple Feb 11, 2021
5a07ef1
Nodes are forever
cntemple Nov 9, 2021
0bd4dc9
foreverp2p
cntemple Jul 8, 2022
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
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enable_testing()
# copy CTestCustom.cmake to build dir to disable long running tests in 'make test'
configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR})

project(Bitcedi)
project(Citadel)

include_directories(include src external "${CMAKE_BINARY_DIR}/version")
if(APPLE)
Expand Down Expand Up @@ -51,7 +51,7 @@ else()
else()
set(ARCH_FLAG "-march=${ARCH}")
endif()
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")
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -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")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
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")
else()
Expand Down Expand Up @@ -149,4 +149,4 @@ endif()

add_subdirectory(external)
add_subdirectory(src)
add_subdirectory(tests)

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Building Bitcedi
## Building Citadel

### On *nix:

Expand Down
6 changes: 6 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Release notes 3.1.0-beta

- Messages 2.0 core support
- Messages API for simplewallet
- Basic access authentication

Release notes 0.1.0

- New industrial type wallet for services: walletd
Expand Down
Binary file added documents/whitepapers/ctlwhitepaper.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion include/IWallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class IWallet {
virtual KeyPair getAddressSpendKey(const std::string& address) const = 0;
virtual KeyPair getViewKey() const = 0;
virtual std::string createAddress() = 0;
virtual std::string createAddress(const Crypto::SecretKey& spendSecretKey) = 0;
virtual std::string createAddress(const Crypto::SecretKey& spendSecretKey, bool reset = true) = 0;
virtual std::string createAddress(const Crypto::PublicKey& spendPublicKey) = 0;
virtual void deleteAddress(const std::string& address) = 0;

Expand Down
9 changes: 7 additions & 2 deletions include/IWalletLegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <vector>

#include "CryptoNote.h"
#include "CryptoTypes.h"


namespace CryptoNote {

Expand Down Expand Up @@ -106,6 +108,8 @@ class IWalletLegacy {
virtual void removeObserver(IWalletLegacyObserver* observer) = 0;

virtual void initAndGenerate(const std::string& password) = 0;
virtual void initAndGenerateDeterministic(const std::string& password) = 0;
virtual Crypto::SecretKey generateKey(const std::string& password, const Crypto::SecretKey& recovery_param = Crypto::SecretKey(), bool recover = false, bool two_random = false) = 0;
virtual void initAndLoad(std::istream& source, const std::string& password) = 0;
virtual void initWithKeys(const AccountKeys& accountKeys, const std::string& password) = 0;
virtual void shutdown() = 0;
Expand Down Expand Up @@ -133,13 +137,14 @@ class IWalletLegacy {
virtual bool getDeposit(DepositId depositId, Deposit& deposit) = 0;
virtual std::vector<Payments> getTransactionsByPaymentIds(const std::vector<PaymentId>& paymentIds) const = 0;

virtual TransactionId sendTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0, const std::vector<TransactionMessage>& messages = std::vector<TransactionMessage>()) = 0;
virtual TransactionId sendTransaction(const std::vector<WalletLegacyTransfer>& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0, const std::vector<TransactionMessage>& messages = std::vector<TransactionMessage>()) = 0;
virtual TransactionId sendTransaction(const WalletLegacyTransfer& transfer, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0, const std::vector<TransactionMessage>& messages = std::vector<TransactionMessage>(), uint64_t ttl = 0) = 0;
virtual TransactionId sendTransaction(const std::vector<WalletLegacyTransfer>& transfers, uint64_t fee, const std::string& extra = "", uint64_t mixIn = 0, uint64_t unlockTimestamp = 0, const std::vector<TransactionMessage>& messages = std::vector<TransactionMessage>(), uint64_t ttl = 0) = 0;
virtual TransactionId deposit(uint32_t term, uint64_t amount, uint64_t fee, uint64_t mixIn = 0) = 0;
virtual TransactionId withdrawDeposits(const std::vector<DepositId>& depositIds, uint64_t fee) = 0;
virtual std::error_code cancelTransaction(size_t transferId) = 0;

virtual void getAccountKeys(AccountKeys& keys) = 0;
virtual bool getSeed(std::string& electrum_words) = 0;
};

}
4 changes: 2 additions & 2 deletions src/BlockchainExplorer/BlockchainExplorerDataBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ bool BlockchainExplorerDataBuilder::fillTransactionDetails(const Transaction& tr
if (!get_inputs_money_amount(transaction, inputsAmount)) {
return false;
}
transactionDetails.totalInputsAmount = core.currency().getTransactionAllInputsAmount(transaction);
transactionDetails.totalInputsAmount = core.currency().getTransactionAllInputsAmount(transaction, blockHeight);

if (transaction.inputs.size() > 0 && transaction.inputs.front().type() == typeid(BaseInput)) {
//It's gen transaction
transactionDetails.fee = 0;
transactionDetails.mixin = 0;
} else {
transactionDetails.fee = core.currency().getTransactionFee(transaction);
transactionDetails.fee = core.currency().getTransactionFee(transaction, blockHeight);
uint64_t mixin;
if (!getMixin(transaction, mixin)) {
return false;
Expand Down
17 changes: 8 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ add_definitions(-DSTATICLIB)

file(GLOB_RECURSE BlockchainExplorer BlockchainExplorer/*)
file(GLOB_RECURSE Common Common/*)
file(GLOB_RECURSE ConnectivityTool ConnectivityTool/*)
file(GLOB_RECURSE Crypto crypto/*)
file(GLOB_RECURSE CryptoNoteCore CryptoNoteCore/* CryptoNoteConfig.h)
file(GLOB_RECURSE CryptoNoteProtocol CryptoNoteProtocol/*)
Expand All @@ -15,6 +14,7 @@ file(GLOB_RECURSE P2p P2p/*)
file(GLOB_RECURSE Rpc Rpc/*)
file(GLOB_RECURSE Serialization Serialization/*)
file(GLOB_RECURSE SimpleWallet SimpleWallet/*)
file(GLOB_RECURSE Mnemonics mnemonics/*)
if(MSVC)
file(GLOB_RECURSE System System/* Platform/Windows/System/*)
elseif(APPLE)
Expand All @@ -31,8 +31,9 @@ file(GLOB_RECURSE JsonRpcServer JsonRpcServer/*)
file(GLOB_RECURSE PaymentGate PaymentGate/*)
file(GLOB_RECURSE PaymentGateService PaymentGateService/*)
file(GLOB_RECURSE Miner Miner/*)
file(GLOB_RECURSE Mnemonics Mnemonics/*)

source_group("" FILES $${Common} ${ConnectivityTool} ${Crypto} ${CryptoNoteCore} ${CryptoNoteProtocol} ${Daemon} ${JsonRpcServer} ${Http} ${Logging} ${NodeRpcProxy} ${P2p} ${Rpc} ${Serialization} ${SimpleWallet} ${System} ${Transfers} ${Wallet} ${WalletLegacy})
source_group("" FILES $${Common} ${Crypto} ${CryptoNoteCore} ${CryptoNoteProtocol} ${Daemon} ${JsonRpcServer} ${Http} ${Logging} ${Mnemonics} ${NodeRpcProxy} ${P2p} ${Rpc} ${Serialization} ${SimpleWallet} ${System} ${Transfers} ${Wallet} ${WalletLegacy})

add_library(BlockchainExplorer ${BlockchainExplorer})
add_library(Common ${Common})
Expand All @@ -41,6 +42,7 @@ add_library(CryptoNoteCore ${CryptoNoteCore})
add_library(Http ${Http})
add_library(InProcessNode ${InProcessNode})
add_library(Logging ${Logging})
add_library(Mnemonics ${Mnemonics})
add_library(NodeRpcProxy ${NodeRpcProxy})
add_library(Rpc ${Rpc})
add_library(P2P ${CryptoNoteProtocol} ${P2p})
Expand All @@ -51,7 +53,6 @@ add_library(Wallet ${Wallet} ${WalletLegacy})
add_library(PaymentGate ${PaymentGate})
add_library(JsonRpcServer ${JsonRpcServer})

add_executable(ConnectivityTool ${ConnectivityTool})
add_executable(Daemon ${Daemon})
add_executable(SimpleWallet ${SimpleWallet})
add_executable(PaymentGateService ${PaymentGateService})
Expand All @@ -61,22 +62,20 @@ if (MSVC)
target_link_libraries(System ws2_32)
endif ()

target_link_libraries(ConnectivityTool CryptoNoteCore Common Logging Crypto P2P Rpc Http Serialization System ${Boost_LIBRARIES})
target_link_libraries(CryptoNoteCore Common Logging Crypto P2P Rpc Http Serialization System ${Boost_LIBRARIES})
target_link_libraries(Daemon CryptoNoteCore P2P Rpc Serialization System Http Logging Common Crypto upnpc-static BlockchainExplorer ${Boost_LIBRARIES})
target_link_libraries(SimpleWallet Wallet NodeRpcProxy Transfers Rpc Http Serialization CryptoNoteCore System Logging Common Crypto ${Boost_LIBRARIES})
target_link_libraries(SimpleWallet Wallet NodeRpcProxy Transfers Rpc Http Serialization CryptoNoteCore System Logging Common Crypto Mnemonics ${Boost_LIBRARIES})
target_link_libraries(PaymentGateService PaymentGate JsonRpcServer Wallet NodeRpcProxy Transfers CryptoNoteCore Crypto P2P Rpc Http Serialization System Logging Common InProcessNode upnpc-static BlockchainExplorer ${Boost_LIBRARIES})
target_link_libraries(Miner CryptoNoteCore Rpc Serialization System Http Logging Common Crypto ${Boost_LIBRARIES})

add_dependencies(Rpc version)

add_dependencies(ConnectivityTool version)
add_dependencies(Daemon version)
add_dependencies(SimpleWallet version)
add_dependencies(PaymentGateService version)
add_dependencies(P2P version)

set_property(TARGET ConnectivityTool PROPERTY OUTPUT_NAME "connectivity_tool")
set_property(TARGET SimpleWallet PROPERTY OUTPUT_NAME "bitcediwallet")
set_property(TARGET SimpleWallet PROPERTY OUTPUT_NAME "citadelwallet")
set_property(TARGET PaymentGateService PROPERTY OUTPUT_NAME "walletd")
set_property(TARGET Miner PROPERTY OUTPUT_NAME "miner")
set_property(TARGET Daemon PROPERTY OUTPUT_NAME "bitcedid")
set_property(TARGET Daemon PROPERTY OUTPUT_NAME "citadeld")
11 changes: 11 additions & 0 deletions src/CTestCustom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(CTEST_CUSTOM_TESTS_IGNORE
CoreTests
IntegrationTestLibrary
TestGenerator
CryptoTests
IntegrationTests
NodeRpcProxyTests
PerformanceTests
TransfersTests
)

18 changes: 9 additions & 9 deletions src/Common/Base58.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ namespace Tools
uint64_t res = 0;
switch (9 - size)
{
case 1: res |= *data++;
case 2: res <<= 8; res |= *data++;
case 3: res <<= 8; res |= *data++;
case 4: res <<= 8; res |= *data++;
case 5: res <<= 8; res |= *data++;
case 6: res <<= 8; res |= *data++;
case 7: res <<= 8; res |= *data++;
case 8: res <<= 8; res |= *data; break;
default: assert(false);
case 1: res |= *data++; /* FALLTHRU */
case 2: res <<= 8; res |= *data++; /* FALLTHRU */
case 3: res <<= 8; res |= *data++; /* FALLTHRU */
case 4: res <<= 8; res |= *data++; /* FALLTHRU */
case 5: res <<= 8; res |= *data++; /* FALLTHRU */
case 6: res <<= 8; res |= *data++; /* FALLTHRU */
case 7: res <<= 8; res |= *data++; /* FALLTHRU */
case 8: res <<= 8; res |= *data; break;
default: assert(false);
}

return res;
Expand Down
37 changes: 34 additions & 3 deletions src/Common/ConsoleHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,40 @@ bool ConsoleHandler::runCommand(const std::vector<std::string>& cmdAndArgs) {
}

void ConsoleHandler::handleCommand(const std::string& cmd) {
std::vector<std::string> args;
boost::split(args, cmd, boost::is_any_of(" "), boost::token_compress_on);
runCommand(args);
bool parseString = false;
std::string arg;
std::vector<std::string> argList;

for (auto ch : cmd) {
switch (ch) {
case ' ':
if (parseString) {
arg += ch;
} else if (!arg.empty()) {
argList.emplace_back(std::move(arg));
arg.clear();
}
break;

case '"':
if (!arg.empty()) {
argList.emplace_back(std::move(arg));
arg.clear();
}

parseString = !parseString;
break;

default:
arg += ch;
}
}

if (!arg.empty()) {
argList.emplace_back(std::move(arg));
}

runCommand(argList);
}

void ConsoleHandler::handlerThread() {
Expand Down
5 changes: 2 additions & 3 deletions src/Common/JsonValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,8 @@ std::ostream& operator<<(std::ostream& out, const JsonValue& jsonValue) {
namespace {

char readChar(std::istream& in) {
char c;

if (!(in >> c)) {
char c = static_cast<char>(in.get());
if (!in) {
throw std::runtime_error("Unable to parse: unexpected end of stream");
}

Expand Down
40 changes: 29 additions & 11 deletions src/CryptoNoteConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
namespace CryptoNote {
namespace parameters {

const uint64_t DIFFICULTY_TARGET = 240; // seconds
const uint64_t CRYPTONOTE_MAX_BLOCK_NUMBER = 500000000;
const size_t CRYPTONOTE_MAX_BLOCK_BLOB_SIZE = 500000000;
const size_t CRYPTONOTE_MAX_TX_SIZE = 1000000000;
const uint64_t CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 0xd7; // addresses start with "0xc"
const size_t CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW = 6;
const uint64_t CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT = 60 * 60 * 2;

const uint64_t CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT = DIFFICULTY_TARGET * 3;
const size_t BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW = 30;

const uint64_t MONEY_SUPPLY = UINT64_C(858986905600000000);
Expand All @@ -31,10 +31,11 @@ const uint64_t COIN = UINT64_C(10000000
const uint64_t MINIMUM_FEE = UINT64_C(100000); // pow(10, 5)
const uint64_t DEFAULT_DUST_THRESHOLD = UINT64_C(100000); // pow(10, 5)
//const uint64_t GENESIS_BLOCK_REWARD = UINT64_C(0);
const uint64_t MAX_TX_MIXIN_SIZE = 50;

const uint64_t DIFFICULTY_TARGET = 240; // seconds
const uint64_t EXPECTED_NUMBER_OF_BLOCKS_PER_DAY = 24 * 60 * 60 / DIFFICULTY_TARGET;
const size_t DIFFICULTY_WINDOW = 240; // blocks
const size_t DIFFICULTY_WINDOW_V2 = 60; // blocks
const size_t DIFFICULTY_CUT = 30; // timestamps to cut after sorting
const size_t DIFFICULTY_LAG = 15;
static_assert(2 * DIFFICULTY_CUT <= DIFFICULTY_WINDOW - 2, "Bad DIFFICULTY_WINDOW or DIFFICULTY_CUT");
Expand All @@ -44,6 +45,8 @@ const uint32_t DEPOSIT_MIN_TERM = 11000;
const uint32_t DEPOSIT_MAX_TERM = 1 * 12 * 11000;
const uint64_t DEPOSIT_MIN_TOTAL_RATE_FACTOR = 77000;
const uint64_t DEPOSIT_MAX_TOTAL_RATE = 107;
const uint64_t DEPOSIT_MAX_TOTAL_RATE_V2 = 12;
const uint32_t DEPOSIT_MAX_TOTAL_RATE_CHANGE_HEIGHT = 196000;
static_assert(DEPOSIT_MIN_TERM > 0, "Bad DEPOSIT_MIN_TERM");
static_assert(DEPOSIT_MIN_TERM <= DEPOSIT_MAX_TERM, "Bad DEPOSIT_MAX_TERM");
static_assert(DEPOSIT_MIN_TERM * DEPOSIT_MAX_TOTAL_RATE > DEPOSIT_MIN_TOTAL_RATE_FACTOR, "Bad DEPOSIT_MIN_TOTAL_RATE_FACTOR or DEPOSIT_MAX_TOTAL_RATE");
Expand All @@ -63,7 +66,10 @@ const size_t FUSION_TX_MAX_SIZE = CRYPTONOTE_BLOCK_
const size_t FUSION_TX_MIN_INPUT_COUNT = 12;
const size_t FUSION_TX_MIN_IN_OUT_COUNT_RATIO = 4;

const uint64_t UPGRADE_HEIGHT = 1;
const uint32_t UPGRADE_HEIGHT_V2 = 1;
const uint32_t UPGRADE_HEIGHT_V3 = 170500;
const uint32_t UPGRADE_HEIGHT_V4 = 270000;
const uint32_t UPGRADE_HEIGHT_V5 = 314020;
const unsigned UPGRADE_VOTING_THRESHOLD = 90; // percent
const size_t UPGRADE_VOTING_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks
const size_t UPGRADE_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks
Expand All @@ -77,20 +83,24 @@ const char CRYPTONOTE_POOLDATA_FILENAME[] = "poolstate.bin";
const char P2P_NET_DATA_FILENAME[] = "p2pstate.bin";
const char CRYPTONOTE_BLOCKCHAIN_INDICES_FILENAME[] = "blockchainindices.dat";
const char MINER_CONFIG_FILE_NAME[] = "miner_conf.json";
const uint32_t EVIL_MAY_CRY_FIX = 235000;
} // parameters

const uint64_t START_BLOCK_REWARD = (UINT64_C(80) * parameters::COIN);
const uint64_t MIN_BLOCK_REWARD = (UINT64_C(5) * parameters::COIN);
const uint64_t REWARD_HALVING_INTERVAL = (UINT64_C(66000));

const char CRYPTONOTE_NAME[] = "bitcedi";
const char CRYPTONOTE_NAME[] = "citadel";
const char GENESIS_COINBASE_TX_HEX[] = "010601ff000180a0d9e61d029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121019e2d1a633f2a54ff1a415e0051d5a699461d9c95479f67c8568446581c2e3782";
const uint32_t GENESIS_NONCE = 70;

const uint8_t TRANSACTION_VERSION_1 = 1;
const uint8_t TRANSACTION_VERSION_2 = 2;
const uint8_t BLOCK_MAJOR_VERSION_1 = 1;
const uint8_t BLOCK_MAJOR_VERSION_2 = 2;
const uint8_t BLOCK_MAJOR_VERSION_3 = 3;
const uint8_t BLOCK_MAJOR_VERSION_4 = 4;
const uint8_t BLOCK_MAJOR_VERSION_5 = 5;
const uint8_t BLOCK_MINOR_VERSION_0 = 0;
const uint8_t BLOCK_MINOR_VERSION_1 = 1;

Expand All @@ -104,6 +114,8 @@ const int RPC_DEFAULT_PORT = 65084;
const size_t P2P_LOCAL_WHITE_PEERLIST_LIMIT = 1000;
const size_t P2P_LOCAL_GRAY_PEERLIST_LIMIT = 5000;



const size_t P2P_CONNECTION_MAX_WRITE_BUFFER_SIZE = 16 * 1024 * 1024; // 16 MB
const uint32_t P2P_DEFAULT_CONNECTIONS_COUNT = 8;
const size_t P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT = 70;
Expand All @@ -117,9 +129,11 @@ const size_t P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT = 5000; //
const char P2P_STAT_TRUSTED_PUB_KEY[] = "85ae8734f90bc1ee295ceb0ec05a49852d4dbbc9d1c27a619b5f4bdf26a0196e";

const std::initializer_list<const char*> SEED_NODES = {
"seed0.bitcedi.org:55008",
"seed1.bitcedi.org:55008",
"seed2.bitcedi.org:55008"

"94.237.61.110:55008",
"78.141.223.33:55008",
"75.119.144.113:55008",
"159.65.4.138:55008",
};

struct CheckpointData {
Expand All @@ -134,12 +148,16 @@ __attribute__((unused))
// You may add here other checkpoints using the following format:
// {<block height>, "<block hash>"},
const std::initializer_list<CheckpointData> CHECKPOINTS = {
{ 100000, "0454f789f0867bf65cfc8f27ab227a68c2d4cd579a2de6d2352a3abec4a236e5" },
{ 103200, "05ebc16209bcdb97005c5cd284f2d4d669a0bf981fb4161a020247d2ce28bf64" },
{ 100000, "0454f789f0867bf65cfc8f27ab227a68c2d4cd579a2de6d2352a3abec4a236e5" },
{ 103200, "05ebc16209bcdb97005c5cd284f2d4d669a0bf981fb4161a020247d2ce28bf64" },
{ 105301, "63ad1e3e08eeb3c3f05d073a4413463393014297dcc42ad39a3ee012ffd986f3" },

{ 235674, "2c2db563461d0fb77f907bb472e321e51509cd9b959ffecd1fdbc6077c62c7e7" },



};


} // CryptoNote

#define ALLOW_DEBUG_COMMANDS
Loading