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
|
@ -26,6 +26,7 @@
|
|||
#include "statedb.hpp"
|
||||
#include "staticfilesdb.hpp"
|
||||
#include "archive-manager.hpp"
|
||||
#include "validator.h"
|
||||
|
||||
namespace ton {
|
||||
|
||||
|
@ -34,8 +35,9 @@ namespace validator {
|
|||
class RootDb : public Db {
|
||||
public:
|
||||
enum class Flags : td::uint32 { f_started = 1, f_ready = 2, f_switched = 4, f_archived = 8 };
|
||||
RootDb(td::actor::ActorId<ValidatorManager> validator_manager, std::string root_path)
|
||||
: validator_manager_(validator_manager), root_path_(std::move(root_path)) {
|
||||
RootDb(td::actor::ActorId<ValidatorManager> validator_manager, std::string root_path,
|
||||
td::Ref<ValidatorManagerOptions> opts)
|
||||
: validator_manager_(validator_manager), root_path_(std::move(root_path)), opts_(opts) {
|
||||
}
|
||||
|
||||
void start_up() override;
|
||||
|
@ -138,6 +140,7 @@ class RootDb : public Db {
|
|||
td::actor::ActorId<ValidatorManager> validator_manager_;
|
||||
|
||||
std::string root_path_;
|
||||
td::Ref<ValidatorManagerOptions> opts_;
|
||||
|
||||
td::actor::ActorOwn<CellDb> cell_db_;
|
||||
td::actor::ActorOwn<StateDb> state_db_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue