Skip to content

feat(v31): cherry-pick TON RPC#3973

Merged
swift1337 merged 4 commits intorelease/v31from
v31-ton-rpc
Jun 11, 2025
Merged

feat(v31): cherry-pick TON RPC#3973
swift1337 merged 4 commits intorelease/v31from
v31-ton-rpc

Conversation

* Migrate linter to V2

* Apply lint

* Improve makefile
* Add TON HTTP-RPC client skeleton

* RPC WIP [1]

* RPC WIP [2]

* RPC WIP [3]

* Metrics note

* Record metrics

* Update changelog
* Refactor observer; refactor mocks

* Fix signer & unit tests

* Drop liteapi

* Restore tx hash conversion aliases

* Fix E2E, adapt Tongo x RPC

* Update wait-for-ton

* Move tlb to rpc package

* fix e2e tests; simplify ensureLastScannedTx; fix client

* rename .rpc to .Endpoint in config

* Simplify config

* Update changelog

* lint

* Address PR comments

* PR fixes

* fix merge conflict

* bump linter timeout

* use ton localnet v2

* bump ton localnet

* bump ton localnet
@swift1337 swift1337 requested review from a team as code owners June 11, 2025 17:22
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@swift1337 swift1337 self-assigned this Jun 11, 2025
@github-actions github-actions bot added ci Changes to CI pipeline or github actions breaking:cli labels Jun 11, 2025
@github-actions
Copy link

!!!WARNING!!!
nosec detected in the following files: zetaclient/chains/ton/rpc/client.go, zetaclient/chains/ton/rpc/tlbstack.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Jun 11, 2025
@codecov
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

Attention: Patch coverage is 21.83544% with 494 lines in your changes missing coverage. Please review.

Project coverage is 64.43%. Comparing base (d11dddf) to head (6e0591f).
Report is 1 commits behind head on release/v31.

Files with missing lines Patch % Lines
zetaclient/chains/ton/rpc/client.go 0.00% 290 Missing ⚠️
zetaclient/chains/ton/rpc/types.go 52.86% 68 Missing and 6 partials ⚠️
zetaclient/chains/ton/rpc/tlbstack.go 0.00% 43 Missing ⚠️
zetaclient/chains/ton/rpc/config.go 0.00% 39 Missing ⚠️
zetaclient/chains/ton/observer/inbound.go 45.00% 22 Missing ⚠️
zetaclient/chains/ton/observer/observer.go 20.00% 8 Missing ⚠️
zetaclient/orchestrator/bootstrap.go 55.55% 3 Missing and 1 partial ⚠️
x/fungible/keeper/deposits.go 0.00% 3 Missing ⚠️
zetaclient/chains/evm/common/cctx.go 25.00% 3 Missing ⚠️
zetaclient/chains/ton/observer/outbound.go 60.00% 2 Missing ⚠️
... and 5 more
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           release/v31    #3973      +/-   ##
===============================================
- Coverage        64.85%   64.43%   -0.43%     
===============================================
  Files              472      474       +2     
  Lines            34471    34724     +253     
===============================================
+ Hits             22356    22374      +18     
- Misses           11085    11323     +238     
+ Partials          1030     1027       -3     
Files with missing lines Coverage Δ
x/crosschain/keeper/abort.go 81.87% <ø> (-0.25%) ⬇️
x/crosschain/keeper/cctx.go 100.00% <100.00%> (ø)
x/crosschain/keeper/cctx_gateway_observers.go 100.00% <100.00%> (ø)
...hain/keeper/cctx_orchestrator_validate_outbound.go 88.41% <100.00%> (-0.04%) ⬇️
x/crosschain/keeper/inbound_tracker.go 90.76% <100.00%> (ø)
...rosschain/keeper/msg_server_add_inbound_tracker.go 100.00% <100.00%> (ø)
x/lightclient/keeper/block_header.go 93.54% <100.00%> (ø)
x/lightclient/keeper/chain_state.go 100.00% <100.00%> (ø)
x/observer/keeper/chain_params.go 100.00% <100.00%> (ø)
x/observer/keeper/hooks.go 68.62% <100.00%> (ø)
... and 20 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# CHANGELOG

## v31.1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need this in release patch (there is a no-changelog label). Otherwise, the PR# would be 3973?

Copy link
Contributor

@ws4charlie ws4charlie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good

@swift1337 swift1337 merged commit f4cf01f into release/v31 Jun 11, 2025
45 of 46 checks passed
@swift1337 swift1337 deleted the v31-ton-rpc branch June 11, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking:cli ci Changes to CI pipeline or github actions nosec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants