bitcoin core – Open a wallet with bitcoind

I am using bitcoind after previously running bitcoin-qt. I created a wallet with bitcoin-qt (and encrypted it) and would like to open it now with bitcoind. The folder that contains the wallet.dat file is in the data directory, but when I do one of the following:

bitcoin-cli listwallets
bitcoin-cli getwalletinfo

it doesn't show my wallet. I have tried:

bitcoind -wallet="directory with wallet.data file"

and still no luck, he just tried to launch bitcoind and said that it is already running (I don't know why, I'm running bitcoind -daemon).

Any idea how to import this wallet?

Bitcoin core – how to use bitcoind "walletnotify" for single transactions only

using bitcoind "walletnotify", my curl command gets 3 hits generating 3 unique transaction hashes but the requirement is to execute only once for single transactions.

I heard about walletnotifynew: – "https://www.multichain.com/qa/9566/how-can-i-use-walletnotify-command-to-get-notification"
but it does not work.

My bitcon.config file

rpcuser=root
rpcpassword=root
testnet=1
test.rpcport=8332
rpcallowip=127.0.0.1
server=1
rpcbind=127.0.0.1
walletnotifynew=/home/scripts/transaction.sh %s
#walletnotify=curl -d "txid=$1" http://127.0.0.1:8888/api/v1/listen-transaction %s  

The database entry I was transferring with the same wallet was always three inbound, but there should only be one outbound entry

select * from transaction;
+-------+--------------+------------+-------------------------------------+-------------------------------------+---------+------------------------------------------------------------------+----------+--------+
| tx_id | amount       | made_on    | sent_from_address                   | sent_to_address                     | success | transaction_hash                                                 | tx_type  | userid |
+-------+--------------+------------+-------------------------------------+-------------------------------------+---------+------------------------------------------------------------------+----------+--------+
|    53 | 0.0000000000 | 2020-02-17 | NULL                                | 2NFgnEMcE4kvvCLXK6uiEgb3dZuVLGUK75v |       1 | 11acce71f3d10330e10d70f5ee974abe5d216ec188309b61d1f751a1615d439d | INCOMING |   NULL |
|    52 | 0.0000000000 | 2020-02-17 | NULL                                | 2NFgnEMcE4kvvCLXK6uiEgb3dZuVLGUK75v |       1 | bc3267ffcc44b8d526cbb1de19f653bc90aedda4dc4fc2fc9ab18a954e7347c1 | INCOMING |   NULL |
|    50 | 0.0001000000 | 2020-02-17 | 2N6MqukeqDftwXsVDBSBkDrnbvzaXoNwNhi | 2NFgnEMcE4kvvCLXK6uiEgb3dZuVLGUK75v |       1 | 9bb2ab339930a68f33ce3521bee46363cbd29a87c68b718c4ae415a3ba53b7b8 | OUTGOING |      1 |
|    51 | 0.0000000000 | 2020-02-17 | NULL                                | 2NFgnEMcE4kvvCLXK6uiEgb3dZuVLGUK75v |       1 | 2e0976cd310fe1d740227cec0ae615dae668d4efeea740e51b81cb1b89dd2a47 | INCOMING |   NULL |
+-------+--------------+------------+-------------------------------------+-------------------------------------+---------+------------------------------------------------------------------+----------+--------+


bitcoin core – How does bitcoind choose its data directory?

Sorry, noob question I'm new to everything about Linux. I managed to configure the Bitcoin core very well on my Raspberry Pi 4 and I have an external hard drive that I want to use as a data directory for the 250 GB or more of blocks (this is not is not my main storage from which I boot).

The problem is that I have absolutely no idea how the bitcoind program decides its data directory. I have run 3 or 4 times and I have 3 or 4 different data directories, none of which on the hard drive. How can I tell him where to store the data? Also, where should I put the bitcoin.conf file because it never seems to find it. I have most of the blockchain preinstalled on my hard drive from my Windows PC and therefore I would ideally use this same directory, but if that is not possible, that’s fine , I want it at least on my hard drive. I have followed several guides and nothing has worked for me so far. I appreciate your time for all the answers!

bitcoind – bitcoin basic test configuration error

I tried to configure the basic Bitcoin test by modifying the bitcoin.conf file with the required credentials.

Previously, before writing test credentials, it was a full running node.
now the error is

the rpcport configuration parameters are only applied on the test network in the (test) section.

(photo uploaded for reference)enter description of image here

bitcoind – Is it possible to manage BCH transactions on the Bitcoin Core wallet?

I installed Bitcoin core on a server and it works well for BTC. I would like to know if I can use the same server and the same platform to support BCH also?
I know that the addresses generated in Bitcoin Core can also be used for BCH. But what if I can BCH transactions in this machine, how can i defer them from BTC those?

Thanks in advance for your answers.

bitcoin core – bitcoind multisig transaction not displayed as multisig transaction / displayed as "signed" by 2: 3

It seems that there has been a change in the creation of multisig transactions. Running one node using bitcoind v0.16.3 and another using the latest version of bitcoind (v.0.19.0.1).

The multisig transaction created on the old node can be decoded correctly by coinb.in (it is displayed as a 2: 3 multisig transaction). Using the most recent bitcoind to create the coinb.in transaction is not able to display it correctly.

Someone involved in this / is there a way to use the latest version of bitcoind to create a multisig transaction which can be decoded on coinb.in (maybe using parameters when signature)?

Example using the latest version of bitcoind (v.0.19.0.1).

./bitcoin-cli createmultisig 2 "("02ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e","037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c","034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb67")"
{
  "address": "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8",
  "redeemScript": "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae"
}

Now found the address using TX 63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01

Important part using getrawtransaction:

{
  "value": 0.00053938,
  "n": 1,
  "scriptPubKey": {
    "asm": "OP_HASH160 7b3c11ea9596776b98f1d7e68ffcf891e860216f OP_EQUAL",
    "hex": "a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87",
    "reqSigs": 1,
    "type": "scripthash",
    "addresses": (
      "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8"
    )
  }

Create a transaction using the information

./bitcoin-cli createrawtransaction "({"txid":"63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01","vout":1})" "({"1GAFEtKWhwn5wQTt53kFMgd4b7xEyCxHHg":0.00048961})"

Transaction generated (unsigned) Decoding on coinb.in does not show any multisig details:

0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000

After signing, there are still no details on multisig displayed on coinb.in, using bitcoind v0.16.3 the transaction itself is indicated as type multisig correctly. Any ideas for achieving the same result using the latest bitcoind?

Update

Signing of the transaction with 1 key:

'signrawtransactionwithkey',(
            "0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000",
            (
                "privkey",
            ),
            (
                "txid"              => "63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01",
                "vout"              => 1,
                "scriptPubKey"      => "a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87",
                "redeemScript"      => "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
                "amount"            => 0.00053938,
            ),
        )

Return:

{
"result":{
"hex":"0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c86301000000b50047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753aeffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000",
"complete":false,
"errors":(
{
"txid":"63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01",
"vout":1,
"witness":(
),
"scriptSig":"0047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
"sequence":4294967295,
"error":"CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)"
}
)
},
"error":null,
"id":null
}

The transaction can be decoded using coinb.in but it says signed by 2 parts which is for sure.

Is the transaction itself signed correctly?

Bitcoin core – bitcoind multisig transaction not displayed as multisig transaction

It seems that there has been a change in the creation of multisig transactions. Running one node using bitcoind v0.16.3 and another using the latest version of bitcoind (v.0.19.0.1).

The multisig transaction created on the old node can be decoded correctly by coinb.in (it is displayed as a 2: 3 multisig transaction). Using the most recent bitcoind to create the coinb.in transaction is not able to display it correctly.

Someone involved in this / is there a way to use the latest version of bitcoind to create a multisig transaction which can be decoded on coinb.in (maybe using parameters when signature)?

Example using the latest version of bitcoind (v.0.19.0.1).

./bitcoin-cli createmultisig 2 "("02ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e","037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c","034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb67")"
{
  "address": "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8",
  "redeemScript": "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae"
}

Now found the address using TX 63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01

Important part using getrawtransaction:

{
  "value": 0.00053938,
  "n": 1,
  "scriptPubKey": {
    "asm": "OP_HASH160 7b3c11ea9596776b98f1d7e68ffcf891e860216f OP_EQUAL",
    "hex": "a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87",
    "reqSigs": 1,
    "type": "scripthash",
    "addresses": (
      "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8"
    )
  }

Create a transaction using the information

./bitcoin-cli createrawtransaction "({"txid":"63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01","vout":1})" "({"1GAFEtKWhwn5wQTt53kFMgd4b7xEyCxHHg":0.00048961})"

Transaction generated (unsigned) Decoding on coinb.in does not show any multisig details:

0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000

After signing, there are still no details on multisig displayed on coinb.in, using bitcoind v0.16.3 the transaction itself is indicated as type multisig correctly. Any ideas for achieving the same result using the latest bitcoind?

Update

Signing of the transaction with 1 key:

'signrawtransactionwithkey',(
            "0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000",
            (
                "privkey",
            ),
            (
                "txid"              => "63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01",
                "vout"              => 1,
                "scriptPubKey"      => "a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87",
                "redeemScript"      => "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
                "amount"            => 0.00053938,
            ),
        )

Return:

{
"result":{
"hex":"0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c86301000000b50047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753aeffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000",
"complete":false,
"errors":(
{
"txid":"63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01",
"vout":1,
"witness":(
),
"scriptSig":"0047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
"sequence":4294967295,
"error":"CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)"
}
)
},
"error":null,
"id":null
}

The transaction can be decoded using coinb.in but it says signed by 2 parts which is for sure.

Is the transaction itself signed correctly?

bitcoind – Sendrawtransaction error with locktime: 64: non final txid

I just ran into the same problem and the solution is almost stupid. Since the clue is not found elsewhere, I would add my two cents in case others stepped on the same trap.

It turns out that, in addition to the usual reasons related to time (for example, the time lock has not expired, the sequence number is not set correctly, etc.), try to passing an unconfirmed UTXO also causes non-final Fault. I didn't delve into the source code to see why this is happening, but the misleading error message cost me a good afternoon.

Why would you ever want to spend unconfirmed outings? Well, when you're testing things and you're gradually losing patience …

bitcoind – Bitcoin Core JSONRPC only accepts requests with 0.0.0.0 in configurations

I had lunch with a Bitcoin Core server and am trying to connect via JSON-RPC.
Here are my configuration settings:

server=1  
rpcuser=admin  
rpcpassword=password
rpcport=1234
rpcallowip=94.183.32.151

But all cURL connections to this server via IP 94.183.32.151 have the same error result as:

cURL error 7: Failed to connect to 94.183.32.151 port 1234: Connection refused

I also tried to add this option, but that did not solve the problem:
rpcbind:94.183.32.151

Only when i put 0.0.0.0 as a combined RPC IP, the Bitcoin core returns a real answer. I have checked many pages, but I have found no other suitable way to allow certain IP addresses to Bitcoind. Can you help me please?

Note: IP, port number, user name and password are changed from actual values.

bitcoind walletnotify PHP returned 32256

I want to receive a notification from bitcoind when I receive a payment.
Next, I want to update the balance of the user who deposited the funds.

My first problem is that I can't ask BitcoinCore to let me know.

My second problem and when I do it manually, how do I associate a repository (from a Tx) with a user?

Right now, I'm using an archaic method, the user has to click a button to send a request to bitcoind to update the balance.

  • Symfony 4
  • BitcoinCore 0.19.0.1

I am open to any other method

bitcoin.conf

proxy=127.0.0.1:9050
bind=127.0.0.1
onlynet=onion

walletnotify=/Users/XXX/code/project/transaction.sh %s

server=1
rpcuser=XXX
rpcpassword=XXX
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=8332

transaction.sh

#!/bin/sh
curl -d "txid=$1" http://127.0.0.1/wallet/notify

Controller:

/**
     * @Route("/wallet/notify/{txid}", name="user_notify")
     */
    public function notify($txid)
    {
        $bitcoin = new BitcoinClient('http://XXX:XX@localhost:8332/');
        echo $bitcoin->gettransaction("$txid");
        $file = fopen("new.txt", "w");
        fwrite($file, $txid);
        fclose($file);
        return $this->render('debug.html.twig');

    }

EDIT:
I looked at the newspapers that I found:

2020-02-05T22:19:22Z Socks5() connect to 6q726sappclov3yk.onion:8333 failed: connection refused

I deleted the connection to Tor, restarted bitcoind and made a new transaction. I get the error:

2020-02-05T22:46:56Z (default wallet) AddToWallet XXXXXXXTXIDXXXXXXX update
2020-02-05T22:46:56Z runCommand error: system(/Users/XXXXX/code/project/transaction.sh XXXXXXXTXIDXXXXXXX) returned 32256