Author

Topic: How to start mining in offline? (Read 2246 times)

legendary
Activity: 1232
Merit: 1030
give me your cryptos
October 20, 2016, 11:36:29 PM
#10
Is it really possible to do mining in offline?

What OP is trying to do is not mining on the current chain offline, as this is impossible.

He wants to create his own blockchain offline. So it will be a network consisting of him and him only.
member
Activity: 114
Merit: 11
October 19, 2016, 07:11:46 AM
#9
Is it really possible to do mining in offline?

Yes. It is possible, by implementing a private network of peers. Atleast it is off from internet. And you will never find the actual block if you mine on private network. You can have fun with playing on how crypto currency works. Tongue
member
Activity: 112
Merit: 10
October 07, 2016, 09:31:03 AM
#8
Is it really possible to do mining in offline?
kzv
legendary
Activity: 1722
Merit: 1285
OpenTrade - Open Source Cryptocurrency Exchange
October 02, 2016, 01:41:54 PM
#7
I tried to start several bitcoind
Code:
#!/bin/bash
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17591 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16591 -datadir=$HOME/ForkTest/A/ -connect=localhost:17592 -pid=$HOME/ForkTest/A/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17592 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16592 -datadir=$HOME/ForkTest/B/ -connect=localhost:17593 -pid=$HOME/ForkTest/B/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17593 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16593 -datadir=$HOME/ForkTest/C/ -connect=localhost:17594 -pid=$HOME/ForkTest/C/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17594 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16594 -datadir=$HOME/ForkTest/D/ -connect=localhost:17591 -pid=$HOME/ForkTest/C/.pid -daemon -debug

but the blockchain still does not start mining (((

Did you try the generate RPC call to mine a new block?  (setgenerate has been removed due to the internal miner being removed - see e.g. https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner )

Thank you very much!
I tried with version 0.12.0 and everything works as expected! Smiley
legendary
Activity: 4228
Merit: 1313
October 01, 2016, 07:42:33 AM
#6
since mining is a way to make small earning in the present time because mining is not more profitable work for mining hardware in the current time so i will suggest you to leave your idea of mining bitcoin . it is waste of time .

I guess you didn't bother to read the first message and just wanted to post in order to increase your ad campaign post count?  
legendary
Activity: 4228
Merit: 1313
October 01, 2016, 07:41:50 AM
#5
I tried to start several bitcoind
Code:
#!/bin/bash
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17591 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16591 -datadir=$HOME/ForkTest/A/ -connect=localhost:17592 -pid=$HOME/ForkTest/A/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17592 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16592 -datadir=$HOME/ForkTest/B/ -connect=localhost:17593 -pid=$HOME/ForkTest/B/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17593 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16593 -datadir=$HOME/ForkTest/C/ -connect=localhost:17594 -pid=$HOME/ForkTest/C/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17594 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16594 -datadir=$HOME/ForkTest/D/ -connect=localhost:17591 -pid=$HOME/ForkTest/C/.pid -daemon -debug

but the blockchain still does not start mining (((

Did you try the generate RPC call to mine a new block?  (setgenerate has been removed due to the internal miner being removed - see e.g. https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner )
legendary
Activity: 2128
Merit: 1073
October 01, 2016, 07:02:49 AM
#4
Conceptually your ring of 4 peers looks correct and should be capable of mining. I don't know why it isn't working for you.

The only thing I can suggest is to search the net for the phase "testnet in a box". There are multiple pages describing exactly how they did it. Just retrace exactly their steps. I've done it multiple times, but my computers used for testing are in storage and I can't look at them now.
kzv
legendary
Activity: 1722
Merit: 1285
OpenTrade - Open Source Cryptocurrency Exchange
October 01, 2016, 02:44:31 AM
#3
I tried to start several bitcoind
Code:
#!/bin/bash
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17591 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16591 -datadir=$HOME/ForkTest/A/ -connect=localhost:17592 -pid=$HOME/ForkTest/A/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17592 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16592 -datadir=$HOME/ForkTest/B/ -connect=localhost:17593 -pid=$HOME/ForkTest/B/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17593 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16593 -datadir=$HOME/ForkTest/C/ -connect=localhost:17594 -pid=$HOME/ForkTest/C/.pid -daemon -debug
$HOME/bitcoin-0.13.0/src/bitcoind -regtest -server -listen -port=17594 -rpcuser=bitcoinrpc -rpcpassword=P -rpcport=16594 -datadir=$HOME/ForkTest/D/ -connect=localhost:17591 -pid=$HOME/ForkTest/C/.pid -daemon -debug

but the blockchain still does not start mining (((
legendary
Activity: 2128
Merit: 1073
October 01, 2016, 12:28:40 AM
#2
For the Bitcoin Core client to start mining it requires some minimal rudimentary peer to peer network. If I remember correctly the minimum is either 2 or 3 peers. You actually don't need the separate computers, the necessary peer to peer network can be created on a single computer by running multiple Bitcoin Core instances under multiple user accounts.

I don't remember the details, you'll have to experiment with starting multiple instances of Bitcoin Core with several flags: -connect=? , -port=? and -rpcport=? .

Edit: If I remember correctly such setup is not called "offline mining", it is called "testnet in a box", even if you aren't running testnet.

Also, research older versions of cgminer that still supported GPU mining of Bitcoin to use for your tests. GPU mining is much more power-efficient than CPU mining. With a mid-range laptop (couple of years ago, when GPU mining of Bitcoin was still a thing) you should be able to run all the required programs (multiple instances of Bitcoin Core and at least one instance of cgminer) on batteries and without spinning up the laptop's fan or having to suffer a hot laptop. Even if you work on a desktop and not on the laptop, the power savings and the fan noise reduction are really helpful for the developer.

kzv
legendary
Activity: 1722
Merit: 1285
OpenTrade - Open Source Cryptocurrency Exchange
October 01, 2016, 12:04:21 AM
#1
Hello,

I'm testing blockchain technology and want to understand how bitcoind is start mining?

I run bitcoind in offline machine with "bintcoind -daemon -gen" and i waiting for him to begin mining new blockchain statred from Genesis block...
I waited a long time, but it does not generate a new chain!

So i tried "bintcoind -daemon -regtest" but it does not generate a blockchain too!

Why is this happening?
Jump to: