diff --git a/libraries/chain/apply_context.cpp b/libraries/chain/apply_context.cpp index d4a067feb5..2c8c3e85e1 100644 --- a/libraries/chain/apply_context.cpp +++ b/libraries/chain/apply_context.cpp @@ -357,12 +357,6 @@ void apply_context::execute_inline( action&& a ) { control.check_actor_list( actors ); } - if( !privileged && control.is_speculative_block() ) { - const auto& chain_config = control.get_global_properties().configuration; - EOS_ASSERT( a.data.size() < std::min(chain_config.max_inline_action_size, control.get_max_nonprivileged_inline_action_size()), - inline_action_too_big_nonprivileged, - "inline action too big for nonprivileged account ${account}", ("account", a.account)); - } // No need to check authorization if replaying irreversible blocks or contract is privileged if( !control.skip_auth_check() && !privileged && !trx_context.is_read_only() ) { try { @@ -417,13 +411,6 @@ void apply_context::execute_context_free_inline( action&& a ) { EOS_ASSERT( a.authorization.size() == 0, action_validate_exception, "context-free actions cannot have authorizations" ); - if( !privileged && control.is_speculative_block() ) { - const auto& chain_config = control.get_global_properties().configuration; - EOS_ASSERT( a.data.size() < std::min(chain_config.max_inline_action_size, control.get_max_nonprivileged_inline_action_size()), - inline_action_too_big_nonprivileged, - "inline action too big for nonprivileged account ${account}", ("account", a.account)); - } - auto inline_receiver = a.account; _cfa_inline_actions.emplace_back( schedule_action( std::move(a), inline_receiver, true ) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 04e6bb8f01..045f4a8691 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -1258,8 +1258,7 @@ struct controller_impl { || (code == contract_blacklist_exception::code_value) || (code == action_blacklist_exception::code_value) || (code == key_blacklist_exception::code_value) - || (code == sig_variable_size_limit_exception::code_value) - || (code == inline_action_too_big_nonprivileged::code_value); + || (code == sig_variable_size_limit_exception::code_value); } bool scheduled_failure_is_subjective( const fc::exception& e ) const { @@ -2747,11 +2746,6 @@ subjective_billing& controller::get_mutable_subjective_billing() { } -uint32_t controller::get_max_nonprivileged_inline_action_size()const -{ - return my->conf.max_nonprivileged_inline_action_size; -} - controller::controller( const controller::config& cfg, const chain_id_type& chain_id ) :my( new controller_impl( cfg, *this, protocol_feature_set{}, chain_id ) ) { diff --git a/libraries/chain/include/eosio/chain/config.hpp b/libraries/chain/include/eosio/chain/config.hpp index a1cf326c89..6d81272944 100644 --- a/libraries/chain/include/eosio/chain/config.hpp +++ b/libraries/chain/include/eosio/chain/config.hpp @@ -79,7 +79,6 @@ const static uint32_t default_sig_cpu_bill_pct = 50 * perc const static uint32_t default_block_cpu_effort_pct = 90 * percent_1; // percentage of block time used for producing block const static uint16_t default_controller_thread_pool_size = 2; const static uint32_t default_max_variable_signature_length = 16384u; -const static uint32_t default_max_nonprivileged_inline_action_size = 4 * 1024; // 4 KB const static uint32_t default_max_action_return_value_size = 256; const static uint32_t default_max_transaction_finality_status_success_duration_sec = 180; diff --git a/libraries/chain/include/eosio/chain/controller.hpp b/libraries/chain/include/eosio/chain/controller.hpp index 965f96628a..e25a201050 100644 --- a/libraries/chain/include/eosio/chain/controller.hpp +++ b/libraries/chain/include/eosio/chain/controller.hpp @@ -74,7 +74,6 @@ namespace eosio { namespace chain { uint64_t state_guard_size = chain::config::default_state_guard_size; uint32_t sig_cpu_bill_pct = chain::config::default_sig_cpu_bill_pct; uint16_t thread_pool_size = chain::config::default_controller_thread_pool_size; - uint32_t max_nonprivileged_inline_action_size = chain::config::default_max_nonprivileged_inline_action_size; bool read_only = false; bool force_all_checks = false; bool disable_replay_opts = false; @@ -198,7 +197,6 @@ namespace eosio { namespace chain { const protocol_feature_manager& get_protocol_feature_manager()const; const subjective_billing& get_subjective_billing()const; subjective_billing& get_mutable_subjective_billing(); - uint32_t get_max_nonprivileged_inline_action_size()const; const flat_set& get_actor_whitelist() const; const flat_set& get_actor_blacklist() const; diff --git a/libraries/chain/include/eosio/chain/exceptions.hpp b/libraries/chain/include/eosio/chain/exceptions.hpp index 151021a284..50c322ff00 100644 --- a/libraries/chain/include/eosio/chain/exceptions.hpp +++ b/libraries/chain/include/eosio/chain/exceptions.hpp @@ -323,8 +323,7 @@ namespace eosio { namespace chain { 3050010, "Action attempts to increase RAM usage of account without authorization" ) FC_DECLARE_DERIVED_EXCEPTION( restricted_error_code_exception, action_validate_exception, 3050011, "eosio_assert_code assertion failure uses restricted error code value" ) - FC_DECLARE_DERIVED_EXCEPTION( inline_action_too_big_nonprivileged, action_validate_exception, - 3050012, "Inline action exceeds maximum size limit for a non-privileged account" ) + // Removed 3050012 - inline_action_too_big_nonprivileged, no longer needed FC_DECLARE_DERIVED_EXCEPTION( action_return_value_exception, action_validate_exception, 3050014, "action return value size too big" ) diff --git a/libraries/testing/include/eosio/testing/tester.hpp b/libraries/testing/include/eosio/testing/tester.hpp index 0037bc3127..5b0eb752d8 100644 --- a/libraries/testing/include/eosio/testing/tester.hpp +++ b/libraries/testing/include/eosio/testing/tester.hpp @@ -156,7 +156,7 @@ namespace eosio { namespace testing { virtual ~base_tester() {}; - void init(const setup_policy policy = setup_policy::full, db_read_mode read_mode = db_read_mode::HEAD, std::optional genesis_max_inline_action_size = std::optional{}, std::optional config_max_nonprivileged_inline_action_size = std::optional{}); + void init(const setup_policy policy = setup_policy::full, db_read_mode read_mode = db_read_mode::HEAD, std::optional genesis_max_inline_action_size = std::optional{}); void init(controller::config config, const snapshot_reader_ptr& snapshot); void init(controller::config config, const genesis_state& genesis); void init(controller::config config); @@ -395,7 +395,7 @@ namespace eosio { namespace testing { return genesis; } - static std::pair default_config(const fc::temp_directory& tempdir, std::optional genesis_max_inline_action_size = std::optional{}, std::optional config_max_nonprivileged_inline_action_size = std::optional{}) { + static std::pair default_config(const fc::temp_directory& tempdir, std::optional genesis_max_inline_action_size = std::optional{}) { controller::config cfg; cfg.blocks_dir = tempdir.path() / config::default_blocks_dir_name; cfg.state_dir = tempdir.path() / config::default_state_dir_name; @@ -419,9 +419,6 @@ namespace eosio { namespace testing { if (genesis_max_inline_action_size) { gen.initial_configuration.max_inline_action_size = *genesis_max_inline_action_size; } - if (config_max_nonprivileged_inline_action_size) { - cfg.max_nonprivileged_inline_action_size = *config_max_nonprivileged_inline_action_size; - } return {cfg, gen}; } @@ -453,7 +450,7 @@ namespace eosio { namespace testing { class tester : public base_tester { public: tester(setup_policy policy = setup_policy::full, db_read_mode read_mode = db_read_mode::HEAD, std::optional genesis_max_inline_action_size = std::optional{}, std::optional config_max_nonprivileged_inline_action_size = std::optional{}) { - init(policy, read_mode, genesis_max_inline_action_size, config_max_nonprivileged_inline_action_size); + init(policy, read_mode, genesis_max_inline_action_size); } tester(controller::config config, const genesis_state& genesis) { diff --git a/libraries/testing/tester.cpp b/libraries/testing/tester.cpp index 6bcc9d1b8d..bdd0d71f67 100644 --- a/libraries/testing/tester.cpp +++ b/libraries/testing/tester.cpp @@ -179,8 +179,8 @@ namespace eosio { namespace testing { return control->head_block_id() == other.control->head_block_id(); } - void base_tester::init(const setup_policy policy, db_read_mode read_mode, std::optional genesis_max_inline_action_size, std::optional config_max_nonprivileged_inline_action_size) { - auto def_conf = default_config(tempdir, genesis_max_inline_action_size, config_max_nonprivileged_inline_action_size); + void base_tester::init(const setup_policy policy, db_read_mode read_mode, std::optional genesis_max_inline_action_size) { + auto def_conf = default_config(tempdir, genesis_max_inline_action_size); def_conf.first.read_mode = read_mode; cfg = def_conf.first; diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 7ac5d5400a..e4beb113da 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -368,7 +368,6 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip "'none' - EOS VM OC tier-up is completely disabled.\n") #endif ("enable-account-queries", bpo::value()->default_value(false), "enable queries to find accounts by various metadata.") - ("max-nonprivileged-inline-action-size", bpo::value()->default_value(config::default_max_nonprivileged_inline_action_size), "maximum allowed size (in bytes) of an inline action for a nonprivileged account") ("transaction-retry-max-storage-size-gb", bpo::value(), "Maximum size (in GiB) allowed to be allocated for the Transaction Retry feature. Setting above 0 enables this feature.") ("transaction-retry-interval-sec", bpo::value()->default_value(20), @@ -633,9 +632,6 @@ void chain_plugin_impl::plugin_initialize(const variables_map& options) { if( options.count( "chain-state-db-guard-size-mb" )) chain_config->state_guard_size = options.at( "chain-state-db-guard-size-mb" ).as() * 1024 * 1024; - if( options.count( "max-nonprivileged-inline-action-size" )) - chain_config->max_nonprivileged_inline_action_size = options.at( "max-nonprivileged-inline-action-size" ).as(); - if( options.count( "transaction-finality-status-max-storage-size-gb" )) { const uint64_t max_storage_size = options.at( "transaction-finality-status-max-storage-size-gb" ).as() * 1024 * 1024 * 1024; if (max_storage_size > 0) {