stacks-network / stacks-blockchain-docker

Stacks-blockchain with API using docker compose
GNU General Public License v3.0
27 stars 37 forks source link

Mock Miner fails to connect to bitcoin node #93

Closed friedger closed 1 year ago

friedger commented 1 year ago

In conf/mainnet/Config.toml, I set

miner = true
mock_miner = true

The mining setting is recognized but the bitcoin node (peer_host = "bitcoin.mainnet.stacks.org") is not accessible, I get following log:

stacks-blockchain        | INFO [1665145257.551612] [testnet/stacks-node/src/run_loop/neon.rs:286] [main] Miner node: checking UTXOs at address: 19sJ4WRhrcMbYDMP64b5hHgjQWRcpQ7v23
stacks-blockchain        | WARN [1665145258.174326] [testnet/stacks-node/src/run_loop/neon.rs:289] [main] Error when creating wallet: Network("Bitcoin RPC: status(404) != success, body is 'Object({\"error\": Object({\"code\": Number(-32601), \"message\": String(\"Method not found\")}), \"id\": String(\"stacks\"), \"result\": Null})'")
stacks-blockchain        | ERRO [1665145259.404621] [testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs:634] [main] Bitcoin RPC failure: error listing utxos Network("Bitcoin RPC: status(404) != success, body is 'Object({\"error\": Object({\"code\": Number(-32601), \"message\": String(\"Method not found\")}), \"id\": String(\"stacks\"), \"result\": Null})'")

Is mock mining intended to work with this docker setup? If yes, do I need to run my own bitcoin node? Should this be a setting in the .env?

wileyj commented 1 year ago

for mining, i would absolutely say to run your own btc node.

i would have expected mock mining to work with the public node - i'll have to look into it a little more, but i don't recall the mock miner checking for utxo's (it's been a while since i've run a mock miner, i'll have to test this myself).

perhaps you are using a valid mining config (with keys), but then set mock_miner = true? if that above is true - i'd first try commenting those lines to see if it makes a difference.

friedger commented 1 year ago

No keys in the Config.toml

wileyj commented 1 year ago

strange - i'll see if i can reproduce this on my end. the odd part to me is the addition of the btc address in the log (which is a valid address). i'm not sure if that's a generic hardcoded address at the moment, but i'll see what what happens when i test

friedger commented 1 year ago

With 2.1.0+ this works