1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-15 04:32:21 +00:00

Merge branch 'testnet' into accelerator

This commit is contained in:
SpyCheese 2024-10-24 17:28:57 +03:00
commit 1dfe79b5c4
8 changed files with 16 additions and 14 deletions

View file

@ -12,7 +12,7 @@
10. Minor changes of TVM which will be activated by `Config8.version >= 9` 10. Minor changes of TVM which will be activated by `Config8.version >= 9`
11. Multiple minor improvements 11. Multiple minor improvements
Besides the work of the core team, this update is based on the efforts of @krigga (emulator), Arayz @ TonBit (LS security, TVM recursion). Besides the work of the core team, this update is based on the efforts of @krigga (emulator), Arayz @ TonBit (LS security, TVM recursion), @ret2happy (UB in BLST).
## 2024.08 Update ## 2024.08 Update

View file

@ -24,7 +24,7 @@ else
fi fi
export NONINTERACTIVE=1 export NONINTERACTIVE=1
brew install ninja pkg-config automake libtool autoconf brew install ninja pkg-config automake libtool autoconf texinfo
brew install llvm@16 brew install llvm@16

View file

@ -42,10 +42,13 @@ pkgs.llvmPackages_16.stdenv.mkDerivation {
]; ];
dontAddStaticConfigureFlags = false; dontAddStaticConfigureFlags = false;
doCheck = false;
doInstallCheck = false;
cmakeFlags = [ cmakeFlags = [
"-DTON_USE_ABSEIL=OFF" "-DTON_USE_ABSEIL=ON"
"-DNIX=ON" "-DNIX=ON"
"-DTON_ONLY_TONLIB=ON"
]; ];
LDFLAGS = [ LDFLAGS = [

View file

@ -58,10 +58,13 @@ stdenv227.mkDerivation {
]; ];
dontAddStaticConfigureFlags = false; dontAddStaticConfigureFlags = false;
doCheck = false;
doInstallCheck = false;
cmakeFlags = [ cmakeFlags = [
"-DTON_USE_ABSEIL=ON" "-DTON_USE_ABSEIL=ON"
"-DNIX=ON" "-DNIX=ON"
"-DTON_ONLY_TONLIB=ON"
]; ];
LDFLAGS = [ LDFLAGS = [

View file

@ -407,7 +407,8 @@ void OverlayImpl::update_neighbours(td::uint32 nodes_to_change) {
continue; continue;
} }
if (X->get_version() <= td::Clocks::system() - Overlays::overlay_peer_ttl()) { if (overlay_type_ != OverlayType::FixedMemberList && X->get_version() <= td::Clocks::system() -
Overlays::overlay_peer_ttl()) {
if (X->is_permanent_member()) { if (X->is_permanent_member()) {
del_from_neighbour_list(X); del_from_neighbour_list(X);
} else { } else {
@ -656,14 +657,9 @@ size_t OverlayImpl::neighbours_cnt() const {
void OverlayImpl::update_root_member_list(std::vector<adnl::AdnlNodeIdShort> ids, void OverlayImpl::update_root_member_list(std::vector<adnl::AdnlNodeIdShort> ids,
std::vector<PublicKeyHash> root_public_keys, OverlayMemberCertificate cert) { std::vector<PublicKeyHash> root_public_keys, OverlayMemberCertificate cert) {
td::uint32 expectd_size = auto expected_size =
(td::uint32)(ids.size() + root_public_keys.size() * opts_.max_slaves_in_semiprivate_overlay_); (td::uint32)(ids.size() + root_public_keys.size() * opts_.max_slaves_in_semiprivate_overlay_);
if (expectd_size > opts_.max_peers_) { opts_.max_peers_ = std::max(opts_.max_peers_, expected_size);
opts_.max_peers_ = expectd_size;
}
if (expectd_size > opts_.max_neighbours_) {
opts_.max_neighbours_ = expectd_size;
}
std::sort(ids.begin(), ids.end()); std::sort(ids.begin(), ids.end());
auto old_root_public_keys = std::move(peer_list_.root_public_keys_); auto old_root_public_keys = std::move(peer_list_.root_public_keys_);
for (const auto &pub_key : root_public_keys) { for (const auto &pub_key : root_public_keys) {

View file

@ -78,7 +78,7 @@ class Overlay : public td::actor::Actor {
bool is_response) = 0; bool is_response) = 0;
virtual void update_peer_ip_str(adnl::AdnlNodeIdShort peer_id, td::string ip_str) = 0; virtual void update_peer_ip_str(adnl::AdnlNodeIdShort peer_id, td::string ip_str) = 0;
virtual void update_member_certificate(OverlayMemberCertificate cert) = 0; virtual void update_member_certificate(OverlayMemberCertificate cert) = 0;
virtual void update_root_member_list(std::vector<adnl::AdnlNodeIdShort> nodes, virtual void update_root_member_list(std::vector<adnl::AdnlNodeIdShort> ids,
std::vector<PublicKeyHash> root_public_keys, OverlayMemberCertificate cert) = 0; std::vector<PublicKeyHash> root_public_keys, OverlayMemberCertificate cert) = 0;
//virtual void receive_broadcast(td::BufferSlice data) = 0; //virtual void receive_broadcast(td::BufferSlice data) = 0;
//virtual void subscribe(std::unique_ptr<Overlays::Callback> callback) = 0; //virtual void subscribe(std::unique_ptr<Overlays::Callback> callback) = 0;

View file

@ -280,7 +280,7 @@ class OverlayImpl : public Overlay {
void update_peer_ip_str(adnl::AdnlNodeIdShort peer_id, td::string ip_str) override; void update_peer_ip_str(adnl::AdnlNodeIdShort peer_id, td::string ip_str) override;
void update_root_member_list(std::vector<adnl::AdnlNodeIdShort> nodes, std::vector<PublicKeyHash> root_public_keys, void update_root_member_list(std::vector<adnl::AdnlNodeIdShort> ids, std::vector<PublicKeyHash> root_public_keys,
OverlayMemberCertificate cert) override; OverlayMemberCertificate cert) override;
bool is_valid_peer(const adnl::AdnlNodeIdShort &id, const ton_api::overlay_MemberCertificate *certificate); bool is_valid_peer(const adnl::AdnlNodeIdShort &id, const ton_api::overlay_MemberCertificate *certificate);

View file

@ -12,6 +12,6 @@
10. Minor changes of TVM which will be activated by `Config8.version >= 9` 10. Minor changes of TVM which will be activated by `Config8.version >= 9`
11. Multiple minor improvements 11. Multiple minor improvements
Besides the work of the core team, this update is based on the efforts of @krigga (emulator), Arayz @ TonBit (LS security, TVM recursion). Besides the work of the core team, this update is based on the efforts of @krigga (emulator), Arayz @ TonBit (LS security, TVM recursion), @ret2happy (UB in BLST).