Receiving Bitcoin Address
Closed this issue ยท 19 comments
I know I am being optimistic that I would actually get lucky enough to mine a block with this, but just in case that crazyness happens, how do i configure the bitcoin address that receives the reward?
To mine a block with Raspberry ? I doubt so, but let me know if you do ๐ . This is only a fork of "mining software", you will need to run "bitcoind" which is a server like software - configure server and address/wallet. You can find more info here bitcoind . So general concept is to run bitcoind service and to point miner to it like you would point it to any public pool. If you plan to run it on Raspberry i doubt that you will have enough space unless you have external storage since bitcoin blockchain size is at 120GB+ blockchain size, tho i am not sure if bitcoind can be compiled on ARM...
I already did compile 0.13.2 bitcoind on my pi and it is running. So now I would like to run the miner on the same pi.
Just so I am clear would you mind giving an example of what the command line would be then? Do I need the username and password? I didn't set anything like that in bitcoind specifically.
Would the URL be http:/localhost:8332?
What else would I need?
And FYI I am using and external USB 128gb drive for blockchain storage.
You will have to look for tutorial on configuring bitcoind online, but general steps are to configure following parameters within bitcoind:
server=1
daemon=1
rpcallowip=192.168.*.* #your range
rpcuser=user
rpcpassword=password
rpcport=X
addnode=x.x.x.x
addnode=x.x.x.x
And than to point your miner :
./minerd -a sha256d -o http://bitcoindIPaddress:port -O user -P password
-a sha256d is sha256 algo which is not defult (minerd -h)
BitcoindIPAddress:PORT - bitcoind IP address or localhost and rpcport.
rpcuser and rpcpassword are user and password arguments.
Make sure to read how bitcoind is trully working, generate wallet there and similar ๐
Thank you. I actually created my wallet on another device to keep it secret. I assume I can just use the wallet public address from that wallet as the coinbase address and not set up a wallet on the mining computer?
I believe that you can't just forward earnings to coinbase address, you would have to import the wallet that coinbase generated for you and i am not sure that you can get private key there - that would allow you to migrate your wallet or access it from multiple locations.
Another solution is to setup wallet on bitcoind and to run script via cron job, something like this :
#!/bin/bash
if [ $(echo "$(bitcoind getbalance) > 0" | bc) -eq 1 ];then
bitcoind sendtoaddress YOUR_NEW_ADDRESS $(bitcoind getbalance) "Comment for resender"
fi
are you saying that when you run bitcoind it creates a wallet and coinbase address for you? how then are you supposed to get the private key so you can ever spend the coins that get created?
Not saying I will ever actually mine a real block, but just in case I want to have it all set up.
If there is some explanation out there that i should read please direct me to it. So far i have not found any information about how a coinbase record chooses what address to put the coin into. Everything just says that it does.
Bicoind and coinbase are totally separate things and are not related in any way. Bitcoind is a service/server while coinbase is just online wallet.
You have to generate your own BTC address with issuing corresponding commands : stackexchange
Also check this for full list of commands.
I am confused then. Let me try asking another way.
If my miner wins the block mining it will create as part of the block a coinbase record. That record is how a miner gets paid for mining.
Where does that address come from?
Can that address just be an address in my personal wallet?
If so, then how do I set that address in minerd so that if my miner ever wins and creates that block it will have my address so I can then spend the money I earned from mining that block?
If your miner win the block, bitcoins will be stored on bitcoind wallet address, you can send your winnings after to any BTC wallet, including CoinBase.
Think of CoinBase as just online wallet, while bitcoind is server and wallet and have many more functionality.
Maybe this will clear things a bit :
When you mine BTC on any pool (pool website), they store information of your user and address within their "bitcoind" service, when you init the payment they just forward your earnings to your coinbase wallet. So in this scenario you will be solo mining, and all earnings will be stored on bitcoind wallet/s - later you can decide if you will forward earnings to coinbase.
I am not really great at explaining things, you might have more luck on google ๐
I appreciate your help. I guess the question I have is where does the bitcoind wallet get its public and private address?
Well it generates them with the command that i have provided previously in link
You have to generate your own BTC address with issuing corresponding commands : stackexchange
-
Setup Bitcoind
-
Generate Wallet
-
Start mining
๐
So what you are saying is that if i generate a wallet without a name the miner will just automatically use that wallet if it ever happens to mine a block...
I just want to be sure because I would hate to just happen to get lucky and mine a block and then not be able to access the reward bitcoins.
Yes ๐ .
If you have wallet on bitcoind and you are running a miner which connects to bitcoind to mine, in case you win a block you will have a balance as soon as your mining process complete whole block ... Then you can issue command like bitcoind sendtoaddress YOUR_COINBASEADDRESS AMOUNT "Comment for resender"
Sweet. Now I understand...
Great ๐ i will close this issue now.
I just want to be sure because I would hate to just happen to get lucky and mine a block and then not be able to access the reward bitcoins.
Sorry for necropost, but i'm just curious, did you get any lucky?