1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Merge branch 'testnet' into block-generation

This commit is contained in:
SpyCheese 2023-06-02 13:34:00 +03:00
commit e4e77c16c5
463 changed files with 29976 additions and 2517 deletions

View file

@ -504,6 +504,22 @@ class ShardConfig {
bool set_shard_info(ton::ShardIdFull shard, Ref<vm::Cell> value);
};
struct BurningConfig {
td::optional<td::Bits256> blackhole_addr;
td::uint32 fee_burn_nom = 0, fee_burn_denom = 1;
td::RefInt256 calculate_burned_fees(const td::RefInt256& x) const {
if (x.is_null()) {
return x;
}
return x * fee_burn_nom / td::make_refint(fee_burn_denom);
}
CurrencyCollection calculate_burned_fees(const CurrencyCollection& x) const {
return CurrencyCollection{calculate_burned_fees(x.grams)};
}
};
struct CollatorNodeDescr {
ton::ShardIdFull shard;
ton::NodeIdShort adnl_id;
@ -629,6 +645,7 @@ class Config {
CollatorConfig get_collator_config(bool need_collator_nodes) const;
td::Result<SizeLimitsConfig> get_size_limits_config() const;
std::unique_ptr<vm::Dictionary> get_suspended_addresses(ton::UnixTime now) const;
BurningConfig get_burning_config() const;
static std::vector<ton::ValidatorDescr> do_compute_validator_set(const block::CatchainValidatorsConfig& ccv_conf,
ton::ShardIdFull shard,
const block::ValidatorSet& vset, ton::UnixTime time,
@ -733,6 +750,7 @@ class ConfigInfo : public Config, public ShardConfig {
ton::CatchainSeqno* cc_seqno_delta = nullptr) const;
std::vector<ton::ValidatorDescr> compute_validator_set_cc(ton::ShardIdFull shard, ton::UnixTime time,
ton::CatchainSeqno* cc_seqno_delta = nullptr) const;
td::Result<Ref<vm::Tuple>> get_prev_blocks_info() const;
static td::Result<std::unique_ptr<ConfigInfo>> extract_config(std::shared_ptr<vm::StaticBagOfCellsDb> static_boc,
int mode = 0);
static td::Result<std::unique_ptr<ConfigInfo>> extract_config(Ref<vm::Cell> mc_state_root, int mode = 0);