So when receive bitcoin, wallet program also shows QR code with address.
How it is possible? How can adopt that system to new coin?
|
|
|
So bitcoin core first start, it need to know ip address of peers to connect to.
Where from those info?
I saw chainparams.cpp has variable like vSeeds.emplace_back("dnsseed.bitcoin.....com", true);
Then bitcoin client first try to access to above address, then fetch nearest peer's ip address from above site?
Then, developer should wrote down ip address (something like 133.344.67.22) to above site before?
or, How it works?
|
|
|
So after block found, all workers(nodes) now work for new block,
following its algorithm, SHA256, if Bitcoin.
Then what is source file name (or function name even better) that code this algorithm actually working part?
|
|
|
Ok, so current status is, if I run with ./bitcoind, then get error of ---------- ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8) 2018-03-01 08:55:21 *** Failed to read block 2018-03-01 08:55:21 Error: Error: A fatal internal error occurred, see debug.log for details ---------- and if I run with ./bitcoind -reindex, then get error of ---------- 2018-03-01 08:55:45 Reindexing block file blk00000.dat... 2018-03-01 08:55:45 case 2 2018-03-01 08:55:45 ERROR: AcceptBlock: high-hash, proof of work failed (code 16) 2018-03-01 08:55:45 Reindexing finished 2018-03-01 08:55:45 Failed to open mempool file from disk. Continuing anyway. 2018-03-01 08:59:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 180 seconds ago) 2018-03-01 09:02:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 360 seconds ago) 2018-03-01 09:05:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 540 seconds ago) 2018-03-01 09:08:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 720 seconds ago) 2018-03-01 09:11:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 900 seconds ago) 2018-03-01 09:14:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 1080 seconds ago) 2018-03-01 09:17:30 Potential stale tip detected, will try using extra outbound peer (last tip update: 1260 seconds ago) ..... continuing forever..... ------------- above's case 2 means, I added manually like, bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params& params) { bool fNegative; bool fOverflow; arith_uint256 bnTarget;
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
// Check range if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) { LogPrintf("\ncase 1\n"); return false; }
// Check proof of work matches claimed amount if (UintToArith256(hash) > bnTarget) { LogPrintf("\ncase 2\n"); return false; } return true; } Any comments appreciated..
|
|
|
I know if run ./bitcoin-qt, wallet GUI program started.
Then if everything is normal and fine, what will happen when run ./bitcoind?
|
|
|
I revised base58Prefixes[SCRIPT_ADDRESS1, 2] = std::vector<unsigned char>(1, 33) at source file, chainparams.cpp,
and compiled with [make, make install],
but when I run xxxcoin-qt, and address checked, it doesn't changed at all, why?
|
|
|
Let's say there is new starting coin, there are few normal user's desktop running and mining that coin.
Suddenly big hash power (like 1000 or over 10000 ASIC machine) owner(big whale) comes in to mine that coin.
Here are questions.
1. Then he maybe will monopoly all the blocks after, and he can mine more faster than the time developer's set like 10 seconds? Like super-fast even mine 1 block in just 0.001 second because whale has enormous hash power?
2. If difficulty retarget period is set like 2 hours instead of 2 weeks which Bitcoin adopt, then it means after 2 hour, big whale also suffer rised difficulty maybe? Then, what happen he left at that time? Now difficulty is so rised, but there are none of that big whale, there is just weak few cpus exist, those maybe can't mine at all for 2 hours?
Then again, after 2 hours, difficulty retargeting again to lower to fit their weak cpu power?
If all these are true, why not shorten difficulty retarget time as short as possible? Isn't it more good way?
|
|
|
So I added 2 lines to bitcoin's newest source for validate & create genesis block. at chainparams.cpp, genesis = CreateGenesisBlock(1519619579, 44453, 0x1f00ffff, 1, 500 * COIN); const Consensus::Params& consensusParams = Params().GetConsensus(); while(!CheckProofOfWork(genesis.GetHash(), genesis.nBits, consensusParams)){ ++genesis.nNonce; } but after compile (by 'make', 'make install'), and run (by './xxxcoind'), following errors. lee@newlite:~/Desktop/BitcoinEssence/src$ ./bitcoinessenced bitcoinessenced: chainparams.cpp:524: const CChainParams& Params(): Assertion `globalChainParams' failed. Aborted (core dumped) chainparams.cpp:524 line is, const CChainParams &Params() { assert(globalChainParams); // this is 524 line. return *globalChainParams; } Why and how to solve this? Thanks..
|
|
|
How to actually mine genesis block? At old source, there is [ hashTarget ] and seems loop hash until become below than [ hashTarget ] But at new source, there is no [ hashTarget ] variable. What name it changed? Where is the part actually mine block? By reference it, maybe I can write code mine genesis block? And at new source, validation.cpp 986 line, there are code like, bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams) ..... .... if(!CheckProofOfWork(block.GetPoWHash(), block.nBits, consensusParams)) ...
How this [ CheckProofOfWork ] function can be used? There is no prior variable declaration. There is just [ #include "pow.h" ] Is this enough? I used this [ CheckProofOfWork ] function same to chainparams.cpp , but error says undefined reference to `CheckProofOfWork Why? how to use this function in chainparams.cpp?
|
|
|
How it works?
If many bitcoin developers agree to some source revision,
lets say new bitcoin client registered to official site, bitcoin.org
Then, how it become spread?
Wouldn't it being refused by existing bitcoin clients if new node's client's source is different with them?
|
|
|
So for test purpose, after source revision, how to test it?
after [ make ] and [ make install ],
What would I run to test? ./bitcoind or ./bitcoin-qt ?
|
|
|
So I after I set all values unique, first run ./xxxcoind , nothing happen, it seems stop, so I opened debug.log file, it says
--------- 2018-02-21 11:44:37 ERROR: AcceptBlock: high-hash, proof of work failed (code 16) 2018-02-21 11:44:37 Reindexing finished 2018-02-21 11:44:37 Failed to open mempool file from disk. Continuing anyway. 2018-02-21 11:48:22 Potential stale tip detected, will try using extra outbound peer (last tip update: 180 seconds ago) 2018-02-21 11:51:22 Potential stale tip detected, will try using extra outbound peer (last tip update: 360 seconds ago) -----------
So I searched about Potential stale.... some says -connect=0, so I did, then again past error appears...
----------- 2018-02-21 12:47:18 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8) 2018-02-21 12:47:18 *** Failed to read block 2018-02-21 12:47:18 Error: Error: A fatal internal error occurred, see debug.log for details -----------
Why and how to resolve... hard, long way to go forward.
Thanks.
|
|
|
From bitcoin newest source, how can I set transaction fee as more lower?
Some wallet(ledger nano hardware wallet) even provide now custom transaction fee, how is possible?
|
|
|
python script GenesisH0, GenesisBlockZero, both does not work with newest bitcoin(0.15.1)/litecoin source.
When use those and compile, those just spit out error at assert line in chainparams.cpp script.
Those uses pubkey variable, so it means public key, right?
It just assume that key or provide, can I use it as-is?
Or how can I know my public key?
Should I generate it? How?
|
|
|
What I did so far.
1. download newest source. 2. change simple parameters only. (like block generation time, etc) and change chainparams.cpp 's genesisoutputScript = CScript() << ParseHex("04.....) 's value by download and run [ cat genesiscoinbase.hex ]
3. download Github's GenesisH0 4. Run GenesisH0 with python genesis.py -a scrypt -z "Now is 2018-02-20"
5. It says merkle hash : be766.... I input this to chainparams.cpp's Main & Testnet's assert(genesis.hashMerkleRoot == unit256s("0xbe766............"));
and it says pubkey : 04678a..... where this pubkey should be written at source?
and it says time : 1519.... I input this to chainparams.cpp's Main's genesis = CreateGenesisBlock(1519..... this's first parameter)
and it says nonce : 170938 I input this to genesis = CreateGenesisBlock(1519..... , 179038, this's 2nd parameter)
and genesis hash : 215c........... I input this to assert(consensus.hashGenesisBlock == unit256s("0x215c............"));
6. repeat 4.
7. repeat 5. to chainparams.cpp's Testnet part.
8. add line printf at
consensus.hashGenesisBlock = genesis.GetHash(); printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str()); assert(consensus.hashGenesisBlock == uint256("0x215c......
9. At terminal, 'make', 'make clean', 'sudo make install'
10. run ./bitcoind
And result is genesis.GetHash = 7fa7c349....... bitcoind : chainparams.cpp : 124 : CMainParams::CMainParams(): Assertion 'consensus.hashGenesisBlock == uint256S("0x215c...)' failed. Aborted (core dumped)
What did I wrong? and how to fix?
Thanks a lot...
|
|
|
So for newest source, doc says how to compile,
Cd ~/xxxxcoin/ ./autogen.sh ./configure make make clean sudo make install
So after I revise some source, I should do these line all again from ./autogen.sh? or can I skip ./autogen.sh and ./configure, and just type [make] and [sudo make install]? What commands are essential to recompile?
Thanks.
|
|
|
If some coin (include bitcoin) provide only (presume) desktop wallet, then anybody can use that computer's wallet's coin?
Just run that wallet program.
Because there is no login process at that desktop wallet.
And owner also doesn't know his secret key?
|
|
|
So I am trying customize litecoin(bitcoin) source, after revise code, I typed, 'make', 'make clean', 'sudo make install' at first time.
After that, I revised source many times, but only typed 'make'.
Then it seems not work? Got stuck at generating new genesis block.
So I typed additionally 'make clean', 'sudo make install' after 'make'.
Now suddenly bitcoin folder's size become over 2 giga, almost take all the empty capacity (total 20giga hdd inside virtualbox), system become unstable, even all apps does not appear, can't run terminal itself.
Why this happen? How can I avoid this?
Thanks.
|
|
|
as titles,
What are those each?
And any other runnable name?
|
|
|
|