online resources

Possible To –enable-wallet After Syncronization With Blockahin?

I am running bitcoind from the command line (--without-gui) and my system apparently does not have the correct Berkley DB version (4.8+). Therefore, I chose to run the program without the wallet enabled (--disable-wallet) so that Berkley DB would not be required. What I am now wondering however, is if I sync the entire blockchain (300GB+) and at some point want to --enable-wallet, will I be able to do so without any incompatibility issues? Furthermore, how can I update to the correct version of Berkley DB (4.8+) so that I can --enable-wallet. I already ran the script $home/bitcoin/contrib/install_db4.sh which did…

Continue Reading Possible To –enable-wallet After Syncronization With Blockahin?

How to get info for public address from bitcoin-cli + local db? (Can it be done without creating a wallet?)

I just started running my own full node. IBD is finished, and I'm now learning how to use bitcoin-cli. First I would like to extract all the available information for one or more public addresses from the downloaded blockchain. For the most part 1, I have not been able to find a way to do this that does not require creating a wallet. For example, if I run % bitcoin-cli getaddressinfo 1XPTgDRhN8RFnzniWCddobD9iKZatrvH4 ...I get an error message that says error code: -18 error message: No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet.…

Continue Reading How to get info for public address from bitcoin-cli + local db? (Can it be done without creating a wallet?)

Setting up lightning with bitcoin-core

I have some questions about bitcoin-core and lightning-network-daemon. I have succesfully set up a bitcoin node running on Ubuntu Server 20.04 by following this tutorial: https://bitcoin.org/en/full-node. This is my node: https://bitnodes.io/nodes/81.166.125.218-8333/ I am planning on installing lnd using bitcoind as the backend, by following this tutorial: https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md In this regard, I have the following questions: What is the relationship between my bitcoin-core wallet and the lnd wallet? What fee should I set to make my lnd node as profitable as possible? What other recommendations can you give to help out a bitcoin- and lnd-noob like me? Thanks in advance for…

Continue Reading Setting up lightning with bitcoin-core

Problem making multisig PSBT on walletcreatefundedpsbt

I'm fighting with PSBT to do a 2: 2 multisig with bitcoin-cli on testnet. Those are the steps I follow: Create a multisig with bitcoin-cli createmultisig 2 "["pubkey1", "pubkey2"]" Create the psbt with createpsbt: bitcoin-cli createpsbt '[{"txid": "578b667a5b2498bce06cf4b31e027a5a045af321f2465d3a7d8f302ac61759e6", "vout": 1 }, { "txid": "237bda433527d32ddce8da640e96efcbf3fddc1fbde8add362abe197cc3c151f", "vout": 0 }]' '{"data": "49879816ffbca992d07559d56c0cb8cbc14aa7eb896bc79f532d272595b5906f", "tb1q369frc2yk5vfly8ya57ed2qr7p3jef6fzaqyz6": 0.00009500 }' On one signer, call to walletprocesspsbt: bitcoin-cli walletprocesspsbt $psbt If I call here to analyzepsbt $psbt, this is what I get: { "inputs": [ { "has_utxo": true, "is_final": false, "next": "updater", "missing": { "redeemscript": "e6b13137de705c19718f1aaf6f80709a9e6c1a7c" } }, { "has_utxo": true, "is_final": false, "next": "updater", "missing": { "redeemscript": "e6b13137de705c19718f1aaf6f80709a9e6c1a7c"…

Continue Reading Problem making multisig PSBT on walletcreatefundedpsbt

Change difficulty using bitcoin-cli/bitcoind in regtest mode

Is there an RPC command which would allow me to generate blocks under a given difficulty? For instance, I would like to do something like this: bitcoind -daemon -regtest bitcoin-cli -regtest setdifficulty 100 bitcoin-cli -regtest generatetoaddress 101 bcrt1qlckxrvk56kezy35xuw3tk5w5gkvnmjl0cahw3u bitcoin-cli -regtest setdifficulty 1 bitcoin-cli -regtest generatetoaddress 101 bcrt1qlckxrvk56kezy35xuw3tk5w5gkvnmjl0cahw3u I am aware that it would result in an invalid blockchain, since it would not match the expected target recalculation of the Bitcoin protocol. This "detail" aside, is there any way to use bitcoind/bitcoin-cli to perform something like this?

Continue Reading Change difficulty using bitcoin-cli/bitcoind in regtest mode

Stopping bitcoind on mac

One of my kids while learning more about bitcoin started bitcoind on my mac. Now I am unable to stop it. In my activity monitor, it shows a process named "bitcoind". I have stopped that process from the activity monitor various times but that doesn't help. It starts again after some time or in the next boot session. It has been taking a lot of my laptop space (>100gb). I am running low on space and I need to stop it now. This has been happening regularly. As a temporary solution, I used to go to /Users/[name]/Library/Application Support/ and delete…

Continue Reading Stopping bitcoind on mac

Importaddress and conf

I'm wondering if its possible to add imported addresses into the bitcoin conf file. So, rather than calling the cli with importaddress, I would add the address to the conf file, with say, importaddress=1123345678A Is this supported in the conf file?

Continue Reading Importaddress and conf

How to extract all the bitcoin addresses with bitcoin-cli?

I am trying to get all existing addresses on the bitcoin blockchain with bitcoin-cli. It seems that I can get addresses from vout that are of type "pubkeyhash". If the type of vout is "pubkey" there are no addresses. pubkeyhash type: "vout": [ { "value": 0.00000001, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 b04e3fb6f6c96ba23233c809e42d8e6a0e0e31ca OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914b04e3fb6f6c96ba23233c809e42d8e6a0e0e31ca88ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "1H5DfbDtCnKUdke9xH9svwwxqga41Z5xbz" ] } } pubkey type: "vout": [ { "value": 50.63517500, "n": 0, "scriptPubKey": { "asm": "04b0bd634234abbb1ba1e986e884185c61cf43e001f9137f23c2c409273eb16e6537a576782eba668a7ef8bd3b3cfb1edb7117ab65129b8a2e681f3c1e0908ef7b OP_CHECKSIG", "hex": "4104b0bd634234abbb1ba1e986e884185c61cf43e001f9137f23c2c409273eb16e6537a576782eba668a7ef8bd3b3cfb1edb7117ab65129b8a2e681f3c1e0908ef7bac", "type": "pubkey" } } Is there an easy way to get ALL the addresses on the…

Continue Reading How to extract all the bitcoin addresses with bitcoin-cli?

Bitcoin Core private key import

I would like to import the private keys from a multisig paper wallet to Bitcoin Core. My aim is to convert the paper wallet to an electronic wallet and to be able to export the corresponding wallet.dat. What's the recommended way of doing this via the command line?

Continue Reading Bitcoin Core private key import

Distrubuted multi sig spend – transaction signed from different locations?

I'm trying to learn more about doing multi sig transactions. The examples I've seen show the signing of the transaction with 2 of 3, or 3 of 3, where the signatures are added, essentially, at the same time, and same place. I'm wondering how does one, using rpc or cli, perform a multi sig spend from physically separate machines? How does a signee know that there is a transaction that he/she needs to sign? Can a 2-of-3 transaction, that initially only contains 1 sig be broadcast then updated by 2nd or 3rd signatory?

Continue Reading Distrubuted multi sig spend – transaction signed from different locations?

How to raise the bad-txns-vout-negative error?

I wanted to replicate the bad-txns-vout-negative error scenario. I tried the following but getting 'Amount out of range' only: Here is the command i tried: bitcoin-cli -named createrawtransaction inputs="[{"txid":"af7cc9204d0ab7d52f66a5dacb79b77c34c90013e3288a391557ee8e07c3c307","vout":"0"}]" outputs="{"data": "6e636861696e20626974636f696e207361746f73686920766973696f6e","myTmAe67rCuJU5X1fqKiEYohb53TEQrxP3": 6.249996,"mt8QSx6m6Fwqt8zMVcji16UiVYS8xYRwFi": -0.001000}" error code: -3 error message: Amount out of range

Continue Reading How to raise the bad-txns-vout-negative error?

signmessage and verifymessage CLI commands not accepting Address from getnewaddress?

I am trying the following commands on my v0.19.0.1 Core implementation: CLI signmessage $(CLI getnewaddress) <message> and the identical CLI signmessagewithprivkey $(bitcoin-cli dumpprivkey $(CLI getnewaddress)) <message> Both times I get Error code: -3 "Address does not refer to key" All my addresses are wrapped-Segwit (3...). Does this mean since its P2SH there is no way to find the privkey from the address? Thank you

Continue Reading signmessage and verifymessage CLI commands not accepting Address from getnewaddress?

What can I expirement with BitcoinCore on my own?

I have a simple faculty assignment where I have to do some experiments with transactions or experiment with the Bitcoin protocol or maybe with wallet code. Work on that assignment shouldn't last more than one day, however I cannot imagine anything I can actually do on my own. Every change in code seems too complex for me or pointless. All my changes will be tested on testnet or regtest and never published of course. Can someone help me with this with some sort of direction, link to some other experiments or maybe with a simple idea or pseudo code example?…

Continue Reading What can I expirement with BitcoinCore on my own?

Unable to decode raw bitcoin transaction data using bitcoind-rpc

I have been following these tutorials in order to stream detailed transaction information that pass through my bitcoin node. This is done through the zeromq interface https://bitcoindev.network/accessing-bitcoins-zeromq-interface/ https://degreesofzero.com/article/streaming-transactions-from-bitcoind-via-zeromq.html I am able to get the raw data but I am having difficulty decoding the information be as detailed as in the first link. I have used the following code to achieve this: //Setup Zero MQ var zmq = require('zeromq') , sock = zmq.socket('sub') , RpcClient = require('bitcoind-rpc') , bitcoin = require('bitcoinjs-lib'); //Setup RPC var config = { protocol: 'http', user: 'test', pass: 'test', host: '127.0.0.1', port: '18443', }; //Create RPC object…

Continue Reading Unable to decode raw bitcoin transaction data using bitcoind-rpc

How to know the destination address of a multisig?

Run this command: bitcoin-cli getrawtransaction 56214420a7c4dcc4832944298d169a75e93acf9721f00656b2ee0e4d194f9970 2 You will see the first vout is a multisig as follow: { "value": 0.04030000, "n": 0, "scriptPubKey": { "asm": "2 02c08786d63f78bd0a6777ffe9c978cf5899756cfc32bfad09a89e211aeb926242 033e81519ecf373ea3a5c7e1c051b71a898fb3438c9550e274d980f147eb4d069d 036d568125a969dc78b963b494fa7ed5f20ee9c2f2fc2c57f86c5df63089f2ed3a 3 OP_CHECKMULTISIG", "hex": "522102c08786d63f78bd0a6777ffe9c978cf5899756cfc32bfad09a89e211aeb92624221033e81519ecf373ea3a5c7e1c051b71a898fb3438c9550e274d980f147eb4d069d21036d568125a969dc78b963b494fa7ed5f20ee9c2f2fc2c57f86c5df63089f2ed3a53ae", "reqSigs": 2, "type": "multisig", "addresses": [ "1PfTD843HiN2PPpxFnMwyxN7se6MEf2ech", "1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW", "1Ng4YU2e2H3E86syX2qrsmD9opBHZ42vCF" ] } }, And from bitinfochart, we can see the destination address is not 1PfTD843HiN2PPpxFnMwyxN7se6MEf2ech 1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW 1Ng4YU2e2H3E86syX2qrsmD9opBHZ42vCF but 3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4 Can someone tell me how to get the destination address, 3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4?

Continue Reading How to know the destination address of a multisig?

Getting “Invalid or non-wallet transaction id” error on transactions definitely from wallet

Very recently (within the past hour), I've been unable to get transactions for wallet addresses. It also returns 0 received when running getreceivedbyaddress and entering an address that I've definitely paid to. What can I do to track down the source of this problem? EDIT: I've noticed that getblockcount shows 639523, while https://blockchain.info/q/getblockcount shows 639529. It's been like that on my end for a while, and I'm not sure how to force it to sync.

Continue Reading Getting “Invalid or non-wallet transaction id” error on transactions definitely from wallet

bitcoin-cli how to verify balance

I've read that addresses alone are a "confusing" way to think about "where" bitcoins "are". Nonetheless I was formerly (2018) able to correlate what I got from bitcoin-cli commands with what I saw on blockchain explorers like https://www.blockchain.com/btc/address/ e.g. back in 2018 getaccountaddress would list 1 address, getaddressesbyaccount would list that plus a 2nd address, getaddressesbylabel would list those same two addresses, getwalletinfo would show a 0.0003 balance, and listaddressgroupings would also show that balance. Now in 2020, that online explorer still shows that 0.0003 BTC balance, as it did in 2018, but due to deprecated cli commands, how can…

Continue Reading bitcoin-cli how to verify balance

Manage multiple users wallets for web wallet service

This already summaries the issue I'm currently trying to figure out to calculate the transaction fee to prevent negative balance. (testnet) I tried using createrawtransaction answered. When I tried to send all balance to an address, the txid was created successfully using createrawtransaction but when I ran the fundrawtranaction on that txid it showed error code: -4 error message: Insufficient funds The goal is to calculate transaction fee before hand to check either sufficient balance is available of an account using sendfrom To manage multiple users to isolate users' balances as this. EDIT1: If using estimatesmartfee it is showing the…

Continue Reading Manage multiple users wallets for web wallet service

End of content

No more pages to load