Bitcoin Forum
May 26, 2024, 12:43:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 [2] 3 »
21  Bitcoin / Development & Technical Discussion / Re: Questions around operation of bitcoin with no blocks and dns disabled.. on: December 14, 2018, 03:57:09 PM
Just two more questions.

1.What exactly is the use of "IsInitialBloackDownlaod()" in mining.cpp. For my chain which is pretty new, If I want to check the block template, the functions returns true and I get
Code:
error -10 : Bitcoin is downloading blocks.
Is it same for

2. What is nMinimumChainWork and how it is calculated initially ?

3. When Bicoin gui starts up, It says I'm 5 weeks behind.I forked bitcoin completely disabled DNS seeds. There's no reason for it. Why I get the message?
22  Bitcoin / Development & Technical Discussion / Re: Questions around operation of bitcoin with no blocks and dns disabled.. on: December 14, 2018, 03:48:30 PM
Thank you so much for the reply.

What client are you using?
I'm using the original Bitcoin Client but forked the source code. 

If you're using the original Bitcoin client (or its fork) to mine, you can manually include transactions into the blocks. Check if the mempool of the mining node lists that specific transaction you're trying to include.
It lists that specific transaction and highlights it with red. But how should I add it ?
23  Bitcoin / Development & Technical Discussion / Re: Questions around operation of bitcoin with no blocks and dns disabled.. on: December 14, 2018, 03:44:53 PM
Did you change the coinbase maturity?

Yes, I reduced it to ten blocks for fast mining.I mines them within a second now.
24  Bitcoin / Development & Technical Discussion / Questions around operation of bitcoin with no blocks and dns disabled.. on: December 14, 2018, 03:04:17 PM
While working on my private chain which is based on bitcoin. Several questions came to my mind. They maybe basic questions but so confusing for me.

1. I created two peers on same machine and I want to add them both to the block chain(The first one is already up). Is it enough to add address of first node to the config file of second node or I need to add both address to the each other's config file ?

2. Should all nodes when created, mine blocks till at least their coinbase maturity?With two nodes on same machine I have to at least generate blocks till their coinbase maturity otherwise I can't spend any amount. It didn't make sense to me. Is it true with bitcoin chain itself ? Cause difficulty there is very high!!!

3. First thing I do when a node starts up is that I generate a new address for it by
Code:
getnewaddress
command in console.Before typing this command there should be some automatically generated address assigned to the node or account. How can I get it?

4. After mining enough blocks, I try to send some bitcoins to the other node,
Code:
sendtoaddress <address> <amount>
but the coins wont't transfer and stays in memory pool for forever. Since I increased the target and reduced difficulty, this shouldn't happen. I guess my coins get lost or something....

Does any one knows the answer?

Thank you so much.
25  Bitcoin / Development & Technical Discussion / Re: Fee estimation failed. Fallbackfee is disabled.... on: December 12, 2018, 05:57:13 PM
So I've checked your code.

You should check the value stored by
Code:
IsInitialBlockDownload()
.
You should check if the function
Code:
IsInitialBlockDownload()
has an influence on other functions, especially ones which are related to your problem : https://github.com/chameleon1239/bitcoin/search?q=IsInitialBlockDownload&unscoped_q=IsInitialBlockDownload .
For instance : https://github.com/chameleon1239/bitcoin/blob/59ecacfc84af13e5a1608e7d970315d07dcb0269/src/validation.cpp#L460

You can use
Code:
LogPrintf("")
to debug and understand what's going wrong.

Yes, I did all that. The value returned when starting up the network is true but after a quick time it latches to false and remains false after that. I have no idea what caused the problem and I can't Log fields such as nMinimumChainWork and chainActive.Tip()->nChainWork purely. I gives me errors. I don't know how to do step by step debugging except gdb which is nightmare for me.

One one question when I run two nodes on same machine should they both be added to each other (dns is set 0 now) or it is ok to set one as server and add  the second node's ip and port to first node using -addnode command ?

Quote
What do you mean ? Transaction could stay in mempool for a very long time, especially on a new network.

I think it depends on hash limit.I increased hash limit bound, so it should mine faster and also add transaction to the blockchain faster.
26  Bitcoin / Development & Technical Discussion / Re: Fee estimation failed. Fallbackfee is disabled.... on: December 12, 2018, 09:18:30 AM
Thanks for all the replies.

All coinbase transactions work fine and I can mine properly.

I enabled -fallbackfee as said but it seems my transaction is lost. Receiver doesn't receive anything. Transaction is still in memory pool but that shouln't take long because th difficulty is changed.

I have a speculation about my genesis block. About a month ago I faced a problem about "InitialBlockDownload()" function returns false but it shouldn't.@achow101 suggesteed that i comment that part that checks "InitialBlockDownload()" value.The discussion can be found here :
https://bitcointalk.org/index.php?topic=5057572.msg47423887#msg47423887

I guess some where in some checkings  InitialBlockDownload() returns false still. I have no idea what should I do Sad
Here's a link to my repository :

https://github.com/chameleon1239/bitcoin


27  Bitcoin / Development & Technical Discussion / Fee estimation failed. Fallbackfee is disabled.... on: December 11, 2018, 06:47:51 AM
Hello
Recently I forked bitcoin and changed difficulty of PoW for some tests.Each node mines coins properly but when I want to send some coins from one to the other using bitcoin-qt, in transaction fee section I choose "recommended" option, and by the time I want to send them I get this error :

"Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee"

Does anyone know what should I do ?

28  Alternate cryptocurrencies / Altcoin Discussion / Re: Facing a problem while trying to change initial difficulty target threashold!!!! on: November 02, 2018, 02:26:43 PM
The problem is solved and is in the three final posts of https://bitcointalk.org/index.php?topic=5057572.msg47431328#msg47431328.
29  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 30, 2018, 05:56:49 PM
Guys!!!! I can't believe the problem is finally solved. @achow101 played the greatest part and I'm very grateful. See the reason in the three final posts in https://bitcointalk.org/index.php?topic=5057572.new#new (which was another speculation of mine) if you are interested. The reason was quite interesting.
30  Bitcoin / Development & Technical Discussion / Re: When bitcoind starts up, In where and which function difficulty is calculated? on: October 30, 2018, 05:55:23 PM
Quote
That error is completely unrelated to the difficulty. The getblocktemplate RPC will refuse to return a valid block template if it thinks it is not fully synced. That will happen if the timestamp of the most recent block is not within two hours of the computer's time.

Thank you so much for the reply. I'm a bit confused a little bit here. The most recent block is my genesis block. If I create a new genesis block and do the compiling and starting up process, same thing will happen. That's why I speculated about difficulty.You say there is no problem with the network and I can create transactions properly?
There are other conditions that can trigger this error, it is not just the timestamp. It may be possible that the fact that there is only the genesis block is what is causing the problem. I think it could be that just having the genesis block even if it is up to date will still cause the node to think it is still in InitialBlockDownload. You can just make the error go away by commenting out or removing these 2 lines in src/rpc/mining.cpp.

Thank you so so much for taking time and finding the solution. I truly appreciate it. I went and saw IsInitialBlockDownload function and read it carefully. The reason is very ambiguous to me.
31  Bitcoin / Development & Technical Discussion / Re: When bitcoind starts up, In where and which function difficulty is calculated? on: October 30, 2018, 06:58:18 AM
Quote
That error is completely unrelated to the difficulty. The getblocktemplate RPC will refuse to return a valid block template if it thinks it is not fully synced. That will happen if the timestamp of the most recent block is not within two hours of the computer's time.

Thank you so much for the reply. I'm a bit confused a little bit here. The most recent block is my genesis block. If I create a new genesis block and do the compiling and starting up process, same thing will happen. That's why I speculated about difficulty.You say there is no problem with the network and I can create transactions properly?
32  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 29, 2018, 05:16:23 AM
I do not understand why do you want to disable the source file. Seems like you aren't getting any answers even on your previous post. I suggest you seek professional help or try on reddit or google.

I'm still trying to find some one professional in person. I don't know if google or reddit have technical discussion part but I will take a look.Thanks.
33  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 29, 2018, 05:10:24 AM
Sometimes it is more helpful to explain what you want to achieve instead of asking about a particular step which you think will help you achieving your goal. I wanted to increase threshold and reduce difficulty but when I started up two nodes and tried to add one node to other.

This is absolutely good enough reason for all to know. If you want more info see may last post in https://bitcointalk.org/index.php?topic=5057572.msg47318146#msg47318146
34  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 29, 2018, 05:08:38 AM
Best advice would be to try a few sources of information to find what you're looking for. Considering the nature of the problem it is important to try several places, determine the best possible solution from the information provided. Hopefully you'll find what you're looking for.

Thank you for the advice. I know "Mastering Bitcoin" is a good source for learning about bitcoin.I also tried to study functions and see where they are referenced in the code. U try to keep the effort go on. I'll let you all know if I find the solution.
35  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 28, 2018, 05:47:35 AM
So far I have never thought about how to disable, even I just heard or read from your post here. I wonder your reason for deactivating.
This confused me.

Do you have any idea what are possible reasons to my problem? If you reached anything, any idea I'd be very happy if you let me know about it.
36  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 28, 2018, 05:40:38 AM
You can change the program if you know the code. Also, the provided site and contacting them should help. So you can try various way, but the default settings are always in your support if you're a novice.

I tried to, but I though it would be simple because they were only two fields in the code. Unfortunately I am a newbie to gdb and don't have any idea how to debug the coin efficiently. I searched google and everywhere but it seems no one even tried it and nobody knows anything about what I'm struggling. I'm bound to a strict deadlineand don't know what to do. Sad
37  Bitcoin / Development & Technical Discussion / Re: When bitcoind starts up, In where and which function difficulty is calculated? on: October 27, 2018, 10:45:18 AM
The difficulty is merely a user facing thing. In reality, it does not calculate the difficulty at all and the difficulty itself is never used anywhere.

The only thing that matters when it comes to the proof of work is that the block hash, when interpreted as a 256 bit little endian integer, is less than or equal to the target value.

So you mean that if I change nBits and consensus.powLimit parameters in chainparams.cpp the whole network should work fine ? but I face a problem when I run two bitcoindd :

Code:
 bitcoind -dns=0 -dnsseed=0 -port=15333 -rpcport=15332 -datadir=/home/.../.bitcoin2 
and
Code:
bitcoind -dns=0 -dnsseed=0 -port=6333 -rpcport=6332 -addnode=127.0.0.1:15332 -debug=rpc

The two servers start up properly but when i type the command "bicoin-cli getblocktemplate" I get

Code:
error code: -10
error message:
Bitcoin is downloading blocks...

The problem is insanely strange to me since when I set those two parameters back to what they have been, The whole thing works fine. Here's my code http:// [url]https://github.com/chameleon1239/bitcoin.git . Would be really thankful if you take a look at it.

38  Alternate cryptocurrencies / Altcoin Discussion / Re: How can I disable bitcoind auto test cases in main network? on: October 27, 2018, 04:46:19 AM
Sometimes it is more helpful to explain what you want to achieve instead of asking about a particular step which you think will help you achieving your goal.

This sounds like a XY problem. May i ask what you exactly want to achieve (especially why you want to 'disable' source files) ?


The real reason I asked this was a strange problem I faced in my last post of https://bitcointalk.org/index.php?topic=5039512.msg46439126#msg46439126.

I only changed nBits field and consenus.powLimit field in chainparams.cpp(created new genesis block according to the change) . I wanted to increase threshold and reduce difficulty but when I started up two nodes and tried to add one node to the other, but when I typed
Code:
bitcoin-cli getblocktemplate
I get:

Code:
error code: -10
error message:
Bitcoin is downloading blocks...

I tried hard for a while where this comes from and had to take any speculation into consideration. I thought maybe in some test cases it failed bc I changed target threshold(tried to change some test cases as well but didn't work). Do you have any suggestion on this ?

Here is the link to my code and changes : https://github.com/chameleon1239/bitcoin.git. I would be so thankful if you could find some time and take a look at it. The two parameters that caused this is only nBits and consenus.powLimit.
39  Alternate cryptocurrencies / Altcoin Discussion / How can I disable bitcoind auto test cases in main network? on: October 26, 2018, 06:13:12 PM
Hello. I recently saw some BOOST_AUTO_TEST_CASE in /src/test folder. I want to disable them specially pow_tests.cpp. Does any one know how it can be done ?
40  Bitcoin / Development & Technical Discussion / When bitcoind starts up, In where and which function difficulty is calculated? on: October 26, 2018, 08:08:16 AM
I am trying to understand bitcoin core deeply though debugging it is really a challenge for me because I'm newbie with gdb and not good with reading memory addresses and machine codes and getting variable values from there.

I wonder when starting up bitcoind where difficulty is calculated and how. I read the formula is pdiff/bdiff (current_difficulty). I f changed bdiff where pdiff is calculated?

There is a function in /src/rpc/blockchain.cpp named GetDifficulty but I think it is only used when rpc callings such as "bitcoin-cli getdifficulty" and "bitcoin-cli getblockheader  <hash of block> ". So what happens in the code if bitcoind is typed? Where will it be calculated?

Here is my own private version of bitcoin https://github.com/chameleon1239/bitcoin. I changed some parameters in chainparams.cpp and GetDifficulty function in  blockchain.cpp. but the whole code is untouched.

The problem I have with my code is -addnode command doesn't work properly.

Guys , the deadline is very close so any suggestions will be appreciated.
Pages: « 1 [2] 3 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!