Author

Topic: 1 ~ 5 LTC- Help me Create Genesis Block for My altcoin (Read 1250 times)

newbie
Activity: 7
Merit: 0
hero member
Activity: 525
Merit: 531
it's not az exact number. if your coin is popular, and there are lof of transaction, use high number. use block explorer to calculate the daily tr number.
but i think 8k is ok.

newbie
Activity: 44
Merit: 0
thank you!!!
I met a problem again, I want to know the following line of code:
https://github.com/litecoin-project/litecoin/blob/v0.8.6.2/src/checkpoints.cpp#L58
8000, it is how to calculate.
what is estimated number.
Code:
static const CCheckpointData data = {
        &mapCheckpoints,
        1383887110, // * UNIX timestamp of last checkpoint block
        2179203, // * total number of transactions between genesis and last checkpoint
                    // (the tx=... number in the SetBestChain debug.log lines)
        8000.0 // * estimated number of transactions per day after checkpoint
    };

newbie
Activity: 44
Merit: 0
elbandi:
thank you!!!!
I almost forgot this post. I think no one is willing to help me...
I have solved my problem, but still thank you for your reply.

newbie
Activity: 44
Merit: 0
5LTC too Too little Huh
newbie
Activity: 44
Merit: 0
Thank you very much for providing the teaching,  I met a new problem.
newbie
Activity: 44
Merit: 0
Thank you!!!!
It prompts the error:

Code:
2014-05-14 12:32:23 Litecoin version v0.8.6.2-gfe7b87a-beta (Thu, 9 Jan 2014 15:38:53 -1000)
2014-05-14 12:32:23 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014
2014-05-14 12:32:23 Default data directory C:\Users\cckkk\AppData\Roaming\Litecoin
2014-05-14 12:32:23 Using data directory C:\Users\cckkk\AppData\Roaming\Litecoin
2014-05-14 12:32:23 Using at most 125 connections (2048 file descriptors available)
2014-05-14 12:32:23 init message: Verifying wallet...
2014-05-14 12:32:23 dbenv.open LogDir=C:\Users\cckkk\AppData\Roaming\Litecoin\database ErrorFile=C:\Users\cckkk\AppData\Roaming\Litecoin\db.log
2014-05-14 12:32:23 Bound to [::]:9441
2014-05-14 12:32:23 Bound to 0.0.0.0:9441
2014-05-14 12:32:23 init message: Loading block index...
2014-05-14 12:32:23 Opening LevelDB in C:\Users\cckkk\AppData\Roaming\Litecoin\blocks\index
2014-05-14 12:32:23 Opened LevelDB successfully
2014-05-14 12:32:23 Opening LevelDB in C:\Users\cckkk\AppData\Roaming\Litecoin\chainstate
2014-05-14 12:32:23 Opened LevelDB successfully
2014-05-14 12:32:23 LoadBlockIndexDB(): last block file = 0
2014-05-14 12:32:23 LoadBlockIndexDB(): transaction index disabled
2014-05-14 12:32:23 Initializing databases...
2014-05-14 12:32:23 3b8e68113b0642ec7a9f8d0abd4b8812900f37040a4ca7ab221453b21960a46b
2014-05-14 12:32:23 3b8e68113b0642ec7a9f8d0abd4b8812900f37040a4ca7ab221453b21960a46b
2014-05-14 12:32:23 8616fea39dec184c9b4c749d6ed93edc13fadcdb536dc6b8736f79ee9660a318
2014-05-14 12:32:23 CBlock(hash=3b8e68113b0642ec7a9f8d0abd4b8812900f37040a4ca7ab221453b21960a46b, input=01000000000000000000000000000000000000000000000000000000000000000000000018a36096ee796f73b8c66d53dbdcfa13dc3ed96e9d744c9b4c18ec9da3fe1686a1b96153f0ff0f1e6d9b2b00, PoW=00000eeea7e66a24081f91b3442f11a51a23571a1e6bbed53debbfc0bd229990, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=8616fea39dec184c9b4c749d6ed93edc13fadcdb536dc6b8736f79ee9660a318, nTime=1398913441, nBits=1e0ffff0, nNonce=2857837, vtx=1)
2014-05-14 12:32:23   CTransaction(hash=8616fea39dec184c9b4c749d6ed93edc13fadcdb536dc6b8736f79ee9660a318, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d01044c6b4d6179203173742c20323031342c476f6c644265616e7320697320616e20696e746572657374696e6720636f756e74696e6720756e69742c2053637279707420504f532e546f64617920697320746865204d617920317374204c61626f75722044617920686f6c69646179)
    CTxOut(error)
  vMerkleTree: 8616fea39dec184c9b4c749d6ed93edc13fadcdb536dc6b8736f79ee9660a318
2014-05-14 12:32:23 Pre-allocating up to position 0x1000000 in blk00000.dat
2014-05-14 12:32:23 ERROR: CTransaction::CheckTransaction() : coinbase script size
2014-05-14 12:32:23 ERROR: CheckBlock() : CheckTransaction failed
2014-05-14 12:32:23 InvalidChainFound: invalid block=3b8e68113b0642ec7a9f8d0abd4b8812900f37040a4ca7ab221453b21960a46b  height=0  log2_work=20.000022  date=2014-05-01 03:04:01

How do I edit the following file:

https://github.com/litecoin-project/litecoin/blob/v0.8.6.2/src/checkpoints.cpp

newbie
Activity: 34
Merit: 0
Stop making crap coins .

 Cheesy Cheesy Cheesy
true... true...
what's more funny - is to ask some questions here, where everyone is your enemy ))
hero member
Activity: 525
Merit: 531
newbie
Activity: 44
Merit: 0
I also want to have a altcoin... It even junk, I also want to have one..  Grin Grin Grin Grin Grin Grin
hero member
Activity: 770
Merit: 500
Stop making crap coins .
newbie
Activity: 44
Merit: 0
Hi ALL:
I also want to make a Altcoin, however, I encountered a problem..
I hope to create a POS altcoin, I downloaded the ITC source code: https://github.com/information-coin/informationcoin
I want to create a Genesis Block,I hope to have a similar litecoin Genesis code, to help me.
Dear coders, help me, I am a poor student, I have 5 LTC, can give you
Code:
// This part was used to generate the genesis block.
// Uncomment to use it again.

// If genesis block hash does not match, then generate new genesis hash.
if (true && block.GetHash() != hashGenesisBlock)
{
printf("Searching for genesis block...\n");
// This will figure out a valid hash and Nonce if you're
// creating a different genesis block:
uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
uint256 thash;
char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
loop
{
#if defined(USE_SSE2)
// Detection would work, but in cases where we KNOW it always has SSE2,
// it is faster to use directly than to use a function pointer or conditional.
#if defined(_M_X64) || defined(__x86_64__) || defined(_M_AMD64) || (defined(MAC_OSX) && defined(__i386__))
// Always SSE2: x86_64 or Intel MacOS X
scrypt_1024_1_1_256_sp_sse2(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#else
// Detect SSE2: 32bit x86 Linux or Windows
scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
#else
// Generic scrypt
scrypt_1024_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
if (thash <= hashTarget)
break;
if ((block.nNonce & 0xFFF) == 0)
{
printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
}
++block.nNonce;
if (block.nNonce == 0)
{
printf("NONCE WRAPPED, incrementing time\n");
++block.nTime;
}
}
printf("block.nTime = %u \n", block.nTime);
printf("block.nNonce = %u \n", block.nNonce);
printf("block.GetHash = %s\n", block.GetHash().ToString().c_str());
}
Jump to: