Bitcoin Forum
May 30, 2024, 01:42:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 »
361  Alternate cryptocurrencies / Altcoin Discussion / Re: How to create unique genesis block? on: February 16, 2018, 11:23:12 AM
so it should first install python package before install scrypt.

anyway, I succeedeed run python genesis.py -a scrypt -z "Now is 2018-xx-xx."

and bunch of values generated. 
362  Alternate cryptocurrencies / Altcoin Discussion / Re: How to create unique genesis block? on: February 16, 2018, 06:13:13 AM
1) Use https://github.com/lhartikk/GenesisH0 to generat the merkle and Genesis hash & nonce
2) fill in this values & recompile
3) delete previous chain data
4) run Forest run!
Thanks, but when I typed 'sudo pip install....' at terminal, system says [sudo : pip : command not found ] ....

Why unix system so complicated... really frustrating...


So I install python, then typed [ python genesis.py -a scrypt -z "Now is 2018" ]

Then error says

File "genesis.py", line 2, in <module> import scrypt
ImportError : No modile named scrypt

363  Alternate cryptocurrencies / Altcoin Discussion / How to create unique genesis block? on: February 15, 2018, 03:30:28 PM
I am researching bitcoin/litecoin source.

I am trying to revise and start new block, create genesis block.

So I changed genesisOutputScript variable at chainparams.cpp  52 line, via [ cat genesiscoinbase.hex ]

and then changed below line's source like following..


Code:
pchMessageStart[2] = 0xb1;
        pchMessageStart[3] = 0xde;
        nDefaultPort = 2454;
        nPruneAfterHeight = 100000;

        genesis = CreateGenesisBlock(1518706741, 2084524493, 0x1e0ffff0, 1, 50 * COIN);
        consensus.hashGenesisBlock = genesis.GetHash();
printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());
printf("genesis.hashMerkleRoot = %s\n", genesis.hashMerkleRoot.ToString().c_str());
        assert(consensus.hashGenesisBlock == uint256S("0xf333b8dff21df2ec0034590afa921a09e43ff41c5c8e5ac10cd83bf17615554d"));
        assert(genesis.hashMerkleRoot == uint256S("0xc4ef14392acd1d6123ab6b4497601f2a164e50f5da77903dc7e2ad1a8fa25f2d"));

        // Note that of those with the service bits flag, most only support a subset of possible options
        vSeeds.emplace_back("something.something.com", true);

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 55);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 55);
        base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1, 55);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,176);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));

        fDefaultConsistencyChecks = false;
        fRequireStandard = true;
        fMineBlocksOnDemand = false;

        checkpointData = (CCheckpointData) {
            {
                {  0, uint256S("0x001")},
            }
        };

        chainTxData = ChainTxData{
            // Data as of block 59c9b9d3fec105bdc716d84caa7579503d5b05b73618d0bf2d5fa639f780a011 (height 1353397).
            1518706741, // * UNIX timestamp of last known number of transactions
            0,  // * total number of transactions between genesis and that timestamp
                    //   (the tx=... number in the SetBestChain debug.log lines)
            0.06     // * estimated number of transactions per second after that timestamp
        };

but after compile this with 'make' , then run ./litecoind  ,
error says,

genesis.GetHash = f333b8dff21df2ec0034590afa921a09e43ff41c5c8e5ac10cd83bf17615554d
genesis.hashMerkleRoot = c4ef14392acd1d6123ab6b4497601f2a164e50f5da77903dc7e2ad1a8fa25f2d
Error: Error: A fatal internal error occurred, see debug.log for details
Segmentation fault (core dumped)


and here is debug.log file says,

2018-02-15 15:23:10 Litecoin version v0.15.1.0-845fc69ab-dirty
2018-02-15 15:23:10 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-02-15 15:23:10 Assuming ancestors of block 59c9b9d3fec105bdc716d84caa7579503d5b05b73618d0bf2d5fa639f780a011 have valid signatures.
2018-02-15 15:23:10 Setting nMinimumChainWork=00000000000000000000000000000000000000000000002ebcfe2dd9eff82666
2018-02-15 15:23:10 Using the 'standard' SHA256 implementation
2018-02-15 15:23:10 Using RdRand as an additional entropy source
2018-02-15 15:23:10 Default data directory /home/ubuntu/.litecoin
2018-02-15 15:23:10 Using data directory /home/ubuntu/.litecoin
2018-02-15 15:23:10 Using config file /home/ubuntu/.litecoin/litecoin.conf
2018-02-15 15:23:10 Using at most 125 automatic connections (1024 file descriptors available)
2018-02-15 15:23:10 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-02-15 15:23:10 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-02-15 15:23:10 Using 4 threads for script verification
2018-02-15 15:23:10 scheduler thread start
2018-02-15 15:23:10 HTTP: creating work queue of depth 16
2018-02-15 15:23:10 No rpcpassword set - using random cookie authentication
2018-02-15 15:23:10 Generated RPC authentication cookie /home/ubuntu/.litecoin/.cookie
2018-02-15 15:23:10 HTTP: starting 4 worker threads
2018-02-15 15:23:10 init message: Verifying wallet(s)...
2018-02-15 15:23:10 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2018-02-15 15:23:10 Using wallet wallet.dat
2018-02-15 15:23:10 CDBEnv::Open: LogDir=/home/ubuntu/.litecoin/database ErrorFile=/home/ubuntu/.litecoin/db.log
2018-02-15 15:23:10 Cache configuration:
2018-02-15 15:23:10 * Using 2.0MiB for block index database
2018-02-15 15:23:10 * Using 8.0MiB for chain state database
2018-02-15 15:23:10 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-02-15 15:23:10 init message: Loading block index...
2018-02-15 15:23:10 Opening LevelDB in /home/ubuntu/.litecoin/blocks/index
2018-02-15 15:23:10 Opened LevelDB successfully
2018-02-15 15:23:10 Using obfuscation key for /home/ubuntu/.litecoin/blocks/index: 0000000000000000
2018-02-15 15:23:10 LoadBlockIndexDB: last block file = 0
2018-02-15 15:23:10 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2018-02-15 15:23:10 Checking all blk files are present...
2018-02-15 15:23:10 LoadBlockIndexDB: transaction index disabled
2018-02-15 15:23:10 Initializing databases...
2018-02-15 15:23:10 Pre-allocating up to position 0x1000000 in blk00000.dat
2018-02-15 15:23:10 Opening LevelDB in /home/ubuntu/.litecoin/chainstate
2018-02-15 15:23:10 Opened LevelDB successfully
2018-02-15 15:23:10 Wrote new obfuscate key for /home/ubuntu/.litecoin/chainstate: 926d8d907f958c5b
2018-02-15 15:23:10 Using obfuscation key for /home/ubuntu/.litecoin/chainstate: 926d8d907f958c5b
2018-02-15 15:23:10 init message: Rewinding blocks...
2018-02-15 15:23:10  block index              18ms
2018-02-15 15:23:10 init message: Loading wallet...
2018-02-15 15:23:10 nFileVersion = 150100
2018-02-15 15:23:10 Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total
2018-02-15 15:23:10 Performing wallet upgrade to 60000
2018-02-15 15:23:10 keypool added 2000 keys (1000 internal), size=2000 (1000 internal)
2018-02-15 15:23:10 keypool reserve 1
2018-02-15 15:23:10 keypool keep 1
2018-02-15 15:23:10  wallet                  738ms
2018-02-15 15:23:10 keypool added 1 keys (0 internal), size=2000 (1000 internal)
2018-02-15 15:23:10 setKeyPool.size() = 2000
2018-02-15 15:23:10 mapWallet.size() = 0
2018-02-15 15:23:10 mapAddressBook.size() = 1
2018-02-15 15:23:10 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2018-02-15 15:23:10 *** Failed to read block
2018-02-15 15:23:10 Error: Error: A fatal internal error occurred, see debug.log for details


So what is the problem? What am I missing? How to fix and can make my own genesis block?

Thanks.
364  Alternate cryptocurrencies / Altcoin Discussion / Re: Are there no tutorial cloning bitcoin source? on: February 15, 2018, 01:33:19 PM

Actually, I bought that book while ago, and get in hand. Though not read whole.

But regard compile and make alt-coin, it does not really helpful.
365  Alternate cryptocurrencies / Altcoin Discussion / Are there no tutorial cloning bitcoin source? on: February 15, 2018, 12:57:11 PM
I am searching bitcoin(or litecoin) source copying, making new alt-coin tutorial.

I googled and saw every threads in this forum, and other sites,

so far there is none based on newest source. (0.15.1)

So all datas written there are incomplete. some still can be applied, some not.

Are there none of it?
366  Bitcoin / Development & Technical Discussion / Re: How to make transaction speed faster? on: February 15, 2018, 07:14:33 AM
So bitcoin block generation speed is 10 minutes, is this minimum transaction speed?

Then how can faster it?

I find at 'chainparams.cpp', consensus.nPowTargetSpacing = 10 * 60;

So this is 10 minutes, so if I change it to 0.1 * 60, then transaction speed also become 6 seconds?

What else parameters should I change to speed up?

That will speed up transactions but you may not have enough time for all the nodes to record the transaction. If you do change it that way you should take a look at the reward amount for each block as decreasing blocktime will increase the supply of bitcoin introduced to the system.

To increase transaction speed you may also want to take a look at blocksize.
Thanks.
Then how ethereum block generation time is so fast? (15 seconds maybe?) Is there enough time for nodes to record the transaction?

And what is proper fastest time to wait all nodes record?
367  Bitcoin / Development & Technical Discussion / Re: How to make transaction speed faster? on: February 15, 2018, 07:12:55 AM
So bitcoin block generation speed is 10 minutes, is this minimum transaction speed?
No, that is the average block time that we want.

Then how can faster it?

I find at 'chainparams.cpp', consensus.nPowTargetSpacing = 10 * 60;

So this is 10 minutes, so if I change it to 0.1 * 60, then transaction speed also become 6 seconds?
If by transaction speed you mean confirmation time, then changing that will effect confirmation time because it effects the block time. Note that changing that does not guarantee that blocks will be found every 6 seconds, it only says that the average time in between blocks is 6 seconds.

What else parameters should I change to speed up?
You will need to change the maximum proof of work target (which thus decreases the minimum difficulty). The proof of work target is what actually regulates block times.
Thanks.
How to change the maximum proof of work target? for faster transaction time?
368  Bitcoin / Development & Technical Discussion / How to make transaction speed faster? on: February 15, 2018, 01:51:33 AM
So bitcoin block generation speed is 10 minutes, is this minimum transaction speed?

Then how can faster it?

I find at 'chainparams.cpp', consensus.nPowTargetSpacing = 10 * 60;

So this is 10 minutes, so if I change it to 0.1 * 60, then transaction speed also become 6 seconds?

What else parameters should I change to speed up?
369  Alternate cryptocurrencies / Altcoin Discussion / Genesis block compile error on: February 15, 2018, 01:49:02 AM
From newest bitcoin/litecoin source,

So I testing make new genesis block, based on new blockchain.

So I changed at 'chainparams.cpp'
pchMessageStart[0~4] value to random value for start new blockchain, (is this right?)

and also I changed following line's

consensus.hashGenesisBlock == uint256S("0x............");
genesis.hashMerkleRoot == uint256S("0x.....");

to value of mine. (knowing by printf code added above these lines)

After compile ('make'), run by ./bitcoind

but error says 'A fatal internal error occured, see debug.log file'

and debug.log says at end,

ReadBlockFromDisk : Errorrs in block header at CBlockDiskPos(nFile =0, nPos = Cool


Maybe I need to revise more elsewhere to start new blockchain?
How to fix?

Thanks.

370  Alternate cryptocurrencies / Altcoin Discussion / Re: Bitcoin source compiling problem. (make install) on: February 15, 2018, 12:10:05 AM
can you build it without your changes? Just original software

Post more information, what you try to build, i'll try on my computer.

Yes I can build original.

I just want to make alt-coin based on newest source, for that, I need to know my genesis block's value.


please post step by step what are you doing. As I know, you have to generate your own genesis block first.

Just I did add printf for know hash value, and then typed 'make' at terminal for recompile. And error occured like above image I posted.
371  Alternate cryptocurrencies / Altcoin Discussion / Re: Bitcoin source compiling problem. (make install) on: February 14, 2018, 02:39:11 AM
can you build it without your changes? Just original software

Post more information, what you try to build, i'll try on my computer.

Yes I can build original.

I just want to make alt-coin based on newest source, for that, I need to know my genesis block's value.
372  Alternate cryptocurrencies / Altcoin Discussion / Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] on: February 13, 2018, 06:28:29 AM
So I want to clone newest source and make alt-coin.

But where is the part that make debug.log file for check and apply new genesis block's hash value?

So now, how to know what value should be replaced to

assert(consensus.hashGenesisBlock == uint256s("?"));
assert(genesis.hashMerkleRoot == unit256s("?));

at chainparams.cpp 's line 123~130 around.

you need some printf statements to get started, I still don't have working genesis blocks but if you put the printf statements in like I have in my coin it should get you farther:

github.com/yenten2/yenten

Thx, so this part you wrote?

Code:
hashGenesisBlock = genesis.GetHash(); 
67           printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());
68 #if 0
69         {
70             printf("calc new genesis block\n");
71             printf("hashMerkleRoot %s\n", genesis.hashMerkleRoot.ToString().c_str());
72             printf("bnProofOfWorkLimit 0x%x\n", bnProofOfWorkLimit.GetCompact());
73             printf("genesis.nBits 0x%x\n", genesis.nBits);
74
 
75             for (genesis.nNonce = 0; ; genesis.nNonce++) {
76                 hashGenesisBlock = genesis.GetHash();
77                 if (hashGenesisBlock <= bnProofOfWorkLimit.getuint256()) break;
78             }
79
 
80             printf("hashGenesisBlock %s\n", hashGenesisBlock.ToString().c_str());
81             printf("genesis.nNonce %d\n", genesis.nNonce);
82         }
83 #endif

So then, where this printf result text be recorded we can know the hash value? I can't find any file generated at .bitcoin folder
373  Alternate cryptocurrencies / Altcoin Discussion / Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] on: February 13, 2018, 05:34:52 AM
So I want to clone newest source and make alt-coin.

But where is the part that make debug.log file for check and apply new genesis block's hash value?

So now, how to know what value should be replaced to

assert(consensus.hashGenesisBlock == uint256s("?"));
assert(genesis.hashMerkleRoot == unit256s("?));

at chainparams.cpp 's line 123~130 around.
374  Alternate cryptocurrencies / Altcoin Discussion / Re: Bitcoin source compiling problem. (make install) on: February 13, 2018, 01:45:52 AM
please re-upload your image

sorry, here it is.

http://naver.me/55BHuWIC
375  Alternate cryptocurrencies / Altcoin Discussion / Bitcoin source compiling problem. (make install) on: February 12, 2018, 01:05:08 PM
I now trying to change variables of bitcoin source and make own.
 
For that maybe I need to change hashGenesisBlock's value to match to my block?

so I revised source like this,

chainparams.cpp : 123~126 line around approx.

assert(consensus.hashGenesisBlock == uint256S("0x"));   // deleted whole after '0x' to spit out error and then debug.log file will show the right value?

but after try, debug.log file itself does not generated, and to take this code change effective, tried compile, but this error.

http://naver.me/55BHuWIC

How to do fix?

Thanks.
376  Alternate cryptocurrencies / Altcoin Discussion / How to find hashGenesisBlock value? on: February 12, 2018, 12:41:25 PM
So for make own coin, I need to change 2 variables about merkleRoot hash value?

at (chainparams.cpp),

consensus.hashGenesisBlock = uint256s("0x2rj203rfjdlakjf3..........));
genesis.hashMerkleRoot = uint256s("0xf2094ur293228ry289.......));

How to change this to right one?

377  Alternate cryptocurrencies / Altcoin Discussion / Where ICO info should be registered? on: February 12, 2018, 10:40:54 AM
If I have new coin idea, then what?

Write about idea (white paper or whatever), then where to register it to spread it to public ICO investors?

Should I first setup ethereum token distribution system?

378  Bitcoin / Development & Technical Discussion / Re: Source code problem. Where it gone dPriority variable? on: February 12, 2018, 04:19:34 AM
This appears to be from the days when you could send free transactions based on some factors like coin-days destroyed. Free transactions are no longer allowed or accepted by miners based on that so it was removed from the code.

Ah I see. Thanks.
379  Bitcoin / Development & Technical Discussion / Source code problem. Where it gone dPriority variable? on: February 12, 2018, 03:50:09 AM
Originally it was at src/Main.h file's  following function.

--------
Code:
static bool AllowFree(double dPriority){
        return dPriority > COIN * 576 / 250;
}

But new source doesn't have this part itself.

Where it gone? Or to what shape changed?
380  Alternate cryptocurrencies / Altcoin Discussion / Re: Where is hashing algorithm code? on: February 12, 2018, 03:44:04 AM
So bitcoin uses sha256, litecoin scrypt, dash x11.
Where is revision location(source code filename, approx line position)  of this algorithm?

Simply google. Those algorithms (SHA, scrypt) weren't invented for those cryptocurrencies.
They existed before.

SHA: https://en.wikipedia.org/wiki/SHA-2
scrypt: https://en.wikipedia.org/wiki/Scrypt

X11 is concatenated algorithm composed of  BLAKE, BMW, Grøstl, JH, Keccak, Skein, Luffa, CubeHash, SHAvite, SIMD and Echo.



How change to x11 algorithm? Some site says x11 is best algorithm.

Changing the algorithm would require a hard fork (https://en.wikipedia.org/wiki/Fork_(blockchain)#Hard_fork).
There is no "best" algorithm.
Simply because there is no definition of a "best" algorithm.

Additionally you should not believe what you read on "some site".

Thanks, but what I wondered is where should I revise at bitcoin source code to change its algorithm from sha256 to another?
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!