Why do I get: Error:
has no matching Script

The example code for psbt.addOutput() with address ‘1KRMKfeZcmosxALVYESdPNez1AP1mEtywp’ works as expected. But if I change this to an testnet address I get this error: ‘ has no matching script’. I expect I need to specify testnet somewhere, but do not know where.

    const psbt = new bitcoin.Psbt();
        hash: 'b881ecef041a7396f3c225644507955732ae98d4a736de7b9ac235c69e1eb182',  
        nonWitnessUtxo: Buffer.from(


      //address: '1KRMKfeZcmosxALVYESdPNez1AP1mEtywp', <- works
      address: 'mhm89vYkAjmU3MWUtyCUcsYYUvkgXT1FAw',
      value: 7240446,     //was 7250446


Why is getdescriptorinfo returning an error “Invalid descriptor (code -5)”

I am using Bitcoin Core bitcoin-cli with getdescriptorinfo like so:

curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdescriptorinfo", "params":["sh(multi(2,[3c60330a/1]03061b79f20d49790c15bdaf15ec8db6d75275f62f04a56eaac31f5c2db48736fc,[d54e4481/1]0396bd8d30f0128dcc67e143cf46efd686bf9e4dc8587facc07f81bb248d1b0209,[1e132a06/1]03c77aa842edc8af76b76f5c29a1133b45b78c8c26a170090184e500232abd15a4))#3qpdv9la"] }' -H 'content-type: text/plain;' http://bitcoin:password@

But it returns Invalid descriptor (code -5)

What am I doing wrong?

What is the formula for inferring hash rate from difficulty and block frequency?

Two parts to this question

1/ There have recently been concerns over drops in hash rate observed on sites such as blockchain.com.

However, my understanding is that hash rate is inferred from the difficulty level and the block intervals.

I am trying to work out the exact formula for the inference of hash rate.

I know that the average time we can expect to find a block in is calculated with the following formula:

average time to find a block = (difficulty * 32 ** 2)/ hash rate

Would that mean that hash rate is inferred with the following formula?

hash rate = (difficulty * 32 ** 2)/ time interval between the last two blocks

2/ I mainly want the first part answered but if you are feeling rosy today, an answer to this second part would be amazing.

Block times are Poisson distributed. I understand that this allows us to calculate the probability that block times increase to such an extent over the course of a day that it infers a 40% reduction in hash rate.

Does anyone know the exact calculation which would let us calculate this probability?

Here’s some rough ideas I have about the calculation:

The following formula allows us to calculate the probability that k events take place in time period t.

P(k in t) = (e ** -lam)*(lam**k / k!)
where lam = (average events which can be expected to be observed per unit of time * t)

The average events which can be expected to be observed in the case of block intervals is 1 block per ten minutes so 1/10

Let’s say we have hash rate dropping 50% over the course of one day, would that imply that we are observing 288 blocks over the course of 1440 minutes?

If I am thinking about this in the correct way, this would mean the calculation is as follows:

P(288 blocks in 1440 minutes) = (e ** -(144)*((144**288)/288!)

Not sure if this calculation is correct. But to take it further, this would calculate the small probability of exactly 288 blocks being found in 1440 minutes. But if it were possible to calculate the Poisson distribution of block intervals, we may be able to find the probability of finding greater than or equal to 288 blocks in 1440 minutes.

As you can probably tell, my understanding of the second part of the question is limited so if you have an answer to even just the fist part, that would be amazing!

Bus error (core dumped)

Running a new install of Ubuntu 18.04.3 LTS and downloading blocks in bitcoin-qt up to over 70% when pgm quits with “Bus error (core dumped)”.

Anyone else gets this or how to fix it? (-rescan didn’t help)


Why can’t a user import keys to the keypool for a blank wallet?

I am creating a blank wallet with the intention of adding keys to the keypool but get an error keys can only be imported to the keypool when private keys are disabled

Why? It would be beneficial for users to be able to import their own private keys and get full functionality of the wallet with those keys. Is there any PR for this?

How can I move BTC wallet and funds from Block.io?

Unfortunately I can’t access dashboard on block.io for some unknown reason. I get the following message from block.io

We’re sorry, but something went wrong. If you are the application owner check the logs for more information.

I have private keys from block.io. I want to transfer the funds in block.io to another address.

Was libbitcoin a part of bitcoin core in the past?

I am trying to use c++ code from the book of Antonopoulos for some time now and I seem to lack an include named bitcoin/bitcoin.hpp.

To compile the code the g++ compiler gets a pkg-config input with libbitcoin. So I suspect I would have to install this library.

Since the book does not mention to install anything else then bitcoin core I really wonder if parts of libbitcoin have originally been part of bitcoin core and have been excluded at some point.

The other explanation would be that the author forgot to mention it. But it seems a bit overload that I have to install another complete system for a full node (libbitcoin) to be able to run the code since the book explicitly says that running a full node with bitcoin core should suffice.

It is just a minor thing and probably laughable for an expert in the field but I am also learning how to use pkg-config and the compiler by doing this.

There have been suggestions to just install parts of libbitcoin but the developers said it is advisable to install the full thing with the automatic install skript.

Also, there is libbitcoin-dev, which is a package in debian (I run Raspbian Buster), but I was not able to compile the code with it.

How is it possible price on Coinbase drops below my Limit Order when it is only partially filled?

I had a post only limit order place for €172 per ETH, about 50% of the order filled before the price dropped to €171.95, leaving my limit order somehow still open? The order was placed when the price was above €172 so didn’t execute as a market order at any point.

This has happened several times on Coinbase Pro, surely the point of a limit order is to the keep the order on the book, so why is the price skipping my order?