Bitcoin Forum
May 04, 2024, 12:49:01 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 »
121  Bitcoin / Development & Technical Discussion / Where is qr-code making part? on: March 04, 2018, 04:11:52 AM
So when receive bitcoin, wallet program also shows QR code with address.

How it is possible? How can adopt that system to new coin?
122  Bitcoin / Development & Technical Discussion / How bitcoin get info of connection to peers? on: March 03, 2018, 06:21:24 AM
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?


123  Alternate cryptocurrencies / Altcoin Discussion / What file that code actually 'work' for mine? on: March 02, 2018, 04:00:48 PM
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?
124  Bitcoin / Development & Technical Discussion / Error "Potential stale tip detected, will try using extra outbound peer" on: March 01, 2018, 09:43:11 AM
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,

Code:
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..
125  Bitcoin / Bitcoin Technical Support / What is normal running state of ./bitcoind ? on: February 28, 2018, 01:47:10 PM
I know if run ./bitcoin-qt, wallet GUI program started.

Then if everything is normal and fine, what will happen when run ./bitcoind?




126  Alternate cryptocurrencies / Altcoin Discussion / Why it does not change script address prefix? on: February 28, 2018, 01:14:34 PM
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?
127  Alternate cryptocurrencies / Altcoin Discussion / What happen if big whale hash owner left the ecosystem? on: February 27, 2018, 10:59:54 PM
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?

128  Bitcoin / Bitcoin Technical Support / Source revision, Assertion `globalChainParams' failed on: February 27, 2018, 01:03:31 PM
So I added 2 lines to bitcoin's newest source for validate & create genesis block.

at chainparams.cpp,

Code:
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,


Code:
const CChainParams &Params() {
    assert(globalChainParams);  // this is 524 line.
    return *globalChainParams;
}


Why and how to solve this? Thanks..
129  Other / Off-topic / Github homepage error? on: February 27, 2018, 02:46:53 AM
Am I the only one now to experience see this github page?

Why and how to fix?


http://gofile.me/3pale/oB7DjdxDU
 
130  Bitcoin / Development & Technical Discussion / How to actually mine genesis block? on: February 24, 2018, 01:05:01 PM
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,

Code:
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?



131  Bitcoin / Development & Technical Discussion / How bitcoin source revision spread to public? on: February 23, 2018, 06:58:23 AM
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?

132  Bitcoin / Development & Technical Discussion / After revise to source, what to run? bitcoin-qt? on: February 22, 2018, 12:16:03 PM
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 ?
133  Alternate cryptocurrencies / Altcoin Discussion / ReadBlockFromDisk: Errors in block header at CBlockDiskPos on: February 21, 2018, 01:17:03 PM
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.
134  Bitcoin / Development & Technical Discussion / How can I lower transaction fee? on: February 21, 2018, 08:34:50 AM
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?

135  Bitcoin / Development & Technical Discussion / What is pubkey? on: February 21, 2018, 08:00:07 AM
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?
136  Alternate cryptocurrencies / Altcoin Discussion / Genesis Block generation failed... on: February 20, 2018, 01:21:48 PM
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...



137  Bitcoin / Development & Technical Discussion / Source compile method on: February 20, 2018, 06:34:17 AM
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.
138  Other / Beginners & Help / Desktop wallet has no security at all? on: February 18, 2018, 10:05:50 PM
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?

139  Bitcoin / Development & Technical Discussion / Bitcoin source 'make install' take over 2 giga capacity? on: February 17, 2018, 10:30:27 PM
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.
140  Bitcoin / Development & Technical Discussion / What is bitcoind, bitcoin-qt, bitcoin-cli? on: February 17, 2018, 09:54:26 AM
as titles,

What are those each?

And any other runnable name?
Pages: « 1 2 3 4 5 6 [7] 8 9 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!