未验证 提交 4bbca00b 编写于 作者: K Kevin Heifner 提交者: GitHub

Merge pull request #2017 from EOSIO/bios-boot-abi-sync

Update bios boot script
......@@ -285,8 +285,7 @@ struct testnet_def {
struct prodkey_def {
string producer_name;
public_key_type signing_key;
// string p2p_server_address;
public_key_type block_signing_key;
};
struct producer_set_def {
......@@ -472,7 +471,6 @@ launcher_def::initialize (const variables_map &vmap) {
exit (-1);
}
}
// add_enable_stale_production = true;
}
using namespace std::chrono;
......@@ -760,7 +758,6 @@ launcher_def::bind_nodes () {
node.keys.emplace_back (move(kp));
if (is_bios) {
string prodname = "eosio";
//pubkey = public_key_type(string("EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"));
node.producers.push_back(prodname);
producer_set.producers.push_back({prodname,pubkey});
}
......@@ -1135,19 +1132,19 @@ launcher_def::write_bios_boot () {
if (key == "envars") {
brb << "bioshost=" << bhost << "\nbiosport=" << biosport << "\n";
}
if (key == "bioskey") {
brb << "wcmd import -n ignition " << string(bios_node.keys[0]) << "\n";
continue;
else if (key == "prodkeys" ) {
for (auto &node : network.nodes) {
brb << "wcmd import -n ignition " << string(node.second.keys[0]) << "\n";
}
}
if (key == "cacmd") {
else if (key == "cacmd") {
for (auto &p : producer_set.producers) {
if (p.producer_name == "eosio") {
continue;
}
brb << "cacmd " << p.producer_name
<< " " << string(p.signing_key) << " " << string(p.signing_key) << "\n";
<< " " << string(p.block_signing_key) << " " << string(p.block_signing_key) << "\n";
}
continue;
}
}
brb << line << "\n";
......@@ -1616,7 +1613,7 @@ launcher_def::ignite() {
cerr << "wait threw error " << ex.what() << "\n";
}
catch (...) {
// when scritp dies wait throws an exception but that is ok
// when script dies wait throws an exception but that is ok
}
} else {
cerr << "**********************************************************************\n"
......@@ -1702,11 +1699,7 @@ void write_default_config(const bfs::path& cfg_file, const options_description &
for(const boost::shared_ptr<bpo::option_description> od : cfg.options())
{
if(!od->description().empty()) {
out_cfg << "# " << od->description();
// disable uninitialized variable usage.
// std::map<std::string, std::string>::iterator it;
// out_cfg << " (" << it->second << ")";
out_cfg << std::endl;
out_cfg << "# " << od->description() << std::endl;
}
boost::any store;
if(!od->semantic()->apply_default(store))
......@@ -1860,8 +1853,7 @@ FC_REFLECT( remote_deploy,
(ssh_cmd)(scp_cmd)(ssh_identity)(ssh_args) )
FC_REFLECT( prodkey_def,
(producer_name)(signing_key))
// (producer_name)(signing_key)(p2p_server_address))
(producer_name)(block_signing_key))
FC_REFLECT( producer_set_def,
(version)(producers))
......
......@@ -65,14 +65,18 @@ ecmd get info
wcmd create -n ignition
# Manual deployers, add a line below this block that looks like:
# wcmd import -n ignition $BIOSKEY
# wcmd import -n ignition $PRODKEY[0]
# wcmd import -n ignition $PRODKEY[1]
# ...
# wcmd import -n ignition $PRODKEY[20]
# where $BIOSKEY is replaced by the private key for the bios node
# ------ DO NOT ALTER THE NEXT LINE -------
###INSERT bioskey
###INSERT prodkeys
# Manual deployers, add a series of lines below this block that looks like:
# cacmd $PRODNAME[0] $DWNERKEY[0] $ACTIVEKEY[0]
# cacmd $PRODNAME[1] $OWNERKEY[1] $ACTOVEKEY[1]
# cacmd $PRODNAME[0] $OWNERKEY[0] $ACTIVEKEY[0]
# cacmd $PRODNAME[1] $OWNERKEY[1] $ACTiVEKEY[1]
# ...
# cacmd $PRODNAME[20] $OWNERKEY[20] $ACTIVEKEY[20]
# where $PRODNAME is the producer account name and $OWNERKEY and $ACTIVEKEY are both the producer's
......@@ -81,11 +85,11 @@ wcmd create -n ignition
###INSERT cacmd
ecmd set contract eosio contracts/test.system/test.system.wast contracts/test.system/test.system.abi
ecmd set contract eosio contracts/eosio.bios/eosio.bios.wast contracts/eosio.bios/eosio.bios.abi
#the setprods.json argument cannot pass through the function call due to embedded quotes
echo ===== Start: $step ============ >> $logfile
echo executing: cleos --wallet-port $wdport -p $biosport -H $bioshost push action eosio setprods "$(cat setprods.json)" -p eosio@active | tee -a $logfile
echo executing: cleos --wallet-port $wdport -p $biosport -H $bioshost push action eosio setprods \"$(cat setprods.json)\" -p eosio@active | tee -a $logfile
echo ----------------------- >> $logfile
programs/cleos/cleos --wallet-port $wdport --wallet-host $wdhost -p $biosport -H $bioshost push action eosio setprods "$(cat setprods.json)" -p eosio@active >> $logfile 2>&1
echo ==== End: $step ============== >> $logfile
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册