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

initminer authority missing in Master #2683

Open
kingswisdom opened this issue Jul 31, 2018 · 6 comments
Open

initminer authority missing in Master #2683

kingswisdom opened this issue Jul 31, 2018 · 6 comments

Comments

@kingswisdom
Copy link

kingswisdom commented Jul 31, 2018

First of all, hello to everybody.

I cloned the master branch of the steem repo, of course after installing the required dependencies.

I'm trying to launch a main net with a different chain ID, which of course work. It gives me the following output :

3315007ms witness_plugin.cpp:507 block_production_loo ] Generated block #1551 with timestamp 2018-07-31T13:55:15 at time 2018-07-31T13:55:15

Then, when I start the cli_wallet, I create a password with set_password, then unlock the wallet, and then I import the initminer private key associated with the public key I configured in the protocol/config.hpp

I then verify if the key was correctly imported, with list_keys, which shows me that the key was correctly saved.

But then, when i try to create an account, or try to broadcast a transaction, it gives me the following error :

2173675ms websocket_api.cpp:102 on_message ] message: {"jsonrpc":"2.0","error":{"code":-32000,"message":"missing required active authority:Missing Active Authority initminer"

For the full error message, please have a look at this : http://jsfiddle.net/j6qterz7/

What I tried so far :

I first saw that the initminer account has the same keys for all the auth (memo, posting, active, owner).

So I thought the cli_wallet couldn't determine which key I imported. I then decided to correct this behaviour by modifying the database.cpp + config.hpp to add different keys to the initminer account at genesis. I then restarted the blockchain from block 1, and i verified on the cli_wallet that the initminer had effectively 4 different keys. Which now does.

But when i import the active key, or the owner key, the same error happen when i try to create an account or broadcast a transaction. So the fix i made didn't work.

I then tried to build from the latest stable build. Now everything works, but the latest stable branch has 1500 commits behind master, which means that the stable branch feels a little bit outdated. Plus we can't configure the init_supply for example.

I searched here and on google already. Some people already had this issue, for example #2282 #2451 #2453

It seems that this issue is also present on Bitshares

I'm not sure how to debug this issue. Is there any fix yet ?

@kingswisdom kingswisdom changed the title intiminer authority missing in Master initminer authority missing in Master Aug 1, 2018
@baaluo
Copy link

baaluo commented Sep 26, 2018

@kingswisdom you solved this issue?
cause I am getting exact same issue..
and found no solution so far.
I also changed my chain-id ..

@baaluo
Copy link

baaluo commented Oct 10, 2018

I figured this out,
This issue occurs, when your code is not using correct chain id ,
you either need to remove checks from code..
or pass chain-id when running steemd ..

I removed checks from code.

@yashbhavsar007
Copy link

@baaluo may i know how to pass that chain_Id or how to remove that checks ?

@yashbhavsar007
Copy link

yashbhavsar007 commented Dec 11, 2018

Got it there is some modifications you need to made when you want to run your own private chain you need to made some changes in cli_wallet's main.hpp file by passing the chain id when you are not on testnet !!!

@rabbykst
Copy link

Got it there is some modifications you need to made when you want to run your own private chain you need to made some changes in cli_wallet's main.hpp file by passing the chain id when you are not on testnet !!!

how you solve please explain me i'm in same issue

@yashbhavsar007
Copy link

yashbhavsar007 commented Jul 1, 2019

@rabbykst I have resolved this issue by the following solution

#ifdef IS_TEST_NET
      if( options.count("chain-id") )
      {
         auto chain_id_str = options.at("chain-id").as< std::string >();

         try
         {
            _steem_chain_id = chain_id_type( chain_id_str);
         }
         catch( fc::exception& )
         {
            FC_ASSERT( false, "Could not parse chain_id as hex string. Chain ID String: ${s}", ("s", chain_id_str) );
         }
      }
#endif

As you can see these lines of code in main.cpp (programs/cli_wallet) what you need to do is you can copy the code which is inside the #ifdef IS_TEST_NET and paste it outside that IF statement that's how it worked for me.

Also add
("chain-id", bpo::value< std::string >()->default_value( STEEM_CHAIN_ID ), "chain ID to connect to")

After line
("wallet-file,w", bpo::value<string>()->implicit_value("wallet.json"), "wallet to load")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants