diff --git a/CMakeLists.txt b/CMakeLists.txt index af264036..cea3fc7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS FALSE) #BEGIN internal +option(BUILD_SHARED_LIBS "Use \"ON\" to build shared libraries instead of static where it's not specified (not recommended)" OFF) option(USE_EMSCRIPTEN "Use \"ON\" for config building wasm." OFF) option(TON_ONLY_TONLIB "Use \"ON\" to build only tonlib." OFF) if (USE_EMSCRIPTEN) diff --git a/Changelog.md b/Changelog.md index fd513bc8..34195f74 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,16 @@ +## 2025.02 Update +1. Series of improvement/fixes for `Config8.version >= 9`, check [GlobalVersions.md](./doc/GlobalVersions.md) +2. Fix for better discovery of updated nodes' (validators') IPs: retry dht queries +3. Series of improvements for extra currency adoption: fixed c7 in rungetmethod, reserve modes +4. TVM: Fix processing continuation control data on deep jump +5. A few fixes of tl-b schemes: crc computation, incorrect tag for merkle proofs, advance_ext, NatWidth print +6. Emulator improvements: fix setting libraries, extracurrency support +7. Increase of gas limit for unlocking highload-v2 wallets locked in the beginning of 2024 +8. Validator console improvement: dashed names, better shard formats + + +Besides the work of the core team, this update is based on the efforts of @dbaranovstonfi from StonFi(libraries in emulator), @Rexagon (ret on deep jumps), @tvorogme from DTon (`advance_ext`), Nan from Zellic (`stk_und` and JNI) + ## 2024.12 Update 1. FunC 0.4.6: Fix in try/catch handling, fixing pure flag for functions stored in variables diff --git a/crypto/tl/tlblib.cpp b/crypto/tl/tlblib.cpp index ee05d371..05ea8e1c 100644 --- a/crypto/tl/tlblib.cpp +++ b/crypto/tl/tlblib.cpp @@ -45,7 +45,7 @@ bool Bool::print_skip(PrettyPrinter& pp, vm::CellSlice& cs) const { } bool NatWidth::print_skip(PrettyPrinter& pp, vm::CellSlice& cs) const { - long long value = (long long)cs.fetch_ulong(32); + long long value = (long long)cs.fetch_ulong(n); return value >= 0 && pp.out_int(value); } diff --git a/crypto/vm/cells/CellSlice.cpp b/crypto/vm/cells/CellSlice.cpp index 466bcd8d..4d8c3c5a 100644 --- a/crypto/vm/cells/CellSlice.cpp +++ b/crypto/vm/cells/CellSlice.cpp @@ -264,7 +264,7 @@ bool CellSlice::advance_ext(unsigned bits, unsigned refs) { } bool CellSlice::advance_ext(unsigned bits_refs) { - return advance_ext(bits_refs >> 16, bits_refs & 0xffff); + return advance_ext(bits_refs & 0xffff, bits_refs >> 16); } // (PRIVATE) diff --git a/emulator/CMakeLists.txt b/emulator/CMakeLists.txt index 66d8309a..a0799541 100644 --- a/emulator/CMakeLists.txt +++ b/emulator/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) -option(BUILD_SHARED_LIBS "Use \"OFF\" for a static build." ON) - if (NOT OPENSSL_FOUND) find_package(OpenSSL REQUIRED) endif() @@ -11,11 +9,6 @@ set(EMULATOR_STATIC_SOURCE tvm-emulator.hpp ) -set(EMULATOR_HEADERS - transaction-emulator.h - emulator-extern.h -) - set(EMULATOR_SOURCE emulator-extern.cpp ) @@ -29,10 +22,10 @@ include(GenerateExportHeader) add_library(emulator_static STATIC ${EMULATOR_STATIC_SOURCE}) target_link_libraries(emulator_static PUBLIC ton_crypto smc-envelope) -if (NOT USE_EMSCRIPTEN AND BUILD_SHARED_LIBS) - add_library(emulator SHARED ${EMULATOR_SOURCE} ${EMULATOR_HEADERS}) +if (USE_EMSCRIPTEN) + add_library(emulator STATIC ${EMULATOR_SOURCE}) else() - add_library(emulator STATIC ${EMULATOR_SOURCE} ${EMULATOR_HEADERS}) + add_library(emulator SHARED ${EMULATOR_SOURCE}) endif() if (PORTABLE AND NOT APPLE) @@ -42,6 +35,9 @@ else() endif() generate_export_header(emulator EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/emulator_export.h) +if (USE_EMSCRIPTEN) + target_compile_definitions(emulator PUBLIC EMULATOR_STATIC_DEFINE) +endif() target_include_directories(emulator PUBLIC $ $) diff --git a/recent_changelog.md b/recent_changelog.md index cc877c2c..dfa39aa6 100644 --- a/recent_changelog.md +++ b/recent_changelog.md @@ -1,13 +1,12 @@ -## 2024.12 Update +## 2025.02 Update +1. Series of improvement/fixes for `Config8.version >= 9`, check [GlobalVersions.md](./doc/GlobalVersions.md) +2. Fix for better discovery of updated nodes' (validators') IPs: retry dht queries +3. Series of improvements for extra currency adoption: fixed c7 in rungetmethod, reserve modes +4. TVM: Fix processing continuation control data on deep jump +5. A few fixes of tl-b schemes: crc computation, incorrect tag for merkle proofs, advance_ext, NatWidth print +6. Emulator improvements: fix setting libraries, extracurrency support +7. Increase of gas limit for unlocking highload-v2 wallets locked in the beginning of 2024 +8. Validator console improvement: dashed names, better shard formats -1. FunC 0.4.6: Fix in try/catch handling, fixing pure flag for functions stored in variables -2. Merging parts of Accelerator: support of specific shard monitoring, archive/liteserver slice format, support for partial liteservers, proxy liteserver, on-demand neighbour queue loading -3. Fix of asynchronous cell loading -4. Various improvements: caching certificates checks, better block overloading detection, `_malloc` in emulator -5. Introduction of telemetry in overlays -6. Use non-null local-id for tonlib-LS interaction - mitigates MitM attack. -7. Adding `SECP256K1_XONLY_PUBKEY_TWEAK_ADD`, `SETCONTCTRMANY` instructions to TVM (activated by `Config8.version >= 9`) -8. Private keys export via validator-engine-console - required for better backups -9. Fix proof checking in tonlib, `hash` in `raw.Message` in tonlib_api -Besides the work of the core team, this update is based on the efforts of OtterSec and LayerZero (FunC), tg:@throwunless (FunC), Aviv Frenkel and Dima Kogan from Fordefi (LS MitM), @hacker-volodya (Tonlib), OKX team (async cell loading), @krigga (emulator) +Besides the work of the core team, this update is based on the efforts of @dbaranovstonfi from StonFi(libraries in emulator), @Rexagon (ret on deep jumps), @tvorogme from DTon (`advance_ext`), Nan from Zellic (`stk_und` and JNI) diff --git a/tonlib/CMakeLists.txt b/tonlib/CMakeLists.txt index 9a56e511..eb538361 100644 --- a/tonlib/CMakeLists.txt +++ b/tonlib/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) -option(BUILD_SHARED_LIBS "Use \"OFF\" for a static build." ON) - if (NOT OPENSSL_FOUND) find_package(OpenSSL REQUIRED) endif() @@ -92,10 +90,10 @@ set(TONLIB_JSON_HEADERS tonlib/tonlib_client_json.h) set(TONLIB_JSON_SOURCE tonlib/tonlib_client_json.cpp) include(GenerateExportHeader) -if (NOT USE_EMSCRIPTEN AND BUILD_SHARED_LIBS) - add_library(tonlibjson SHARED ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS}) +if (USE_EMSCRIPTEN) + add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE}) else() - add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS}) + add_library(tonlibjson SHARED ${TONLIB_JSON_SOURCE}) endif() if (PORTABLE AND NOT APPLE) @@ -105,7 +103,7 @@ else() endif() generate_export_header(tonlibjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h) -if (!BUILD_SHARED_LIBS) +if (USE_EMSCRIPTEN) target_compile_definitions(tonlibjson PUBLIC TONLIBJSON_STATIC_DEFINE) endif() target_include_directories(tonlibjson PUBLIC @@ -159,7 +157,7 @@ endif() install(FILES ${TONLIB_JSON_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h DESTINATION include/tonlib/) -if (NOT USE_EMSCRIPTEN AND BUILD_SHARED_LIBS) +if (NOT USE_EMSCRIPTEN) install(EXPORT Tonlib FILE TonlibTargets.cmake NAMESPACE Tonlib::