Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/create-tolk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:

permissions: write-all

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
create-release:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -155,11 +152,3 @@ jobs:
asset_name: ton-wasm.zip
tag: ${{ inputs.tag }}

- name: Upload stdlib
run: |
mkdir smartcont_lib
cd smartcont_lib
cp -r ../artifacts/ton-x86_64-linux/{smartcont,lib} .
zip -r smartcont_lib.zip .
gh release upload ${{ inputs.tag }} smartcont_lib.zip

12 changes: 0 additions & 12 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
## 2025.10 Update

1. [TVM version v12](./doc/GlobalVersions.md): full bounces, new `BTOS` and `HASHBU` instuctions, limit on contract size in masterchain.
2. Optimistic collation/validation: allow nodes to generate and check block candidates before previous block is fully signed (not fully activated yet).
3. Introduced custom block compression algorithm.
4. Overlay improvements: improved overlay discovery on shard configuration update, private externals in custom overlays.
5. Various improvements: session stats, telemetry in fast-sync overlay, earlier block broadcasts, limiting ttl for values in DHT, fixing search by utime in native blockexplorer, faster downloading candidates in validator session, parallelization of storing to cell_db, avoiding touching packfiles on startup.

Besides the work of the core team, this update is based on the efforts of the Tonstudio team: @hacker-volodya @Shvandre; and @mkiesel (avoiding touching packfiles on startup).



## 2025.07 Accelerator Update

Separation of validation and collation processes that allows to host them on independent machines and achieve full horizontal scaling. [More details in documentation](https://docs.ton.org/v3/documentation/infra/nodes/validation/collators)
Expand Down
14 changes: 0 additions & 14 deletions adnl/adnl-ext-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ void AdnlExtClientImpl::alarm() {
next_create_at_ = td::Timestamp::in(10.0);
alarm_timestamp() = next_create_at_;

if (!dst_host_.empty()) {
auto S = dst_addr_.init_host_port(dst_host_);
if (S.is_error()) {
LOG(INFO) << "failed to connect to " << dst_host_ << ": " << S;
return;
}
LOG(DEBUG) << "resolved " << dst_host_ << " -> " << dst_addr_;
}
auto fd = td::SocketFd::open(dst_addr_);
if (fd.is_error()) {
LOG(INFO) << "failed to connect to " << dst_addr_ << ": " << fd.move_as_error();
Expand Down Expand Up @@ -174,12 +166,6 @@ td::actor::ActorOwn<AdnlExtClient> AdnlExtClient::create(AdnlNodeIdFull dst, td:
return td::actor::create_actor<AdnlExtClientImpl>("extclient", std::move(dst), dst_addr, std::move(callback));
}

td::actor::ActorOwn<AdnlExtClient> AdnlExtClient::create(AdnlNodeIdFull dst, std::string dst_host,
std::unique_ptr<AdnlExtClient::Callback> callback) {
return td::actor::create_actor<AdnlExtClientImpl>("extclient", std::move(dst), std::move(dst_host),
std::move(callback));
}

td::actor::ActorOwn<AdnlExtClient> AdnlExtClient::create(AdnlNodeIdFull dst, PrivateKey local_id,
td::IPAddress dst_addr,
std::unique_ptr<AdnlExtClient::Callback> callback) {
Expand Down
2 changes: 0 additions & 2 deletions adnl/adnl-ext-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class AdnlExtClient : public td::actor::Actor {
td::Promise<td::BufferSlice> promise) = 0;
static td::actor::ActorOwn<AdnlExtClient> create(AdnlNodeIdFull dst, td::IPAddress dst_addr,
std::unique_ptr<AdnlExtClient::Callback> callback);
static td::actor::ActorOwn<AdnlExtClient> create(AdnlNodeIdFull dst, std::string dst_host,
std::unique_ptr<AdnlExtClient::Callback> callback);
static td::actor::ActorOwn<AdnlExtClient> create(AdnlNodeIdFull dst, PrivateKey local_id, td::IPAddress dst_addr,
std::unique_ptr<AdnlExtClient::Callback> callback);
};
Expand Down
4 changes: 0 additions & 4 deletions adnl/adnl-ext-client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ class AdnlExtClientImpl : public AdnlExtClient {
AdnlExtClientImpl(AdnlNodeIdFull dst_id, td::IPAddress dst_addr, std::unique_ptr<Callback> callback)
: dst_(std::move(dst_id)), dst_addr_(dst_addr), callback_(std::move(callback)) {
}
AdnlExtClientImpl(AdnlNodeIdFull dst_id, std::string dst_host, std::unique_ptr<Callback> callback)
: dst_(std::move(dst_id)), dst_host_(std::move(dst_host)), callback_(std::move(callback)) {
}
AdnlExtClientImpl(AdnlNodeIdFull dst_id, PrivateKey local_id, td::IPAddress dst_addr,
std::unique_ptr<Callback> callback)
: dst_(std::move(dst_id)), local_id_(local_id), dst_addr_(dst_addr), callback_(std::move(callback)) {
Expand Down Expand Up @@ -136,7 +133,6 @@ class AdnlExtClientImpl : public AdnlExtClient {
AdnlNodeIdFull dst_;
PrivateKey local_id_;
td::IPAddress dst_addr_;
std::string dst_host_;

std::unique_ptr<Callback> callback_;

Expand Down
10 changes: 5 additions & 5 deletions blockchain-explorer/blockchain-explorer-query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ HttpQueryBlockSearch::HttpQueryBlockSearch(std::map<std::string, std::string> op
}
if (opts.count("utime") == 1) {
try {
utime_ = static_cast<td::uint32>(std::stoull(opts["utime"]));
mode_ = 4;
seqno_ = static_cast<td::uint32>(std::stoull(opts["utime"]));
mode_ = 1;
} catch (...) {
error_ = td::Status::Error("cannot parse utime");
return;
Expand Down Expand Up @@ -1429,10 +1429,10 @@ void HttpQueryStatus::finish_query() {
A << "<td>" << static_cast<td::int32>(x->ts_.at_unix()) << "</td>";
}
A << "</tr>\n";
for (td::uint32 i = 0; i < results_.addrs.size(); i++) {
for (td::uint32 i = 0; i < results_.ips.size(); i++) {
A << "<tr>";
if (!results_.addrs[i].empty()) {
A << "<td>" << results_.addrs[i] << "</td>";
if (results_.ips[i].is_valid()) {
A << "<td>" << results_.ips[i].get_ip_str() << ":" << results_.ips[i].get_port() << "</td>";
} else {
A << "<td>hidden</td>";
}
Expand Down
8 changes: 4 additions & 4 deletions blockchain-explorer/blockchain-explorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class CoreActor : public CoreActorInterface {
std::mutex queue_mutex_;
std::mutex res_mutex_;
std::map<td::int32, std::shared_ptr<RemoteNodeStatus>> results_;
std::vector<std::string> addrs_;
std::vector<td::IPAddress> addrs_;
static CoreActor* instance_;
td::actor::ActorId<CoreActor> self_id_;

Expand Down Expand Up @@ -220,7 +220,7 @@ class CoreActor : public CoreActorInterface {
}
void get_results(td::uint32 max, td::Promise<RemoteNodeStatusList> promise) override {
RemoteNodeStatusList r;
r.addrs = hide_ips_ ? std::vector<std::string>{addrs_.size()} : addrs_;
r.ips = hide_ips_ ? std::vector<td::IPAddress>{addrs_.size()} : addrs_;
auto it = results_.rbegin();
while (it != results_.rend() && r.results.size() < max) {
r.results.push_back(it->second);
Expand Down Expand Up @@ -445,14 +445,14 @@ class CoreActor : public CoreActorInterface {
r_servers.ensure();
servers = r_servers.move_as_ok();
for (const auto& serv : servers) {
addrs_.push_back(serv.hostname);
addrs_.push_back(serv.addr);
}
} else {
if (!remote_addr_.is_valid()) {
LOG(FATAL) << "remote addr not set";
}
addrs_.push_back(remote_addr_);
servers.push_back(liteclient::LiteServerConfig{ton::adnl::AdnlNodeIdFull{remote_public_key_}, remote_addr_});
addrs_.push_back(servers.back().hostname);
}
n_servers_ = servers.size();
client_ = liteclient::ExtClient::create(std::move(servers), make_callback(), true);
Expand Down
2 changes: 1 addition & 1 deletion blockchain-explorer/blockchain-explorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CoreActorInterface : public td::actor::Actor {
};

struct RemoteNodeStatusList {
std::vector<std::string> addrs;
std::vector<td::IPAddress> ips;
std::vector<std::shared_ptr<RemoteNodeStatus>> results;
};
virtual ~CoreActorInterface() = default;
Expand Down
2 changes: 1 addition & 1 deletion common/global-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
namespace ton {

// See doc/GlobalVersions.md
constexpr int SUPPORTED_VERSION = 12;
constexpr int SUPPORTED_VERSION = 11;

}
3 changes: 3 additions & 0 deletions create-hardfork/create-hardfork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ class HardforkCreator : public td::actor::Actor {

void new_key_block(ton::validator::BlockHandle handle) override {
}
void send_validator_telemetry(ton::PublicKeyHash key,
ton::tl_object_ptr<ton::ton_api::validator_telemetry> telemetry) override {
}
};

td::actor::send_closure(validator_manager_, &ton::validator::ValidatorManagerInterface::install_callback,
Expand Down
2 changes: 0 additions & 2 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ set(TON_CRYPTO_CORE_SOURCE
openssl/residue.cpp
openssl/rand.cpp
vm/boc.cpp
vm/boc-compression.cpp
vm/large-boc-serializer.cpp
tl/tlblib.cpp

Expand Down Expand Up @@ -109,7 +108,6 @@ set(TON_CRYPTO_SOURCE
vm/arithops.h
vm/atom.h
vm/boc.h
vm/boc-compression.h
vm/boc-writers.h
vm/box.hpp
vm/cellops.h
Expand Down
46 changes: 27 additions & 19 deletions crypto/block/block-parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ bool CommonMsgInfo::validate_skip(int* ops, vm::CellSlice& cs, bool weak) const
&& t_MsgAddressInt.validate_skip(ops, cs, weak) // src
&& t_MsgAddressInt.validate_skip(ops, cs, weak) // dest
&& t_CurrencyCollection.validate_skip(ops, cs, weak) // value
&& t_Grams.validate_skip(ops, cs, weak) // extra_flags
&& t_Grams.validate_skip(ops, cs, weak) // ihr_fee
&& t_Grams.validate_skip(ops, cs, weak) // fwd_fee
&& cs.advance(64 + 32); // created_lt:uint64 created_at:uint32
case ext_in_msg_info:
Expand All @@ -684,7 +684,7 @@ bool CommonMsgInfo::unpack(vm::CellSlice& cs, CommonMsgInfo::Record_int_msg_info
return get_tag(cs) == int_msg_info && cs.advance(1) && cs.fetch_bool_to(data.ihr_disabled) &&
cs.fetch_bool_to(data.bounce) && cs.fetch_bool_to(data.bounced) && t_MsgAddressInt.fetch_to(cs, data.src) &&
t_MsgAddressInt.fetch_to(cs, data.dest) && t_CurrencyCollection.fetch_to(cs, data.value) &&
t_Grams.fetch_to(cs, data.extra_flags) && t_Grams.fetch_to(cs, data.fwd_fee) &&
t_Grams.fetch_to(cs, data.ihr_fee) && t_Grams.fetch_to(cs, data.fwd_fee) &&
cs.fetch_uint_to(64, data.created_lt) && cs.fetch_uint_to(32, data.created_at);
}

Expand All @@ -696,7 +696,7 @@ bool CommonMsgInfo::skip(vm::CellSlice& cs) const {
&& t_MsgAddressInt.skip(cs) // src
&& t_MsgAddressInt.skip(cs) // dest
&& t_CurrencyCollection.skip(cs) // value
&& t_Grams.skip(cs) // extra_flags
&& t_Grams.skip(cs) // ihr_fee
&& t_Grams.skip(cs) // fwd_fee
&& cs.advance(64 + 32); // created_lt:uint64 created_at:uint32
case ext_in_msg_info:
Expand All @@ -718,7 +718,7 @@ bool CommonMsgInfo::get_created_lt(vm::CellSlice& cs, unsigned long long& create
&& t_MsgAddressInt.skip(cs) // src
&& t_MsgAddressInt.skip(cs) // dest
&& t_CurrencyCollection.skip(cs) // value
&& t_Grams.skip(cs) // extra_flags
&& t_Grams.skip(cs) // ihr_fee
&& t_Grams.skip(cs) // fwd_fee
&& cs.fetch_ulong_bool(64, created_lt) // created_lt:uint64
&& cs.advance(32); // created_at:uint32
Expand Down Expand Up @@ -1843,18 +1843,26 @@ bool InMsg::validate_skip(int* ops, vm::CellSlice& cs, bool weak) const {
return false;
}

static td::RefInt256 get_ihr_fee(const CommonMsgInfo::Record_int_msg_info &info, int global_version) {
// Legacy: extra_flags was previously ihr_fee
return global_version >= 12 ? td::zero_refint() : t_Grams.as_integer(std::move(info.extra_flags));
}

bool InMsg::get_import_fees(vm::CellBuilder& cb, vm::CellSlice& cs, int global_version) const {
bool InMsg::get_import_fees(vm::CellBuilder& cb, vm::CellSlice& cs) const {
int tag = get_tag(cs);
switch (tag) {
case msg_import_ext: // inbound external message
return t_ImportFees.null_value(cb); // external messages have no value and no import fees
case msg_import_ihr: // IHR-forwarded internal message to its final destination
// IHR is not implemented
if (cs.advance(3) && cs.size_refs() >= 3) {
auto msg_cs = load_cell_slice(cs.fetch_ref());
CommonMsgInfo::Record_int_msg_info msg_info;
td::RefInt256 ihr_fee;
vm::CellBuilder aux;
// sort of Prolog-style in C++
return t_Message.extract_info(msg_cs) && t_CommonMsgInfo.unpack(msg_cs, msg_info) &&
cs.fetch_ref().not_null() && (ihr_fee = t_Grams.as_integer_skip(cs)).not_null() &&
cs.fetch_ref().not_null() && !cmp(ihr_fee, t_Grams.as_integer(*msg_info.ihr_fee)) &&
cb.append_cellslice_bool(msg_info.ihr_fee) // fees_collected := ihr_fee
&& aux.append_cellslice_bool(msg_info.ihr_fee) && t_ExtraCurrencyCollection.null_value(aux) &&
t_CurrencyCollection.add_values(cb, aux.as_cellslice_ref().write(),
msg_info.value.write()); // value_imported := ihr_fee + value
}
return false;
case msg_import_imm: // internal message re-imported from this very block
if (cs.advance(3) && cs.size_refs() >= 2) {
Expand All @@ -1880,7 +1888,7 @@ bool InMsg::get_import_fees(vm::CellBuilder& cb, vm::CellSlice& cs, int global_v
return t_Message.extract_info(msg_cs) && t_CommonMsgInfo.unpack(msg_cs, msg_info) &&
cb.append_cellslice_bool(in_msg.fwd_fee_remaining) // fees_collected := fwd_fee_remaining
&& t_Grams.as_integer_skip_to(msg_info.value.write(), value_grams) &&
(ihr_fee = get_ihr_fee(msg_info, global_version)).not_null() &&
(ihr_fee = t_Grams.as_integer(std::move(msg_info.ihr_fee))).not_null() &&
t_Grams.store_integer_ref(cb, value_grams + ihr_fee + fwd_fee_remaining) &&
cb.append_cellslice_bool(
msg_info.value.write()); // value_imported = msg.value + msg.ihr_fee + fwd_fee_remaining
Expand All @@ -1903,7 +1911,7 @@ bool InMsg::get_import_fees(vm::CellBuilder& cb, vm::CellSlice& cs, int global_v
return t_Message.extract_info(msg_cs) && t_CommonMsgInfo.unpack(msg_cs, msg_info) &&
t_Grams.store_integer_ref(cb, std::move(transit_fee)) // fees_collected := transit_fees
&& t_Grams.as_integer_skip_to(msg_info.value.write(), value_grams) &&
(ihr_fee = get_ihr_fee(msg_info, global_version)).not_null() &&
(ihr_fee = t_Grams.as_integer(std::move(msg_info.ihr_fee))).not_null() &&
t_Grams.store_integer_ref(cb, value_grams + ihr_fee + fwd_fee_remaining) &&
cb.append_cellslice_bool(
msg_info.value.write()); // value_imported = msg.value + msg.ihr_fee + fwd_fee_remaining
Expand Down Expand Up @@ -1933,8 +1941,8 @@ bool InMsg::get_import_fees(vm::CellBuilder& cb, vm::CellSlice& cs, int global_v

const InMsg t_InMsg;

const Aug_InMsgDescr aug_InMsgDescrDefault(ton::SUPPORTED_VERSION);
const InMsgDescr t_InMsgDescrDefault(ton::SUPPORTED_VERSION);
const Aug_InMsgDescr aug_InMsgDescr;
const InMsgDescr t_InMsgDescr;

bool OutMsg::skip(vm::CellSlice& cs) const {
switch (get_tag(cs)) {
Expand Down Expand Up @@ -2030,7 +2038,7 @@ bool OutMsg::validate_skip(int* ops, vm::CellSlice& cs, bool weak) const {
return false;
}

bool OutMsg::get_export_value(vm::CellBuilder& cb, vm::CellSlice& cs, int global_version) const {
bool OutMsg::get_export_value(vm::CellBuilder& cb, vm::CellSlice& cs) const {
auto tag = get_tag(cs);
switch (tag) {
case msg_export_ext: // external outbound message carries no value
Expand Down Expand Up @@ -2063,7 +2071,7 @@ bool OutMsg::get_export_value(vm::CellBuilder& cb, vm::CellSlice& cs, int global
td::RefInt256 value_grams, ihr_fee, fwd_fee_remaining;
return t_Message.extract_info(msg_cs) && t_CommonMsgInfo.unpack(msg_cs, msg_info) &&
(value_grams = t_Grams.as_integer_skip(msg_info.value.write())).not_null() &&
(ihr_fee = get_ihr_fee(msg_info, global_version)).not_null() &&
(ihr_fee = t_Grams.as_integer(std::move(msg_info.ihr_fee))).not_null() &&
(fwd_fee_remaining = t_Grams.as_integer(out_msg.fwd_fee_remaining)).not_null() &&
t_Grams.store_integer_ref(cb, value_grams + ihr_fee + fwd_fee_remaining) &&
cb.append_cellslice_bool(std::move(msg_info.value));
Expand Down Expand Up @@ -2104,8 +2112,8 @@ bool OutMsg::get_emitted_lt(vm::CellSlice& cs, unsigned long long& emitted_lt) c

const OutMsg t_OutMsg;

const Aug_OutMsgDescr aug_OutMsgDescrDefault(ton::SUPPORTED_VERSION);
const OutMsgDescr t_OutMsgDescrDefault(ton::SUPPORTED_VERSION);
const Aug_OutMsgDescr aug_OutMsgDescr;
const OutMsgDescr t_OutMsgDescr;

bool EnqueuedMsg::validate_skip(int* ops, vm::CellSlice& cs, bool weak) const {
return cs.advance(64) && t_Ref_MsgEnvelope.validate_skip(ops, cs, weak);
Expand Down
Loading