Skip to content

Commit 3fbab2c

Browse files
authored
Always set ihr_disabled in internal messages (#1691)
1 parent 9b2933c commit 3fbab2c

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

crypto/block/transaction.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,6 +2569,9 @@ int Transaction::try_action_send_msg(const vm::CellSlice& cs0, ActionPhase& ap,
25692569
fwd_fee = block::tlb::t_Grams.as_integer(info.fwd_fee);
25702570
ihr_fee = block::tlb::t_Grams.as_integer(info.ihr_fee);
25712571
}
2572+
if (cfg.disable_ihr_flag) {
2573+
info.ihr_disabled = true;
2574+
}
25722575
}
25732576
// set created_at and created_lt to correct values
25742577
info.created_at = now;
@@ -4080,6 +4083,7 @@ td::Status FetchConfigParams::fetch_config_params(
40804083
action_phase_cfg->mc_blackhole_addr = config.get_burning_config().blackhole_addr;
40814084
action_phase_cfg->extra_currency_v2 = config.get_global_version() >= 10;
40824085
action_phase_cfg->disable_anycast = config.get_global_version() >= 10;
4086+
action_phase_cfg->disable_ihr_flag = config.get_global_version() >= 11;
40834087
}
40844088
{
40854089
serialize_cfg->extra_currency_v2 = config.get_global_version() >= 10;

crypto/block/transaction.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ struct ActionPhaseConfig {
174174
bool disable_custom_fess{false};
175175
bool reserve_extra_enabled{false};
176176
bool extra_currency_v2{false};
177+
bool disable_ihr_flag{false};
177178
td::optional<td::Bits256> mc_blackhole_addr;
178179
bool disable_anycast{false};
179180
const MsgPrices& fetch_msg_prices(bool is_masterchain) const {

crypto/vm/tonops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ int exec_send_message(VmState* st) {
18341834
if (!tlb::csr_unpack(msg.info, info)) {
18351835
throw VmError{Excno::unknown, "invalid message"};
18361836
}
1837-
ihr_disabled = info.ihr_disabled;
1837+
ihr_disabled = info.ihr_disabled || st->get_global_version() >= 11;
18381838
dest = std::move(info.dest);
18391839
Ref<vm::Cell> extra;
18401840
if (!block::tlb::t_CurrencyCollection.unpack_special(info.value.write(), value, extra)) {

doc/GlobalVersions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,6 @@ Along with the storage stat (cells and bits count), each account now stores the
223223
**Storage dict** is the dictionary that stores refcnt for each cell in the account state.
224224
This is required to help computing storage stats in the future, after collator-validator separation.
225225

226-
### Other TVM changes
227-
- Fix returning `null` as `c4` and `c5` (when VM state is not committed) in `RUNVM`.
226+
### Other changes
227+
- Fix returning `null` as `c4` and `c5` (when VM state is not committed) in `RUNVM`.
228+
- In new internal messages `ihr_disabled` is automatically set to `1`, `ihr_fee` is always zero.

validator/impl/validate-query.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ bool ValidateQuery::fetch_config_params() {
10071007
action_phase_cfg_.mc_blackhole_addr = config_->get_burning_config().blackhole_addr;
10081008
action_phase_cfg_.extra_currency_v2 = config_->get_global_version() >= 10;
10091009
action_phase_cfg_.disable_anycast = config_->get_global_version() >= 10;
1010+
action_phase_cfg_.disable_ihr_flag = config_->get_global_version() >= 11;
10101011
}
10111012
{
10121013
serialize_cfg_.extra_currency_v2 = config_->get_global_version() >= 10;

0 commit comments

Comments
 (0)