6 votes
Accepted

Why does Bitcoin Core support a transaction index but not an address index?

The transaction index exists because it is leftover from how Bitcoin Core used to work for validating new blocks and transactions. Prior to 0.8.0, Bitcoin Core maintained the transaction index, and ...
user avatar
  • 62.5k
5 votes
Accepted

Bitcoin-cli responding but not curl

Found it out, you just need to give it a username and password. You can add them to a bitcoin.conf file in your datadir. This file isn't automatically created. The default datadir is at ~/.bitcoin, so ...
user avatar
3 votes

Is the 'Remote' In 'Remote Procedural Call' something of a misnomer?

Bitcoin-qt does not interact with bitcoind at all. Bitcoin-qt is a full node by itself, entirely stand-alone. There is a tool shipped with Bitcoin Core called bitcoin-cli which allows RPC commands to ...
user avatar
  • 11.4k
3 votes

RPC getblockstats call using genesis block

This occurs because the genesis block is a special block. It is not written to disk like all other blocks are. It cannot be undone so there is no undo data for it. getblockstats uses the undo data (...
user avatar
  • 62.5k
3 votes
Accepted

Correct way to implement bitcoin:<address> URI handling in Gnome desktop

The simple answer is that when the parameter '%U' is missing from the 'Exec' line in a gnome/Ubuntu desktop file, the OS creates a new instance whenever the application is called (in this case by the ...
user avatar
  • 161
3 votes
Accepted

Validate raw transaction hex without broadcasting

The RPC you're looking for is testmempoolaccept. It checks whether a raw transaction would be accepted into the local mempool, without actually doing so. Only transactions that satisfy all consensus ...
user avatar
3 votes
Accepted

Can I use the Bitcoin Core CLI to learn the block height at which a transaction was mined?

For a transaction that's not considered "yours" by the Bitcoin Core wallet, the only way to learn anything about it is through the optional transaction index. If you have the transaction ...
user avatar
3 votes
Accepted

How do I maintain a continuously updated copy of a local mempool?

There are two methods to do this: ZMQ and Tracepoints. The zmqpubsequence can be used to notifications for all mempool events. See the PR and test for more information. It was designed specifically ...
user avatar
  • 62.5k
2 votes

I am getting an RPC error when trying to run any Bitcoin-cli commands on Ubuntu

Since you are probably starting the daemon with a non-standard data directory, you'll need to specify the datadir every time you use the bitcoin-cli command, like this: bitcoin-cli -datadir=/mnt/...
user avatar
2 votes
Accepted

Bitcoin RPC not reachable: Cant bind RPC server to IPV6

At least for IPv4, you can't specify 0.0.0.0 for rpcbind. You'll get this error in bitcoind logs if you try: Binding RPC on address 0.0.0.0 port 18443 failed. Try 127.0.0.1 for IPv4, or ::1/128 for ...
user avatar
  • 136
2 votes

How to generate a public key in wallet rpc commands

I expect the pair getnewaddress ( "label" "address_type" ) getaddressinfo "address" will generate a new pubkey and tell you what it is The same commands are ...
user avatar
2 votes
Accepted

What is the correct syntax when specifying the utxos to be used in c-lightning's `withdraw`?

I'm sorry if this can be a little bit confusing, but the correct syntax is the following one: clightning -k withdraw destination=** satoshi=** feerate=normal utxos='[{"********":"0"...
user avatar
2 votes
Accepted

Get Address from pubkey scriptPubKey

Not all scriptPubKeys correspond to an address. The address field is provided for those that do, and is omitted for those that don't. Your example contains a P2PK scriptPubKey which does not have a ...
user avatar
  • 62.5k
2 votes

Bitcoin-cli responding but not curl

Keep in mind that the configuration file is not automatically created; you can create it using your favorite text editor. By default, the configuration file name is bitcoin.conf and it is located in ...
user avatar
  • 121
2 votes
Accepted

Consider only deposits in a bitcoind’s RPC call listsinceblock transaction returned JSON

Unless you're mining (yourself, not via a pool), you will never see categories "generate", "immature", or "orphan". "send" is only for transactions you create ...
user avatar
2 votes
Accepted

Using bitcoind json-rpc with multiple wallets

Does it mean that it is possible to run multiple wallets in parallel with single blockchain? Yes. If so how do I send coins from particular wallet then? Eventually how do I list transactions from ...
user avatar
2 votes

On signet of bitcoin core, why didn't the average time between blocks I mined accord with the time I set?

I spent some time figuring out what's going on in the miner script, and here's what I think I have understood so far: on a signet network difficulty adjustement is similar to what it is on mainnet, ...
user avatar
  • 519
2 votes
Accepted

TX decode failed Separator is missing at the end of an output map: iostream error

It means that the PSBT is malformed and missing the separator required at the end of each section within the PSBT. This error usually comes up when the last output map is missing the separator. A ...
user avatar
  • 62.5k
1 vote
Accepted

Can a receive transaction be 0 in a bitcoind’s rpc call listsinceblock transaction returned json?

I think creating zero value UTXOs would be an attack, attempting to clog Bitoin nodes. See What is meant by Bitcoin dust? Questions about dust
user avatar
1 vote
Accepted

What does getnewaddress return

It returns an address you can use, not merely some useless random number. It generates a new pair of public and private keys, stores those keys in your wallet and generates the address from the public ...
user avatar
1 vote
Accepted

Generating bitcoin core -rpcauth argument using golang

The issue is that your salt is a byte array, which you are passing directly as the hmac key, and then printing out the hex. This would require bitcoind to interpret the salt hex as a hex string and ...
user avatar
  • 62.5k
1 vote

Is it possible to set multiple JSON-RPC users?

I figured it out! I used share/rpcauth.py script in bitcoin core to generate two users and passed the output multiple times using -rpcauth argument. wget https://raw.githubusercontent.com/bitcoin/...
user avatar
  • 863
1 vote
Accepted

How to run Bitcoin-Qt over RPC to another machine

As @Andrew Chow said: Bitcoin-qt is not just a frontend GUI or wallet handling software. It is bitcoind with a GUI. There is a WIP project for separating things and make this possible, but it's ...
user avatar
1 vote
Accepted

Weird Bitcoin RPC listreceivedbyaddress behaviour

listreceivedbyaddress (and the other transaction listing RPCs) list logical transactions, not physical transactions. So it really lists transaction outputs. Additionally, they share a lot of code. ...
user avatar
  • 62.5k
1 vote

MerkleRoot requires transaction hash to build a merkle tree.... Is that the "hash" key/value within the getblocktemplate response or the "data"?

The transaction Merkle tree, whose root is stored in the block header, is computed over the individual transactions' txid value (which are the double-SHA256 of their data after stripping the witness). ...
user avatar
1 vote

Not able to verify tor setup for RPC

I still don't know why the error occurred however I found a workaround. I added the lines HiddenServiceDir /var/lib/tor/standup/ HiddenServiceVersion 3 HiddenServicePort 1309 127.0.0.1:18332 ...
user avatar
  • 303
1 vote
Accepted

What exactly is the data required when creating a coinbase transaction? How do I insert the blocks height into the coinbase transaction?

The requirement of encoding the block height in the coinbase transaction is specified in BIP34. You may want to read the actual documentation there. Specifically, it requires the scriptSig of the ...
user avatar
1 vote
Accepted

RPC interface MITM protection

The JSON-RPC interface is intended for local access. By default it will only accept connections from localhost, but it can be configured to be accessed for a wider netmask; e.g. a trusted LAN network. ...
user avatar
1 vote
Accepted

Flag -deprecatedrpc=addressess - Bitcoin core

Generally, deprecated RPCs are available for one major release. That would mean this specific one will not be present in Bitcoin Core 23.0 anymore, but will be in any 22.x releases.
user avatar
1 vote

Just to be sure, the downloads at bitcoincore.org are the safer ones?

the downloads at bitcoincore.org are the safer ones? https://bitcoincore.org is the website where developers of bitcoin-core place ready to use executables you can download. I wouldn't characterise ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible