Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add cleos system activate subcommand (to activate system feature like kv_database) #10036

Merged
merged 2 commits into from
Feb 13, 2021

Conversation

softprofe
Copy link
Contributor

@softprofe softprofe commented Feb 12, 2021

Change Description

Start 10036 description ......

EPE 453
Add cleos system activate subcommand (to activate system feature like kv_database)
you can find usage by: cleos system activate -h

support all system features. support uppercase and lowercase kv_database or KV_DATABASE or KV_database

                          PREACTIVATE_FEATURE
                          ONLY_LINK_TO_EXISTING_PERMISSION
                          FORWARD_SETCODE
                          KV_DATABASE
                          WTMSIG_BLOCK_SIGNATURES
                          REPLACE_DEFERRED
                          NO_DUPLICATE_DEFERRED_ID
                          RAM_RESTRICTIONS
                          WEBAUTHN_KEY
                          BLOCKCHAIN_PARAMETERS
                          DISALLOW_EMPTY_PRODUCER_SCHEDULE
                          ONLY_BILL_FIRST_AUTHORIZER
                          RESTRICT_ACTION_TO_SELF
                          CONFIGURABLE_WASM_LIMITS
                          ACTION_RETURN_VALUE
                          FIX_LINKAUTH_RESTRICTION
                          GET_SENDER

using : cleos system activate kv_database
instead of using cleos push action eosio activate '["825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"]' -p eosio

End 10036 description ......

Change Type

Select ONE

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

new subcommand cleos system activate
see usage by: cleos system activate -h
example: cleos system activate kv_database
cleos system activate KV_DATABASE
cleos system activate KV_database
note : feature name argument is not sensitive to uppercase or lowercase

…ch as: cleos system activate kv_database. don't need using digest.
std::string feature_digest = map_name_digest[feature_name_str];
data = "[\"" + feature_digest + "\"]";
} else {
std::cout << "Can't find system feature : " << feature_name_str << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exit when feature cannot be found.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Is the command format agreed by Areg?
  • Add command usage to Documentation section in the PR header

yes, It is Areg's idea to add subcommand under cleos system.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click the documentation button in the PR and add documentation there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now documentation is there.

fc::variant action_args_var;
if( !data.empty() ) {
action_args_var = json_from_file_or_string(data, fc::json::parse_type::relaxed_parser);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an else to handle error.

Copy link
Contributor

@linhuang-blockone linhuang-blockone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Is the command format agreed by Areg?
  • Add command usage to Documentation section in the PR header

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

Successfully merging this pull request may close these issues.

2 participants