diff --git a/crypto/block/transaction.cpp b/crypto/block/transaction.cpp index 3f1be336..379d899e 100644 --- a/crypto/block/transaction.cpp +++ b/crypto/block/transaction.cpp @@ -2392,8 +2392,12 @@ int Transaction::try_action_send_msg(const vm::CellSlice& cs0, ActionPhase& ap, if (!tlb::csr_unpack(msg.info, info) || !block::tlb::t_CurrencyCollection.validate_csr(info.value)) { return -1; } - fwd_fee = block::tlb::t_Grams.as_integer(info.fwd_fee); - ihr_fee = block::tlb::t_Grams.as_integer(info.ihr_fee); + if (cfg.disable_custom_fess) { + fwd_fee = ihr_fee = td::zero_refint(); + } else { + fwd_fee = block::tlb::t_Grams.as_integer(info.fwd_fee); + ihr_fee = block::tlb::t_Grams.as_integer(info.ihr_fee); + } } // set created_at and created_lt to correct values info.created_at = now; @@ -3755,6 +3759,7 @@ td::Status FetchConfigParams::fetch_config_params( action_phase_cfg->action_fine_enabled = config.get_global_version() >= 4; action_phase_cfg->bounce_on_fail_enabled = config.get_global_version() >= 4; action_phase_cfg->message_skip_enabled = config.get_global_version() >= 8; + action_phase_cfg->disable_custom_fess = config.get_global_version() >= 8; action_phase_cfg->mc_blackhole_addr = config.get_burning_config().blackhole_addr; } { diff --git a/crypto/block/transaction.h b/crypto/block/transaction.h index 29290cfb..20d7cb29 100644 --- a/crypto/block/transaction.h +++ b/crypto/block/transaction.h @@ -168,6 +168,7 @@ struct ActionPhaseConfig { bool action_fine_enabled{false}; bool bounce_on_fail_enabled{false}; bool message_skip_enabled{false}; + bool disable_custom_fess{false}; td::optional mc_blackhole_addr; const MsgPrices& fetch_msg_prices(bool is_masterchain) const { return is_masterchain ? fwd_mc : fwd_std; diff --git a/doc/GlobalVersions.md b/doc/GlobalVersions.md index 86de6317..e649c009 100644 --- a/doc/GlobalVersions.md +++ b/doc/GlobalVersions.md @@ -109,3 +109,4 @@ Operations for working with Merkle proofs, where cells can have non-zero level a - Slightly change random seed generation to fix mix of `addr_rewrite` and `addr`. - Fill in `skipped_actions` for both invalid and valid messages with `IGNORE_ERROR` mode that can't be sent. - Allow unfreeze through external messages. +- Don't use user-provided `fwd_fee` and `ihr_fee` for internal messages. \ No newline at end of file diff --git a/validator/impl/validate-query.cpp b/validator/impl/validate-query.cpp index 0de6d667..5345ed72 100644 --- a/validator/impl/validate-query.cpp +++ b/validator/impl/validate-query.cpp @@ -995,6 +995,7 @@ bool ValidateQuery::fetch_config_params() { action_phase_cfg_.action_fine_enabled = config_->get_global_version() >= 4; action_phase_cfg_.bounce_on_fail_enabled = config_->get_global_version() >= 4; action_phase_cfg_.message_skip_enabled = config_->get_global_version() >= 8; + action_phase_cfg_.disable_custom_fess = config_->get_global_version() >= 8; action_phase_cfg_.mc_blackhole_addr = config_->get_burning_config().blackhole_addr; } {