Testnet start issue
Hello, Guru! I try to launch testnet on my OsX El Capitan 10.11.6 by instuction from here: https://steem.io/documentation/how-to-start-a-testnet/
git clone https://github.com/steemit/steem.git
cd steem
export OPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2h_1/
export BOOST_ROOT=/usr/local/Cellar/boost160/1.60.0/
git submodule update --init --recursive
cmake -DBUILD_STEEM_TESTNET=ON .
make -j4
Process going well.
When i started testnet
./steemd -d testnet
I got private key, which i import to config.ini like wroten in instruction.
And after try to start production like that:
./steemd -d testnet --enable-stale-production
Answer is:
Your genesis seems to have an old timestamp
Please consider using the --genesis-timestamp option to give your genesis a recent timestamp
614156ms th_a witness.cpp:197 plugin_startup ] No miners configured! Please add miner names and private keys to configuration.
616907ms ntp ntp.cpp:166 read_loop ] received stale ntp reply requested at 2016-09-19T06:10:14, send a new time request
616984ms ntp ntp.cpp:177 read_loop ] ntp_delta_time updated to 166357 us
622836ms th_a witness.cpp:283 block_production_loo ] Not producing block because node didn't wake up within 500ms of the slot time.
680842ms th_a database.cpp:2831 _apply_block ] 10 assert_exception: Assert Exception
active_witnesses.size() == STEEMIT_MAX_MINERS: number of active witnesses does not equal STEEMIT_MAX_MINERS
{"active_witnesses.size()":1,"STEEMIT_MAX_MINERS":21}
th_a database.cpp:1189 update_witness_schedule4
680847ms th_a database.cpp:662 _push_block ] Failed to push new block:
10 assert_exception: Assert Exception
active_witnesses.size() == STEEMIT_MAX_MINERS: number of active witnesses does not equal STEEMIT_MAX_MINERS
{"active_witnesses.size()":1,"STEEMIT_MAX_MINERS":21}
th_a database.cpp:1189 update_witness_schedule4
rethrow
Ok! I see problem and try to resolve it. Firstly, i change time of genesis to nearly feature (../chain/config.hpp).
#define STEEMIT_GENESIS_TIME (fc::time_point_sec(1474267524))
Next i see problem with miners and thought that if i change:
#define STEEMIT_MAX_MINERS (STEEMIT_MAX_VOTED_WITNESSES+STEEMIT_MAX_MINER_WITNESSES+STEEMIT_MAX_RUNNER_WITNESSES)
to
#define STEEMIT_MAX_MINERS 1
and
#define STEEMIT_HARDFORK_REQUIRED_WITNESSES 21
to
#define STEEMIT_HARDFORK_REQUIRED_WITNESSES 1
that it can helps.
Also i changed database.cpp :
from
static_assert( STEEMIT_MAX_MINERS == 21, "this code assumes 21 per round" );
to
static_assert(STEEMIT_MAX_MINERS == 1, "this code assumes 21 per round" );
And rebuild again.
cmake -DBUILD_STEEM_TESTNET=ON .
make -j4
After import key and start stale-production answer is:
314156ms th_a witness.cpp:101 plugin_initialize ] _witnesses: ["initminer"]
314158ms th_a thread.cpp:95 thread ] name: tid:123145307131904
314199ms th_a thread.cpp:95 thread ] name:ntp tid:123145307668480
314200ms th_a thread.cpp:95 thread ] name:p2p tid:123145308205056
********************************
* *
* ------- NEW CHAIN ------ *
* - Welcome to Steem! - *
* ------------------------ *
* *
********************************
314759ms ntp ntp.cpp:177 read_loop ] ntp_delta_time updated to -46220 us
315002ms th_a witness.cpp:234 block_production_loo ] waiting until genesis time to produce block: 2016-09-19T07:10:48
........
So, i waiting genesis time and think all done... but. When time genesis is coming, nothing not change, first block not produced... A stop process steemd and start it again, production and start. I see just it:
------------------------------------------------------
778567ms th_a witness.cpp:101 plugin_initialize ] _witnesses: ["initminer"]
778569ms th_a thread.cpp:95 thread ] name: tid:123145307131904
778646ms th_a thread.cpp:95 thread ] name:ntp tid:123145307668480
778647ms th_a thread.cpp:95 thread ] name:p2p tid:123145308205056
779001ms th_a witness.cpp:283 block_production_loo ] Not producing block because node didn't wake up within 500ms of the slot time.
779208ms ntp ntp.cpp:177 read_loop ] ntp_delta_time updated to -47683 us
... and this is all. I builded it may be 100 times with different parameters and do not found right way yet. And i think, that without help of Guru this problem cannot be resolved. Can anybody say - what i do wrong? What real process for start private testnet now?
I've never tried to build a test net, but one thing I know, is that DON'T change those 21 witnesses to 1, otherwise it will break many things. Please try another way.
You need to adjust this parameter:
#define STEEMIT_MINING_TIME (fc::time_point_sec(1451606400))
to a later time so this parameter:
#define STEEMIT_START_MINER_VOTING_BLOCK (STEEMIT_BLOCKS_PER_DAY * 30)
can be a time in the future, to ensure enough (21+) accounts be mined out for witness voting.
You may also need to update the STEEMIT_HARDFORK_0_4_TIME parameter in https://github.com/steemit/steem/blob/develop/libraries/chain/hardfork.d/0_4.hf#L3
#define STEEMIT_HARDFORK_0_4_TIME 1462028400
to a late time, to make sure you have at least 21 (elected witnesses + miners) before that hard fork taking effect.
I tried, but problem still.. It all seems like testnet cannot start without 21+ miners/witness? But graphen (bitshares) with same algorithm i launched without it troubles.. And we have instruction to launch testnet Steem, actually, too (but not works). hmmmm
BitShares is not with same algorithm. Steem is a bit more complicated. And yes, please stick with 21. If you still have issue, please post your logs here.
Perhaps you need this: https://github.com/steemit/steem/blob/develop/doc/Python-Debug-Node.md but not need to make your own testnet.
What are you trying to use the testnet for? It is possible we have already written a tool to help you do whatever it is you are trying to do.
You may have better luck if you do cmake -DBUILD_STEEM_TESTNET=ON, among other things this will define the compile time constant IS_TEST_NET which will activate a section of config.hpp which should work with a testnet.
In my spare time I've been trying to get our testnet code up-to-date so that one day we may be able to regularly run testnets, something that we haven't really done since before release. So there is lots of testnet stuff is probably not-quite-working at the moment.
I'm having the same error for the testnet right now.
********************************
* *
* ------- NEW CHAIN ------ *
* - Welcome to Steem! - *
* ------------------------ *
* *
********************************
3015000ms th_a witness_plugin.cpp:501 block_production_loo ] Not producing block because node didn't wake up within 500ms of the slot time.
3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 1 at block 1
3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 2 at block 1
3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 3 at block 1
3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 4 at block 1
3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 5 at block 1
Any solution for this now?
Same error! Please help! Thanks!
1747000ms th_a witness_plugin.cpp:584 block_production_loo ] Not producing block because node didn't wake up within 500ms of the slot time.
1748000ms th_a witness_plugin.cpp:584 block_production_loo ] Not producing block because node didn't wake up within 500ms of the slot time.
Closing this ticket due to its age, and due to the fact that all testnet-related bugs should get a thorough shakeout as we prepare to deploy a testnet soon.
has this issue been solved now ? because we are still facing the same issue
------- NEW CHAIN ------
- Welcome to Steem! -
3015000ms th_a witness_plugin.cpp:501 block_production_loo ] Not producing block because node didn't wake up within 500ms of the slot time. 3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 1 at block 1 3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 2 at block 1 3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 3 at block 1 3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 4 at block 1 3016002ms th_a database.cpp:3649 apply_hardfork ] HARDFORK 5 at block 1
Hello,
Has there been any solution to this as I am getting the same problem and have built steemd many times now with various settings and still the same problems.
I am trying to build the Private TESTNET as a first step but it will not product blocks even though the compile completes successfully.
Thanks,
@prashant-awasthi
I have the same problem as you, have you solved it?
Can you help me?