disintar / toncli

TON Command Line Interface - easy smart contract manipulation
https://disintar.io/
Apache License 2.0
158 stars 35 forks source link

How to use new tests? What is the current situation over TON binaries? #72

Open tvorogme opened 1 year ago

tvorogme commented 1 year ago

You can be confused by installation process of toncli. We do our best to soften the corners.

Current situation is: for latest master version (it's not in PyPi right now) you need to install binary from toncli-local branch of SpyCheese repo. Pre-builds can be founded here

Is it safe?

Yes, @SpyCheese is active TON contributor. The toncli-local branch contains new TVM OP codes, and it's up-to-date with master branch.

New TVM OP present:

GASLIMITSTEMP PRIVTOPUB SIGN RESETLOADEDCELLS

Why this is needed?

Those TVM OP needed for new toncli tests. Unlike the old version where you need to run TVM instant on each test - now you run only on TVM instant and run all tests inside it. This is a really cool improvement and the process now is smoother. The realization and idea is @BorysMinaiev (thanks for that).

Why we can't merge it to ton-blockchain/ton master branch?

According to @EmelyanenkoK - those TVM OP are used only for debug and tests, so it's better to have "developer" version of TVM and "production" version of TVM. You should keep in mind that these four TVM OP cannot be used in production.

How to simplify proccess?

Special thanks to @Trinketer22 we have a docker - you can create bash script which mount project to docker and there already binaries.

Also Disintar-related dev @TonTheMoon (supported by TF) is creating auto-build version of TON source-code. I guess we will create one-line script of install toncli on any major system with auto-downloading binaries from package managers.

vtamara commented 1 year ago

I see precompiled binaries for Ubuntu, MacOS and Windows, but not for my system OpenBSD/adJ, where in this moment I just need to run:

doas pip3 install toncli

The improvements you are doing are breaking this possibility as I reported in https://github.com/disintar/toncli/issues/76

In my humble opinion toncli should be able to run in two modes without issue:

  1. To run with the debugging ton that has available more debugging primitives.
  2. With the --old (or better --production) flag it should be able to run in the standard ton that is where the smart contract really will run.

By the way, I sent the following patch to the production ton repository to compile those tools in OpenBSD/adJ: https://github.com/ton-blockchain/ton/pull/430

I prepared a ton package for OpenBSD/adJ: https://github.com/pasosdeJesus/adJ/tree/main/arboldes/usr/ports/mystuff/net/ton

And this package is included in the distribution adJ