Skip to content

Commit

Permalink
Mandatory Update Version 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Tillkoeln committed Nov 24, 2015
1 parent e9b2a7a commit db03106
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 5
#define CLIENT_VERSION_MINOR 7
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0

Expand Down
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ int64_t GetProofOfWorkReward(int64_t nFees)
return nSubsidy + nFees;
}

else if (pindexBest->nHeight+1 > 250560)
else
{
nSubsidy = 0.001 * COIN;
return nSubsidy + nFees;
Expand Down Expand Up @@ -2148,8 +2148,9 @@ bool CBlock::AcceptBlock()
CBlockIndex* pindexPrev = (*mi).second;
int nHeight = pindexPrev->nHeight+1;

if (IsProofOfWork() && nHeight > LAST_POW_BLOCK)
return DoS(100, error("AcceptBlock() : reject proof-of-work at height %d", nHeight));
// KolschCoin will now be PoW/PoS hybrid permanently
/* if (IsProofOfWork() && nHeight > LAST_POW_BLOCK)
return DoS(100, error("AcceptBlock() : reject proof-of-work at height %d", nHeight));*/

if (IsProofOfStake() && nHeight < MODIFIER_INTERVAL_SWITCH)
return DoS(100, error("AcceptBlock() : reject proof-of-stake at height %d", nHeight));
Expand Down
1 change: 1 addition & 0 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,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] = {
{"CGN0", "185.61.151.109"},
{"CGN1", "104.156.237.74"},
{"CGN2", "104.219.250.54"},
{"CGN3", "5.9.36.211"},
Expand Down
3 changes: 0 additions & 3 deletions src/rpcblockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ double GetDifficulty(const CBlockIndex* blockindex)

double GetPoWMHashPS()
{
if (pindexBest->nHeight >= LAST_POW_BLOCK)
return 0;

int nPoWInterval = 72;
int64_t nTargetSpacingWorkMin = 30, nTargetSpacingWork = 30;

Expand Down
14 changes: 3 additions & 11 deletions src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ Value getworkex(const Array& params, bool fHelp)
if (IsInitialBlockDownload())
throw JSONRPCError(-10, "KolschCoin is downloading blocks...");

if (pindexBest->nHeight >= LAST_POW_BLOCK)
throw JSONRPCError(RPC_MISC_ERROR, "No more PoW blocks");

typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t;
static mapNewBlock_t mapNewBlock;
static vector<CBlock*> vNewBlock;
Expand Down Expand Up @@ -256,9 +253,6 @@ Value getwork(const Array& params, bool fHelp)
if (IsInitialBlockDownload())
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "KolschCoin is downloading blocks...");

if (pindexBest->nHeight >= LAST_POW_BLOCK)
throw JSONRPCError(RPC_MISC_ERROR, "No more PoW blocks");

typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t;
static mapNewBlock_t mapNewBlock; // FIXME: thread safety
static vector<CBlock*> vNewBlock;
Expand Down Expand Up @@ -302,7 +296,7 @@ Value getwork(const Array& params, bool fHelp)
}

// Update nTime
pblock->UpdateTime(pindexPrev);
//pblock->UpdateTime(pindexPrev);
pblock->nNonce = 0;

// Update nExtraNonce
Expand Down Expand Up @@ -400,9 +394,6 @@ Value getblocktemplate(const Array& params, bool fHelp)
if (IsInitialBlockDownload())
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "KolschCoin is downloading blocks...");

if (pindexBest->nHeight >= LAST_POW_BLOCK)
throw JSONRPCError(RPC_MISC_ERROR, "No more PoW blocks");

static CReserveKey reservekey(pwalletMain);

// Update block
Expand Down Expand Up @@ -436,7 +427,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
}

// Update nTime
pblock->UpdateTime(pindexPrev);
// pblock->UpdateTime(pindexPrev);
pblock->nNonce = 0;

Array transactions;
Expand Down Expand Up @@ -540,3 +531,4 @@ Value submitblock(const Array& params, bool fHelp)
return Value::null;
}


6 changes: 3 additions & 3 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ static const int DATABASE_VERSION = 70508;
// network protocol versioning
//

static const int PROTOCOL_VERSION = 60013;
static const int PROTOCOL_VERSION = 60020;

// earlier versions not supported as of Feb 2012, and are disconnected
static const int MIN_PROTO_VERSION = 209;
static const int MIN_PROTO_VERSION = 60020;

// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
static const int CADDR_TIME_VERSION = 31402;

// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_START = 60002;
static const int NOBLKS_VERSION_END = 60006;
static const int NOBLKS_VERSION_END = 60019;

// BIP 0031, pong message, is enabled for all versions AFTER this one
static const int BIP0031_VERSION = 60000;
Expand Down

15 comments on commit db03106

@joshafest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good work till.....maybe you need swap.

@Tillkoeln
Copy link
Owner Author

@Tillkoeln Tillkoeln commented on db03106 Nov 26, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshafest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was just gussing..... i thought that pow limit exceed ...so; if one want to change past ...he need a new blockchain.

@Tillkoeln
Copy link
Owner Author

@Tillkoeln Tillkoeln commented on db03106 Nov 26, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshafest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so; you made pos/pow hybrid ...
This will increase change of collision as have 2 proofs ...pow and pos ..
Suppose block time is 30sec. and in 30 a pos block found , and at that time pow also found, but network can have only one block so one should be rejected ..every 30 sec. This may cause a lot of orphane blocks.
And most generally pow block get rejected as pos have large community to verify it.

lol...

@Tillkoeln
Copy link
Owner Author

@Tillkoeln Tillkoeln commented on db03106 Nov 26, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tillkoeln
Copy link
Owner Author

@Tillkoeln Tillkoeln commented on db03106 Nov 26, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tillkoeln
Copy link
Owner Author

@Tillkoeln Tillkoeln commented on db03106 Nov 26, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshafest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work till it will not have any orphan block (your new project) as you already told have different timings for pos &pow .
So, no problem of time clash=no rejection (no orphan block)
nice till you already solved problem.

@joshafest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this problem occurs in coins having same timing of pos pow

@vickyzare567
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Tillkoeln ,

I have cloned a POS coin but now i am unable to generate the first block.
Please tell me how to do that
i am in a big problem .
if you help me , then i will be very greatfull
Thanks in advance

@Tillkoeln
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would go this way...

start the client 2 times.... which require 2 different folders for the data etc....
open the cmd prompt inside your executable.

mkdir c:\yourcoin1
mkdir c:\yourcoin2

yourcoin-qt.exe -datadir=C:\yourcoin1 -server=1 -rpcpassword=123 -rpcuser=123 -rpcport=12345 -port=54321
yourcoin-qt.exe -datadir=C:\yourcoin2 -server=1 -rpcpassword=1234 -rpcuser=1234 -rpcport=23456 -port=65432 -addnode=127.0.0.1:54321

.. this should start 2 instances for your coin with different folders....

now use a simple cpu miner like "cpuminer-multi-rel1.1"
modify the conf file for the miner :

"url" : "127.0.0.1:12345",
"user" : "123",
"pass" : "123",

"algo" : "x13",

and run the miner *exe

then just wait... if anything is red = bad
anything else is a good sign

@joshafest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vickyzare567 , you need to mine genesis block, and as far as I know it would be POW block

@vickyzare567
Copy link

@vickyzare567 vickyzare567 commented on db03106 Sep 20, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vickyzare567
Copy link

@vickyzare567 vickyzare567 commented on db03106 Sep 20, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.