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 2024-04-08 14:44:28 +03:00
commit 8143eb074e
9 changed files with 28 additions and 16 deletions

View file

@ -930,7 +930,7 @@ void ArchiveManager::alarm() {
}
void ArchiveManager::run_gc(UnixTime mc_ts, UnixTime gc_ts, UnixTime archive_ttl) {
auto p = get_temp_package_id_by_unixtime(std::max(gc_ts, mc_ts - TEMP_PACKAGES_TTL));
auto p = get_temp_package_id_by_unixtime(mc_ts - TEMP_PACKAGES_TTL);
std::vector<PackageId> vec;
for (auto &x : temp_files_) {
if (x.first < p) {

View file

@ -226,7 +226,7 @@ class ArchiveManager : public td::actor::Actor {
void update_permanent_slices();
static const td::uint32 TEMP_PACKAGES_TTL = 86400 * 7;
static const td::uint32 TEMP_PACKAGES_TTL = 3600;
};
} // namespace validator

View file

@ -189,7 +189,7 @@ void FullNodeCustomOverlay::receive_broadcast(PublicKeyHash src, td::BufferSlice
}
void FullNodeCustomOverlay::send_external_message(td::BufferSlice data) {
if (config_.ext_messages_broadcast_disabled_) {
if (!inited_ || config_.ext_messages_broadcast_disabled_) {
return;
}
LOG(FULL_NODE_DEBUG) << "Sending external message to private overlay \"" << name_ << "\"";
@ -267,6 +267,7 @@ void FullNodeCustomOverlay::init() {
td::actor::send_closure(rldp_, &rldp::Rldp::add_id, local_id_);
td::actor::send_closure(rldp2_, &rldp2::Rldp::add_id, local_id_);
inited_ = true;
}
void FullNodeCustomOverlay::tear_down() {

View file

@ -1419,7 +1419,7 @@ static td::Ref<vm::Tuple> prepare_vm_c7(ton::UnixTime now, ton::LogicalTime lt,
config ? config->get_root_cell() : vm::StackEntry() // global_config:(Maybe Cell) ] = SmartContractInfo;
};
if (config && config->get_global_version() >= 4) {
tuple.push_back(my_code); // code:Cell
tuple.push_back(vm::StackEntry::maybe(my_code)); // code:Cell
tuple.push_back(block::CurrencyCollection::zero().as_vm_tuple()); // in_msg_value:[Integer (Maybe Cell)]
tuple.push_back(td::zero_refint()); // storage_fees:Integer
@ -1430,10 +1430,13 @@ static td::Ref<vm::Tuple> prepare_vm_c7(ton::UnixTime now, ton::LogicalTime lt,
tuple.push_back(info.is_ok() ? info.move_as_ok() : vm::StackEntry());
}
if (config && config->get_global_version() >= 6) {
tuple.push_back(config->get_unpacked_config_tuple(now)); // unpacked_config_tuple:[...]
tuple.push_back(due_payment); // due_payment:Integer
tuple.push_back(vm::StackEntry::maybe(config->get_unpacked_config_tuple(now))); // unpacked_config_tuple:[...]
tuple.push_back(due_payment); // due_payment:Integer
// precomiled_gas_usage:(Maybe Integer)
auto precompiled = config->get_precompiled_contracts_config().get_contract(my_code->get_hash().bits());
td::optional<block::PrecompiledContractsConfig::Contract> precompiled;
if (my_code.not_null()) {
precompiled = config->get_precompiled_contracts_config().get_contract(my_code->get_hash().bits());
}
tuple.push_back(precompiled ? td::make_refint(precompiled.value().gas_usage) : vm::StackEntry());
}
auto tuple_ref = td::make_cnt_ref<std::vector<vm::StackEntry>>(std::move(tuple));

View file

@ -954,6 +954,7 @@ bool ValidateQuery::fetch_config_params() {
compute_phase_cfg_.mc_gas_prices = mc_gas_prices.move_as_ok();
compute_phase_cfg_.special_gas_full = config_->get_global_version() >= 5;
storage_phase_cfg_.enable_due_payment = config_->get_global_version() >= 4;
storage_phase_cfg_.global_version = config_->get_global_version();
compute_phase_cfg_.block_rand_seed = rand_seed_;
compute_phase_cfg_.libraries = std::make_unique<vm::Dictionary>(config_->get_libraries_root(), 256);
compute_phase_cfg_.max_vm_data_depth = size_limits.max_vm_data_depth;