mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add collator options (#1052)
* Set collator options from validator console * Fix compilation error in manager-disk * Defer all messages if out msg queue is too big * Fix checking queue size in collator --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
c54f095c1b
commit
57f95cc282
22 changed files with 294 additions and 27 deletions
|
@ -51,6 +51,21 @@ struct PerfTimerStats {
|
|||
std::deque<std::pair<double, double>> stats; // <Time::now(), duration>
|
||||
};
|
||||
|
||||
struct CollatorOptions : public td::CntObject {
|
||||
bool deferring_enabled = true;
|
||||
|
||||
// Defer messages from account after Xth message in block (excluding first messages from transactions)
|
||||
td::uint32 defer_messages_after = 10;
|
||||
// Defer all messages if out msg queue size is greater than X (excluding first messages from transactions)
|
||||
td::uint64 defer_out_queue_size_limit = 2048;
|
||||
|
||||
// See Collator::process_dispatch_queue
|
||||
td::uint32 dispatch_phase_2_max_total = 150;
|
||||
td::uint32 dispatch_phase_3_max_total = 150;
|
||||
td::uint32 dispatch_phase_2_max_per_initiator = 20;
|
||||
td::optional<td::uint32> dispatch_phase_3_max_per_initiator; // Default - depends on out msg queue size
|
||||
};
|
||||
|
||||
struct ValidatorManagerOptions : public td::CntObject {
|
||||
public:
|
||||
enum class ShardCheckMode { m_monitor, m_validate };
|
||||
|
@ -91,6 +106,7 @@ struct ValidatorManagerOptions : public td::CntObject {
|
|||
virtual bool get_celldb_preload_all() const = 0;
|
||||
virtual td::optional<double> get_catchain_max_block_delay() const = 0;
|
||||
virtual bool get_state_serializer_enabled() const = 0;
|
||||
virtual td::Ref<CollatorOptions> get_collator_options() const = 0;
|
||||
|
||||
virtual void set_zero_block_id(BlockIdExt block_id) = 0;
|
||||
virtual void set_init_block_id(BlockIdExt block_id) = 0;
|
||||
|
@ -120,6 +136,7 @@ struct ValidatorManagerOptions : public td::CntObject {
|
|||
virtual void set_celldb_preload_all(bool value) = 0;
|
||||
virtual void set_catchain_max_block_delay(double value) = 0;
|
||||
virtual void set_state_serializer_enabled(bool value) = 0;
|
||||
virtual void set_collator_options(td::Ref<CollatorOptions> value) = 0;
|
||||
|
||||
static td::Ref<ValidatorManagerOptions> create(
|
||||
BlockIdExt zero_block_id, BlockIdExt init_block_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue