Conversation
fall back to ton-http-api only on error drop the forced ton-http-api installation when enabling liquid-staking mode
use local liteserver for calculate_loan_amount
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves how the project runs local lite-client get-method calls and parses their VM stack output, and hardens the benchmark workflow around symlinked temp directories and editable installs.
Changes:
- Add robust parsing for
remote resultstacks and introducerun_get_method_local+ local lite-client execution flow. - Make benchmark setup resilient to symlinked temp dirs and ensure
tontesteris installed editable (both shell + Python benchmark runner). - Extend unit/integration tests to cover the new parsing, local lite-client behavior, and benchmark regression.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/run_benchmark.sh | Resolve temp dir realpath and install tontester with uv add --editable. |
| tests/unit/test_vm_stack.py | Add tests for parsing remote result and guarding against false matches. |
| tests/unit/test_mytoncore.py | Add tests for run_get_method_local and calculate_loan_amount local + fallback behavior. |
| tests/unit/test_clients.py | Add tests ensuring run_local connects only to local liteserver and errors if unconfigured. |
| tests/integration/test_benchmark.py | Add regression test for symlinked temp dir + editable install expectations. |
| mytoncore/vm_stack.py | Refactor stack parsing into shared helper + add remote-result parsing support. |
| mytoncore/mytoncore.py | Add run_get_method_local, refactor loan amount calculation to prefer local liteclient then ton-http-api fallback. |
| mytoncore/clients.py | Add LiteClient.run_local() and route eligible run() calls through it. |
| mytoncore/background_runner.py | Disable complaints processing by early-returning from _complaints(). |
| modules/general.py | Resolve benchmark temp dir path and use uv add --editable for tontester. |
| modules/controller.py | Switch loan-amount test command to calculate_loan_amount and remove controller check_enable. |
| .github/workflows/tests.yml | Pin ruff version used in CI installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
60
to
62
| def _complaints(self): | ||
| return | ||
| validator_index = self._ton.GetValidatorIndex() |
| if res_data.get("ok") is False: | ||
| error = res_data.get("error") | ||
| raise Exception(error) | ||
| result = res_data.get("result").get("stack").pop().pop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.