Skip to content

Commit

Permalink
This commit is a RESET previous blockchain and config are invalid. It…
Browse files Browse the repository at this point in the history
… includes new NTP by Art Forz, his fix for a tricky timestamp manipulation technique, proper credites in comments, new config, new diff adjust parameters, new checkpoints, and a new config that takes advantage of new fix, as well as first 200 blocks of the chain (to quickly bootstrap stuff)

PLEASE UPDATE
  • Loading branch information
Lolcust committed Sep 13, 2011
1 parent 36a34c6 commit f9523f3
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 25 deletions.
Binary file added Config+Blockchain/Config+Blockchain.zip
Binary file not shown.
Binary file removed Config+Blockchain/Geistgeld_Files.zip
Binary file not shown.
32 changes: 19 additions & 13 deletions bitcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@ rpcpassword=password
rpcuser=username
printtoconsole=1

#attempt to change the limit of how far from the future should a block be accepted , previously was two hours (2 * 60 *60), aka 7200. How about we try setting this to 30 seconds and see where this gets us
#attempt to change the limit of how far from the future should a block be accepted , previously was two hours (2 * 60 *60), aka 7200. How about we try setting this to 10 seconds and see where this gets us
#LET'S GET DANGEROUS!

future_time_limit=10





#to enable scripts uncomment nonstandard here this overrides IsStandard() to return true
#needed for Escrow to work right.
#FOR SCIENCE!

nonstandard=1

#ArtForz's fix for the timestamp issues.

enablefullretargetperiod=1

# listen port can now be set to other than 18333 for testnet on proto nets nX
port=7769

Expand All @@ -36,6 +44,7 @@ irc_address=irc.lfnet.org
max_money=1369777777

irc_channel=geistgeld00

#The message start string is designed to be unlikely to occur in normal data.
#The characters are rarely used upper ascii, not valid as UTF-8, and produce
# a large 4-byte int at any alignment.
Expand All @@ -50,12 +59,13 @@ irc_channel=geistgeld00
# weeds settings
#\xf8\xbf\xb5\xda
# beerA settings
#xf9 \ xbe \ xb4\ xd9
#\xf7\xbf\xb5\xdb
#My mainnet settings: xbe\xfa\xb5\xbf
pscMessageStart0=181
#My mainnet settings: xbe\xfa\xb5\xf9
pscMessageStart0=190
pscMessageStart1=250
pscMessageStart2=190
pscMessageStart3=191
pscMessageStart2=181
pscMessageStart3=249

AddressVerson=97

Expand All @@ -72,27 +82,23 @@ inflation_triger=1

post_Subsidy=7

#to loop to generate the first block in a new chain set this to 1 ( to create your first proto coin type)
#


pszTimestamp="That is not dead which can eternal lie, And with strange aeons even death may die"

#these values must be with value 0x to the front to make hex format
#pbtc new block.hashMerkleRoot value
block_hashMerkleRoot=0x1d5efa2e5e8a5adb884bc2c7e9f4af7b835ffe75998ec5eeac726305f06a21cd
block_hashMerkleRoot=0xb6d09a6425be1a206bd7d1cd8af9e7635345fb706bf1681ed265cab87ec80934

#pbtc new genesisblock value
genesisblock=0x000000015907c88d06902a1848d533f343f864c053f3d13889477c88202bc4d5
genesisblock=0x00000002325a5250292f059d3a3a2b17b1a752f73926289d5d76ca2cc1f94435

txNew_vout_nValue=777
txNew_vout_nValue=7769

#Pbtc new block.ntime time epoc of creation use date +%s to use when you create new one
#block_nTime=1315436213
block_nTime=1315469777

#Pbtc new block.nNonce start at zero when you are creating a new one
block_nNonce=10239333
block_nNonce=1510063910

#COINBASE_MATURITY defaults to 100 if changed here will credit minned coins in this number of new blocks
# this feature is now disabled in this build until I figure out the changes made around it.
Expand Down
30 changes: 18 additions & 12 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,19 +790,25 @@ unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast)
return pindexLast->nBits;
}

// Go back by what we want to be 14 days worth of blocks
// Go back the full period unless it's the first retarget after genesis. Code courtesy of Art Forz
int blockstogoback = nInterval-1;
if(GetBoolArg("-enablefullretargetperiod") && ((pindexLast->nHeight+1) != nInterval))
blockstogoback = nInterval;

// Go back by what we want to be 14 days worth of blocks
const CBlockIndex* pindexFirst = pindexLast;
for (int i = 0; pindexFirst && i < nInterval-1; i++)
for (int i = 0; pindexFirst && i < blockstogoback; i++)
pindexFirst = pindexFirst->pprev;
assert(pindexFirst);

// Limit adjustment step


// Limit adjustment step [altered for GG's purposes]
int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
printf(" nActualTimespan = %"PRI64d" before bounds\n", nActualTimespan);
if (nActualTimespan < nTargetTimespan/4)
nActualTimespan = nTargetTimespan/4;
if (nActualTimespan > nTargetTimespan*4)
nActualTimespan = nTargetTimespan*4;
if (nActualTimespan < nTargetTimespan/1.769)
nActualTimespan = nTargetTimespan/1.769;
if (nActualTimespan > nTargetTimespan*1.769)
nActualTimespan = nTargetTimespan*1.769;

// Retarget
CBigNum bnNew;
Expand Down Expand Up @@ -1480,13 +1486,13 @@ bool CBlock::AcceptBlock()

// Check that the block chain matches the known block chain up to a checkpoint
if (!fTestNet)
if ((nHeight == 669 && hash != uint256("0x0000000002d0c7ae4faa3be972f44525440a3c4f40fd52c2a06e9addc2a99a8e")) ||
(nHeight == 7777 && hash != uint256("0x0000000fbebe2a10e03de788495f35cc62c5245da5dd980aaedbf5e94d6454a2")))
if ((nHeight == 100 && hash != uint256("0x00000000a4eea5877f58aaa6bcff2e00032b6df0e64528f18c5cb6e65a5a48e7")) ||
(nHeight == 200 && hash != uint256("0x000000006eccc8a7a759e13a3ba6ef4c907b8236fa23a19dcfdb93ebb6c8cc38")))
return error("AcceptBlock() : rejected by checkpoint lockin at %d", nHeight);

if (fTestNet)
if ((nHeight == 669 && hash != uint256("0x0000000002d0c7ae4faa3be972f44525440a3c4f40fd52c2a06e9addc2a99a8e")) ||
(nHeight == 7777 && hash != uint256("0x0000000fbebe2a10e03de788495f35cc62c5245da5dd980aaedbf5e94d6454a2")))
if ((nHeight == 100 && hash != uint256("0x00000000a4eea5877f58aaa6bcff2e00032b6df0e64528f18c5cb6e65a5a48e7")) ||
(nHeight == 200 && hash != uint256("0x000000006eccc8a7a759e13a3ba6ef4c907b8236fa23a19dcfdb93ebb6c8cc38")))
return error("AcceptBlock() : rejected by checkpoint lockin at %d", nHeight);

// Write block to history file
Expand Down
2 changes: 2 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,8 @@ void ShrinkDebugFile()
// - Median of other nodes's clocks
// - The user (asking the user to fix the system clock if the first two disagree)
//
//NTP code found in this version courtesy of Art Forz
//

int64 GetTime()
{
Expand Down

0 comments on commit f9523f3

Please sign in to comment.