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

0 Members and 1 Guest are viewing this topic.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
There are two arguments:  -w "1.6.X" means produce for that witness, enable-stale means produce alone.
Thanks. Just restarted my witness without enable-stale parameter and it works!

By the way how to "cleanly" exit the witness node? It takes much time to replay while restarting.

Without '--enable-stale-production' my witness doesn't produce blocks.
It's really confusing. Maybe it's better to have 2 parameters: '--enable-block-production' and '--enable-stale-production'.
I thought the same last night, but I just set up my node earlier without the stale production and it was producing blocks when I left.

Maybe because the "Generated block" lines in the console log are in white color, so I didn't notice them.
Code: [Select]
540991ms th_a       witness.cpp:242               block_production_loo ] Witness 1.6.5155 production slot has arrived; generating a bl
ock now...
540992ms th_a       witness.cpp:255               block_production_loo ] Generated block #66220 with timestamp 2015-08-18T00:09:01 at
time 2015-08-18T00:09:01

And this line of log is in blue:
Code: [Select]
884991ms th_a       witness.cpp:191               operator()           ] Not producing block because production is disabled.
8
But the real reason of 'production disabled' is "not enabled stale production && it's stale now "? I would not get confused if the log says "... because stale production is disabled".
« Last Edit: August 18, 2015, 12:28:09 am by abit »
BitShares committee member: abit
BitShares witness: in.abit

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
My test witness missed all blocks since I haven't enabled block production..  ;)

I may have done the same but I don't think I was voted in.

How do you enable block production?

Nothing is needed beyond launching the witness_node with the witness ID and public private key pair.  You can also add them to the config.ini if you prefer.
Doesn't it need the parameter '--enable-stale-production'?
only if you are the initial node starting a stale chain.  If you are joining a live chain it's not needed.
I don't think so.. Without '--enable-stale-production' my witness doesn't produce blocks.
It's really confusing. Maybe it's better to have 2 parameters: '--enable-block-production' and '--enable-stale-production'.
I thought the same last night, but I just set up my node earlier without the stale production and it was producing blocks when I left.
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline bytemaster

My test witness missed all blocks since I haven't enabled block production..  ;)

I may have done the same but I don't think I was voted in.

How do you enable block production?

Nothing is needed beyond launching the witness_node with the witness ID and public private key pair.  You can also add them to the config.ini if you prefer.
Doesn't it need the parameter '--enable-stale-production'?
only if you are the initial node starting a stale chain.  If you are joining a live chain it's not needed.
I don't think so.. Without '--enable-stale-production' my witness doesn't produce blocks.
It's really confusing. Maybe it's better to have 2 parameters: '--enable-block-production' and '--enable-stale-production'.

There are two arguments:  -w "1.6.X" means produce for that witness, enable-stale means produce alone.
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 abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
My test witness missed all blocks since I haven't enabled block production..  ;)

I may have done the same but I don't think I was voted in.

How do you enable block production?

Nothing is needed beyond launching the witness_node with the witness ID and public private key pair.  You can also add them to the config.ini if you prefer.
Doesn't it need the parameter '--enable-stale-production'?
only if you are the initial node starting a stale chain.  If you are joining a live chain it's not needed.
I don't think so.. Without '--enable-stale-production' my witness doesn't produce blocks.
It's really confusing. Maybe it's better to have 2 parameters: '--enable-block-production' and '--enable-stale-production'.
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
The test net died, but I started another one, so if you want to test until another official one comes up replace the url in bytemasters command with 45.55.6.216:1776
I'm in and producing blocks, witness 1.6.5155.
Current IP/port of my observing/seed node is 114.92.254.159:62016.

Command of witness node for observing:
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8170"  --genesis-json "aug-14-test-genesis.json" --data-dir="testnet_puppies_ob" -s "45.55.6.216:1776" --p2p-endpoint "0.0.0.0:62016"

Command of CLI wallet for observing:
Code: [Select]
./cli_wallet -w wallet-testnet-puppies-ob.json --chain-id 081401ede64c8fe30b23c91d7ab8750103acb1a39548a866fb562f2edf4627d6 -s ws://127.0.0.1:8170

Command of witness node for block producing:
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8190"  --genesis-json "aug-14-test-genesis.json" --data-dir="testnet_puppies_prod" -s "45.55.6.216:1776" --witness-id '"1.6.5155"' --private-key '["MY_SIGNING_KEY","PRIVATE_KEY_OF_MY_SIGNING_KEY"]'

Command of CLI wallet for block producing:
Code: [Select]
./cli_wallet -w wallet-testnet-puppies-prod.json --chain-id 081401ede64c8fe30b23c91d7ab8750103acb1a39548a866fb562f2edf4627d6 -s ws://127.0.0.1:8190

//Edit: removed the '--enable-stale-production' parameter.
« Last Edit: August 18, 2015, 12:24:10 am by abit »
BitShares committee member: abit
BitShares witness: in.abit

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
My test witness missed all blocks since I haven't enabled block production..  ;)

I may have done the same but I don't think I was voted in.

How do you enable block production?

Nothing is needed beyond launching the witness_node with the witness ID and public private key pair.  You can also add them to the config.ini if you prefer.
Doesn't it need the parameter '--enable-stale-production'?
only if you are the initial node starting a stale chain.  If you are joining a live chain it's not needed.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
My test witness missed all blocks since I haven't enabled block production..  ;)

I may have done the same but I don't think I was voted in.

How do you enable block production?

Nothing is needed beyond launching the witness_node with the witness ID and public private key pair.  You can also add them to the config.ini if you prefer.
Doesn't it need the parameter '--enable-stale-production'?
BitShares committee member: abit
BitShares witness: in.abit

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
perhaps try
Code: [Select]
./witness_node -d new-data-dir
let it start up and then CTRL C to kill it. Then do
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-14-test-genesis.json -d new-data-dir -s 45.55.6.216:1776
If that doesn't work then I am completely out of ideas.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Thom

I have no fucking idea what is going on. No matter what I've tried I can't get the witness to start now.

I have tried adding the config.ini you posted to the top of mine. I've tried using ONLY what you posted as the config.ini. I've removed the -d test_net and reverted to the old seed, no matter what I get this same error. No log file is generated. There is a bug with the cmd line processing is my guess, but if so it doesn't explain why using the same args as before produces this error.

Thought the genesis file might have become corrupted, but refreshing it did nothing. Here is where I am. Using ONLY the config.ini lines you posted, no others:

Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090" --resync-blockchain -s 45.55.6.216:1776 -d test_net
2205326ms th_a       witness.cpp:70                plugin_initialize    ] key_id_to_wif_pair: ["GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
2205327ms th_a       db_management.cpp:67          wipe                 ] Wiping database
2205329ms th_a       object_database.cpp:82        wipe                 ] Wiping object_database.
2205336ms th_a       application.cpp:228           operator()           ] Initializing database...
2205343ms th_a       main.cpp:173                  main                 ] Exiting with error:
11 eof_exception: End Of File
unexpected end of file
    {}
    th_a  json.cpp:430 variant_from_stream

    {"data_dir":"/home/deletech/bts2.0/test_net/blockchain"}
    th_a  db_management.cpp:94 open

    {}
    th_a  application.cpp:301 startup

I'll switch over and try this on one of my VPS systems and see if I can get anywhere.
« Last Edit: August 17, 2015, 10:41:49 pm 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
I've never seen that error.  Do you have data in your blockchain directory? Maybe add a --resync-blockchain to your command
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
What error is it throwing?  And sorry no Skype account.  I probably should make one though.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Thom

This is a pain. Using these and now witness won't start:

cmd:
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090" -d test_net -s 45.55.6.216:1776
test_net/config.ini:
Code: [Select]
#Endpoint for P2P node to listen on
p2p-endpoint = 0.0.0.0:1776

# P2P nodes to connect to on startup (may specify multiple times)
# seed-node =

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =

# Endpoint for websocket RPC to listen on
rpc-endpoint = 127.0.0.1:8090

# Endpoint for TLS websocket RPC to listen on
# rpc-tls-endpoint =

# The TLS certificate file for this server
# server-pem =

# Password for this certificate
# server-pem-password =

# File to read Genesis State from
genesis-json = aug-14-test-genesis.json

# JSON file specifying API permissions
# api-access =

# Enable block production, even if the chain is stale.
enable-stale-production = false

# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = false

# Allow block production, even if the last block was produced by the same witness.
allow-consecutive = false

# ID of witness controlled by this node (e.g. "1.6.0", quotes are required, may specify multiple times)
# witness-id =

# Tuple of [PublicKey, WIF private key] (may specify multiple times)
private-key = ["GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]

# Account ID to track history for (may specify multiple times)
# track-account =

# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
bucket-size = [15,60,300,3600,86400]

# How far back in time to track history for each bucket size, measured in the number of buckets (default: 1000)
history-per-size = 1000

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error

# declare an appender named "p2p" that writes messages to p2p.log
[log.file_appender.p2p]
filename=logs/p2p/p2p.log
# filename can be absolute or relative to this config file

# route any messages logged to the default logger to the "stderr" logger we
# declared above, if they are info level are higher
[logger.default]
level=info
appenders=stderr

# route messages sent to the "p2p" logger to the p2p appender declared above
[logger.p2p]
level=debug
appenders=p2p

Some file is expected that is missing. I added the genesis cmd line param back in but same issue:
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  -d test_net -s 45.55.6.216:1776
558187ms th_a       witness.cpp:70                plugin_initialize    ] key_id_to_wif_pair: ["GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
558188ms th_a       application.cpp:228           operator()           ] Initializing database...
558191ms th_a       main.cpp:173                  main                 ] Exiting with error:
11 eof_exception: End Of File
unexpected end of file
    {}
    th_a  json.cpp:430 variant_from_stream

    {"data_dir":"/home/deletech/bts2.0/test_net/blockchain"}
    th_a  db_management.cpp:94 open

    {}
    th_a  application.cpp:301 startup
« Last Edit: August 17, 2015, 10:11:47 pm 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

I moved the genesis json into same folder as witness binary and removed the _data_dir folder and the other cmd line params. Not using your config yet.

Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-14-test-genesis.json -d test_net -s 45.55.6.216:1776
I'll try that next. cli wallet still will not run with above witness params. I'll see if the config you posted will help that.



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

Offline Thom

Using this to launch the witness node, wiped the _data_dir (there doesn't seem to be a wallet yet, probably b/c it is crashing):

Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json ../Downloads/aug-14-test-genesis.json -d test_net -s 45.55.6.216:1776 --enable-stale-production -w \""1.6.0"\" \""1.6.1"\" \""1.6.2"\" \""1.6.3"\" \""1.6.4"\"

My node is still running with those params. Getting lots of output. I started the node with no _data_dir, so I presume there's no need for the resync param. Always start with the --genesis-json param using aug json.

My IP is 72.161.53.59.

BTW, are you on skype | BitShares General group? Might be faster than forum posts.

OK I see you posted as I was. Thanks for the config, that helps.

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
Using this to launch the witness node, wiped the _data_dir (there doesn't seem to be a wallet yet, probably b/c it is crashing):

Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json ../Downloads/aug-14-test-genesis.json -d test_net -s 45.55.6.216:1776 --enable-stale-production -w \""1.6.0"\" \""1.6.1"\" \""1.6.2"\" \""1.6.3"\" \""1.6.4"\"

Is that correct? I'm have a little difficulty following the permutations between the instructions in the OP of this thread and xeroc's instructions for importing balances from 0.9.2. The OP doesn't appear to address importing from 0.9.2, which xeroc's instructions do. I'm just a bit confused by the mixture of accounts in this predefined genesis block and using balances imported from 0.9.2.

Not even sure if I should be trying to import a balance from 0.9.2. Is that what most of you testing now are doing or just using the balance from nathan's account mentioned in the OP?

Get rid of the  --enable-stale-production -w \""1.6.0"\" \""1.6.1"\" \""1.6.2"\" \""1.6.3"\" \""1.6.4"\"
You will add your witness node later.

Make sure that you are modifying the test_net/config.ini the -d is the data directory.  It is not the witness_node_data_dir/config.ini

I launch with ./witness_node -d test_net and everything else is in my config.ini  I am at work, and only have access to my vps.  I will add the first half of my config.ini in a minute. 

This is the first part of my config.ini it should have all the modifications you need to change from default.
Code: [Select]
#Endpoint for P2P node to listen on
p2p-endpoint = 0.0.0.0:1776

# P2P nodes to connect to on startup (may specify multiple times)
# seed-node =

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =

# Endpoint for websocket RPC to listen on
rpc-endpoint = 127.0.0.1:8090

# Endpoint for TLS websocket RPC to listen on
# rpc-tls-endpoint =

# The TLS certificate file for this server
# server-pem =

# Password for this certificate                                              # server-pem-password =

# File to read Genesis State from
genesis-json = aug-14-test-genesis.json
]

My guess from your error is that it isn't loading the genesis.json.  Perhaps try moving it to your witness_node directory.  Thats where mine is, hence the config.ini
« Last Edit: August 17, 2015, 09:51:13 pm by puppies »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads