BitShares Forum

Main => Technical Support => Topic started by: lastagile on September 21, 2014, 01:30:21 pm

Title: Problem in connect. Invalid chain id
Post by: lastagile on September 21, 2014, 01:30:21 pm
Hi team,
I got connection problem when trying to build and run web wallet.
Source code from github prepossBitShares/bitshares_toolkit, and built successfully.
When I run ./bitshares_client --data-dir w1 --server --httpport 9989 
I can login from localhost. But get a connection error.
I read the code find out that it have some thing to do with genesis.json.
Code: [Select]
./bitshares_client --data-dir w1 --server --httpport 9989                             
Loading blockchain from: w1/chain
Loading config from file: w1/config.json
Initializing genesis state from built-in genesis file
Please be patient, this will take a few minutes...
Successfully re-indexed 0 blocks in 0 seconds.
Initializing genesis state from built-in genesis file
Starting JSON RPC server on port 55613 (localhost only)
Starting HTTP JSON RPC server on port 9989
Attempting to map P2P port 1723 with UPNP...
Listening for P2P connections on port 1723
Adding peer 5.101.106.138:1777 to peer database
Adding peer 84.238.140.192:42577 to peer database
Adding peer 89.187.144.203:8764 to peer database
Adding peer 178.62.50.61:1777 to peer database
Adding peer 54.79.27.224:1776 to peer database
Adding peer 80.240.133.79:1776 to peer database
(wallet closed) >>>

The log is like that:
Code: [Select]
Received a rejection from 80.240.133.79:1777 in response to my "hello",
reason: "You're on a different chain than I am. 
I'm on 75c11a81b7670bbaa721cc603eadb2313756f94a3bcbb9928e9101432701ac5f
and you're on d2b8c7464fee1179616efc306c195aaddf2bdf4da26bd31c825d3ad2b266b933"

Code: [Select]
>> blockchain_get_info

{
  "blockchain_id": "d2b8c7464fee1179616efc306c195aaddf2bdf4da26bd31c825d3ad2b266b933",
  "symbol": "XTS",
  "name": "BitShares XTS",
  "version": 109,
  "db_version": 133,
  "genesis_timestamp": "2014-09-01T00:00:00",
  "block_interval": 10,
  "max_block_size": 51200,
  "max_blockchain_size": 107374182400,
  "address_prefix": "XTS",
  "inactivity_fee_apr": "0.00010 XTS",
  "relay_fee": "0.10000 XTS",
  "delegate_num": 101,
  "delegate_reg_fee": "0.00000 XTS",
  "name_size_max": 63,
  "memo_size_max": 19,
  "data_size_max": 65536,
  "symbol_size_max": 5,
  "symbol_size_min": 3,
  "asset_reg_fee": "0.00000 XTS",
  "asset_shares_max": 1000000000000000,
  "min_market_depth": "2,000,000.00000 XTS",
  "max_pending_queue_size": 10,
  "max_trx_per_second": 1,
  "min_block_fee": "0.00000 XTS"
}

I noticed genesis.json is broken, there is no "tests/genesis.json":
genesis.json -> ../../tests/genesis.json
So I download one from https://raw.githubusercontent.com/dacsunlimited/bitsharesx/master/libraries/blockchain/genesis.json .
Ues parameter with --genesis-config genesis.json. But it also not work.

Could u help me?
Title: Re: Problem in connect. Invalid chain id
Post by: lastagile on September 21, 2014, 01:33:20 pm
I run it under ubuntu 13.4
Title: Re: Problem in connect. Invalid chain id
Post by: bitder on September 21, 2014, 02:27:21 pm
...
Code: [Select]
>> blockchain_get_info

{
  "blockchain_id": "d2b8c7464fee1179616efc306c195aaddf2bdf4da26bd31c825d3ad2b266b933",
  "symbol": "XTS",
  "name": "BitShares XTS",
  "version": 109,
  "db_version": 133,
  "genesis_timestamp": "2014-09-01T00:00:00",
  "block_interval": 10,
  "max_block_size": 51200,
  "max_blockchain_size": 107374182400,
  "address_prefix": "XTS",
  "inactivity_fee_apr": "0.00010 XTS",
  "relay_fee": "0.10000 XTS",
  "delegate_num": 101,
  "delegate_reg_fee": "0.00000 XTS",
  "name_size_max": 63,
  "memo_size_max": 19,
  "data_size_max": 65536,
  "symbol_size_max": 5,
  "symbol_size_min": 3,
  "asset_reg_fee": "0.00000 XTS",
  "asset_shares_max": 1000000000000000,
  "min_market_depth": "2,000,000.00000 XTS",
  "max_pending_queue_size": 10,
  "max_trx_per_second": 1,
  "min_block_fee": "0.00000 XTS"
}

I noticed genesis.json is broken, there is no "tests/genesis.json":
genesis.json -> ../../tests/genesis.json
So I download one from https://raw.githubusercontent.com/dacsunlimited/bitsharesx/master/libraries/blockchain/genesis.json .
Ues parameter with --genesis-config genesis.json. But it also not work.

Could u help me?

You're building from the wrong repo. You need to clone the dacsunlimited fork since btsx is launched by them.
git clone https://github.com/dacsunlimited/bitsharesx.git

Title: Re: Problem in connect. Invalid chain id
Post by: lastagile on September 22, 2014, 12:32:26 pm
...
Code: [Select]
>> blockchain_get_info

{
  "blockchain_id": "d2b8c7464fee1179616efc306c195aaddf2bdf4da26bd31c825d3ad2b266b933",
  "symbol": "XTS",
  "name": "BitShares XTS",
  "version": 109,
  "db_version": 133,
  "genesis_timestamp": "2014-09-01T00:00:00",
  "block_interval": 10,
  "max_block_size": 51200,
  "max_blockchain_size": 107374182400,
  "address_prefix": "XTS",
  "inactivity_fee_apr": "0.00010 XTS",
  "relay_fee": "0.10000 XTS",
  "delegate_num": 101,
  "delegate_reg_fee": "0.00000 XTS",
  "name_size_max": 63,
  "memo_size_max": 19,
  "data_size_max": 65536,
  "symbol_size_max": 5,
  "symbol_size_min": 3,
  "asset_reg_fee": "0.00000 XTS",
  "asset_shares_max": 1000000000000000,
  "min_market_depth": "2,000,000.00000 XTS",
  "max_pending_queue_size": 10,
  "max_trx_per_second": 1,
  "min_block_fee": "0.00000 XTS"
}

I noticed genesis.json is broken, there is no "tests/genesis.json":
genesis.json -> ../../tests/genesis.json
So I download one from https://raw.githubusercontent.com/dacsunlimited/bitsharesx/master/libraries/blockchain/genesis.json .
Ues parameter with --genesis-config genesis.json. But it also not work.

Could u help me?

You're building from the wrong repo. You need to clone the dacsunlimited fork since btsx is launched by them.
git clone https://github.com/dacsunlimited/bitsharesx.git

Thanks man, it works now