Author Topic: Test Net for Advanced Users  (Read 266543 times)

0 Members and 1 Guest are viewing this topic.

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
thanks @betax for the nice tutorial!

@bytemaster
betax deserves some Brownies for the tutorial about how to install a Graphene node. Please send him some extra Brownies. I am sure everybody here aggrees with that.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
14. Restart with parameters to start block producing (block producing needs your witness id and private keys) Current node abit's for test 1
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-14-test-genesis.json -d test_net_1 -s 114.92.254.159:62015  --witness-id '"1.6.5156"' --private-key '["GPH6JhL..your.signing.key..bc5mWyCvERV3coy","5K..your.secret..a"]'15. See your witness producing blocks and
you can Ctrl A Ctrl D to detach from screen.
Thanks for sharing, but don't use my node(at least not only use my node), it breaks now and then.
And the genesis file in step 14 should be aug-20-test-genesis.json.

Here is a list of nodes I'm using (still breaks sometimes):
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json  aug-20-test-genesis.json -d test_net_1 -s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015"


BitShares committee member: abit
BitShares witness: in.abit

Offline cass

  • Hero Member
  • *****
  • Posts: 4311
  • /(┬.┬)\
    • View Profile
great tut @betax - thx for sharing !
█║▌║║█  - - -  The quieter you become, the more you are able to hear  - - -  █║▌║║█

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
Full Instructions for Test 1, maybe the op can change.. or we can start a new thread changing the nodes / chain id so is easier for everyone to start / get started again.

It is a summary of everyone findings in this thread, so credit to everyone.  (@puppies, @abit, @clayop, @maqifrnswa, @lafona, @IHashfury, @Riverhead, @testz,  @cryptosile, @Thom) plus of course @xeroc original tutorials, and help here.

I have published this now on the Wiki: https://github.com/cryptonomex/graphene/wiki/How-to-setup-your-witness-for-test-net-(Ubuntu-14.04)

Installation of dependencies
Extracted from xerocs instructions here: https://github.com/cryptonomex/graphene/wiki/build-ubuntu
If you already have done your installation move to next step.

Code: [Select]
sudo apt-get updateInstall gcc-49 etc
Code: [Select]
sudo apt-get install gcc-4.9 g++-4.9 cmake make libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool gitIf you cannot install gcc-4.9, you will need to add this repository before hand and try again.
Code: [Select]
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
Installation of BOOST
Code: [Select]
BOOST_ROOT=$HOME/opt/boost_1_57_0
sudo apt-get update
sudo apt-get install autotools-dev build-essential g++ libbz2-dev libicu-dev python-dev
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download' -O boost_1_57_0.tar.bz2
[ $( sha256sum boost_1_57_0.tar.bz2 | cut -d ' ' -f 1 ) == "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967" ] || ( echo 'Corrupt download' ; exit 1 )
tar xjf boost_1_57_0.tar.bz2
cd boost_1_57_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
./b2 install

Git  checkout and build
Ensure your boost path is correct
Code: [Select]
BOOST_ROOT=$HOME/opt/boost_1_57_0Check out and build
Code: [Select]
cd ~
git clone https://github.com/cryptonomex/graphene.git
cd graphene

Check out test 1 (specific to this chain)
Code: [Select]
git checkout test1
Code: [Select]
git submodule update --init --recursive
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Debug .
make

Setup witness / import balances

2. Go to the witness directory:
Code: [Select]
cd ~/graphene/programs/witness_node
3. Download genesis Path specific for Test 1
Code: [Select]
wget https://github.com/cryptonomex/graphene/releases/download/test1/aug-20-test-genesis.json
4.Start a new terminal screen
Code: [Select]
screen5. Run the witness  Current nodes for test 1 (replace for other tests) 
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-20-test-genesis.json -d test_net_1 -s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015"
Note:
-d parameter is for the directory you want the witness data to be stored
-s is the node you want to connect

If you have problems, you might need to put the whole path for the genesis
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json ~/graphene/programs/witness-node/aug-20-test-genesis.json -d test_net_1 -s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015"

6. Detach from screen
Code: [Select]
Ctrl A Ctrl D7. Extract your wif keys for user and balances as per xeroc's instructions https://github.com/cryptonomex/graphene/wiki/Howto-become-an-active-witness-in-BitShares-2.0
8. Navigate to cli_wallet
Code: [Select]
cd ~/graphene/programs/cli_wallet9. Run cli Current chain id for test 1
Code: [Select]
./cli_wallet -w test_wallet_puppies  --chain-id d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083Note:
-w is your directory wallet
10. Setup witness as per xerocs instructions https://github.com/cryptonomex/graphene/wiki/Howto-become-an-active-witness-in-BitShares-2.0
Remember to copy your keys, witness id
Note you need to wait for a maintenance period to be voted in
11. Exit
12. Go back to your witness terminal
Code: [Select]
screen -r 13. Exit your witness ctrl c
14. Restart with parameters to start block producing (block producing needs your witness id and private keys) Current nodes for test 1 (replace for other tests)
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-20-test-genesis.json -d test_net_1 -s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015"  --witness-id '"1.6.5156"' --private-key '["GPH6JhL..your.signing.key..bc5mWyCvERV3coy","5K..your.secret..a"]'15. See your witness producing blocks and
you can Ctrl A Ctrl D to detach from screen.


Edit: As per abit's comments adding other nodes, correcting genesis in last step.
« Last Edit: August 24, 2015, 10:47:20 am by betax »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Thom

I understand you are frustrated with the information being spread out throughout this thread.  I have been responding to this thread mostly from work, typing on a cellphone, and have not have the time nor the wherewithal to collect everything into a single post.

You and xeroc have been the more helpful ones here puppies. Xeroc mostly via PMs. A few others here and there.

I do understand your constraints related to your work environment, and I don't expect anyone to consolidate the posts in this lengthy thread. However, given the effort I see put forth here to post various things, it would only take slightly more effort for (anyone participating) to post the essential parameters when they change.

TBH some of the frustrations I've experienced are my own internal "demons", so for that I offer my apologies. My style of learning usually involves asking a lot of questions which can be annoying to some people, and may put them off from answering them. Sometimes I can figure things out on my own but often I can't.

Since Wednesday this week I have also had many interruptions which has interfered with my ability to stay focused all day. When I am involved it has been later in the day when many are probably ramping down their efforts.

Thus there are several contributing factors to the difficulties I've had.

Going forward if the essential parameters (genesis json, chain-id, src code used [i.e. test1 etc],  and seed node IP) are posted in the forum at least whenever any of them change it would help tremendously in being able to get on the same page.

I feel like I've learned a lot today and can now successfully import a 0.9.2 balance. It wasn't clear to me that could be done for any registered 0.9.2 account (I didn't see any explanation of what 0.9.2 accounts were included in this test net, presumably in the genesis json file?). I figured it out experimentally today. I believe I was able to vote my delegate in, but not sure about that yet. I didn't get any errors from the API calls, and they did return a json object, but I also never performed any "lifetime member" upgrade either. abit said I was voted in, but not sure how he knows that and I'm not sure if it was me or some else that made that happen.

So despite my sense that I have learned much there are still some basic gaps in my understanding. I'm sure I'm not the only one, I just happen to be more vocal about expressing them I guess.
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline bitcard

  • Newbie
  • *
  • Posts: 9
    • View Profile
the test url is broken?

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
Thanks for the info abit. Did you vote me in or did you just observe it was so?

If you haven't noticed by now I'm full of questions. Being voted in will last until the next test or code revision, or ? At which time one must run thru the process of balance import and getting voted in right?

I just tried to check the node to see if I could find evidence it was producing blocks or was voted in but could not figure out how.

I did a forum search for "voted in" and "producing blocks" and of all the messages that had those phrases NOT ONE gave an API call or method for checking those things. Nice communication there folks. Real nice :(
You will stay voted in until we start a new chain, at which point you will need to import your keys again, and get voted in again.

I don't know of any direct way to check witness statistics.  Some alternatives are to watch the wtiness_node, and watch for your delegate number going by.  or in the cli wallet you can use the get_witness command and look at the previous secret, and the next secret hash readouts.  Those two entries will change every time you generate a block.  (if anyone else has a good way of checking I would appreciate it.)

I understand you are frustrated with the information being spread out throughout this thread.  I have been responding to this thread mostly from work, typing on a cellphone, and have not have the time nor the wherewithal to collect everything into a single post. 
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Thom

Thanks for the info abit. Did you vote me in or did you just observe it was so?

If you haven't noticed by now I'm full of questions. Being voted in will last until the next test or code revision, or ? At which time one must run thru the process of balance import and getting voted in right?

I just tried to check the node to see if I could find evidence it was producing blocks or was voted in but could not figure out how.

I did a forum search for "voted in" and "producing blocks" and of all the messages that had those phrases NOT ONE gave an API call or method for checking those things. Nice communication there folks. Real nice :(
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
I'm going to leave my witness node running until tomorrow, but I'n tired of waiting for puppies to vote me in or for the maintenance interval to pass that should do the same.

I'll have to try again Monday.

Good luck to your efforts puppies!
You've been voted in.  8)
BitShares committee member: abit
BitShares witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Dang, shit keeps changing!

I had to restart the witness after I saw the witness-id for delegate.verbaltech changed. Is that b/c of the different genesis block? I'm using the aug-20th gen. blk now, with d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083 and seed node=104.200.28.117:61705.

After that I had to go thru the rig-a-ma-role of importing the balance all over again. SO, if the above params are correct whenever that maintenance interval passes I should be voted in.

What's the api call to chk if I'm producing blocks?

will the total_votes go up in this api call after the maintenance interval passes? I just looked for dele-puppy and it's still shows total_votes as 0.

Code: [Select]
get_witness delegate.verbaltech
{
  "id": "1.6.1621",
  "witness_account": "1.2.22408",
  "signing_key": "GPHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "next_secret_hash": "556678686970979675674876785---jhjbvth,
  "previous_secret": "0000000000000000000000000000000000000000",
  "vote_id": "1:1621",
  "total_votes": 0,                              <---------------- will this change?
  "url": ""
}
See https://github.com/cryptonomex/graphene/releases

Code: [Select]
./witness_node -s "104.236.51.238:1776" --genesis-json aug-20-test-genesis.json
./cli_wallet --chain-id d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083
BitShares committee member: abit
BitShares witness: in.abit

Offline Thom

I'm going to leave my witness node running until tomorrow, but I'n tired of waiting for puppies to vote me in or for the maintenance interval to pass that should do the same.

I'll have to try again Monday.

Good luck to your efforts puppies!
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline Thom

Well, I believe I've FINALLY jumped through all the hurdles to start producing blocks, assuming 50K CORE is enough AND all of the parameters are correct like chain-id, genesis block, seed node.......

It makes my head spin!

If all the required params were posted whenever they change (and perhaps a reference to them every other page or so) it would be a hell of a lot easier to get involved with this testing effort.

But then I guess I'm slow in learning that abrupt / unannounced changes are par for the course around here.

Just noticed this from the info API call:
Code: [Select]
info
{
  "head_block_num": 0,
  "head_block_id": "0000000000000000000000000000000000000000",
  "head_block_age": "5 days old",
  "next_maintenance_time": "45 years  ago",    <----------------------------- Does this mean there will not be another one to apply the votes I cast????????
  "chain_id": "d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083",

BTW, until I started trying to get involved with this testing I never heard anyone mention the terms "committee member" or CORE asset. When did these get added to the BitShares buzzwords?
« Last Edit: August 23, 2015, 01:32:36 am by Thom »
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline Thom

Dang, shit keeps changing!

I had to restart the witness after I saw the witness-id for delegate.verbaltech changed. Is that b/c of the different genesis block? I'm using the aug-20th gen. blk now, with d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083 and seed node=104.200.28.117:61705.

After that I had to go thru the rig-a-ma-role of importing the balance all over again. SO, if the above params are correct whenever that maintenance interval passes I should be voted in.

What's the api call to chk if I'm producing blocks?

will the total_votes go up in this api call after the maintenance interval passes? I just looked for dele-puppy and it's still shows total_votes as 0.

Code: [Select]
get_witness delegate.verbaltech
{
  "id": "1.6.1621",
  "witness_account": "1.2.22408",
  "signing_key": "GPHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "next_secret_hash": "556678686970979675674876785---jhjbvth,
  "previous_secret": "0000000000000000000000000000000000000000",
  "vote_id": "1:1621",
  "total_votes": 0,                              <---------------- will this change?
  "url": ""
}
« Last Edit: August 23, 2015, 01:07:01 am by Thom »
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
You do have to wait for the maintenance period.  50k is plenty.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Thom

Kewlness. Please vote me in, I'm up and running now.

everydaycrypto, I tried to vote you in with my 50K BTS balance but the wallet said everydaycrypto is not registered as a witness.

Puppies, I was under the impression it didn't take much of a balance to vote witnesses in on this test net. Isn't 50K BTS (CORE?) enough, or is it that the maintenance interval must pass to accumulate the votes and I haven't waited long enough yet?

Dont know if this has already been found and fixed but my witness node died.  I'll get it back up in a few minutes and vote those needing it.
Code: [Select]
   {"new_block":{"previous":"0002a82166d023fa7d649b09e5d81098fb7bf60b","timestamp":"2015-08-22T22:21:18","witness":"1.6.27","next_secret_hash":"22230db1a0563e301b74c59ef7e1ff1612bff7b7","previous_secret":"9eabe79eb0d03d3c8630c0886c58462516913db4","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f1109216757ffd893766ca55fd2e8b6b870ce120eb8ac0b8d2b5fe308bb33b5441a3d8e49d7de51cad7163d71febab7eb119bf6cc1c0ca6a2bf9dfd29e85f879a","transactions":[]}}
    th_a  db_block.cpp:176 _push_block
1279000ms th_a       witness.cpp:240               block_production_loo ] slot: 66 scheduled_witness: 1.6.1526 scheduled_time: 2015-08-22T22:21:19 now: 2015-08-22T22:21:19
1279000ms th_a       witness.cpp:243               block_production_loo ] Witness 1.6.1526 production slot has arrived; generating a block now...

Program received signal SIGSEGV, Segmentation fault.
0x0000000002851792 in SHA256_Update.part.0 ()
(gdb) bt
second_branch_itr != _index.get<block_id>().end():
    {}
    th_a  fork_database.cpp:186 fetch_branch_from

    {"first":"0002a822214f6038949b2585653866af1da863a3","second":"0002a7e8b9613cd334a36aeccdb1d32460d8fa53"}
    th_a  fork_database.cpp:217 fetch_branch_from
    {"new_block":{"previous":"0002a82166d023fa7d649b09e5d81098fb7bf60b","timestamp":"2015-08-22T22:21:18","witness":"1.6.27","next_secret_hash":"22230db1a0563e301b74c59ef7e1ff1612bff7b7","previous_secret":"9eabe79eb0d03d3c8630c0886c58462516913db4","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f1109216757ffd893766ca55fd2e8b6b870ce120eb8ac0b8d2b5fe308bb33b5441a3d8e49d7de51cad7163d71febab7eb119bf6cc1c0ca6a2bf9dfd29e85f879a","transactions":[]}}                                      th_a  db_block.cpp:176 _push_block                                       1279000ms th_a       witness.cpp:240               block_production_loo ] slot: 66 scheduled_witness: 1.6.1526 scheduled_time: 2015-08-22T22:21:19 now: 2015-08-22T22:21:19
1279000ms th_a       witness.cpp:243               block_production_loo ] Witness 1.6.1526 production slot has arrived; generating a block now...
Program received signal SIGSEGV, Segmentation fault.                         0x0000000002851792 in SHA256_Update.part.0 ()
(gdb) bt
#0  0x0000000002851792 in SHA256_Update.part.0 ()                            #1  0x0000000002851b29 in SHA224_Update ()                                   #2  0x0000000002574131 in fc::sha224::encoder::write (this=0x7ffff585a220,
    d=0x7ffff585a077 "\366\v", dlen=1)
    at /home/user/src/graphene/libraries/fc/src/crypto/sha224.cpp:43
#3  0x00000000023c4c99 in fc::raw::pack<fc::sha224::encoder> (s=..., v=...)
    at /home/user/src/graphene/libraries/fc/include/fc/io/raw.hpp:141
#4  0x00000000023c4f34 in fc::raw::detail::pack_object_visitor<fc::sha224::encoder, graphene::db::object_id<(unsigned char)1, (unsigned char)6, graphene::chain::witness_object> >::operator()<fc::unsigned_int, graphene::db::object_id<(unsigned char)1, (unsigned char)6, graphene::chain::witness_object>, &graphene::db::object_id<(unsigned char)1, (unsigned char)6, graphene::chain::witness_object>::instance> (this=0x7ffff585a0e0, name=0x29d9a9e "instance")
    at /home/user/src/graphene/libraries/fc/include/fc/io/raw.hpp:250
#5  0x00000000023c4eba in fc::reflector<graphene::db::object_id<(unsigned char)1, (unsigned char)6, graphene::chain::witness_object> >::visit<fc::raw::detail::pack_object_visitor<fc::sha224::encoder, graphene::db::object_id<(unsigned char)1, (unsigned char)6, graphene::chain::witness_object> > > (
    visitor=...)
    at /home/user/src/graphene/libraries/db/include/graphene/db/object_id.hpp:143
#6  0x00000000023c4dbc in fc::raw::detail::if_enum<fc::false_type>::pack<fc::sha224::encoder, graphene::db::object_id<(unsigned char)1, (unsigned char)6, graphene::chain::witness_object> > (s=..., v=...)
    at /home/user/src/graphene/libraries/fc/include/fc/io/raw.hpp:296
#7  0x00000000023c4c38 in fc::raw::detail::if_reflected<fc::true_type>::pack<fc::sha224::encoder, graphene::db::object_id<(unsigned char)1, (unsigned char---Type <return> to continue, or q <return> to quit---
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html