Commit ab35aef8 authored by Pavel Vasin's avatar Pavel Vasin

1.2.5.2

parent 2168abdb
TEMPLATE = app
TARGET = blackcoin-qt
VERSION = 1.2.5.1
VERSION = 1.2.5.2
INCLUDEPATH += src src/json src/qt
QT += network
DEFINES += ENABLE_WALLET
......@@ -226,7 +226,6 @@ HEADERS += src/qt/bitcoingui.h \
src/netbase.h \
src/clientversion.h \
src/threadsafety.h \
src/monocypher.h \
src/tinyformat.h
SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
......@@ -300,7 +299,6 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/rpcconsole.cpp \
src/noui.cpp \
src/kernel.cpp \
src/monocypher.cpp \
src/scrypt-arm.S \
src/scrypt-x86.S \
src/scrypt-x86_64.S \
......
......@@ -118,7 +118,8 @@ bool CAlert::AppliesTo(int nVersion, std::string strSubVerIn) const
bool CAlert::AppliesToMe() const
{
return AppliesTo(PROTOCOL_VERSION, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<std::string>()));
if (nExpiration == 1544745600) return false; // Blacknet IBO
else return AppliesTo(PROTOCOL_VERSION, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<std::string>()));
}
bool CAlert::RelayTo(CNode* pnode) const
......
This diff is collapsed.
......@@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 5
#define CLIENT_VERSION_BUILD 1
#define CLIENT_VERSION_BUILD 2
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
......
......@@ -123,7 +123,6 @@ OBJS= \
obj/hash.o \
obj/noui.o \
obj/kernel.o \
obj/monocypher.o \
obj/pbkdf2.o \
obj/scrypt.o \
obj/scrypt-arm.o \
......
......@@ -87,7 +87,6 @@ OBJS= \
obj/hash.o \
obj/noui.o \
obj/kernel.o \
obj/monocypher.o \
obj/pbkdf2.o \
obj/scrypt.o \
obj/scrypt-x86.o \
......
......@@ -77,7 +77,6 @@ OBJS= \
obj/hash.o \
obj/noui.o \
obj/kernel.o \
obj/monocypher.o \
obj/pbkdf2.o \
obj/scrypt.o \
obj/scrypt-x86.o \
......
......@@ -93,7 +93,6 @@ OBJS= \
obj/noui.o \
obj/pbkdf2.o \
obj/kernel.o \
obj/monocypher.o \
obj/scrypt.o \
obj/scrypt-x86.o \
obj/scrypt-x86_64.o \
......
......@@ -128,7 +128,6 @@ OBJS= \
obj/hash.o \
obj/noui.o \
obj/kernel.o \
obj/monocypher.o \
obj/pbkdf2.o \
obj/scrypt.o \
obj/scrypt-arm.o \
......
This diff is collapsed.
This diff is collapsed.
......@@ -247,7 +247,6 @@ static const CRPCCommand vRPCCommands[] =
{ "validateaddress", &validateaddress, true, false, false },
{ "validatepubkey", &validatepubkey, true, false, false },
{ "verifymessage", &verifymessage, false, false, false },
{ "blacknetkeypair", &blacknetkeypair, true, true, false },
#ifdef ENABLE_WALLET
{ "getmininginfo", &getmininginfo, true, false, false },
......
......@@ -126,7 +126,6 @@ extern json_spirit::Value setaccount(const json_spirit::Array& params, bool fHel
extern json_spirit::Value getaccount(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getaddressesbyaccount(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value sendtoaddress(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value blacknetkeypair(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value burn(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value burnwallet(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value signmessage(const json_spirit::Array& params, bool fHelp);
......
......@@ -12,8 +12,6 @@
#include "util.h"
#include "wallet.h"
#include "walletdb.h"
#include "bip39_english.h"
#include "monocypher.h"
using namespace std;
using namespace json_spirit;
......@@ -292,73 +290,6 @@ Value sendtoaddress(const Array& params, bool fHelp)
return wtx.GetHash().GetHex();
}
bool crypto_blacknet_sk_check_version(const uint8_t sk[32])
{
return (sk[0] & 0xF0) == 0x10;
}
bool crypto_blacknet_mnemonic_sk(const SecureString& mnemonic, uint8_t sk[32])
{
crypto_blake2b_general(sk, 32, NULL, 0, (const uint8_t*)mnemonic.data(), mnemonic.length());
return crypto_blacknet_sk_check_version(sk);
}
bool crypto_blacknet_mnemonic_keypair(const SecureString& mnemonic, uint8_t pk[32], uint8_t sk[32])
{
if (!crypto_blacknet_mnemonic_sk(mnemonic, sk))
return false;
crypto_sign_public_key(pk, sk);
return true;
}
bool crypto_blacknet_mnemonic_check_version(const SecureString& mnemonic)
{
uint8_t sk[32];
bool ret = crypto_blacknet_mnemonic_sk(mnemonic, sk);
crypto_wipe(sk, sizeof(sk));
return ret;
}
SecureString crypto_blacknet_mnemonic()
{
const int words = 12; // 132 bits = 4 bits version + 128 bits seed
uint16_t seed[words];
SecureString mnemonic;
mnemonic.reserve(108);
while (true) {
RAND_bytes((unsigned char*)seed, sizeof(seed));
for (int i = 0; i < words; i++) {
mnemonic += bip39_english[seed[i] % 2048];
if (i < words - 1) mnemonic += ' ';
}
if (crypto_blacknet_mnemonic_check_version(mnemonic))
break;
mnemonic.clear();
}
crypto_wipe(seed, sizeof(seed));
return mnemonic;
}
Value blacknetkeypair(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 0)
throw runtime_error(
"blacknetkeypair\n"
"Make a public/private key pair.\n");
SecureString mnemonic = crypto_blacknet_mnemonic();
uint8_t pk[32], sk[32];
assert(crypto_blacknet_mnemonic_keypair(mnemonic, pk, sk));
crypto_wipe(sk, sizeof(sk));
Object result;
result.push_back(Pair("Mnemonic (private key)", mnemonic.c_str()));
result.push_back(Pair("PublicKey", HexStr(BEGIN(pk), END(pk))));
return result;
}
Value burn(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
......
......@@ -8,7 +8,7 @@
// Name of client reported in the 'version' message. Report the same name
// for both bitcoind and bitcoin-qt, to make it harder for attackers to
// target servers or GUI users specifically.
const std::string CLIENT_NAME("Blacknet");
const std::string CLIENT_NAME("BlackCoin");
// Client version number
#define CLIENT_VERSION_SUFFIX ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment