Bitcoin Core Advanced Discussion

It worked. Thank you!

2 Likes

I see! Great. Now I understand. :slight_smile:

Thanks so much, once again. Your continued help and input is highly valued with the videos being so out of date.

Hi @Alko89

I had the same error and I was able to fix it with your suggestion:

However; it seems to me that this is a work-around instead of understanding why some us get this “fallbackfee” error.

“Fee estimation failed. wait a few blocks or enable fallback fee”

As a note: I tried playing with -fallbackfee=“X”. For instance =“0” nothing really happens, still get the error.
=“0.25” ./bitcoind warns about the fee amount and computes a random fee. I suppose bitcoind has a wired limit on how much satoshi per byte? See the printout:

2020-10-14T01:25:25Z Warning: -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.
Warning: -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.

This is just a curiosity, I suppose it doesn’t really stop me from “developing” something.

Questions:

When you execute dumpwallet, the dumped file seems to have a finite list of addresses with their corresponding private keys.

Does this means that there is a limit on the number of addresses per wallet?

Also, when you “getnewaddress” you are essentially calling one of these “reserve” wallets?

The issue occurs because its an empty network and the node can’t make any prediction on the fee to set. Historically the fallback fee was set by default, but was removed in this PR:


So you can either set the fallback fee back on on regtest or set a fee for each tx manually.

Theoretically the limit is when you fill all the possible combinations of private keys, in practice its limited to the filesize your filesystem can handle or the size of your hd, whichever comes first.
There might also be an upper limit to number of addresses in a wallet, but I’m not aware of it. If there is its probably so large it doesn’t matter in practice.

Bitcoin CLI generates private keys in batches of 100 or so, its not a HD wallet, so each time you call the command you either get the next one in line or it will generate a new batch. This is the reason why you have to periodically backup wallet.dat because newer addresses might not be backed up in the old file. :slight_smile:

2 Likes

@Alko89 or @thecil , Im trying to send the coins to a different addess, I already have 3 UTXO´s in my wallet, but when I try to send to another address, I get the follwoing output from the powershell (I couldnt run bitcoind nor bitcoin-cli in ubuntu … but that´s another issue):

I also tried to run bitcoind with fallbackfee modifier, but I get the following problem:

can you please help me out on this? It´s being hard to follow the course as this … I will study other courses on the meanwhile

Hey :slight_smile: you must specify the fallback fee in bitcoind, in powershell you must also put the fee in single quotations:

.\bitcoind.exe -regtest -fallbackfee='0.00001'

Once you have the bitcoind running you should be able to call sendtoaddress without specifying the fee.

1 Like

Hi,

I am trying to find a RPC call (Bitcoin-cli) that tells you the “balance” or UTXOs of an arbitrary address (not in my wallets). However, I cannot find one.

There is certainly a way, since blockchain explorers can do it. However, the only way I can come up is checking all outputs of all blocks; probably not efficient.

Please advise.

Have you tried using getreceivedbyaddress? :slight_smile: You can help yourself with using the help from cli, it will list all available commands in bitcoin-cli:

bitcoin-cli help

# or to get help on specific command
bitcoin-cli help <command>
1 Like

The help rpc call “help” is useful thanks for that!

However, the getreceivedbyaddress only works if that address is part of your wallet. Otherwise it throws:

error code: -4
error message:
Address not found in wallet

I found that scantxoutset does what I want but I have not been able to figure out how to input the JSON array.

Yes you can’t query any address with it, not sure how to query other addresses, I think you first must have an indexed blockchain or the queries will take a very long time.
I think an easier way would be to setup an electrum server and query that one for other addresses. I’m running my explorer in a similar way.
https://github.com/janoside/btc-rpc-explorer

1 Like

why do not teach in the course how to mine seriously the course would be more valuable if students learned how to mine in reality

By mine seriously what do you mean? teach you the entire math that is behind the mining process?

Carlos Z.

2 Likes

how is the connection made between a website and a node? how is it possible to transition the information from the node to the web page?

no, it was just instead of doing a test example in the video doing it was a demonstration of reality

Because this Blockchain 101 and not Mining 101 we might consider adding mining course in the future but atm it is not in out backlog. Though setting up a miner is quite easy and most pools have instructions for each miner they support.

Check the instructions for a specific pool. For example: https://web.xmrpool.eu/xmr-monero-easy-mining-guide.html

The webpage is just a frontend that displays your stats and nothing is sent on the webpage. Behind the webpage there is a full node, a stratum node that manages the pool and a database to handle balances and payouts. :slight_smile:

3 Likes

Hey can somebody help me with the ‘sendtoaddress’ command? I’m pretty sure I have the correct syntax but it’s coming up with the following error message:

Error code: -4
Error message:
Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.

Did you enabled fallback fee? Never versions of bitcoin don’t set it by default, you should start bitcoind with that option:

.\bitcoind.exe -regtest -fallbackfee='0.00001'
1 Like

Yes thanks that worked :blush: