mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Changes in validation
* Configure collator list in validator-console * Remove "lite-validator" flags * Better compatibility in validate-query.cpp
This commit is contained in:
parent
f91ed6cc31
commit
38ab70c037
16 changed files with 368 additions and 107 deletions
|
@ -52,10 +52,24 @@ struct PerfTimerStats {
|
|||
std::deque<std::pair<double, double>> stats; // <Time::now(), duration>
|
||||
};
|
||||
|
||||
struct CollatorsList : public td::CntObject {
|
||||
struct Collator {
|
||||
adnl::AdnlNodeIdShort adnl_id;
|
||||
bool trusted;
|
||||
};
|
||||
struct Shard {
|
||||
ShardIdFull shard_id;
|
||||
std::vector<Collator> collators;
|
||||
};
|
||||
bool self_collate = true;
|
||||
bool use_config_41 = false;
|
||||
std::vector<Shard> shards;
|
||||
|
||||
void unpack(const ton_api::engine_validator_collatorsList& obj);
|
||||
};
|
||||
|
||||
struct ValidatorManagerOptions : public td::CntObject {
|
||||
public:
|
||||
enum ValidatorMode { validator_normal, validator_lite_shards, validator_lite_all };
|
||||
|
||||
virtual BlockIdExt zero_block_id() const = 0;
|
||||
virtual BlockIdExt init_block_id() const = 0;
|
||||
virtual bool need_monitor(ShardIdFull shard, const td::Ref<MasterchainState>& state) const = 0;
|
||||
|
@ -91,7 +105,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 ValidatorMode validator_mode() const = 0;
|
||||
virtual td::Ref<CollatorsList> get_collators_list() const = 0;
|
||||
|
||||
virtual void set_zero_block_id(BlockIdExt block_id) = 0;
|
||||
virtual void set_init_block_id(BlockIdExt block_id) = 0;
|
||||
|
@ -120,7 +134,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_validator_mode(ValidatorMode value) = 0;
|
||||
virtual void set_collators_list(td::Ref<CollatorsList> list) = 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