mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Rollback celldb default flag values and decrease default TTLs (#1012)
* Rollback celldb default flag values and decrease default TTLs * Fix description
This commit is contained in:
parent
74801d00b8
commit
3d7e85bafd
3 changed files with 13 additions and 13 deletions
|
@ -3897,7 +3897,7 @@ int main(int argc, char *argv[]) {
|
|||
acts.push_back([&x, v]() { td::actor::send_closure(x, &ValidatorEngine::set_max_mempool_num, v); });
|
||||
return td::Status::OK();
|
||||
});
|
||||
p.add_checked_option('b', "block-ttl", "blocks will be gc'd after this time (in seconds) default=7*86400",
|
||||
p.add_checked_option('b', "block-ttl", "blocks will be gc'd after this time (in seconds) default=86400",
|
||||
[&](td::Slice fname) {
|
||||
auto v = td::to_double(fname);
|
||||
if (v <= 0) {
|
||||
|
@ -3907,7 +3907,7 @@ int main(int argc, char *argv[]) {
|
|||
return td::Status::OK();
|
||||
});
|
||||
p.add_checked_option(
|
||||
'A', "archive-ttl", "archived blocks will be deleted after this time (in seconds) default=365*86400",
|
||||
'A', "archive-ttl", "archived blocks will be deleted after this time (in seconds) default=7*86400",
|
||||
[&](td::Slice fname) {
|
||||
auto v = td::to_double(fname);
|
||||
if (v <= 0) {
|
||||
|
@ -4020,7 +4020,7 @@ int main(int argc, char *argv[]) {
|
|||
acts.push_back([&x]() { td::actor::send_closure(x, &ValidatorEngine::set_nonfinal_ls_queries_enabled); });
|
||||
});
|
||||
p.add_checked_option(
|
||||
'\0', "celldb-cache-size", "block cache size for RocksDb in CellDb, in bytes (default: 50G)",
|
||||
'\0', "celldb-cache-size", "block cache size for RocksDb in CellDb, in bytes (default: 1G)",
|
||||
[&](td::Slice s) -> td::Status {
|
||||
TRY_RESULT(v, td::to_integer_safe<td::uint64>(s));
|
||||
if (v == 0) {
|
||||
|
@ -4030,12 +4030,12 @@ int main(int argc, char *argv[]) {
|
|||
return td::Status::OK();
|
||||
});
|
||||
p.add_option(
|
||||
'\0', "celldb-no-direct-io", "disable direct I/O mode for RocksDb in CellDb (forced when celldb cache is < 30G)",
|
||||
[&]() { acts.push_back([&x]() { td::actor::send_closure(x, &ValidatorEngine::set_celldb_direct_io, false); }); });
|
||||
'\0', "celldb-direct-io", "enable direct I/O mode for RocksDb in CellDb (doesn't apply when celldb cache is < 30G)",
|
||||
[&]() { acts.push_back([&x]() { td::actor::send_closure(x, &ValidatorEngine::set_celldb_direct_io, true); }); });
|
||||
p.add_option(
|
||||
'\0', "celldb-no-preload-all",
|
||||
"disable preloading all cells from CellDb on startup (enabled by default)",
|
||||
[&]() { acts.push_back([&x]() { td::actor::send_closure(x, &ValidatorEngine::set_celldb_preload_all, false); }); });
|
||||
'\0', "celldb-preload-all",
|
||||
"preload all cells from CellDb on startup (recommended to use with big enough celldb-cache-size and celldb-direct-io)",
|
||||
[&]() { acts.push_back([&x]() { td::actor::send_closure(x, &ValidatorEngine::set_celldb_preload_all, true); }); });
|
||||
p.add_checked_option(
|
||||
'\0', "catchain-max-block-delay", "delay before creating a new catchain block, in seconds (default: 0.5)",
|
||||
[&](td::Slice s) -> td::Status {
|
||||
|
|
|
@ -211,9 +211,9 @@ class ValidatorEngine : public td::actor::Actor {
|
|||
double archive_preload_period_ = 0.0;
|
||||
bool disable_rocksdb_stats_ = false;
|
||||
bool nonfinal_ls_queries_enabled_ = false;
|
||||
td::optional<td::uint64> celldb_cache_size_ = 50LL << 30;
|
||||
bool celldb_direct_io_ = true;
|
||||
bool celldb_preload_all_ = true;
|
||||
td::optional<td::uint64> celldb_cache_size_ = 1LL << 30;
|
||||
bool celldb_direct_io_ = false;
|
||||
bool celldb_preload_all_ = false;
|
||||
td::optional<double> catchain_max_block_delay_;
|
||||
bool read_config_ = false;
|
||||
bool started_keyring_ = false;
|
||||
|
|
|
@ -125,8 +125,8 @@ struct ValidatorManagerOptions : public td::CntObject {
|
|||
BlockIdExt zero_block_id, BlockIdExt init_block_id,
|
||||
std::function<bool(ShardIdFull, CatchainSeqno, ShardCheckMode)> check_shard = [](ShardIdFull, CatchainSeqno,
|
||||
ShardCheckMode) { return true; },
|
||||
bool allow_blockchain_init = false, double sync_blocks_before = 86400, double block_ttl = 86400 * 7,
|
||||
double state_ttl = 3600, double archive_ttl = 86400 * 365, double key_proof_ttl = 86400 * 3650,
|
||||
bool allow_blockchain_init = false, double sync_blocks_before = 3600, double block_ttl = 86400,
|
||||
double state_ttl = 3600, double archive_ttl = 86400 * 7, double key_proof_ttl = 86400 * 3650,
|
||||
double max_mempool_num = 999999,
|
||||
bool initial_sync_disabled = false);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue