1
0
Fork 0
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:
EmelyanenkoK 2023-12-08 14:20:17 +03:00 committed by GitHub
parent 7fcf267717
commit 9b6d699c21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 230 additions and 37 deletions

View file

@ -114,6 +114,9 @@ struct ValidatorManagerOptionsImpl : public ValidatorManagerOptions {
std::string get_session_logs_file() const override {
return session_logs_file_;
}
td::uint32 get_celldb_compress_depth() const override {
return celldb_compress_depth_;
}
void set_zero_block_id(BlockIdExt block_id) override {
zero_block_id_ = block_id;
@ -167,6 +170,9 @@ struct ValidatorManagerOptionsImpl : public ValidatorManagerOptions {
void set_session_logs_file(std::string f) override {
session_logs_file_ = std::move(f);
}
void set_celldb_compress_depth(td::uint32 value) override {
celldb_compress_depth_ = value;
}
ValidatorManagerOptionsImpl *make_copy() const override {
return new ValidatorManagerOptionsImpl(*this);
@ -209,6 +215,7 @@ struct ValidatorManagerOptionsImpl : public ValidatorManagerOptions {
BlockSeqno truncate_{0};
BlockSeqno sync_upto_{0};
std::string session_logs_file_;
td::uint32 celldb_compress_depth_{0};
};
} // namespace validator