Skip to content

Fix/tdutils json field#1

Open
zakkycrypt01 wants to merge 780 commits intobirydrad:masterfrom
zakkycrypt01:fix/tdutils-json-field
Open

Fix/tdutils json field#1
zakkycrypt01 wants to merge 780 commits intobirydrad:masterfrom
zakkycrypt01:fix/tdutils-json-field

Conversation

@zakkycrypt01
Copy link

No description provided.

tolk-vm and others added 30 commits April 29, 2025 18:21
This update greatly enhances reading Fift output:
1) stack comments are aligned
2) original lines from .tolk files are output as comments,
   grouping asm instructions

Internally, every AsmOp now has SrcLocation.
When outputting them one by one, an original .tolk line is
inserted if locations differ.
This can be optimized later by storing an index
to fast mapping of location (offset) into a line in a file.
In FunC, any function could be called `f(arg)` or `arg.f()`.
You had to call `cell.cell_hash()` / `slice.slice_hash()`:
these were two different global-scope functions.

Now, Tolk, as other languages, separates functions from methods.
It drops the ability to call a function via dot;
you can only call a method (for an object type).

> fun cell.hash(self): int ...
> fun slice.hash(self): int ...

With methods, stdlib functions became short:
`t.size()` instead of `t.tupleSize()`, and so on.

Methods can be declared for any type, including generics.
Calling a method, the compiler does type matching to detect
the only method from many equally named. This could be
generalized to functions overloading some day.
This is now valid:
> struct Container<T = int?> { item: T = null }
> Container{}   // does Container<int?>

Defaults for Ts work both for functions and structs.
Their main purpose is to have the `never` default:
> struct WithOptField<T = never> { f: T; }
I've added a rule that if a struct has the `never` field,
it can be missed out from a literal while creation
(like it doesn't exist at all).
This will be used in stdlib later.
This partially "reverts" the behavior of pragma
'compute-asm-ltr' from FunC, which was always on in Tolk.
Now, if it's safe, for asm functions with arg_order,
arguments are evaluated and placed onto the stack
in a desired order. When it's unsafe (the purpose
of this pragma, actually), arguments are evaluated
left-to-right.
Tolk v0.12: structures, generics, and methods
* Remove AdnlStaticNodesManager

* Remove AdnlPeer

---------

Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
DanShaders and others added 30 commits October 20, 2025 18:21
* Remove commented out directives from top-level CMakeLists

* Use add_compiler_options instead of some weird helper in CMake

* Suppress CMake policy version warning from Abseil

We really should update it.

* Suppress existing warnings

This is not particularly precise as I disabled warnings on file level
(and warning suppression mappings allow specifying function scope) but
is good enough to add -Werror CI job in next commit.

* Add -Werror CI job
… and setting environment=node (ton-blockchain#1850)

Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
…1849)

* [vm] Add new opcodes to store and load `addr_std$10`

LDSTDADDR — loads a MessageInt address or fail
LDSTDADDRQ — quirly loads a MessageInt address
LDOPTSTDADDR — loads a Maybe MessageInt address or fail
LDOPTSTDADDRQ — quitly loads a Maybe MessageInt address
STSTDADDR — stores a MessageInt address or fail
STSTDADDRQ — quetly stores a MessageInt address
STOPTSTDADDR — stores a Maybe MessageInt address or fail
STOPTSTDADDRQ — quetly stores a Maybe MessageInt address

* add description for STSTDADDR error

* add check that address is fully valid

* add require_version for the new opcodes

* correct LDOPTSTDADDR(Q) behaviour

* correct STOPTSTDADDR(Q) behaviour

* run test-fift with --regression

* add description to GlobalVersions.md

* remove old +1

* fix stack description

* fix `is_valid_std_msg_addr`

* add `have_refs(0)` check to is_valid_std_msg_addr

* check exact length and refs_length in is_valid_std_msg_addr

* simplify fallback in is_valid_std_msg_addr

* use push_bool, add check for refs
* Add timeout to default failure signal handler

* Put init_alarm_signal under "if posix"
* Require OpenSSL from top-level CMakeLists

* Automatically generate TLO files for TL schemas

* Remove useless directory include in tddb target

* Do not compile some validator sources 3 times

Instead, put them into an object library and use it in 3 different
validator targets.

* Do not make ninja regenerate smartcont/provider-code.h on every run

OUTPUT parameter is relative to the current binary directory by default,
so we need to explicitly use ${CMAKE_CURRENT_SOURCE_DIR}.

* Run CI in forks as well

I faced some unexpected backlash from other developers because of
disabling it in ton-blockchain#1844.
…rification (mode&4) (ton-blockchain#1857)

Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
* upgrade abseil to August 2025, Patch 1

* Add a new argument to validator-engine that helps to speed up the initial node sync.

* correct wording
…n#1859)

* upgrade abseil to August 2025, Patch 1

* upgrade abseil to August 2025, Patch 1
These were needed because our abseil version was too old.
…k-patch

Debug logs for applying blocks, optimize BlockArchiver
Signed-off-by: hustrust <hustrust@outlook.com>
Co-authored-by: EmelyanenkoK <emelyanenko.kirill@gmail.com>
* Mostly do not reference virtualization level outside of cells

This is done by adding `Cell::is_virtualized` method that checks if
`virtualization != 0` and providing a default value for
vm::MerkleProof::virtualize virtualization parameter. Everywhere except
for a single place in tests (where it doesn't matter), the parameter was
set to 1.

* Remove concept of virtualization level

We use virtualization level 0 for non-virtualized cells and level 1 for
virtualized ones. With this patch, we do not store this level anymore
and instead infer it based on "effective" level (previously known as
VirtualizationParameters::level) and the actual level of the cell.

This is mainly done to reduce cognitive complexity of the code. However,
as a nice side-effect, changes in VirtualCell give a negligible
performance improvement on the verification benchmark.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.