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
|
@ -71,6 +71,7 @@ class Collator final : public td::actor::Actor {
|
|||
std::vector<Ref<ShardState>> prev_states;
|
||||
std::vector<Ref<BlockData>> prev_block_data;
|
||||
Ed25519_PublicKey created_by_;
|
||||
Ref<CollatorOptions> collator_opts_;
|
||||
Ref<ValidatorSet> validator_set_;
|
||||
td::actor::ActorId<ValidatorManager> manager;
|
||||
td::Timestamp timeout;
|
||||
|
@ -90,7 +91,8 @@ class Collator final : public td::actor::Actor {
|
|||
public:
|
||||
Collator(ShardIdFull shard, bool is_hardfork, td::uint32 min_ts, BlockIdExt min_masterchain_block_id,
|
||||
std::vector<BlockIdExt> prev, Ref<ValidatorSet> validator_set, Ed25519_PublicKey collator_id,
|
||||
td::actor::ActorId<ValidatorManager> manager, td::Timestamp timeout, td::Promise<BlockCandidate> promise);
|
||||
Ref<CollatorOptions> collator_opts, td::actor::ActorId<ValidatorManager> manager, td::Timestamp timeout,
|
||||
td::Promise<BlockCandidate> promise);
|
||||
~Collator() override = default;
|
||||
bool is_busy() const {
|
||||
return busy_;
|
||||
|
@ -195,6 +197,7 @@ class Collator final : public td::actor::Actor {
|
|||
std::unique_ptr<vm::AugmentedDictionary> in_msg_dict, out_msg_dict, out_msg_queue_, sibling_out_msg_queue_;
|
||||
std::map<StdSmcAddress, size_t> unprocessed_deferred_messages_; // number of messages from dispatch queue in new_msgs
|
||||
td::uint64 out_msg_queue_size_ = 0;
|
||||
td::uint64 old_out_msg_queue_size_ = 0;
|
||||
bool have_out_msg_queue_size_in_state_ = false;
|
||||
std::unique_ptr<vm::Dictionary> ihr_pending;
|
||||
std::shared_ptr<block::MsgProcessedUptoCollection> processed_upto_, sibling_processed_upto_;
|
||||
|
@ -211,6 +214,8 @@ class Collator final : public td::actor::Actor {
|
|||
unsigned dispatch_queue_ops_{0};
|
||||
std::map<StdSmcAddress, LogicalTime> last_dispatch_queue_emitted_lt_;
|
||||
bool have_unprocessed_account_dispatch_queue_ = true;
|
||||
td::uint64 defer_out_queue_size_limit_;
|
||||
td::uint64 hard_defer_out_queue_size_limit_;
|
||||
|
||||
bool msg_metadata_enabled_ = false;
|
||||
bool deferring_messages_enabled_ = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue