Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for private testnet, and improve error message of witness_node #1770

Open
1 of 3 tasks
heyasjack opened this issue May 23, 2019 · 12 comments
Open
1 of 3 tasks
Labels
3d Bug Classification indicating the existing implementation does not match the intention of the design 5a Docs Needed Status specific to Documentation indicating the need for proper documentation to be added

Comments

@heyasjack
Copy link

heyasjack commented May 23, 2019

Updated by @abitmore: see #1770 (comment) for what to do with this issue.


Instructions
Hello, I'm new to bitshares and I'd like to learn bitshares from building a private testnet.
But when I tried to build one referring to
-https://github.com/bitshares/bitshares-core/wiki/private-testnet
-https://dev.bitshares.works/en/master/development/testnets/private_testnet.html
it always stuck in 4-1
./witness_node --data-dir=data/my-blocktestnet --genesis-json=my-genesis.json --seed-nodes "[]"
it couldn't run a node

  • Build Error
root@instance-12:~/bitshares-core# ls
CMakeCache.txt         docker       programs
CMakeFiles             Dockerfile   README-docker.md
cmake_install.cmake    docs         README.md
CMakeLists.txt         Doxyfile     sonar-project.properties
CMakeModules           genesis      testnet_home
compile_commands.json  libraries    tests
CONTRIBUTORS.txt       LICENSE.txt  Vagrantfile
data                   Makefile
root@instance-12:~/bitshares-core# cd testnet_home
root@instance-12:~/bitshares-core/testnet_home# ls
cli_wallet  genesis  witness_node
root@instance-12:~/bitshares-core/testnet_home# ./witness_node --data-dir=data/my-blocktestnet --genesis-json=my-genesis.json --seed-nodes "[]"
738405ms th_a       config_util.cpp:247           create_new_config_fi ] Writing new config file at /root/bitshares-core/testnet_home/data/my-blocktestnet/config.ini
738406ms th_a       config_util.cpp:309           create_logging_confi ] Writing new config file at /root/bitshares-core/testnet_home/data/my-blocktestnet/logging.ini
738407ms th_a       witness.cpp:84                plugin_initialize    ] witness plugin:  plugin_initialize() begin
738408ms th_a       witness.cpp:94                plugin_initialize    ] Public Key: TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
738408ms th_a       witness.cpp:112               plugin_initialize    ] witness plugin:  plugin_initialize() end
738408ms th_a       db_management.cpp:190         open                 ] Wiping object_database due to missing or wrong version
738408ms th_a       object_database.cpp:100       wipe                 ] Wiping object database...
738408ms th_a       object_database.cpp:102       wipe                 ] Done wiping object databse.
738408ms th_a       object_database.cpp:115       open                 ] Opening object database from /root/bitshares-core/testnet_home/data/my-blocktestnet/blockchain ...
738410ms th_a       object_database.cpp:124       open                 ] Done opening object database.
738410ms th_a       application.cpp:338           operator()           ] Initializing database...
738411ms th_a       db_management.cpp:224         open                 ] 11 eof_exception: End Of File
stringstream
    {}
    th_a  sstream.cpp:66 readsome

    {"str":""}
    th_a  json.cpp:463 from_string
738411ms th_a       db_management.cpp:224         open                 ] data_dir: /root/bitshares-core/testnet_home/data/my-blocktestnet/blockchain 
738411ms th_a       application.cpp:441           startup              ] Caught exception 11 eof_exception: End Of File
stringstream
    {}
    th_a  sstream.cpp:66 readsome

    {"str":""}
    th_a  json.cpp:463 from_string
rethrow
    {"data_dir":"/root/bitshares-core/testnet_home/data/my-blocktestnet/blockchain"}
    th_a  db_management.cpp:224 open in open(), you might want to force a replay
738411ms th_a       application.cpp:488           startup              ] 11 eof_exception: End Of File
stringstream
    {}
    th_a  sstream.cpp:66 readsome
    {"str":""}
    th_a  json.cpp:463 from_string
rethrow
    {"data_dir":"/root/bitshares-core/testnet_home/data/my-blocktest
net/blockchain"}
    th_a  db_management.cpp:224 open
738411ms th_a       application.cpp:1041          startup           
   ] 11 eof_exception: End Of File
stringstream
    {}
    th_a  sstream.cpp:66 readsome
    {"str":""}
    th_a  json.cpp:463 from_string
rethrow
    {"data_dir":"/root/bitshares-core/testnet_home/data/my-blocktest
net/blockchain"}
    th_a  db_management.cpp:224 open
rethrow
    {}
    th_a  application.cpp:488 startup
738412ms th_a       main.cpp:184                  main              
   ] Exiting with error:
11 eof_exception: End Of File
stringstream
    {}
    th_a  sstream.cpp:66 readsome
    {"str":""}
    th_a  json.cpp:463 from_string
rethrow
    {"data_dir":"/root/bitshares-core/testnet_home/data/my-blocktest
net/blockchain"}
    th_a  db_management.cpp:224 open
rethrow
    {}
    th_a  application.cpp:488 startup

In tutorial , it says

Several messages will go to the console. When you see messages like these:
3501235ms th_a main.cpp:165 main ] Started witness node on a chain with 0 blocks.
3501235ms th_a main.cpp:166 main ] Chain ID is cf307110d029cb882d126bf0488dc4864772f68d9888d86b458d16e6c36aa74b

But my node couldn't figure it out.

  • Build Environment

I build it on GCP
Linux instance-12 4.15.0-1032-gcp #34~16.04.1-Ubuntu SMP Wed May 8 13:26:26 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
(4 vCPUs, 15 GB memory)
50GB SSD

  • Steps To Reproduce

I reproduced it according to the tutorial about ten times.
I tried running directly in bitshares-core, and make testnet_home in different location and run, but they all failed.
Only 1 time I succeeded in running witness_node in bitshares-core but it couldn't repeat later.

  • Console Logs (optional)

Finally, press the 'Submit new issue' button. The Core Team will evaluate and prioritize your Bug Report for future development.

Build Error Description
A clear and concise description of what the build error is.

Build Environment
Details about the build environment, including the relevant required libraries. Much of this information can be found in the CMakeFiles/CMakeOutput.log.

  • Host OS: [e.g. Ubuntu 16.04 LTS]
  • Host Physical RAM [e.g. 15GB]
    The system is: Linux - 4.15.0-1032-gcp - x86_64
    Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
    Compiler: /usr/bin/cc
    Build flags:
    Id flags:

The output was:
0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/root/bitshares-core/CMakeFiles/3.5.1/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/bin/c++
Build flags:
Id flags:

The output was:
0

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is GNU, found in "/root/bitshares-core/CMakeFiles/3.5.1/CompilerIdCXX/a.out"

Determining if the C compiler works passed with the following output:
Change Dir: /root/bitshares-core/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_85529/fast"
@
"CMakeOutput.log" 554L, 40439C 1,1 Top

CORE TEAM TASK LIST

  • Evaluate Build Error
  • Provide build guidance
  • Create Bug Report
@pmconrad pmconrad added the 0 Question Notification that Issue has an open question. Please reference open question within Description label May 23, 2019
@pmconrad
Copy link
Contributor

I think it can't find the genesis file because it is in a subdirectory. Try

./witness_node --data-dir=data/my-blocktestnet --genesis-json=genesis/my-genesis.json --seed-nodes "[]"

instead.

@cedar-book the documentation seems to be wrong in that detail.

Also, the error message from witness_node is misleading and should be improved.

@pmconrad pmconrad added 3d Bug Classification indicating the existing implementation does not match the intention of the design 5a Docs Needed Status specific to Documentation indicating the need for proper documentation to be added labels May 23, 2019
@pmconrad pmconrad added this to the Future Feature Release milestone May 23, 2019
@pmconrad pmconrad added this to New -Awaiting Core Team Evaluation in Project Backlog via automation May 23, 2019
@abitmore
Copy link
Member

Or perhaps the program failed to parse genesis file due to wrong format or so? @heyasjack can you upload your genesis file so we can check?

@heyasjack
Copy link
Author

Or perhaps the program failed to parse genesis file due to wrong format or so? @heyasjack can you upload your genesis file so we can check?

@abitmore
Thank you for your help!

And the genesis has 2 version. I have tried both of them, but it seemed that both of them have similar problems.
The old one is from https://dev.bitshares.works/en/master/development/testnets/private_testnet_genesis_example.html#private-testnet-genesis-example
And the new one is copied from bitshares-core/libraries/egenesis/genesis-dev.json , which refer to #1591

the old one
`
{
"initial_timestamp": "2016-01-18T09:18:25",
"max_core_supply": "1000000000000000",
"initial_parameters": {
"current_fees": {
"parameters": [[
0,{
"fee": 2000000,
"price_per_kbyte": 1000000
}
],[
1,{
"fee": 500000
}
],[
2,{
"fee": 0
}
],[
3,{
"fee": 2000000
}
],[
4,{}
],[
5,{
"basic_fee": 500000,
"premium_fee": 200000000,
"price_per_kbyte": 100000
}
],[
6,{
"fee": 2000000,
"price_per_kbyte": 100000
}
],[
7,{
"fee": 300000
}
],[
8,{
"membership_annual_fee": 200000000,
"membership_lifetime_fee": 1000000000
}
],[
9,{
"fee": 50000000
}
],[
10,{
"symbol3": "50000000000",
"symbol4": "30000000000",
"long_symbol": 500000000,
"price_per_kbyte": 10
}
],[
11,{
"fee": 50000000,
"price_per_kbyte": 10
}
],[
12,{
"fee": 50000000
}
],[
13,{
"fee": 50000000
}
],[
14,{
"fee": 2000000,
"price_per_kbyte": 100000
}
],[
15,{
"fee": 2000000
}
],[
16,{
"fee": 100000
}
],[
17,{
"fee": 10000000
}
],[
18,{
"fee": 50000000
}
],[
19,{
"fee": 100000
}
],[
20,{
"fee": 500000000
}
],[
21,{
"fee": 2000000
}
],[
22,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
23,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
24,{
"fee": 100000
}
],[
25,{
"fee": 100000
}
],[
26,{
"fee": 100000
}
],[
27,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
28,{
"fee": 0
}
],[
29,{
"fee": 500000000
}
],[
30,{
"fee": 2000000
}
],[
31,{
"fee": 100000
}
],[
32,{
"fee": 100000
}
],[
33,{
"fee": 2000000
}
],[
34,{
"fee": 500000000
}
],[
35,{
"fee": 100000,
"price_per_kbyte": 10
}
],[
36,{
"fee": 100000
}
],[
37,{}
],[
38,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
39,{
"fee": 500000,
"price_per_output": 500000
}
],[
40,{
"fee": 500000,
"price_per_output": 500000
}
],[
41,{
"fee": 500000
}
],[
42,{}
],[
43,{
"fee": 2000000
}
]
],
"scale": 10000
},
"block_interval": 5,
"maintenance_interval": 86400,
"maintenance_skip_slots": 3,
"committee_proposal_review_period": 1209600,
"maximum_transaction_size": 2048,
"maximum_block_size": 2048000000,
"maximum_time_until_expiration": 86400,
"maximum_proposal_lifetime": 2419200,
"maximum_asset_whitelist_authorities": 10,
"maximum_asset_feed_publishers": 10,
"maximum_witness_count": 1001,
"maximum_committee_count": 1001,
"maximum_authority_membership": 10,
"reserve_percent_of_fee": 2000,
"network_percent_of_fee": 2000,
"lifetime_referrer_percent_of_fee": 3000,
"cashback_vesting_period_seconds": 31536000,
"cashback_vesting_threshold": 10000000,
"count_non_member_votes": true,
"allow_non_member_whitelists": false,
"witness_pay_per_block": 1000000,
"worker_budget_per_day": "50000000000",
"max_predicate_opcode": 1,
"fee_liquidation_threshold": 10000000,
"accounts_per_fee_scale": 1000,
"account_fee_scale_bitshifts": 4,
"max_authority_depth": 2,
"extensions": []
},
"initial_accounts": [{
"name": "init0",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init1",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init2",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init3",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init4",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init5",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init6",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init7",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init8",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init9",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "init10",
"owner_key": "--- set a public key ---",
"active_key": "--- set a public key ---",
"is_lifetime_member": true
},{
"name": "nathan",
"owner_key": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3",
"active_key": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3",
"is_lifetime_member": false
}
],
"initial_assets": [],
"initial_balances": [{
"owner": "--- set a public key ---",
"asset_symbol": "TEST",
"amount": "1000000000000000"
}
],
"initial_vesting_balances": [],
"initial_active_witnesses": 11,
"initial_witness_candidates": [{
"owner_name": "init0",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init1",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init2",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init3",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init4",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init5",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init6",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init7",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init8",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init9",
"block_signing_key": "--- set a public key ---"
},{
"owner_name": "init10",
"block_signing_key": "--- set a public key ---"
}
],
"initial_committee_candidates": [{
"owner_name": "init0"
},{
"owner_name": "init1"
},{
"owner_name": "init2"
},{
"owner_name": "init3"
},{
"owner_name": "init4"
},{
"owner_name": "init5"
},{
"owner_name": "init6"
},{
"owner_name": "init7"
},{
"owner_name": "init8"
},{
"owner_name": "init9"
},{
"owner_name": "init10"
}
],
"initial_worker_candidates": [],
"immutable_parameters": {
"min_committee_member_count": 11,
"min_witness_count": 11,
"num_special_accounts": 0,
"num_special_assets": 0
}
}

the new one
{
"initial_timestamp": "2019-02-14T20:32:55",
"max_core_supply": "1000000000000000",
"initial_parameters": {
"current_fees": {
"parameters": [[
0,{
"fee": 2000000,
"price_per_kbyte": 1000000
}
],[
1,{
"fee": 500000
}
],[
2,{
"fee": 0
}
],[
3,{
"fee": 2000000
}
],[
4,{}
],[
5,{
"basic_fee": 500000,
"premium_fee": 200000000,
"price_per_kbyte": 100000
}
],[
6,{
"fee": 2000000,
"price_per_kbyte": 100000
}
],[
7,{
"fee": 300000
}
],[
8,{
"membership_annual_fee": 200000000,
"membership_lifetime_fee": 1000000000
}
],[
9,{
"fee": 50000000
}
],[
10,{
"symbol3": "50000000000",
"symbol4": "30000000000",
"long_symbol": 500000000,
"price_per_kbyte": 10
}
],[
11,{
"fee": 50000000,
"price_per_kbyte": 10
}
],[
12,{
"fee": 50000000
}
],[
13,{
"fee": 50000000
}
],[
14,{
"fee": 2000000,
"price_per_kbyte": 100000
}
],[
15,{
"fee": 2000000
}
],[
16,{
"fee": 100000
}
],[
17,{
"fee": 10000000
}
],[
18,{
"fee": 50000000
}
],[
19,{
"fee": 100000
}
],[
20,{
"fee": 500000000
}
],[
21,{
"fee": 2000000
}
],[
22,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
23,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
24,{
"fee": 100000
}
],[
25,{
"fee": 100000
}
],[
26,{
"fee": 100000
}
],[
27,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
28,{
"fee": 0
}
],[
29,{
"fee": 500000000
}
],[
30,{
"fee": 2000000
}
],[
31,{
"fee": 100000
}
],[
32,{
"fee": 100000
}
],[
33,{
"fee": 2000000
}
],[
34,{
"fee": 500000000
}
],[
35,{
"fee": 100000,
"price_per_kbyte": 10
}
],[
36,{
"fee": 100000
}
],[
37,{}
],[
38,{
"fee": 2000000,
"price_per_kbyte": 10
}
],[
39,{
"fee": 500000,
"price_per_output": 500000
}
],[
40,{
"fee": 500000,
"price_per_output": 500000
}
],[
41,{
"fee": 500000
}
],[
42,{}
],[
43,{
"fee": 2000000
}
],[
44,{}
],[
45,{
"fee": 2000000
}
],[
46,{}
],[
47,{
"fee": 2000000
}
],[
48,{
"fee": 2000000
}
]
],
"scale": 10000
},
"block_interval": 5,
"maintenance_interval": 86400,
"maintenance_skip_slots": 3,
"committee_proposal_review_period": 1209600,
"maximum_transaction_size": 2048,
"maximum_block_size": 2000000,
"maximum_time_until_expiration": 86400,
"maximum_proposal_lifetime": 2419200,
"maximum_asset_whitelist_authorities": 10,
"maximum_asset_feed_publishers": 10,
"maximum_witness_count": 1001,
"maximum_committee_count": 1001,
"maximum_authority_membership": 10,
"reserve_percent_of_fee": 2000,
"network_percent_of_fee": 2000,
"lifetime_referrer_percent_of_fee": 3000,
"cashback_vesting_period_seconds": 31536000,
"cashback_vesting_threshold": 10000000,
"count_non_member_votes": true,
"allow_non_member_whitelists": false,
"witness_pay_per_block": 1000000,
"worker_budget_per_day": "50000000000",
"max_predicate_opcode": 1,
"fee_liquidation_threshold": 10000000,
"accounts_per_fee_scale": 1000,
"account_fee_scale_bitshifts": 4,
"max_authority_depth": 2,
"extensions": []
},
"initial_accounts": [{
"name": "init0",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init1",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init2",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init3",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init4",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init5",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init6",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init7",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init8",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init9",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "init10",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": true
},{
"name": "nathan",
"owner_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"active_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"is_lifetime_member": false
}
],
"initial_assets": [],
"initial_balances": [{
"owner": "BTSFAbAx7yuxt725qSZvfwWqkdCwp9ZnUama",
"asset_symbol": "BTS",
"amount": "1000000000000000"
}
],
"initial_vesting_balances": [],
"initial_active_witnesses": 11,
"initial_witness_candidates": [{
"owner_name": "init0",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init1",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init2",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init3",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init4",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init5",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init6",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init7",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init8",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init9",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
},{
"owner_name": "init10",
"block_signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
}
],
"initial_committee_candidates": [{
"owner_name": "init0"
},{
"owner_name": "init1"
},{
"owner_name": "init2"
},{
"owner_name": "init3"
},{
"owner_name": "init4"
},{
"owner_name": "init5"
},{
"owner_name": "init6"
},{
"owner_name": "init7"
},{
"owner_name": "init8"
},{
"owner_name": "init9"
},{
"owner_name": "init10"
}
],
"initial_worker_candidates": [],
"immutable_parameters": {
"min_committee_member_count": 11,
"min_witness_count": 11,
"num_special_accounts": 0,
"num_special_assets": 0
}
}
`

@heyasjack
Copy link
Author

@pmconrad Thank you for your help !
I tried your code in testnet_home, but it seemed to have a same problem.
And the genesis.json file have 2 version, I get confused of them.

The old one is from https://dev.bitshares.works/en/master/development/testnets/private_testnet_genesis_example.html#private-testnet-genesis-example
And the new one is copied from bitshares-core/libraries/egenesis/genesis-dev.json , which refer to #1591

I haven't change the genesis.json when I run the witness_node. Should I need to change some variable or chain ID of it?
And I'm going to try both of them using your code in different location now.

@abitmore
Copy link
Member

abitmore commented May 23, 2019

@heyasjack try absolute path, e.g. --genesis-json=/root/bitshares-core/testnet_home/genesis/my-genesis.json?

Please make sure the file is there:

ls -l /root/bitshares-core/testnet_home/genesis/my-genesis.json

The old one with "block_signing_key": "--- set a public key ---" won't work anyway.

@heyasjack
Copy link
Author

@abitmore Thank you for your advice!
But I failed again.
I used GCP ubuntu for testing, so maybe I had made something wrong setting.
And if you have some free time, could you make a test on your device according to the tutorial, so we can see whether the document is wrong or I made the wrong setting. https://dev.bitshares.works/en/master/development/testnets/private_testnet.html
I‘m all gratitude!

@heyasjack
Copy link
Author

@abitmore @pmconrad Thank you for your help!
Well, I succeed in running the witness_node with
root@instance-7:/home/user1/bitshares-core# programs/witness_node/witness_node --data-d ir data/my-blockprod --genesis-json genesis/my-genesis.json --seed-nodes "[]"
which is from https://github.com/bitshares/bitshares-core/wiki/private-testnet.
I leave genesis file in bitshares-core/genesis/my-genesis.json, and the my-genesis.json is from https://github.com/bitshares/bitshares-core/blob/master/libraries/egenesis/genesis-dev.json
And later I will repeat these steps and check whether it is stable.

@heyasjack
Copy link
Author

oh, I failed again. With almost the same steps.

3364457ms th_a db_management.cpp:224 open ] 7 bad_cast_exception: Bad Cast Invalid cast from type 'string_type' to Object {"type":"string_type"} th_a variant.cpp:582 get_object 3364457ms th_a db_management.cpp:224 open ] data_dir: /home/use1/bitshares-core/data/my-blockprod/bloc kchain

@heyasjack
Copy link
Author

The succeed running console:
3387741ms th_a object_database.cpp:115 open ] Opening object d atabase from /home/user1/bitshares-core/data/my-blockprod/blockchain ... 3387811ms th_a object_database.cpp:124 open ] Done opening obj ect database. 3387813ms th_a application.cpp:209 reset_p2p_node ] Configured p2p n ode to listen on 0.0.0.0:43167
The failed console:
3364455ms th_a object_database.cpp:115 open ] Opening object database from /home/user1/bitshares-core/data/my-blockprod/blockchain ... 3364457ms th_a object_database.cpp:124 open ] Done opening object database. 3364457ms th_a application.cpp:353 operator() ] Initializing database... 3364457ms th_a db_management.cpp:224 open ] 7 bad_cast_exception: Bad Cast Invalid cast from type 'string_type' to Object {"type":"string_type"} th_a variant.cpp:582 get_object 3364457ms th_a db_management.cpp:224 open ] data_dir: /home/user1/bitshares-core/data/my-blockprod/blockchain

Their difference begin from that.
But I noticed the difference between application.cpp:209 and application.cpp:353 ,but I don't know why and how to solve it...
I will test more and I hope you can give me a hand! Please!

@heyasjack
Copy link
Author

Well, I FOUND IT!
So stupid I am, the my-genesis.json have something miss part maybe I missed them in the copy step.

@heyasjack
Copy link
Author

heyasjack commented May 25, 2019

Yeeeaaa, I repeat it successfully!

The most important things is the route and location, the tutorial has made misleading about the location, check the location of my-genesis.json when you run witness_node.

And the second point is the my-genesis.json, you should copy command
cp -r libraries/egenesis/genesis-dev.json testnet_home/genesis
and then enter the testnet_home/genesis and mv genesis-dev.json my-genesis.json
it often miss the first line of the file, check it first.

@heyasjack
Copy link
Author

Oh, I suggest that the tutorial should be added using screen when running the witness_node and cli_wallet

@pmconrad pmconrad removed the 0 Question Notification that Issue has an open question. Please reference open question within Description label May 28, 2019
@abitmore abitmore modified the milestone: Future Feature Release Feb 6, 2020
@abitmore abitmore changed the title Wrong in running testnet_home/witness_node --data- dir data/my-blockprod --genesis-json testnet_home/genesis/my-genesis .json --seed-nodes "[]" Update docs for private testnet, and improve error message of witness_node Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3d Bug Classification indicating the existing implementation does not match the intention of the design 5a Docs Needed Status specific to Documentation indicating the need for proper documentation to be added
Projects
Project Backlog
  
New -Awaiting Core Team Evaluation
Development

No branches or pull requests

3 participants