1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00
Commit graph

63 commits

Author SHA1 Message Date
tolk-vm
f00ff75548
[FunC] Make Expr::VarApply always impure (#1381)
Expr::_VarApply is now always impure. It means, that
for `some_var()`, don't make any considerations about runtime value,
it's always called.
2024-11-14 18:32:04 +03:00
tolk-vm
89f136e670
[FunC] Add more tests for try/catch (#1380)
After fixing a bug with c1/c3 registers in #1332,
cover an issue with tests.
2024-11-14 18:31:21 +03:00
EmelyanenkoK
3ce6118c3f
Fix try-catch: save c1, c3 to catch continuation (#1332) 2024-11-02 18:23:08 +03:00
Aleksandr Kirsanov
fd1735f6ec
[FunC] Fix a bug with << operator to zero value (#1262) 2024-10-09 16:03:58 +03:00
birydrad
72020c04c4
celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164)
* getactorstats query for validator-engine-console

* celldb in-memory mode (--celldb-in-memory option)

* rldp2: bugfix - do not estimate speed while nothing is sent

* add simple ed25519 benchmark

* fix compilation errors of different platforms and move to c++20

* fix some warnings

* turn on TON_USE_ABSEIL for glibc 2.27 nix build

---------

Co-authored-by: birydrad <>
2024-09-23 17:34:37 +03:00
neodix42
679e6be294
Remove rocksdb usage from fift (#1064)
* add github action for macOS 14 (arm64, M1)

* add github action (portable) for macOS 14 (arm64, M1)

* rename macOS arm64 output artifact

* Update libsodium on windows

* Compile libsodium

* Update build-windows.bat

* use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled;

* revert libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled;

* use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled;

* fix libsodium version 1.0.19; use compiled static libsodium for Windows instead of precompiled;

* try 1.0.20 libsodium precompiled on github

* try 1.0.18 libsodium precompiled on github

* try windows build on win server 2019

* and use PlatformToolset=v142

* use cmake -G "Visual Studio 16 2019"

* fix path to msvc 2019 on github

* separate github windows build on win server 2019 and build on win server 2022

* Update assembly/native/build-windows-2019.bat

add retry mechanism

Co-authored-by: Dr. Awesome Doge <doge@ton.org>

* add test-emulator; disable test groovy pipeline

* trigger all gh actions

* fix win build

* call test-emulator

* remove usage of rocksdb in fift-lib

* put back some code for test-db

* fix test-emulator

* remove usage of db-path parameter in fift

* some func adjustments

* fix checkout of openssl in fift-func-wasm-build-ubuntu.sh

* typo

* improve wasm build script for quicker turn around

* remove sENVIRONMENT=web,worker for funcfiftlib. will be added later.

* remove sENVIRONMENT=web,worker for funcfiftlib. will be added later.

* remove sENVIRONMENT=web,worker for funcfiftlib. will be added later.

* minor adjustments

* remove -d option in fift; optimize fift-lib usage

* reduce tondb usage

---------

Co-authored-by: neodiX <neodix42@ton.org>
Co-authored-by: Dr. Awesome Doge <doge@ton.org>
Co-authored-by: ms <dungeon666master@protonmail.com>
2024-07-26 22:10:55 +03:00
SpyCheese
5847897b37
Various changes in TVM, github builds and tests (#793)
* Bugfixes in TVM and node

* Upgrade to C++17

* Improve GitHub builds

* Fix existing tests and partially integrate them into builds

---------

Co-authored-by: neodiX42 <namlem@gmail.com>
Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
2023-11-03 14:43:34 +03:00
EmelyanenkoK
583178ccb1
FunC: enable asserts and fix try/catch stack corruption (#699)
* FunC: enable asserts in Release

* FunC: Fix analyzing infinite loops

* FunC: Allow catch with one tensor argument

* FunC: Fix try/catch stack corruption

---------

Co-authored-by: SpyCheese <mikle98@yandex.ru>
2023-05-15 15:31:42 +03:00
SpyCheese
5abfe2337e
Catchain improvements (#698)
* Fix "sgn" in fift; fix marking infinite loops as noterurn in func

* TON-P1-1: Remove unused catchain queries

* TON-P1-15: Avoid synchronization with self

* TON-P1-3, TON-P1-17: Disallow more than one candidate per src per round (to prevent flood), add checks to process_broadcast

* TON-P1-10: Fix fast/slow attempts

* TON-P1-14: Add named constants

* TON-P1-18, TON-P1-19: Alloc temporary memory in the same way as persistent memory

* TON-P1-20: Add comment to choose_blocks_to_approve

* TON-P1-16: Avoid creating two catchain blocks on need_new_block

* TON-P1-8: Add some validation to validator-engine parameters

* TON-P1-6: Don't allow sending the same block many times

Many requests for the same block are not unusual (however, there's no need to answer them all)

* TON-P1-2: Enable prohibiting dependencies from blamed nodes (2.7.5 in CatChain doc), fix processing blame proofs

* Best practices

bp-6: Fix incorrect warning
bp-7: Remove unused code
bp-8: Bring back PerfWarningTimer logging (only when no callback)
bp-9: Remove unnecessary condition
bp-11: Remove commented-out code
bp-13: Divide code in validator-session-state
Adherence to Specification: Fix typo
2023-05-10 12:57:57 +03:00
EmelyanenkoK
5606418234
FunC: Prohibit unifying tensors and "forall" vars (#684)
* FunC: Prohibit unifying tensors and "forall" vars

* Bump funC version to 0.4.4

---------

Co-authored-by: SpyCheese <mikle98@yandex.ru>
2023-04-27 10:23:04 +03:00
EmelyanenkoK
8b0d6a2665
Add WASM FunC autotests (#673)
* feat: func wasm autotests

* fixes necessary for func wasm autotests

---------

Co-authored-by: krigga <krigga7@gmail.com>
2023-04-19 21:29:41 +03:00
EmelyanenkoK
8eb167b76a
Fix FunC UB (#656)
* Fix UB in func

* Improve optimizing int consts and unused variables in FunC

* Bump funC version to 0.4.3

* Fix analyzing repeat loop

---------

Co-authored-by: SpyCheese <mikle98@yandex.ru>
2023-04-03 10:13:39 +03:00
EmelyanenkoK
7da30e1e7f
Add PRNG with normal distribution to mathlib.fc (#646)
* Add random with normal distribution

* Fix hex arguments in mathlib testcases
2023-03-13 16:49:30 +03:00
Dan Volkov
4590ed381b
Make funcfiftlib compilation compatible with modern compilers (#618)
* wip: make funcfiftlib compilation compatible with modern compilers

* wip: add methods needed for another compiler

* fix: tdutils port config if emscripten

* feat: func source and realpath callback

* fix: invalid fift compilation exceptions

---------

Co-authored-by: krigga <krigga7@gmail.com>
2023-03-09 17:37:15 +03:00
EmelyanenkoK
04d4ae2dec Add version printing to legacy tester 2023-03-06 14:03:29 +03:00
EmelyanenkoK
c2c9a93916
Bump funC version to 0.4.2 2023-03-03 10:33:22 +03:00
SpyCheese
0578cb4a42
Fix typos, UBs and warnings (#625) 2023-02-28 12:06:09 +03:00
SpyCheese
c6143715cc
Fix some error handling in FunC (#599) 2023-01-23 13:01:40 +03:00
EmelyanenkoK
653c88aa9d
Add pragmas to funC for precise control of computation order (#589)
* FunC pragmas: allow-post-modification and compute-asm-ltr

* Warn if #pragma is enabled only in included files

* Add tests for new pragmas

* Add special ops for "allow-post-modification" only when needed

* Update FunC version to 0.4.1

* Allow empty inlines (#10)

Co-authored-by: SpyCheese <mikle98@yandex.ru>
2023-01-13 12:45:04 +03:00
EmelyanenkoK
6b49d6a382
Add legacy_tester for existing funC contracts (#588)
* Add legacy_tester for existing funC contracts

* Add storage-contracts and pragma options
2023-01-12 12:33:15 +03:00
EmelyanenkoK
a1d8a5e4f3
Add complex assigns to FunC and fix UB (#574)
* Fixed complex funC setglob cases

* Forbid modifying local variables after using them in the same tensor

* Fix analyzing "while" in func

* Update funC version (#9)

* Update stress tester

* Fix using variable after move

Co-authored-by: krigga <krigga7@gmail.com>
Co-authored-by: SpyCheese <mikle98@yandex.ru>
2022-12-29 18:06:13 +03:00
SpyCheese
8bfad35e93
Add try/catch to func stress-tester (#565) 2022-12-22 15:26:58 +03:00
EmelyanenkoK
e1be988df5
Add try/catch to FunC (#560)
* Add try-catch

* Fix 'return' bugs

* Update tests

* Fix 'SETCONTVARARGS' bug

* Fix 'SETCONTVARARGS' bug again

* Check deep stack

* Add throw_arg

Co-authored-by: legaii <jgates.ardux@gmail.com>
2022-12-22 15:26:39 +03:00
SpyCheese
91580e7ebf Fix emulate_not in func 2022-10-12 14:09:15 +03:00
SpyCheese
fc8da44940
Fix compilation of muliplication (#475) 2022-09-29 09:24:15 +03:00
SpyCheese
5c2ad4a6c7 Tests for func with scripts 2022-09-23 16:27:18 +03:00
EmelyanenkoK
6a72aba9af
Bump func version 2022-09-22 16:55:14 +03:00
EmelyanenkoK
d23267d996
Add triple quotes asms (#463)
* Add python-like triple quotes for multiline strings

* Add test for multiline asm

* Allow asm definition duplicate

* Asm duplicate: add test & fixes

* Fix multiline asm

* Fix asm duplicate

Co-authored-by: legaii <jgates.ardux@gmail.com>
2022-09-22 16:54:26 +03:00
Starlight Duck
3c380e0a7b
Implement compilation and pre-computation of logical operations (#437)
* Implement compilation and pre-computation of logical operations (and, or, xor, not)

* Fix emulate_and optimization

* Fix variable flags in emulate_not

* Rename co2.fc to co3.fc

Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
2022-09-20 14:19:42 +03:00
EmelyanenkoK
3b1d33f543
Allow constants with the same name and value (#462)
Co-authored-by: legaii <jgates.ardux@gmail.com>
2022-09-20 14:16:53 +03:00
Andrey Tvorozhkov
e40d323fce
Add ~strdump and STRDUMP TVM OP (#452)
* Add ~strdump and STRDUMP TVM OP

Add ~strdump and STRDUMP TVM OP

Add ~strdump and STRDUMP TVM OP

* STRDUMP fixes

Co-authored-by: Andrey Tvorozhkov <andrey@h-labs.ru>
2022-09-14 12:36:54 +03:00
AlexeyFSL
e2cca03a78
Func and Fift lib for WASM (#455)
* Add social badges

Add telegram, Twitter and Stack Overflow badges in Readme

* update README.md badges

* patch for wasm build

* fix narrowing conversion error for clang compiler

* refactor func code

* funcfift lib implementation

* fix funcfift lib
fix CMakeFile

* fix rvalue missing

* remove unused field from result json

* name fix
remove unused target

* rename

* added script for building funcfiftlib to wasm

* fix json fild names

* fix commit hash for script

* added version function to funcfiftlib

* update commit hash for script

* add realpath fail processing
fix DISABLE_EXCEPTION_CATCHING option

* update hash in script

Co-authored-by: Anthony Tsivarev <tsivarev.a@gmail.com>
Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
Co-authored-by: tolya-yanot <1449561+tolya-yanot@users.noreply.github.com>
2022-09-14 12:36:01 +03:00
EmelyanenkoK
40cec56e28
A series of FunC improvements (#378)
* Don't use IFJMP/IFNOTJMP in inline functions

* Fix incorrect ifelse branch code generation 

https://github.com/ton-blockchain/ton/issues/374

* Make generate_code_all clearer

* Don't replace IFJMP with IF in inner blocks in inline functions

* Allow unbalance if/else by using RETALT

* Fix wrong PUSHCONT

* Bugfix in IF code generation for inline functions

* Fix unbalanced if/else

* Bugfix and improvements in code generation

* Fix analyzing while(0) in func

https://github.com/ton-blockchain/ton/issues/377

* FunC and Asm.fif: Fix inlining large functions

https://github.com/ton-blockchain/ton/issues/375

Co-authored-by: SpyCheese <mikle98@yandex.ru>
2022-08-04 14:48:19 +03:00
starlightduck
eb35cf653a Use td::realpath and add re-inclusion tests 2022-05-12 18:57:03 +03:00
starlightduck
9356a16b84 Implement #include keyword with advanced checks and backtrace 2022-05-12 12:54:34 +03:00
EmelyanenkoK
0c772185ef Add constants and string literals to funC
* Add special string literals "..."? (s,a,u,h,)

* Add string literal H (256-bit hash)

* Add string literal c (crc32)

* Use td::hex_encode instead of homebrew function and add test

* Fix error codes and use more generic address

* Add support for int and slice constants

* Add support for strongly typed constants

* Add support for precompiled constant expressions (hard!)

Co-authored-by: starlightduck <starlightduck@gmail.com>
2022-05-06 11:13:04 +03:00
starlightduck
0e955793ed Add support for #pragma version and FunC versioning
FunC pragma refined error messages and ^ partials
2022-05-06 11:11:42 +03:00
Alex Melman
bab4c1637e Automatically integrates git build information into executables.
Usage:
func.exe -V
adnl-pong -V
validator-engine -V
and so on.
Result will be shown in the following format:
Func build information: [ Commit: d8b751d7a5, Date: 2021-02-27 14:34:41 +0200]
2021-02-27 14:34:43 +03:00
Alex Melman
41a3418b7b Adds command line parameter -V that shows build version to the binaries.
Build number controlled in top level CMakeLists.txt file via -DBUILD_VERSION variable.
Usage:
adnl-pong -V
validator-engine -V
and so on.
2021-02-27 14:34:41 +03:00
ton
f064b1047a pow-testgiver support 2020-07-06 17:07:20 +03:00
ton
dbde9c1c40 minor bugfix 2020-06-03 21:47:47 +04:00
ton
4e2624459b integrating the existing state of TON Storage / TON Payments / CPS Fift development branches 2020-05-27 22:10:46 +04:00
ton
be9c34c62d bugfixes 2020-04-10 23:06:01 +04:00
ton
a31f8d4424 bugfixed + crypto update
- compiles vs BoringSSL
- config proposal/vote fift code
- bugfixes in catchain
- other small fixes
2020-03-27 18:59:00 +04:00
ton
9f351fc29f emergency update 2020-03-24 03:32:16 +04:00
ton
54c7a4dcc3 updated vm
- updated func/fift
- additional checks in block validator
- docs
- tunnel prototype in ADNL
2020-03-11 14:19:31 +04:00
ton
e27fb1e09c updated vm (breaking compatibility)
- updated vm
- new actor scheduler
- updated tonlib
- updated DNS smartcontract
2020-02-28 14:28:47 +04:00
ton
efd47af432 updated tonlib + fixes in vm 2020-02-20 19:56:18 +04:00
ton
28735ddc9e bugfixes 2020-02-17 14:18:59 +04:00
ton
a73d202ba2 updated func and tonlib 2020-02-15 20:03:17 +04:00