Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacks-node unable to find Bitcoin wallet #3651

Closed
igorsyl opened this issue Apr 8, 2023 · 4 comments
Closed

Stacks-node unable to find Bitcoin wallet #3651

igorsyl opened this issue Apr 8, 2023 · 4 comments
Assignees
Labels
bug Unwanted or unintended property causing functional harm locked mining

Comments

@igorsyl
Copy link
Contributor

igorsyl commented Apr 8, 2023

Issue initially reported by Yuriy here: https://discord.com/channels/621759717756370964/691807526118883418/1080471748778148031

Describe the bug
A clear and concise description of what the bug is.

i use custom wallet on btc node which is loaded from bitcoind.conf
wallet=bitcoind/data/testnet3/wallets/my_wallet_name/
2.1 node could find it while trying to list utxo
it looks like it's trying to use default 'wallet'
is there a way to continue using custom wallet?
ERRO [1677673080.754803] [testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs:728] [main] Bitcoin RPC failure: error listing utxos Network("Bitcoin RPC: status(500) != success, body is 'Object({\"error\": Object({\"code\": Number(-18), \"message\": String(\"Requested wallet does not exist or is not loaded\")}), \"id\": String(\"stacks\"), \"result\": Null})'")
wallet is loaded, as bitcoin-cli return correct balance and utxos

don't work either
i've trying everything, changing wallet name to lowercase, set wallet_name=full path to wallet.dat

bitcoin-cli loadwallet shows that wallet is loaded, but stacks-node says Requested wallet does not exist or is not loaded

Steps To Reproduce
Please provide detailed instructions (e.g. command line invocation with parameters) to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • OS: [e.g. Ubuntu / Debian]
  • Rust version
  • Version of the appropriate binary / software package

Bitcoin v22.0.0 for testnet
Bitcoin v21.1 for mainnet
doesn't work for mainnet too

Additional context
Please include any relevant stack traces, error messages and logs.

Hi, it doesn't seem to work or i am doing smth. wrong
i loaded the wallet for bitcoind,
in bitcoind.conf
wallet=/bitcoind/data/testnet3/wallets/MY_WALLET_NAME/

in stacks-node config
wallet_name = "MY_WALLET_NAME"

when starting the node
DEBG [1678156411.470224] [testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs:2147] [main] BitcoinRPC builder 'listunspent': Some("user"):Some("password")@http://127.0.0.1:18332/wallet/MY_WALLET_NAME ERRO [1678156411.470837] [testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs:728] [main] Bitcoin RPC failure: error listing utxos Network("Bitcoin RPC: status(500) != success, body is 'Object({\"error\": Object({\"code\": Number(-18), \"message\": String(\"Requested wallet does not exist or is not loaded\")}), \"id\": String(\"stacks\"), \"result\": Null})'")

From Jude:

Hey! Both master (2.1.0.0.1) and the 2.1 release from a few weeks ago are stable. In both cases, you'll need to set always_use_affirmation_maps = false in the config file in the [node] section. I have a PR open that makes this the default, but it is not merged yet

If you are encountering an issue with a smart contract, please include the smart contract code
that demonstrates the issue.

@igorsyl igorsyl self-assigned this Apr 10, 2023
@pavitthrap pavitthrap added bug Unwanted or unintended property causing functional harm mining labels Apr 11, 2023
@diwakergupta
Copy link
Member

Related PR, that does have an integration test for custom wallets: #3597

Other relevant threads on Discord:

@wileyj
Copy link
Contributor

wileyj commented Apr 18, 2023

from reporter:

since no default wallet is created by latest bitcoin-core it's quite challenging to spin-up a miner
it requires:
- start a miner in order to create bitcoin default wallet
- stop a miner
- import key to bitcoin wallet
- start a miner so it can track UTXOs in the wallet and start mining

will have to test and see if it can be reproduced or resolved.

@wileyj
Copy link
Contributor

wileyj commented May 3, 2023

#3694

@github-project-automation github-project-automation bot moved this to 🆕 New in Stacks Core Eng Aug 4, 2023
@wileyj wileyj closed this as completed Dec 19, 2023
@github-project-automation github-project-automation bot moved this from Status: 🆕 New to Status: ✅ Done in Stacks Core Eng Dec 19, 2023
@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Unwanted or unintended property causing functional harm locked mining
Projects
Archived in project
Development

No branches or pull requests

5 participants