Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
aLQ committed May 2, 2013
1 parent dad549d commit 64c0ed4
Show file tree
Hide file tree
Showing 28 changed files with 94 additions and 2,864 deletions.
1 change: 1 addition & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Copyright (c) 2013 BitBar Developers
Copyright (c) 2013 NovaCoin Developers
Copyright (c) 2011-2012 PPCoin Developers
Copyright (c) 2009-2012 Bitcoin Developers
Expand Down
39 changes: 2 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
BitBar official development tree

NovaCoin official development tree

NovaCoin - a hybrid scrypt PoW + PoS based cryptocurrency.

* 10 minute PoW block targets
* 10 minute PoS block targets
* The PoW subsidy halves every x64 multiply of difficulty
* Maximum PoW reward is 100 coins
* ~ 2 billion total coins

Development process
===========================

Developers work in their own trees, then submit pull requests when
they think their feature or bug fix is ready.

The patch will be accepted if there is broad consensus that it is a
good thing. Developers should expect to rework and resubmit patches
if they don't match the project's coding conventions (see coding.txt)
or are controversial.

The master branch is regularly built and tested, but is not guaranteed
to be completely stable. Tags are regularly created to indicate new
official, stable release versions of NovaCoin.

Feature branches are created when there are major new features being
worked on by several people.

From time to time a pull request will become outdated. If this occurs, and
the pull is no longer automatically mergeable; a comment on the pull will
be used to issue a warning of closure. The pull will be closed 15 days
after the warning if action is not taken by the author. Pull requests closed
in this manner will have their corresponding issue labeled 'stagnant'.

Issues with no commits will be given a similar warning, and closed after
15 days from their last activity. Issues closed in this manner will be
labeled 'stale'.
Based on NovaCoin
20 changes: 20 additions & 0 deletions doc/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
BitBar 0.3.0 BETA

Copyright (c) 2013 BitBar Developers
Copyright (c) 2013 NovaCoin Developers
Copyright (c) 2011-2012 PPCoin Developers
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com).


Intro
-----
NovaCoin is a free open source project derived from Novacoin, with
the goal of providing a long-term energy-efficient scrypt-based crypto-currency.
Built on the foundation of Bitcoin and PPCoin, innovations such as proof-of-stake
help further advance the field of crypto-currency.

-----
NovaCoin 0.3.0 BETA

Copyright (c) 2013 NovaCoin Developers
Expand Down
26 changes: 22 additions & 4 deletions doc/README_windows.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NovaCoin 0.4.0 BETA
BitBar 0.4.0 BETA

Copyright (c) 2013 NovaCoin Developers
Copyright (c) 2013 BitBar Developers
Copyright (c) 2011-2013 PPCoin Developers
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
Expand All @@ -16,7 +16,6 @@ the goal of providing a long-term energy-efficient scrypt-based crypto-currency.
Built on the foundation of Bitcoin, innovations such as proof-of-stake and scrypt
help further advance the field of crypto-currency.


Setup
-----
After completing windows setup then run windows command line (cmd)
Expand All @@ -38,10 +37,29 @@ Upgrade
All you existing coins/transactions should be intact with the upgrade.
To upgrade from 0.2.x, first backup wallet
bitbard backupwallet <destination_backup_file>
Then shutdown ppcoind by
Then shutdown bitbard by
bitbard stop
Start up the new bitbard (0.3.0).

-------------------
NovaCoin 0.4.0 BETA

Copyright (c) 2013 NovaCoin Developers
Copyright (c) 2011-2013 PPCoin Developers
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com).


Intro
-----
NovaCoin is a free open source project derived from PPCoin, with
the goal of providing a long-term energy-efficient scrypt-based crypto-currency.
Built on the foundation of Bitcoin, innovations such as proof-of-stake and scrypt
help further advance the field of crypto-currency.


------------------
Bitcoin 0.6.3 BETA
Expand Down
8 changes: 4 additions & 4 deletions src/base58.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ class CBitcoinAddress : public CBase58Data
public:
enum
{
PUBKEY_ADDRESS = 8,
SCRIPT_ADDRESS = 20,
PUBKEY_ADDRESS_TEST = 111,
SCRIPT_ADDRESS_TEST = 196,
PUBKEY_ADDRESS = 25,
SCRIPT_ADDRESS = 30,
PUBKEY_ADDRESS_TEST = 115,
SCRIPT_ADDRESS_TEST = 130,
};

bool Set(const CKeyID &id) {
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void ThreadRPCServer3(void* parg);

static inline unsigned short GetDefaultRPCPort()
{
return GetBoolArg("-testnet", false) ? 18344 : 8344;
return GetBoolArg("-testnet", false) ? 19344 : 9344;
}

Object JSONRPCError(int code, const string& message)
Expand Down
4 changes: 0 additions & 4 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ namespace Checkpoints
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, hashGenesisBlockOfficial )
( 6000, uint256("0x000000000945e3c9d8e15df834e802521eb79f9ceb4191a27bdfadad4b777f4a"))
( 8700, uint256("0x00000000014270724837789c9a69859290f6bdee38556bc4561c21f17935a178"))
( 13560, uint256("0xa1591a0fcbf11f282d671581edb9f0aadcd06fee69761081e0a3245914c13729"))
( 14189, uint256("0x00000000020f76474d2522b19c7bfafc43ba6ecbabae54293bcd9546159c8c1d"))
;

static MapCheckpoints mapCheckpointsTestnet =
Expand Down
8 changes: 4 additions & 4 deletions src/irc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ void ThreadIRCSeed2(void* parg)
return;

printf("ThreadIRCSeed started\n");
int nErrorWait = 10;
int nErrorWait = 30;
int nRetryWait = 10;
int nNameRetry = 0;

while (!fShutdown)
{
CService addrConnect("92.243.23.21", 6667); // irc.lfnet.org
CService addrConnect("188.122.74.140", 6667); // eu.undernet.org

CService addrIRC("irc.lfnet.org", 6667, true);
CService addrIRC("irc.rizon.net", 6667, true);
if (addrIRC.IsValid())
addrConnect = addrIRC;

Expand Down Expand Up @@ -263,7 +263,7 @@ void ThreadIRCSeed2(void* parg)
strMyName = strprintf("x%"PRI64u"", GetRand(1000000000));

Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str());
Send(hSocket, strprintf("USER %s 8 * : BitBar - www.bitbar.biz \r", strMyName.c_str()).c_str());

int nRet = RecvUntil(hSocket, " 004 ", " 433 ");
if (nRet != 1)
Expand Down
7 changes: 1 addition & 6 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ extern int nStakeTargetSpacing;
unsigned int nModifierInterval = MODIFIER_INTERVAL;

// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map<int, unsigned int> mapStakeModifierCheckpoints =
boost::assign::map_list_of
( 0, 0x0e00670bu )
( 6000, 0xb7cbc5d3u )
( 12661, 0x5d84115du )
;
static std::map<int, unsigned int> mapStakeModifierCheckpoints;

// Get the last stake modifier and its generation time from a given block
static bool GetLastStakeModifier(const CBlockIndex* pindex, uint64& nStakeModifier, int64& nModifierTime)
Expand Down
38 changes: 14 additions & 24 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ map<uint256, CBlockIndex*> mapBlockIndex;
set<pair<COutPoint, unsigned int> > setStakeSeen;
uint256 hashGenesisBlock = hashGenesisBlockOfficial;
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20);
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);
static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 30);
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 18);
static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 18);
static CBigNum bnInitialHashTarget(~uint256(0) >> 20);
unsigned int nStakeMinAge = 60 * 60 * 24 * 30; // minimum age for coin age
unsigned int nStakeMaxAge = 60 * 60 * 24 * 90; // stake age of full weight
Expand Down Expand Up @@ -975,7 +975,7 @@ int64 GetProofOfWorkReward(unsigned int nBits)
}

int64 nSubsidy = bnUpperBound.getuint64();
nSubsidy = (nSubsidy / CENT) * CENT;
//nSubsidy = (nSubsidy / CENT) * CENT;
if (fDebug && GetBoolArg("-printcreation"))
printf("GetProofOfWorkReward() : create=%s nBits=0x%08x nSubsidy=%"PRI64d"\n", FormatMoney(nSubsidy).c_str(), nBits, nSubsidy);

Expand Down Expand Up @@ -1031,16 +1031,7 @@ unsigned int static GetNextTargetRequired(const CBlockIndex* pindexLast, bool fP

if(fProofOfStake)
{
// Proof-of-Stake blocks has own target limit since nVersion=3 supermajority on mainNet and always on testNet
if(fTestNet)
bnTargetLimit = bnProofOfStakeHardLimit;
else
{
if(fTestNet || (pindexLast->nHeight + 1 > 15000))
bnTargetLimit = bnProofOfStakeLimit;
else if(pindexLast->nHeight + 1 > 14060)
bnTargetLimit = bnProofOfStakeHardLimit;
}
bnTargetLimit = bnProofOfStakeHardLimit;
}

if (pindexLast == NULL)
Expand All @@ -1063,7 +1054,6 @@ unsigned int static GetNextTargetRequired(const CBlockIndex* pindexLast, bool fP
int64 nInterval = nTargetTimespan / nTargetSpacing;
bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing);
bnNew /= ((nInterval + 1) * nTargetSpacing);

if (bnNew > bnTargetLimit)
bnNew = bnTargetLimit;

Expand Down Expand Up @@ -2485,16 +2475,16 @@ bool LoadBlockIndex(bool fAllowNew)
return false;

// Genesis Block:
// CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
// CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
// CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
// CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
// vMerkleTree: 4a5e1e
// CBlock(hash=00000b03a8fb08c5fc7c, ver=1, hashPrevBlock=00000000000000000000, hashMerkleRoot=0d05d4780f, nTime=1367445600, nBits=1e0fffff, nNonce=5712, vtx=1, vchBlockSig=)
// Coinbase(hash=0d05d4780f, nTime=1367445600, ver=1, vin.size=1, vout.size=1, nLockTime=0)
// CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d020f274c4f4e6f727468204b6f7265612073656e74656e6365732064657461696e656420416d65726963616e20746f2031352079656172732068617264206c61626f72202d204e42432030322d31352d32303133)
// CTxOut(empty)
// vMerkleTree: 0d05d4780f

// Genesis block
const char* pszTimestamp = "https://bitcointalk.org/index.php?topic=134179.msg1502196#msg1502196";
const char* pszTimestamp = "North Korea sentences detained American to 15 years hard labor - NBC 02-15-2013";
CTransaction txNew;
txNew.nTime = 1360105017;
txNew.nTime = 1367445600;
txNew.vin.resize(1);
txNew.vout.resize(1);
txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(9999) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
Expand All @@ -2504,12 +2494,12 @@ bool LoadBlockIndex(bool fAllowNew)
block.hashPrevBlock = 0;
block.hashMerkleRoot = block.BuildMerkleTree();
block.nVersion = 1;
block.nTime = 1360105017;
block.nTime = 1367445600;
block.nBits = bnProofOfWorkLimit.GetCompact();
block.nNonce = 1575379;
block.nNonce = 5712;

//// debug print
assert(block.hashMerkleRoot == uint256("0x4cb33b3b6a861dcbc685d3e614a9cafb945738d6833f182855679f2fad02057b"));
assert(block.hashMerkleRoot == uint256("0x0d05d4780fa20225c36f785971ee30ce1c45b0631fd588751c583cb52795f46d"));
block.print();
assert(block.GetHash() == hashGenesisBlock);
assert(block.CheckBlock());
Expand Down
12 changes: 6 additions & 6 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const unsigned int MAX_INV_SZ = 50000;
static const int64 MIN_TX_FEE = CENT;
static const int64 MIN_RELAY_TX_FEE = CENT;
static const int64 MAX_MONEY = 2000000000 * COIN;
static const int64 MAX_MINT_PROOF_OF_WORK = 100 * COIN;
static const int64 MIN_TX_FEE = CENT/100;
static const int64 MIN_RELAY_TX_FEE = CENT/100;
static const int64 MAX_MONEY = 500000 * COIN;
static const int64 MAX_MINT_PROOF_OF_WORK = 1 * COIN;
static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
Expand All @@ -45,8 +45,8 @@ static const int fHaveUPnP = true;
static const int fHaveUPnP = false;
#endif

static const uint256 hashGenesisBlockOfficial("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4");
static const uint256 hashGenesisBlockTestNet("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4");
static const uint256 hashGenesisBlockOfficial("0x00000b03a8fb08c5fc7c876f73c224a964ed79f71276694c3c0a6d288ae57fc3");
static const uint256 hashGenesisBlockTestNet ("0x00000b03a8fb08c5fc7c876f73c224a964ed79f71276694c3c0a6d288ae57fc3");

static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours

Expand Down
9 changes: 4 additions & 5 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ void MapPort()
// The first name is used as information source for addrman.
// The second name should resolve to a list of seed addresses.
static const char *strDNSSeed[][2] = {
{"bitbar.su", "seed.bitbar.su"},
{"bitbar.biz", "netboot.bitbar.biz"},
};

void ThreadDNSAddressSeed(void* parg)
Expand Down Expand Up @@ -1220,7 +1220,6 @@ void ThreadDNSAddressSeed2(void* parg)

unsigned int pnSeed[] =
{
0x90EF78BC, 0x33F1C851, 0x36F1C851, 0xC6F5C851,
};

void DumpAddresses()
Expand Down Expand Up @@ -1842,19 +1841,19 @@ void StartNode(void* parg)
// Start threads
//

/*

if (!GetBoolArg("-dnsseed", true))
printf("DNS seeding disabled\n");
else
if (!NewThread(ThreadDNSAddressSeed, NULL))
printf("Error: NewThread(ThreadDNSAddressSeed) failed\n");
*/

/*
if (!GetBoolArg("-dnsseed", false))
printf("DNS seeding disabled\n");
if (GetBoolArg("-dnsseed", false))
printf("DNS seeding NYI\n");

*/
// Map ports with UPnP
if (fUseUPnP)
MapPort();
Expand Down
2 changes: 1 addition & 1 deletion src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
extern bool fTestNet;
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
{
return testnet ? 17777 : 7777;
return testnet ? 18777 : 8777;
}


Expand Down
1 change: 0 additions & 1 deletion src/qt/bitcoin.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@
</qresource>
<qresource prefix="/translations">
<file alias="en">locale/bitcoin_en.qm</file>
<file alias="ru">locale/bitcoin_ru.qm</file>
</qresource>
</RCC>
6 changes: 3 additions & 3 deletions src/qt/bitcoinunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ QString BitcoinUnits::name(int unit)
{
switch(unit)
{
case BTC: return QString("NVC");
case mBTC: return QString("mNVC");
case uBTC: return QString::fromUtf8("μNVC");
case BTC: return QString("BTB");
case mBTC: return QString("mBTB");
case uBTC: return QString::fromUtf8("μBTB");
default: return QString("???");
}
}
Expand Down
Loading

0 comments on commit 64c0ed4

Please sign in to comment.