Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Mining on Linux instructions?  (Read 4733 times)

0 Members and 1 Guest are viewing this topic.

Offline rando

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Mining on Linux instructions?
« on: November 04, 2013, 09:05:07 PM »

Can someone help me figure how to mine Protoshares on Linux (Debian/Ubuntu) please? Here is what I think I know so far:

# Install dependencies
sudo apt-get install build-essential
sudo apt-get install libssl-dev

# Download
git clone https://github.com/InvictusInnovations/ProtoShares.git protoshares
cd protoshares

# Compile
cd src
make -f makefile.unix protosharesd

# Usage
protosharesd start
protosharesd stop
protosharesd --help

What dependencies are needed?
Do I need to add/alter a configuration anywhere (port, etc)?
How do I generate a protoshares public/private key pair and set it to send the mining proceeds to that address?
How do I configure UFW (uncomplicated firewall) for P2P software like this? Deny all TCP and allow xxx UDP?
How can I see that it's working?
« Last Edit: November 04, 2013, 09:10:46 PM by rando »

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #1 on: November 04, 2013, 09:14:27 PM »
Assuming all dependencies are installed....

qmake-qt4  protosharesd.pro
make

More details will follow...
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #2 on: November 04, 2013, 09:21:31 PM »
Here is the relevant subset of my command history for setting up a fresh Digital Ocean machine:

    2   apt-get install git
    5   apt-get install qt4
    9   apt-get install libboost-all-dev
   15  apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
   18  apt-get install make
   20  apt-get install libssl-dev
   24  apt-get install libdb-dev
   28  apt-get install libdb++-dev
   34  wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.5.tar.gz
   35  mv download.php\?file\=miniupnpc-1.5.tar.gz  miniupnpc-1.5.tar.gz
   36  tar -xzvf miniupnpc-1.5.tar.gz
   37  cd miniupnpc-1.5/
   39  make
   40  make install
     
   11  git clone https://github.com/InvictusInnovations/ProtoShares.git
   12  cd ProtoShares/
   16  qmake-qt4 protosharesd.pro
   29  make
   30  make -j2
   31  export LC_ALL=C 

    ./protosharesd .................
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline rando

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Mining on Linux instructions?
« Reply #3 on: November 04, 2013, 10:01:13 PM »
Fantastic. I'll give that a try. Would you be able to answer my other questions too please?

1.) Do I need to alter any configuration settings (port #, etc) before running it?
2.) How do I generate a Protoshares public/private key pair and set it to send the mining proceeds to that address?
3.) What are the correct firewall setting for this? (Deny all, allow 3888 out only?)
4.) How can I verify that it's working?

Thanks!

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #4 on: November 04, 2013, 10:05:36 PM »
As far as I know it operates just like Bitcoin.  FreeTrade set this up and the only changes from Bitcoin 8.5 are to the proof of work and mining rewards. 

You should be able to use the command line API to report your hash rate and report the number of connected nodes and block depth. 

As far as ports go... 3888 simply replaced bitcoins default port.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline rando

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Mining on Linux instructions?
« Reply #5 on: November 04, 2013, 10:10:55 PM »
Okay. Thanks!

Offline Pairmike

Re: Mining on Linux instructions?
« Reply #6 on: November 04, 2013, 10:41:54 PM »
I'm failing with the following error when executing --- 'line 29 make' from the instructions.  Ironically, I got the same error will trying to build this with MinWG on Windows.
 
home/mike/ProtoShares/src/rpcwallet.cpp:77: undefined reference to `nBestHeight'
/home/mike/ProtoShares/src/rpcwallet.cpp:85: undefined reference to `nTransactionFee'
/home/mike/ProtoShares/src/rpcwallet.cpp:88: undefined reference to `GetWarnings(std::string)'
build/rpcwallet.o: In function `signmessage(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcwallet.cpp:338: undefined reference to `strMessageMagic'
build/rpcwallet.o: In function `verifymessage(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcwallet.cpp:374: undefined reference to `strMessageMagic'
build/rpcwallet.o: In function `ListTransactions(CWalletTx const&, std::string const&, int, bool, std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > >&)':
/home/mike/ProtoShares/src/rpcwallet.cpp:987: undefined reference to `CMerkleTx::GetBlocksToMaturity() const'
build/rpcwallet.o: In function `listsinceblock(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcwallet.cpp:1154: undefined reference to `nBestHeight'
/home/mike/ProtoShares/src/rpcwallet.cpp:1170: undefined reference to `hashBestChain'
/home/mike/ProtoShares/src/rpcwallet.cpp:1170: undefined reference to `hashBestChain'
/home/mike/ProtoShares/src/rpcwallet.cpp:1170: undefined reference to `hashBestChain'
/home/mike/ProtoShares/src/rpcwallet.cpp:1170: undefined reference to `hashBestChain'
/home/mike/ProtoShares/src/rpcwallet.cpp:1174: undefined reference to `pindexBest'
/home/mike/ProtoShares/src/rpcwallet.cpp:1177: undefined reference to `pindexBest'
build/rpcwallet.o: In function `CBlockLocator::CBlockLocator(uint256)':
/home/mike/ProtoShares/src/main.h:1979: undefined reference to `mapBlockIndex'
/home/mike/ProtoShares/src/main.h:1980: undefined reference to `mapBlockIndex'
build/rpcblockchain.o: In function `GetDifficulty(CBlockIndex const*)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:20: undefined reference to `pindexBest'
/home/mike/ProtoShares/src/rpcblockchain.cpp:23: undefined reference to `pindexBest'
build/rpcblockchain.o: In function `blockToJSON(CBlock const&, CBlockIndex const*)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:49: undefined reference to `CBlockHeader::GetHash() const'
/home/mike/ProtoShares/src/rpcblockchain.cpp:51: undefined reference to `CMerkleTx::SetMerkleBranch(CBlock const*)'
build/rpcblockchain.o: In function `getblockcount(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:81: undefined reference to `nBestHeight'
build/rpcblockchain.o: In function `settxfee(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:108: undefined reference to `nTransactionFee'
build/rpcblockchain.o: In function `getrawmempool(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:120: undefined reference to `mempool'
/home/mike/ProtoShares/src/rpcblockchain.cpp:120: undefined reference to `CTxMemPool::queryHashes(std::vector<uint256, std::allocator<uint256> >&)'
build/rpcblockchain.o: In function `getblockhash(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:137: undefined reference to `nBestHeight'
/home/mike/ProtoShares/src/rpcblockchain.cpp:140: undefined reference to `FindBlockByHeight(int)'
build/rpcblockchain.o: In function `getblock(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:154: undefined reference to `mapBlockIndex'
/home/mike/ProtoShares/src/rpcblockchain.cpp:158: undefined reference to `mapBlockIndex'
/home/mike/ProtoShares/src/rpcblockchain.cpp:159: undefined reference to `CBlock::ReadFromDisk(CBlockIndex const*)'
build/rpcblockchain.o: In function `gettxoutsetinfo(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:174: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcblockchain.cpp:174: undefined reference to `pcoinsTip'
build/rpcblockchain.o: In function `gettxout(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcblockchain.cpp:204: undefined reference to `mempool'
/home/mike/ProtoShares/src/rpcblockchain.cpp:205: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcblockchain.cpp:205: undefined reference to `mempool'
/home/mike/ProtoShares/src/rpcblockchain.cpp:205: undefined reference to `CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView&, CTxMemPool&)'
/home/mike/ProtoShares/src/rpcblockchain.cpp:206: undefined reference to `CCoinsViewMemPool::GetCoins(uint256 const&, CCoins&)'
/home/mike/ProtoShares/src/rpcblockchain.cpp:208: undefined reference to `mempool'
/home/mike/ProtoShares/src/rpcblockchain.cpp:208: undefined reference to `CTxMemPool::pruneSpent(uint256 const&, CCoins&)'
/home/mike/ProtoShares/src/rpcblockchain.cpp:210: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcblockchain.cpp:210: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcblockchain.cpp:216: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcblockchain.cpp:216: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcblockchain.cpp:220: undefined reference to `pcoinsTip'
build/rpcblockchain.o:/home/mike/ProtoShares/src/rpcblockchain.cpp:220: more undefined references to `pcoinsTip' follow
build/rpcblockchain.o: In function `CCoinsView::~CCoinsView()':
/home/mike/ProtoShares/src/main.h:2166: undefined reference to `vtable for CCoinsView'
build/rpcblockchain.o: In function `CCoinsViewBacked::~CCoinsViewBacked()':
/home/mike/ProtoShares/src/main.h:2170: undefined reference to `vtable for CCoinsViewBacked'
build/rpcblockchain.o: In function `CCoinsViewMemPool::~CCoinsViewMemPool()':
/home/mike/ProtoShares/src/main.h:2223: undefined reference to `vtable for CCoinsViewMemPool'
build/rpcrawtransaction.o: In function `TxToJSON(CTransaction const&, uint256, std::vector<json_spirit::Pair_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Pair_impl<json_spirit::Config_vector<std::string> > > >&)':
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:119: undefined reference to `mapBlockIndex'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:120: undefined reference to `mapBlockIndex'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:125: undefined reference to `nBestHeight'
build/rpcrawtransaction.o: In function `getrawtransaction(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:153: undefined reference to `GetTransaction(uint256 const&, CTransaction&, uint256&, bool)'
build/rpcrawtransaction.o: In function `signrawtransaction(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:382: undefined reference to `CCoinsViewCache::CCoinsViewCache(CCoinsView&, bool)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:384: undefined reference to `mempool'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:385: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:386: undefined reference to `mempool'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:386: undefined reference to `CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView&, CTxMemPool&)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:387: undefined reference to `CCoinsViewBacked::SetBackend(CCoinsView&)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:392: undefined reference to `CCoinsViewCache::GetCoins(uint256 const&, CCoins&)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:395: undefined reference to `CCoinsViewBacked::SetBackend(CCoinsView&)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:443: undefined reference to `CCoinsViewCache::GetCoins(uint256 const&, CCoins&)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:456: undefined reference to `CCoinsViewCache::SetCoins(uint256 const&, CCoins const&)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:502: undefined reference to `CCoinsViewCache::GetCoins(uint256 const&, CCoins&)'
build/rpcrawtransaction.o: In function `sendrawtransaction(std::vector<json_spirit::Value_impl<json_spirit::Config_vector<std::string> >, std::allocator<json_spirit::Value_impl<json_spirit::Config_vector<std::string> > > > const&, bool)':
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:554: undefined reference to `pcoinsTip'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:561: undefined reference to `CTransaction::AcceptToMemoryPool(CValidationState&, bool, bool, bool*)'
/home/mike/ProtoShares/src/rpcrawtransaction.cpp:571: undefined reference to `SyncWithWallets(uint256 const&, CTransaction const&, CBlock const*, bool)'
build/rpcrawtransaction.o: In function `CCoinsView::CCoinsView()':
/home/mike/ProtoShares/src/main.h:2140: undefined reference to `vtable for CCoinsView'
build/rpcrawtransaction.o: In function `CCoinsViewCache::~CCoinsViewCache()':
/home/mike/ProtoShares/src/main.h:2188: undefined reference to `vtable for CCoinsViewCache'
build/protocol.o: In function `CMessageHeader::CMessageHeader()':
/home/mike/ProtoShares/src/protocol.cpp:25: undefined reference to `pchMessageStart'
build/protocol.o: In function `CMessageHeader::CMessageHeader(char const*, unsigned int)':
/home/mike/ProtoShares/src/protocol.cpp:34: undefined reference to `pchMessageStart'
build/protocol.o: In function `CMessageHeader::IsValid() const':
/home/mike/ProtoShares/src/protocol.cpp:51: undefined reference to `pchMessageStart'
build/txdb.o: In function `CCoinsViewDB::GetBestBlock()':
/home/mike/ProtoShares/src/txdb.cpp:44: undefined reference to `mapBlockIndex'
/home/mike/ProtoShares/src/txdb.cpp:45: undefined reference to `mapBlockIndex'
build/txdb.o: In function `CBlockTreeDB::LoadBlockIndexGuts()':
/home/mike/ProtoShares/src/txdb.cpp:211: undefined reference to `InsertBlockIndex(uint256)'
/home/mike/ProtoShares/src/txdb.cpp:212: undefined reference to `InsertBlockIndex(uint256)'
/home/mike/ProtoShares/src/txdb.cpp:226: undefined reference to `pindexGenesisBlock'
/home/mike/ProtoShares/src/txdb.cpp:226: undefined reference to `hashGenesisBlock'
/home/mike/ProtoShares/src/txdb.cpp:227: undefined reference to `pindexGenesisBlock'
build/txdb.o: In function `CTxOutCompressor::GetSerializeSize(int, int) const':
/home/mike/ProtoShares/src/main.h:687: undefined reference to `CTxOutCompressor::CompressAmount(unsigned long long)'
build/txdb.o: In function `CBlockIndex::CheckIndex() const':
/home/mike/ProtoShares/src/main.h:1766: undefined reference to `CheckProofOfWork(uint256, unsigned int)'
build/txdb.o: In function `CDiskBlockIndex::GetBlockHash() const':
/home/mike/ProtoShares/src/main.h:1885: undefined reference to `CBlockHeader::GetHash() const'
build/txdb.o: In function `void CTxOutCompressor::Unserialize<CDataStream>(CDataStream&, int, int)':
/home/mike/ProtoShares/src/main.h:687: undefined reference to `CTxOutCompressor::DecompressAmount(unsigned long long)'
build/txdb.o: In function `void CTxOutCompressor::Serialize<CDataStream>(CDataStream&, int, int) const':
/home/mike/ProtoShares/src/main.h:687: undefined reference to `CTxOutCompressor::CompressAmount(unsigned long long)'
build/txdb.o:(.rodata._ZTI12CCoinsViewDB[_ZTI12CCoinsViewDB]+0x10): undefined reference to `typeinfo for CCoinsView'
collect2: error: ld returned 1 exit status
make: *** [protosharesd] Error 1
https://Steemit.com | The Social Media Network that Pays

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #7 on: November 04, 2013, 11:01:59 PM »
Very interesting error... looks like something didn't link.

I just followed the steps above and everything built for me.  Only thing I changed was installing boost 1.54 from source rather than using the built in version.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline educatedwarrior

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Mining on Linux instructions?
« Reply #8 on: November 05, 2013, 12:18:49 AM »
bytemaster, when you created your droplet in digital ocean what parameters did you use?  Maybe that has something to do with it.
BTSX: codeblooded   |   PTS: PiiQ6ZECCRYawcZFc8ZGbvjuCjCnBVuPjA
BTSX delegate: wallet_approve_delegate codeblooded true

Offline Amazon

  • Hero Member
  • *****
  • Posts: 831
    • View Profile
    • Bitshares Forum
Re: Mining on Linux instructions?
« Reply #9 on: November 05, 2013, 12:43:12 AM »
I compiled src from makefile.unix, got bitcoind.

when I tried to run it, got following
Code: [Select]
bitcoind: main.cpp:2839: bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.
Aborted (core dumped)

Am I on the good track?

Even I changed system time, it still give me same error. I just want to test speed.
« Last Edit: November 05, 2013, 12:47:49 AM by Amazon »
Forum Donation: PforumPLfVQXTi4QpQqKwoChXHkoHcxGuA

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #10 on: November 05, 2013, 12:49:36 AM »
You are on the right track... once we publish the proper commit you will be good to go.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #11 on: November 05, 2013, 12:50:56 AM »
bytemaster, when you created your droplet in digital ocean what parameters did you use?  Maybe that has something to do with it.

2 GB 2 Core.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline lib

  • Sr. Member
  • ****
  • Posts: 243
  • liberty
    • View Profile
Re: Mining on Linux instructions?
« Reply #12 on: November 05, 2013, 12:58:33 AM »
I got the same error in mac. Waiting for pull ;)
Is "./bitcoind -gen -daemon &"  the right command to go?
Do we need some special configuration in "protoshares.conf"?
Forum Donation: PforumPLfVQXTi4QpQqKwoChXHkoHcxGuA
Personal Address: PakhuBkqTu4oTHJ4ZffvzVwCGCMfuqazgm

Offline bytemaster

Re: Mining on Linux instructions?
« Reply #13 on: November 05, 2013, 01:04:02 AM »
The only thing I can vouch for is protsharesd.pro  using qmake. 

Mining will not work unless you can connect to a network so it is hard to do a speed test :).

I will post a benchmark tool for everyone here in a bit :)
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline Pairmike

Re: Mining on Linux instructions?
« Reply #14 on: November 05, 2013, 01:10:16 AM »
 bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.

I think I figured it out. 
https://Steemit.com | The Social Media Network that Pays

 

Google+