From 77b000385be11ba68ec474b5833eea9544c6c8dd Mon Sep 17 00:00:00 2001 From: tolya-yanot Date: Sun, 7 Nov 2021 23:58:30 +0300 Subject: [PATCH 1/2] fix split-depth (cherry picked from commit de5036ee1229fcf1489933cf3f8dd628163d342b) --- crypto/block/transaction.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/block/transaction.cpp b/crypto/block/transaction.cpp index 3f5a1ae6..3668a45f 100644 --- a/crypto/block/transaction.cpp +++ b/crypto/block/transaction.cpp @@ -395,6 +395,7 @@ bool Account::init_new(ton::UnixTime now) { } state_hash = addr_orig; status = orig_status = acc_nonexist; + split_depth_set_ = false; created = true; return true; } @@ -2243,6 +2244,8 @@ Ref Transaction::commit(Account& acc) { acc.tock = new_tock; } else { acc.tick = acc.tock = false; + acc.split_depth_set_ = false; + acc.created = true; } end_lt = 0; acc.push_transaction(root, start_lt); From 292ae26576b94932c7fe9937efe545adcbf60d60 Mon Sep 17 00:00:00 2001 From: tolya-yanot Date: Mon, 8 Nov 2021 00:03:20 +0300 Subject: [PATCH 2/2] fix collator (cherry picked from commit fd59193a2d8b970f027b45ad2a155ff521822555) --- validator/impl/collator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/validator/impl/collator.cpp b/validator/impl/collator.cpp index 3b8a4549..9ca4a6cc 100644 --- a/validator/impl/collator.cpp +++ b/validator/impl/collator.cpp @@ -2298,6 +2298,10 @@ Ref Collator::create_ordinary_transaction(Ref msg_root) { } register_new_msgs(*trans); update_max_lt(acc->last_trans_end_lt_); + // temporary patch to stop producing dangerous block + if (acc->status == block::Account::acc_nonexist) { + block_full_ = true; + } return trans_root; } @@ -2447,6 +2451,10 @@ int Collator::process_one_new_message(block::NewOutMsg msg, bool enqueue_only, R if (!insert_out_msg(cb.finalize())) { return -1; } + // 6.5. check for temporary patch can be left here + if (block_full_) { + return 3; + } // 7. check whether the block is full now if (!block_limit_status_->fits(block::ParamLimits::cl_normal)) { block_full_ = true;