mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Cache recent block states and adjust timeouts (#823)
* Add parameter --celldb-compress-depth to speed up celldb * Fix collator timeout * Add block_state_cache * Adjust state cache ttl * Don't merge shards when queue is too big * Decrease lt limit if previous block is too old --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
7fcf267717
commit
9b6d699c21
20 changed files with 230 additions and 37 deletions
|
@ -1363,6 +1363,7 @@ td::Status ValidatorEngine::load_global_config() {
|
|||
if (!session_logs_file_.empty()) {
|
||||
validator_options_.write().set_session_logs_file(session_logs_file_);
|
||||
}
|
||||
validator_options_.write().set_celldb_compress_depth(celldb_compress_depth_);
|
||||
|
||||
std::vector<ton::BlockIdExt> h;
|
||||
for (auto &x : conf.validator_->hardforks_) {
|
||||
|
@ -3761,6 +3762,11 @@ int main(int argc, char *argv[]) {
|
|||
acts.push_back([&x, at]() { td::actor::send_closure(x, &ValidatorEngine::schedule_shutdown, (double)at); });
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_checked_option('\0', "celldb-compress-depth", "(default: 0)", [&](td::Slice arg) {
|
||||
TRY_RESULT(value, td::to_integer_safe<td::uint32>(arg));
|
||||
acts.push_back([&x, value]() { td::actor::send_closure(x, &ValidatorEngine::set_celldb_compress_depth, value); });
|
||||
return td::Status::OK();
|
||||
});
|
||||
auto S = p.run(argc, argv);
|
||||
if (S.is_error()) {
|
||||
LOG(ERROR) << "failed to parse options: " << S.move_as_error();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue