hide max_action_return_value_size in get_consensus_parameters when feature not activated
#1284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In AntelopeIO/leap#1770 we decided to hide the
wasm_configurationinget_consensus_parameterswhenCONFIGURABLE_WASM_LIMITS2is not activated. This helps resolve some confusion (see AntelopeIO/leap#1660).But this introduced an inconsistency: we still show
max_action_return_value_sizeeven ifACTION_RETURN_VALUEis not activated. To fix this inconsistency, now hidemax_action_return_value_sizeuntilACTION_RETURN_VALUEis activated.Example response when starting from genesis
{ "chain_config": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, "max_transaction_net_usage": 524288, "base_per_transaction_net_usage": 12, "net_usage_leeway": 500, "context_free_discount_net_usage_num": 20, "context_free_discount_net_usage_den": 100, "max_block_cpu_usage": 200000, "target_block_cpu_usage_pct": 1000, "max_transaction_cpu_usage": 150000, "min_transaction_cpu_usage": 100, "max_transaction_lifetime": 3600, "deferred_trx_expiration_window": 600, "max_transaction_delay": 3888000, "max_inline_action_size": 524288, "max_inline_action_depth": 4, "max_authority_depth": 6 } }Example response after activating `ACTION_RETURN_VALUE`
{ "chain_config": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, "max_transaction_net_usage": 524288, "base_per_transaction_net_usage": 12, "net_usage_leeway": 500, "context_free_discount_net_usage_num": 20, "context_free_discount_net_usage_den": 100, "max_block_cpu_usage": 200000, "target_block_cpu_usage_pct": 1000, "max_transaction_cpu_usage": 150000, "min_transaction_cpu_usage": 100, "max_transaction_lifetime": 3600, "deferred_trx_expiration_window": 600, "max_transaction_delay": 3888000, "max_inline_action_size": 524288, "max_inline_action_depth": 4, "max_authority_depth": 6, "max_action_return_value_size": 256 } }Example response after activating `ACTION_RETURN_VALUE` and `CONFIGURABLE_WASM_LIMITS2`
{ "chain_config": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, "max_transaction_net_usage": 524288, "base_per_transaction_net_usage": 12, "net_usage_leeway": 500, "context_free_discount_net_usage_num": 20, "context_free_discount_net_usage_den": 100, "max_block_cpu_usage": 200000, "target_block_cpu_usage_pct": 1000, "max_transaction_cpu_usage": 150000, "min_transaction_cpu_usage": 100, "max_transaction_lifetime": 3600, "deferred_trx_expiration_window": 600, "max_transaction_delay": 3888000, "max_inline_action_size": 524288, "max_inline_action_depth": 4, "max_authority_depth": 6, "max_action_return_value_size": 256 }, "wasm_config": { "max_mutable_global_bytes": 1024, "max_table_elements": 1024, "max_section_elements": 8192, "max_linear_memory_init": 65536, "max_func_local_bytes": 8192, "max_nested_structures": 1024, "max_symbol_bytes": 8192, "max_module_bytes": 20971520, "max_code_bytes": 20971520, "max_pages": 528, "max_call_depth": 251 } }