bitshares / bitshares/bitshares-core

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

Open
#1,770 12 comments 0 reactions 0 assignees View on GitHub
3d Bug 5a Docs Needed
Dominant language
C++
Stars
1.2k
Forks
660
Avg merge
8h 17m
Merged PRs (30d)
26

Description

Updated by @abitmore: see https://github.com/bitshares/bitshares-core/issues/1770#issuecomment-495113403 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
- [x] Evaluate `Build Error`
- [ ] Provide build guidance
- [ ] Create `Bug Report`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the private-testnet instructions on the linked BitShares wiki and developer documentation, then reproduce the witness_node command from the issue. Trace the reported failure through db_management.cpp, application.cpp, and main.cpp. Done means the private-testnet guidance is accurate and witness_node reports a clearer failure for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
blockchain, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.