1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Merge branch 'testnet' into accelerator

This commit is contained in:
SpyCheese 2025-01-24 17:54:29 +03:00
commit 54e498a3ba
4 changed files with 18 additions and 4 deletions

View file

@ -1156,7 +1156,7 @@ namespace transaction {
* It is activated by setting global version to 5 in ConfigParam 8.
* This config change also activates new behavior for special accounts in masterchain.
*
* In Augost 2024 it was decided to unlock other old highload wallets that got into the same situation.
* In August 2024 it was decided to unlock other old highload wallets that got into the same situation.
* See https://t.me/tondev_news/129
* It is activated by setting global version to 9.
*

View file

@ -247,6 +247,11 @@ int VmState::jump(Ref<Continuation> cont) {
// general jump to continuation cont
int VmState::jump(Ref<Continuation> cont, int pass_args) {
cont = adjust_jump_cont(std::move(cont), pass_args);
return jump_to(std::move(cont));
}
Ref<Continuation> VmState::adjust_jump_cont(Ref<Continuation> cont, int pass_args) {
const ControlData* cont_data = cont->get_cdata();
if (cont_data) {
// first do the checks
@ -287,7 +292,7 @@ int VmState::jump(Ref<Continuation> cont, int pass_args) {
consume_stack_gas(copy);
}
}
return jump_to(std::move(cont));
return cont;
} else {
// have no continuation data, situation is somewhat simpler
if (pass_args >= 0) {
@ -299,7 +304,7 @@ int VmState::jump(Ref<Continuation> cont, int pass_args) {
consume_stack_gas(pass_args);
}
}
return jump_to(std::move(cont));
return cont;
}
}

View file

@ -347,6 +347,7 @@ class VmState final : public VmStateInterface {
int call(Ref<Continuation> cont, int pass_args, int ret_args = -1);
int jump(Ref<Continuation> cont);
int jump(Ref<Continuation> cont, int pass_args);
Ref<Continuation> adjust_jump_cont(Ref<Continuation> cont, int pass_args);
int ret();
int ret(int ret_args);
int ret_alt();
@ -374,6 +375,13 @@ class VmState final : public VmStateInterface {
if (cnt > free_nested_cont_jump && global_version >= 9) {
consume_gas(1);
}
if (cont.not_null() && global_version >= 9) {
const ControlData* cont_data = cont->get_cdata();
if (cont_data && (cont_data->stack.not_null() || cont_data->nargs >= 0)) {
// if cont has non-empty stack or expects fixed number of arguments, jump is not simple
cont = adjust_jump_cont(std::move(cont), -1);
}
}
}
return res;
}

View file

@ -133,4 +133,5 @@ Example: if the last masterchain block seqno is `19071` then the list contains b
- Fix exception code in some TVM instructions: now `stk_und` has priority over other error codes.
- `PFXDICTADD`, `PFXDICTSET`, `PFXDICTREPLACE`, `PFXDICTDEL`, `GETGASFEE`, `GETSTORAGEFEE`, `GETFORWARDFEE`, `GETORIGINALFWDFEE`, `GETGASFEESIMPLE`, `GETFORWARDFEESIMPLE`, `HASHEXT`
- Now setting the contract code to a library cell does not consume additional gas on execution of the code.
- Temporary increase gas limit for some accounts (see [this post](https://t.me/tondev_news/129) for details, `override_gas_limit` in `transaction.cpp` for the list of accounts).
- Temporary increase gas limit for some accounts (see [this post](https://t.me/tondev_news/129) for details, `override_gas_limit` in `transaction.cpp` for the list of accounts).
- Fix recursive jump to continuations with non-null control data.