Author Topic: Compiling Bitshares in Ubuntu  (Read 10908 times)

0 Members and 1 Guest are viewing this topic.

Offline HackFisher

  • Hero Member
  • *****
  • Posts: 883
    • View Profile
Please refer this: https://github.com/InvictusInnovations/BitShares/issues/52
lack of genesis.json file causing dead loop rather throw exception in bts_server
Hey,
maybe you can help me out,

I built the wallet and server using your tutorial, the wallet works but the server is throwing this error (in red)

Code: [Select]
$ ./bts_server
1828991ms th_a       chain_server.cpp:401          configure            ] listening for stcp connections on port 4567
1828992ms th_a       chain_server.cpp:403          configure            ] ...
1829029ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/blk_id2num is not upgradeable
1829075ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/trx_id2num is not upgradeable
1829126ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/meta_trxs is not upgradeable
1829166ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/blocks is not upgradeable
1829217ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/block_trxs is not upgradeable
1829264ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/bids is not upgradeable
1829326ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/asks is not upgradeable
1829385ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/calls is not upgradeable
1829430ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/price_history is not upgradeable
1829431ms th_a       chain_server.cpp:94           create_test_genesis_ ] caught exception!: eof
unexpected end of file
    {}
    th_a  json.cpp:342 variant_from_stream
1829431ms th_a       chain_server.cpp:114          close                ] closing connections...
1829431ms th_a       server.cpp:19                 main                 ] eof
unexpected end of file
    {}
    th_a  json.cpp:342 variant_from_stream
error configuring server
    {"config":{"port":4567,"mirrors":[]}}
    th_a  chain_server.cpp:423 configure

Any idea what I may be doing wrong here?
thanks
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 arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Too bad..
I pulled an update from git just now and re-built, but it's still giving the same error


Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
I am having the same problem with today's and yesterday build. Yesterday was working correctly ... so I guess some breaking changes are occurring now in the network.
« Last Edit: February 28, 2014, 12:51:23 pm by betax »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Hey,
maybe you can help me out,

I built the wallet and server using your tutorial, the wallet works but the server is throwing this error (in red)

Code: [Select]
$ ./bts_server
1828991ms th_a       chain_server.cpp:401          configure            ] listening for stcp connections on port 4567
1828992ms th_a       chain_server.cpp:403          configure            ] ...
1829029ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/blk_id2num is not upgradeable
1829075ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/trx_id2num is not upgradeable
1829126ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/meta_trxs is not upgradeable
1829166ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/blocks is not upgradeable
1829217ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/block_trxs is not upgradeable
1829264ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/bids is not upgradeable
1829326ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/asks is not upgradeable
1829385ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/calls is not upgradeable
1829430ms th_a       upgrade_leveldb.cpp:24        UpgradeDbIfNecessary ] Database chain/market/price_history is not upgradeable
1829431ms th_a       chain_server.cpp:94           create_test_genesis_ ] caught exception!: eof
unexpected end of file
    {}
    th_a  json.cpp:342 variant_from_stream
1829431ms th_a       chain_server.cpp:114          close                ] closing connections...
1829431ms th_a       server.cpp:19                 main                 ] eof
unexpected end of file
    {}
    th_a  json.cpp:342 variant_from_stream
error configuring server
    {"config":{"port":4567,"mirrors":[]}}
    th_a  chain_server.cpp:423 configure

Any idea what I may be doing wrong here?
thanks

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline cryptosig

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Is QT not required for the GUI?
BTSX: wallet_approve_delegate cryptosig
KEYID: wallet_approve_delegate delegate-cryptosig

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
Compiled versions

I will try to post a daily compiled drop here (until a better solution is available).

Note: You don't know me, so for all you know this can be infected with a virus, (it is not) but nevertheless common sense apply.

Have fun.

2014-02-27https://www.dropbox.com/s/p0aggc29in3rucr/bts_wallet%202014-02-27.tar.gz
2014-02-28https://www.dropbox.com/s/vytze9qfhtw5qsp/bts_wallet_2014-02-28.tar.gz
2014-03-03Build broken: authorisation_status enum changes
2014-03-04https://www.dropbox.com/s/u2qn33uv2v2hauq/bts_wallet_2014_03_04.tar.gz It includes now get_bts_balance

Note: If you have already compiled your own version and want to build the latest just, run this. It will delete the BitShares directory, clone the latest, run cmake and compile.
Code: [Select]

cd ~
rm -rf BitShares
git clone https://github.com/InvictusInnovations/BitShares.git
cd BitShares
git clone https://github.com/InvictusInnovations/fc.git

~/cmake-2.8.12.1/bin/cmake ~/BitShares

cd ~/BitShares
make

If you have a custom chain as supplied by HackFisher.. backit up first before you delete the BitShares the directory.
« Last Edit: March 04, 2014, 04:53:21 pm by betax »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
Hi,

Please find here some quick notes I have written on compiling BitShares in a fresh image of Ubuntu.

Code: [Select]
cd ~
sudo apt-get update
sudo apt-get install git libreadline-dev uuid-dev g++ libdb++-dev libdb-dev zip libssl-dev openssl build-essential python-dev autotools-dev libicu-dev build-essential libbz2-dev

Boost
Code: [Select]
cd ~
wget -O boost_1_54_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download
tar xzvf boost_1_54_0.tar.gz
cd boost_1_54_0/

# boost's bootsrap setup
./bootstrap.sh --prefix=/usr/local
   
# If we want MPI then we need to set the flag in the user-config.jam file
user_configFile=`find $PWD -name user-config.jam`
echo "using mpi ;" >> $user_configFile
   
# Find the maximum number of physical cores
n=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'`

    # Install boost in parallel
sudo ./b2 --with=all -j $n install
   
    # Reset the ldconfig, assumes you have /usr/local/lib setup already. check ROOT installation
    # blog I wrote if not. Else you can add it to your LD_LIBRARY_PATH, running this anyway
    # will not hurt.
sudo ldconfig 

chmod +x install_boost.sh
./install_boost.sh

boost installation extracted from here: https://dl.dropboxusercontent.com/u/88131281/install_boost.sh

cmake-2.8.12.1

Code: [Select]
cd ~
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
tar xvf cmake-2.8.12.1.tar.gz
cd cmake-2.8.12.1
cmake . && make

Clone the code

Code: [Select]
cd ~
git clone https://github.com/InvictusInnovations/BitShares.git
cd BitShares
git clone https://github.com/InvictusInnovations/fc.git


Run cmake
Code: [Select]
~/cmake-2.8.12.1/bin/cmake ~/BitShares
Finally compile it
Code: [Select]
cd ~/BitShares
make

If everything is ok you should have your compiled versions here:
Code: [Select]
cd bts_wallet
 ./bts_server and ./bts_wallet

Genesis 28/2

Here is a link to the genesis.json posted by bytemaster

https://github.com/betaxx/BTSXBalance/blob/master/genesis.json?raw=true

Initialising Genesis by HackFisher:
Quote
For testing, I modified the code using original genesis address and generate the testing genesis chain, you can download it and unzip in the folder of bts_server if you need.

https://dl.dropboxusercontent.com/u/5037011/chain.zip

after you start and login bts wallet, you can import genesis key:
Code: [Select]

importkey d987064e501555cf3d2e4e68f093a94144bc876a85c520971b747af32fa6a4c3 rescan


you get 100 BTS to play.


Check your BTSX balances without using your wallet.dat
This a shameless plug for a tool I created :) .. check it out here if you want to confirm your BTSx balance.
https://bitsharestalk.org/index.php?topic=3371.0
« Last Edit: March 06, 2014, 05:45:17 am by betax »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads