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

1003 commits

Author SHA1 Message Date
SpyCheese
40b91d9de9 Merge branch 'testnet' into accelerator 2024-12-06 13:38:43 +03:00
SpyCheese
7df2ea9f06
Improve async cell loading in DynamicBagOfCellsDb.cpp (#1414) 2024-12-06 11:56:24 +03:00
krigga
fd095403d7
fix: missing _malloc in emulator-emscripten (#1420) 2024-12-06 11:50:50 +03:00
SpyCheese
d878eac9ec Merge branch 'testnet' into accelerator 2024-12-06 09:37:45 +03:00
SpyCheese
645d26a1f3
Patch tonlib and validator-engine (#1417)
* Don't enable fast state serializer automatically

* Fix checking masterchain proof in tonlib lookupBlock
2024-12-05 18:50:12 +03:00
SpyCheese
378b5e94c8 Automatically issue and import fast sync overlay certificates 2024-12-04 18:06:19 +03:00
SpyCheese
09c4488fbf Merge branch 'testnet' into accelerator 2024-12-04 14:51:20 +03:00
SpyCheese
7bc50e63d7
tonNode.getOutMsgQueueProof query in public shard overlays (#1413)
* tonNode.getOutMsgQueueProof query in public shard overlays

* Allow responding to getOutMsgQueueProof requests one at a time only
2024-12-04 14:38:57 +03:00
SpyCheese
4826f7665f Merge branch 'testnet' into accelerator 2024-12-03 20:46:55 +03:00
SpyCheese
9ae88d87e3
Export all keys command in validator-engine-console (#1412)
* Export all keys command in validator-engine-console

* Use OPENSSL_cleanse in Bits256::fill_zero_s
2024-12-03 17:19:12 +03:00
neodix42
4aa6412f9c
Include proxy-liteserver (#1406)
* include into artifacts

* include proxy-liteserver into release artifacts
2024-12-03 10:03:14 +03:00
SpyCheese
ed7ac6312a
Fix UB in query-utils.cpp (#1411) 2024-12-03 10:02:51 +03:00
dependabot[bot]
531b6ceccc
Bump dawidd6/action-download-artifact from 2 to 6 in /.github/workflows (#1400)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v2...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 10:02:30 +03:00
SpyCheese
4704de76c6 Fix compilation errors 2024-11-29 13:49:24 +03:00
SpyCheese
0280a288c6 Check supported version in collator-node 2024-11-29 10:34:01 +03:00
SpyCheese
923f1cd69b Improve collator node pings and collation manager stats 2024-11-28 14:13:49 +03:00
SpyCheese
5fae8db7a0 Adapt "get msg queue sizes" in lite-client and tonlib to non-full liteservers 2024-11-28 13:09:40 +03:00
SpyCheese
5d79855c94 Out msg queues: improve logs, various small changes 2024-11-27 18:12:23 +03:00
SpyCheese
3dce9d11d9
Merge pull request #1405 from birydrad/accelerator
optimistic out-msg-queue broadcast
2024-11-27 14:05:49 +04:00
birydrad
bf572f9599 optimistic out-msg-queue broadcast 2024-11-26 21:41:12 +04:00
SpyCheese
6df6f182bf Merge branch 'testnet' into accelerator 2024-11-26 16:51:21 +03:00
SpyCheese
640c0bb313 Merge branch 'testnet' into accelerator 2024-11-26 16:50:57 +03:00
SpyCheese
25b4c6794a
TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) (#1404)
* TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X)

* Add tests for xonly_pubkey_tweak_add

* added secp256k1 as submodule, since we need extrakeys feature of secp256k1

* cleanup

* add ton_crypto_core secp256k1 dependency

* adjust Dockerfile, android and wasm builds

* adjust nix build

* test windows build with SECP256K1_ENABLE_MODULE_EXTRAKEYS

* test windows build with SECP256K1_ENABLE_MODULE_EXTRAKEYS

* adjust android build

* adjust emscripten build

* adjust emscripten build

* try macos-13

* emscripten build adjustments

* windows build adjustments

* final corrections

---------

Co-authored-by: neodix <neodix@ton.org>
2024-11-26 16:23:17 +03:00
SpyCheese
954a96a077
Accelerator: partial fullnodes (#1393)
* Accelerator: partial fullnodes

1) Node can monitor a subset of shards
2) New archive slice format (sharded)
3) Validators are still required to have all shards
4) Support partial liteservers in lite-client, blockchain explorer, tonlib
5) Proxy liteserver

* Fix compilation error
2024-11-26 14:46:58 +03:00
neodix42
62444100f5
Add message hash to tonlib response (#1379)
* add msg hash

* regenerate tonlib_api.tlo
2024-11-26 11:23:05 +03:00
SpyCheese
8a41ee8ffb
Generate random privkey in AdnlExtClient (#1398) 2024-11-26 11:22:35 +03:00
SpyCheese
d9aeab07db Send telemetry broadcasts to fast sync overlays 2024-11-26 10:53:55 +03:00
SpyCheese
e6aac0b143 Merge branch 'testnet' into accelerator 2024-11-26 09:28:07 +03:00
SpyCheese
b60f6ee72f Write collation stats to session stats, add collator options for collated data 2024-11-26 08:54:19 +03:00
SpyCheese
061c82f89c
Send validator telemetry to the private overlay (#1325)
* Send validator telemetry to the private overlay

* Improve rotating neighbours in overlays
2024-11-25 22:37:18 +03:00
SpyCheese
b3bea413e3 Rework validator-collator interaction
1) Remove config 41, move "full collated data" to capabilities
2) Whitelist on collator nodes
3) "Ping" request for collator nodes
4) More customizable collators list for validators
5) CollationManager
2024-11-21 11:47:39 +03:00
SpyCheese
7d2110c8b0 Fix shard overlays 2024-11-18 17:14:13 +03:00
SpyCheese
62ede1851b Merge branch 'testnet' into accelerator 2024-11-18 12:37:18 +03:00
SpyCheese
52b010ff34
Fix block limit classification (#1337)
Block size estimation can decrease, so it was possible that soft limit was reached, but the block is not considered overloaded
2024-11-18 09:39:20 +03:00
SpyCheese
413da6cd20
Cached checked certificates in overlays (#1338) 2024-11-18 09:38:32 +03:00
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
neodix42
a904a0a195
remove stripping of artifacts (#1375)
* remove stripping from nix artifacts

* remove stripping from natively compiled binaries

* add missing tolk on mac

* add missing tolk on mac
2024-11-11 16:07:06 +03:00
EmelyanenkoK
3ce6118c3f
Fix try-catch: save c1, c3 to catch continuation (#1332) 2024-11-02 18:23:08 +03:00
EmelyanenkoK
a5f1f7d73e
Merge pull request #1351 from ton-blockchain/master
Merge tolk
2024-11-02 18:22:24 +03:00
EmelyanenkoK
7151ff2627
Merge pull request #1345 from ton-blockchain/tolk-v0.6.0
Tolk Language: next-generation FunC
2024-11-02 18:20:23 +03:00
tolk-vm
d110022731
[Tolk] Implement logical operators && ||
Unary logical NOT was already implemented earlier.
Logical AND OR are expressed via conditional expression:
* a && b  ->  a ? (b != 0) : 0
* a || b  ->  a ? 1 : (b != 0)
They work as expected in any expressions. For instance, having
`cond && f()`, f is called only if cond is true.
For primitive cases, like `a > 0 && b > 0`, Fift code is not optimal,
it could potentially be without IFs.
These are moments of future optimizations. For now, it's more than enough.
2024-11-02 03:44:14 +04:00
tolk-vm
16824fcfe3
[Tolk] Get rid of ton_crypto dependency, embed address parsing
Instead on 'ton_crypto', Tolk now depends on 'ton_crypto_core'.
The only purpose of ton_crypto (in FunC also, btw) is address parsing:
"EQCRDM9...", "0:52b3..." and so on.
Such parsing has been implemented manually exactly the same way.
2024-11-02 03:44:14 +04:00
tolk-vm
d9dba320cc
[Tolk] Get rid of ~tilda with mutate and self methods
This is a very big change.
If FunC has `.methods()` and `~methods()`, Tolk has only dot,
one and only way to call a `.method()`.
A method may mutate an object, or may not.
It's a behavioral and semantic difference from FunC.

- `cs.loadInt(32)` modifies a slice and returns an integer
- `b.storeInt(x, 32)` modifies a builder
- `b = b.storeInt()` also works, since it not only modifies, but returns
- chained methods also work, they return `self`
- everything works exactly as expected, similar to JS
- no runtime overhead, exactly same Fift instructions
- custom methods are created with ease
- tilda `~` does not exist in Tolk at all
2024-11-02 03:44:14 +04:00
tolk-vm
12ff28ac94
[Tolk] Completely rework stdlib: multiple files and renaming
- split stdlib.tolk into multiple files (tolk-stdlib/ folder)
  (the "core" common.tolk is auto-imported, the rest are
  needed to be explicitly imported like "@stdlib/tvm-dicts.tolk")
- all functions were renamed to long and clear names
- new naming is camelCase
2024-11-02 03:44:13 +04:00
tolk-vm
e2edadba92
[Tolk] v0.6 syntax: fun, import, var, types on the right, etc.
Lots of changes, actually. Most noticeable are:
- traditional //comments
- #include -> import
- a rule "import what you use"
- ~ found -> !found (for -1/0)
- null() -> null
- is_null?(v) -> v == null
- throw is a keyword
- catch with swapped arguments
- throw_if, throw_unless -> assert
- do until -> do while
- elseif -> else if
- drop ifnot, elseifnot
- drop rarely used operators

A testing framework also appears here. All tests existed earlier,
but due to significant syntax changes, their history is useless.
2024-11-02 03:44:13 +04:00
tolk-vm
5a3e3595d6
[Tolk] Compilation pipeline, register global symbols in advance
Since I've implemented AST, now I can drop forward declarations.
Instead, I traverse AST of all files and register global symbols
(functions, constants, global vars) as a separate step, in advance.

That's why, while converting AST to Expr/Op, all available symbols are
already registered.
This greatly simplifies "intermediate state" of yet unknown functions
and checking them afterward.

Redeclaration of local variables (inside the same scope)
is now also prohibited.
2024-11-02 01:33:09 +04:00
tolk-vm
80001d1756
[Tolk] Implement AST: intermediate representation of tolk files
Now, the whole .tolk file can be loaded as AST tree and
then converted to Expr/Op.
This gives a great ability to implement AST transformations.
In the future, more and more code analysis will be moved out of legacy to AST-level.
2024-11-02 01:33:08 +04:00
tolk-vm
6c30e5a7eb
[Tolk] Embedded stdlib.tolk, CompilerState, strict includes
Several related changes:
- stdlib.tolk is embedded into a distribution (deb package or tolk-js),
  the user won't have to download it and store as a project file;
  it's an important step to maintain correct language versioning
- stdlib.tolk is auto-included, that's why all its functions are
  available out of the box
- strict includes: you can't use symbol `f` from another file
  unless you've #include'd this file
- drop all C++ global variables holding compilation state,
  merge them into a single struct CompilerState located at
  compiler-state.h; for instance, stdlib filename is also there
2024-11-02 01:33:08 +04:00
tolk-vm
f0e6470d0b
[Tolk] Rewrite lexer, spaces are not mandatory anymore
A new lexer is noticeably faster and memory efficient
(although splitting a file to tokens is negligible in a whole pipeline).

But the purpose of rewriting lexer was not just to speed up,
but to allow writing code without spaces:
`2+2` is now 4, not a valid identifier as earlier.

The variety of symbols allowed in identifier has greatly reduced
and is now similar to other languages.

SrcLocation became 8 bytes on stack everywhere.

Command-line flags were also reworked:
- the input for Tolk compiler is only a single file now, it's parsed, and parsing continues while new #include are resolved
- flags like -A -P and so on are no more needed, actually
2024-11-02 01:33:08 +04:00