mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Increase limit for t_Block.validate, simplify validating StateInit (#691)
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
24ed85b155
commit
a78adf3062
6 changed files with 63 additions and 10 deletions
|
@ -2111,13 +2111,13 @@ bool ValidateQuery::unpack_block_data() {
|
|||
auto outmsg_cs = vm::load_cell_slice_ref(std::move(extra.out_msg_descr));
|
||||
// run some hand-written checks from block::tlb::
|
||||
// (automatic tests from block::gen:: have been already run for the entire block)
|
||||
if (!block::tlb::t_InMsgDescr.validate_upto(1000000, *inmsg_cs)) {
|
||||
if (!block::tlb::t_InMsgDescr.validate_upto(10000000, *inmsg_cs)) {
|
||||
return reject_query("InMsgDescr of the new block failed to pass handwritten validity tests");
|
||||
}
|
||||
if (!block::tlb::t_OutMsgDescr.validate_upto(1000000, *outmsg_cs)) {
|
||||
if (!block::tlb::t_OutMsgDescr.validate_upto(10000000, *outmsg_cs)) {
|
||||
return reject_query("OutMsgDescr of the new block failed to pass handwritten validity tests");
|
||||
}
|
||||
if (!block::tlb::t_ShardAccountBlocks.validate_ref(1000000, extra.account_blocks)) {
|
||||
if (!block::tlb::t_ShardAccountBlocks.validate_ref(10000000, extra.account_blocks)) {
|
||||
return reject_query("ShardAccountBlocks of the new block failed to pass handwritten validity tests");
|
||||
}
|
||||
in_msg_dict_ = std::make_unique<vm::AugmentedDictionary>(std::move(inmsg_cs), 256, block::tlb::aug_InMsgDescr);
|
||||
|
@ -5507,7 +5507,7 @@ bool ValidateQuery::try_validate() {
|
|||
}
|
||||
}
|
||||
LOG(INFO) << "running automated validity checks for block candidate " << id_.to_str();
|
||||
if (!block::gen::t_Block.validate_ref(1000000, block_root_)) {
|
||||
if (!block::gen::t_Block.validate_ref(10000000, block_root_)) {
|
||||
return reject_query("block "s + id_.to_str() + " failed to pass automated validity checks");
|
||||
}
|
||||
if (!fix_all_processed_upto()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue