-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(zetaclient)!: TON observer-signer #3418
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis pull request introduces a comprehensive refactoring of the TON (The Open Network) blockchain support in the ZetaChain node, implementing Orchestrator V2 for TON integration. The changes involve restructuring configuration management, observer-signer functionality, and bootstrapping processes across multiple packages. The implementation focuses on modularizing TON-specific components while maintaining a consistent approach to blockchain integration. Changes
Assessment against linked issues
Suggested Labels
Suggested Reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
!!!WARNING!!! Be very careful about using 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 Pay extra attention to the way |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3418 +/- ##
===========================================
+ Coverage 63.00% 63.13% +0.12%
===========================================
Files 436 437 +1
Lines 30892 30827 -65
===========================================
- Hits 19465 19463 -2
+ Misses 10617 10550 -67
- Partials 810 814 +4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (20)
zetaclient/chains/ton/signer/signer.go (2)
81-81
: Consider enhancing context handling for improved reliability.The implementation is solid, but could benefit from additional context handling for better reliability in distributed systems.
Consider adding context cancellation handling and timeout configuration:
func (s *Signer) TryProcessOutbound( ctx context.Context, cctx *cc.CrossChainTx, proc *outboundprocessor.Processor, outboundID string, zetacore interfaces.ZetacoreClient, zetaBlockHeight uint64, ) { + // Add timeout to prevent hanging operations + ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + defer cancel() + proc.StartTryProcess(outboundID) defer proc.EndTryProcess(outboundID) + + // Handle context cancellation + if err := ctx.Err(); err != nil { + s.Logger().Std.Error().Err(err).Str("outbound.id", outboundID).Msg("Context cancelled") + return + }
Line range hint
42-45
: Consider making cache configuration more flexible.The signatures cache size is hardcoded. For production systems, this should be configurable to accommodate different deployment scenarios.
Consider making the cache size configurable:
+// Config represents Signer configuration +type Config struct { + SignaturesCacheSize int +} + // New Signer constructor. -func New(baseSigner *base.Signer, client LiteClient, gateway *toncontracts.Gateway) *Signer { - sigCache, _ := lru.New(signaturesHashSize) +func New(baseSigner *base.Signer, client LiteClient, gateway *toncontracts.Gateway, config Config) *Signer { + if config.SignaturesCacheSize <= 0 { + config.SignaturesCacheSize = signaturesHashSize + } + sigCache, _ := lru.New(config.SignaturesCacheSize)zetaclient/chains/ton/observer/observer.go (4)
69-71
: Add missing test coverage forPostGasPrice
.Since lines 70-71 are not covered, consider creating a unit test that verifies both successful and failure paths of
config.FetchGasConfig
.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 70-71: zetaclient/chains/ton/observer/observer.go#L70-L71
Added lines #L70 - L71 were not covered by tests
76-76
: Consider robust error handling forParseGasPrice
.In addition to returning the error, a log entry or fallback mechanism might be helpful if the price cannot be parsed.
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 76-76: zetaclient/chains/ton/observer/observer.go#L76
Added line #L76 was not covered by tests
96-97
: Add a dedicated test forCheckRPCStatus
.You could mock
GetBlockHeader
to produce success and failure cases to ensure correct logic under different RPC responses.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 97-97: zetaclient/chains/ton/observer/observer.go#L97
Added line #L97 was not covered by tests
104-105
: Revisit the two-case switch structure.A simple
if err != nil { ... } else if block.NotMaster { ... }
may be more readable.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 104-105: zetaclient/chains/ton/observer/observer.go#L104-L105
Added lines #L104 - L105 were not covered by testszetaclient/chains/ton/ton.go (9)
20-26
: Struct definition forTON
is clear but untested.Consider adding a small struct-level test or ensuring that each field’s usage is covered by downstream tests.
28-36
:New
constructor is straightforward but unverified by tests.You could validate the newly created
TON
object in a unit test to check default field values and error paths.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 29-35: zetaclient/chains/ton/ton.go#L29-L35
Added lines #L29 - L35 were not covered by tests
38-40
:Chain()
method is minimal and likely needs coverage.Even a small test confirming that
Chain()
returns the expected result can raise coverage measurably.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 38-39: zetaclient/chains/ton/ton.go#L38-L39
Added lines #L38 - L39 were not covered by tests
42-100
:Start
method: thorough scheduling logic but complex flow.
- Consider splitting out block-subscription logic from ticker scheduling to improve readability.
- Add test scenarios for scheduling intervals, skipping logic, and error handling from
zctx.FromContext
.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 42-45: zetaclient/chains/ton/ton.go#L42-L45
Added lines #L42 - L45 were not covered by tests
[warning] 47-50: zetaclient/chains/ton/ton.go#L47-L50
Added lines #L47 - L50 were not covered by tests
[warning] 52-55: zetaclient/chains/ton/ton.go#L52-L55
Added lines #L52 - L55 were not covered by tests
[warning] 57-59: zetaclient/chains/ton/ton.go#L57-L59
Added lines #L57 - L59 were not covered by tests
[warning] 61-63: zetaclient/chains/ton/ton.go#L61-L63
Added lines #L61 - L63 were not covered by tests
[warning] 65-67: zetaclient/chains/ton/ton.go#L65-L67
Added lines #L65 - L67 were not covered by tests
[warning] 69-71: zetaclient/chains/ton/ton.go#L69-L71
Added lines #L69 - L71 were not covered by tests
[warning] 73-75: zetaclient/chains/ton/ton.go#L73-L75
Added lines #L73 - L75 were not covered by tests
[warning] 77-79: zetaclient/chains/ton/ton.go#L77-L79
Added lines #L77 - L79 were not covered by tests
[warning] 81-88: zetaclient/chains/ton/ton.go#L81-L88
Added lines #L81 - L88 were not covered by tests
[warning] 90-100: zetaclient/chains/ton/ton.go#L90-L100
Added lines #L90 - L100 were not covered by tests
103-105
:Stop
method lacks direct coverage.You might confirm that the schedule group stops gracefully by verifying side effects or using a mock scheduler in a test.
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 103-105: zetaclient/chains/ton/ton.go#L103-L105
Added lines #L103 - L105 were not covered by tests
108-111
:group
method is purely descriptive but rarely tested.A simple test ensuring correct group name formation can help keep coverage consistent.
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 108-111: zetaclient/chains/ton/ton.go#L108-L111
Added lines #L108 - L111 were not covered by tests
114-172
:scheduleCCTX
uses concurrency withgo t.signer.TryProcessOutbound()
.
- Ensure that any context cancellation or error from
TryProcessOutbound
is properly tracked.- Consider a wait group or error channel if you need synchronous finalization before exit.
Also, add coverage for each branch in the loop, especially aroundVoteOutboundIfConfirmed
.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 114-117: zetaclient/chains/ton/ton.go#L114-L117
Added lines #L114 - L117 were not covered by tests
[warning] 119-124: zetaclient/chains/ton/ton.go#L119-L124
Added lines #L119 - L124 were not covered by tests
[warning] 127-132: zetaclient/chains/ton/ton.go#L127-L132
Added lines #L127 - L132 were not covered by tests
[warning] 134-144: zetaclient/chains/ton/ton.go#L134-L144
Added lines #L134 - L144 were not covered by tests
[warning] 148-158: zetaclient/chains/ton/ton.go#L148-L158
Added lines #L148 - L158 were not covered by tests
[warning] 161-168: zetaclient/chains/ton/ton.go#L161-L168
Added lines #L161 - L168 were not covered by tests
174-189
:updateChainParams
method is well-defined but untested.A lightweight test mocking
zctx.FromContext
and verifying that updatedchain.Params()
reflect on the signer and observer can be valuable.
191-195
:outboundLogger
helps with structured logging but is uncovered.Check that the logger is appended correctly and tested with at least one example using a mock or capturing logs.
zetaclient/orchestrator/v2_bootstrap.go (2)
135-169
:bootstrapTON
parallelsbootstrapBitcoin
andbootstrapEVM
.For consistency, factor out shared logic (such as retrieving configs and base observers) to reduce duplication. Also add test coverage verifying that an invalid chain or missing config triggers correct error behavior.
217-235
:makeTONClient
method for creating a TON client and gateway
- Ensure that an empty or invalid
LiteClientConfigURL
orgatewayAddr
is tested.- Add a small integration or unit test to validate error paths (e.g., invalid URL, parse failures).
zetaclient/chains/ton/observer/outbound.go (1)
50-52
: Consider partial or concurrent handling of outbound trackers
Processing large numbers of trackers sequentially could block other operations. Consider chunked or parallel processing for scalability.zetaclient/chains/ton/observer/inbound.go (2)
25-29
: Guard against high transaction volume
Observing all net-new transactions might strain performance if the account has a large backlog. Consider adding pagination or batching.
119-120
: Improve scalability for inbound trackers
This function iterates trackers in a single pass. For substantial traffic, a concurrent or batched approach might improve throughput.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
changelog.md
(1 hunks)cmd/zetae2e/config/clients.go
(2 hunks)zetaclient/chains/ton/config/config.go
(3 hunks)zetaclient/chains/ton/liteapi/client.go
(2 hunks)zetaclient/chains/ton/liteapi/client_live_test.go
(2 hunks)zetaclient/chains/ton/observer/inbound.go
(2 hunks)zetaclient/chains/ton/observer/inbound_test.go
(8 hunks)zetaclient/chains/ton/observer/observer.go
(4 hunks)zetaclient/chains/ton/observer/outbound.go
(1 hunks)zetaclient/chains/ton/observer/outbound_test.go
(1 hunks)zetaclient/chains/ton/signer/signer.go
(1 hunks)zetaclient/chains/ton/signer/signer_test.go
(1 hunks)zetaclient/chains/ton/ton.go
(1 hunks)zetaclient/orchestrator/bootstrap.go
(2 hunks)zetaclient/orchestrator/bootstrap_test.go
(0 hunks)zetaclient/orchestrator/orchestrator.go
(2 hunks)zetaclient/orchestrator/v2_bootstrap.go
(4 hunks)zetaclient/orchestrator/v2_bootstrap_test.go
(1 hunks)zetaclient/orchestrator/v2_orchestrator.go
(1 hunks)
💤 Files with no reviewable changes (1)
- zetaclient/orchestrator/bootstrap_test.go
🧰 Additional context used
📓 Path-based instructions (17)
zetaclient/chains/ton/signer/signer_test.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/observer/outbound_test.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/orchestrator/v2_orchestrator.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/observer/inbound_test.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/orchestrator/v2_bootstrap_test.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/orchestrator/bootstrap.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/orchestrator/orchestrator.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
cmd/zetae2e/config/clients.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/observer/observer.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/liteapi/client_live_test.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/observer/outbound.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/liteapi/client.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/observer/inbound.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/signer/signer.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/config/config.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/orchestrator/v2_bootstrap.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/ton/ton.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
📓 Learnings (1)
zetaclient/chains/ton/observer/inbound.go (1)
Learnt from: ws4charlie
PR: zeta-chain/node#2899
File: zetaclient/chains/bitcoin/observer/inbound.go:131-132
Timestamp: 2024-11-12T13:20:12.658Z
Learning: ObserveInbound coverage will be improved in future refactor.
🪛 GitHub Check: codecov/patch
zetaclient/chains/ton/observer/observer.go
[warning] 70-71: zetaclient/chains/ton/observer/observer.go#L70-L71
Added lines #L70 - L71 were not covered by tests
[warning] 76-76: zetaclient/chains/ton/observer/observer.go#L76
Added line #L76 was not covered by tests
[warning] 97-97: zetaclient/chains/ton/observer/observer.go#L97
Added line #L97 was not covered by tests
[warning] 104-105: zetaclient/chains/ton/observer/observer.go#L104-L105
Added lines #L104 - L105 were not covered by tests
[warning] 107-107: zetaclient/chains/ton/observer/observer.go#L107
Added line #L107 was not covered by tests
zetaclient/chains/ton/liteapi/client.go
[warning] 42-42: zetaclient/chains/ton/liteapi/client.go#L42
Added line #L42 was not covered by tests
zetaclient/chains/ton/config/config.go
[warning] 56-56: zetaclient/chains/ton/config/config.go#L56
Added line #L56 was not covered by tests
[warning] 66-66: zetaclient/chains/ton/config/config.go#L66
Added line #L66 was not covered by tests
[warning] 70-70: zetaclient/chains/ton/config/config.go#L70
Added line #L70 was not covered by tests
zetaclient/chains/ton/ton.go
[warning] 29-35: zetaclient/chains/ton/ton.go#L29-L35
Added lines #L29 - L35 were not covered by tests
[warning] 38-39: zetaclient/chains/ton/ton.go#L38-L39
Added lines #L38 - L39 were not covered by tests
[warning] 42-45: zetaclient/chains/ton/ton.go#L42-L45
Added lines #L42 - L45 were not covered by tests
[warning] 47-50: zetaclient/chains/ton/ton.go#L47-L50
Added lines #L47 - L50 were not covered by tests
[warning] 52-55: zetaclient/chains/ton/ton.go#L52-L55
Added lines #L52 - L55 were not covered by tests
[warning] 57-59: zetaclient/chains/ton/ton.go#L57-L59
Added lines #L57 - L59 were not covered by tests
[warning] 61-63: zetaclient/chains/ton/ton.go#L61-L63
Added lines #L61 - L63 were not covered by tests
[warning] 65-67: zetaclient/chains/ton/ton.go#L65-L67
Added lines #L65 - L67 were not covered by tests
[warning] 69-71: zetaclient/chains/ton/ton.go#L69-L71
Added lines #L69 - L71 were not covered by tests
[warning] 73-75: zetaclient/chains/ton/ton.go#L73-L75
Added lines #L73 - L75 were not covered by tests
[warning] 77-79: zetaclient/chains/ton/ton.go#L77-L79
Added lines #L77 - L79 were not covered by tests
[warning] 81-88: zetaclient/chains/ton/ton.go#L81-L88
Added lines #L81 - L88 were not covered by tests
[warning] 90-100: zetaclient/chains/ton/ton.go#L90-L100
Added lines #L90 - L100 were not covered by tests
[warning] 103-105: zetaclient/chains/ton/ton.go#L103-L105
Added lines #L103 - L105 were not covered by tests
[warning] 108-111: zetaclient/chains/ton/ton.go#L108-L111
Added lines #L108 - L111 were not covered by tests
[warning] 114-117: zetaclient/chains/ton/ton.go#L114-L117
Added lines #L114 - L117 were not covered by tests
[warning] 119-124: zetaclient/chains/ton/ton.go#L119-L124
Added lines #L119 - L124 were not covered by tests
[warning] 127-132: zetaclient/chains/ton/ton.go#L127-L132
Added lines #L127 - L132 were not covered by tests
[warning] 134-144: zetaclient/chains/ton/ton.go#L134-L144
Added lines #L134 - L144 were not covered by tests
[warning] 148-158: zetaclient/chains/ton/ton.go#L148-L158
Added lines #L148 - L158 were not covered by tests
[warning] 161-168: zetaclient/chains/ton/ton.go#L161-L168
Added lines #L161 - L168 were not covered by tests
🔇 Additional comments (24)
zetaclient/chains/ton/observer/observer.go (3)
15-15
: Use of the newconfig
package import appears correct.
107-107
: Confirm whether returning an error on non-master blocks is appropriate.If non-master blocks are expected in certain scenarios, consider gracefully handling them instead of failing outright.
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 107-107: zetaclient/chains/ton/observer/observer.go#L107
Added line #L107 was not covered by tests
35-35
: Confirm thatLiteClient
indeed implementsconfig.Getter
.Please ensure all required methods are present and properly implemented. Example verification script:
✅ Verification successful
Interface embedding is correctly defined and actively used
The
config.Getter
interface is properly embedded inLiteClient
, requiring only theGetConfigParams
method. The interface is actively used in the codebase and has corresponding mock implementations, indicating proper implementation in production code.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash ast-grep --pattern $'type LiteClient interface {\n config.Getter\n $$$\n}'Length of output: 992
Script:
#!/bin/bash # Find config.Getter interface definition ast-grep --pattern 'type Getter interface { $$$ }' # Search for potential implementations rg "config\.Getter" -A 5 -B 5Length of output: 1617
Script:
#!/bin/bash # Search for concrete types implementing LiteClient rg "type.*struct" -A 3 | rg -A 3 "implements|satisfies|LiteClient" # Search for mock implementations (as indicated by go:generate comment) fd "ton_liteclient.go"Length of output: 1834
zetaclient/orchestrator/bootstrap.go (2)
135-136
: Skip logic for TON (managed by orchestrator V2)
No concerns. The decision to skip TON in the old orchestrator aligns with the new orchestrator V2 approach.
277-278
: Ensure orchestrator V2 readiness
This skip is proper. Confirm that orchestrator V2 has comprehensive tests and validation for TON functionality.zetaclient/chains/ton/observer/outbound_test.go (1)
62-62
: LGTM: Method name update aligns with new naming convention.The change from
observeOutboundTrackers
toObserveOutbound
maintains test functionality while improving API visibility.zetaclient/chains/ton/config/config.go (2)
18-23
: Interface name simplified for better readability.The renamed interface
Getter
is more concise while maintaining clear purpose through its documentation.
Line range hint
70-89
: Add test coverage for gas configuration retrieval.The
FetchGasConfig
function handles critical gas pricing logic but lacks test coverage. Consider adding unit tests to verify:
- Successful gas config retrieval
- Error handling for missing config keys
- Error handling for unmarshal failures
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 56-56: zetaclient/chains/ton/config/config.go#L56
Added line #L56 was not covered by tests
[warning] 66-66: zetaclient/chains/ton/config/config.go#L66
Added line #L66 was not covered by tests
[warning] 70-70: zetaclient/chains/ton/config/config.go#L70
Added line #L70 was not covered by testscmd/zetae2e/config/clients.go (1)
22-22
: LGTM: Import path and method call updates are consistent.The changes correctly reflect the package restructuring:
- Updated import path to use the new config package location
- Updated method call from
ConfigFromURL
toFromURL
Also applies to: 138-138
zetaclient/chains/ton/liteapi/client.go (1)
16-16
: Add test coverage for client initialization.While the import and method call updates are correct, the
NewFromSource
function lacks test coverage. Consider adding tests to verify:
- Successful client creation from URL
- Successful client creation from file path
- Error handling for invalid sources
Also applies to: 42-42
zetaclient/chains/ton/signer/signer_test.go (1)
76-76
: LGTM! Improved dependency injection in test.The change from
nil
tots.zetacore
properly reflects the actual dependency requirements of theTryProcessOutbound
method, making the test more realistic.zetaclient/orchestrator/v2_bootstrap_test.go (1)
119-155
: 🛠️ Refactor suggestionAddress TODOs and incomplete configuration in TON test.
The test case is well-structured but has several issues that need attention:
- Test is skipped pending lite-server mocks (issue mock TON liteServer with real calls #3419)
- Configuration is incomplete with a "todo" comment
- Missing parallel execution flag that other test cases have
Let's verify if issue #3419 is being tracked:
Consider this implementation for the configuration:
ts.UpdateConfig(func(cfg *config.Config) { - // todo cfg.TONConfig = config.TONConfig{ LiteClientConfigURL: "localhost", + // Add other required configuration fields } })✅ Verification successful
Test skip is justified, focus on mock implementation and test structure.
The test skip is valid as it depends on issue #3419 which is actively tracked. The TON configuration is actually complete as
LiteClientConfigURL
is the only required field. Consider these improvements:
- Implement TON lite-server mocks following the pattern in
zetaclient/testutils/testrpc/rpc_evm.go
- Enable parallel test execution with
t.Parallel()
once mocks are in place, matching other test cases🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash gh issue view 3419
Length of output: 109
Script:
#!/bin/bash # Check TON configuration structure ast-grep --pattern 'type TONConfig struct { $$$ }' # Look for other TON test implementations rg "func.*TON.*\(t \*testing.T\)" -A 5 # Check issue reference gh issue view 3419 --repo zeta-chain/nodeLength of output: 1248
zetaclient/chains/ton/liteapi/client_live_test.go (1)
173-173
: LGTM! Package reorganization improves modularity.The migration from
zetaton
tozetatonconfig
package improves code organization by properly separating configuration concerns.Also applies to: 180-180
zetaclient/orchestrator/v2_orchestrator.go (1)
162-162
: LGTM! TON chain support follows established patterns.The implementation of TON chain bootstrapping follows the same pattern as Bitcoin and EVM chains, maintaining consistency in the codebase.
zetaclient/chains/ton/observer/inbound_test.go (8)
41-41
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
67-67
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
108-108
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
148-148
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
210-210
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
278-278
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
356-356
: Method renamed to follow Go's export convention.The method call has been updated from
observeGateway
toObserveGateway
to make it an exported method, which is consistent with the orchestrator V2 implementation.
430-430
: Method renamed to follow Go's export convention.The method call has been updated from
processInboundTrackers
toObserveInboundTrackers
to make it an exported method, which is consistent with the orchestrator V2 implementation.zetaclient/orchestrator/orchestrator.go (1)
359-359
: TON chain added to orchestrator V2.The TON chain has been added to the list of chains managed by orchestrator V2, following the same pattern as BTC and EVM chains. This is consistent with the PR objectives to implement TON orchestrator V2.
Also applies to: 408-409
changelog.md (1)
18-18
: Changelog entry added for TON observer-signer.The changelog entry correctly documents the implementation of TON observer-signer in orchestrator V2, which is consistent with the PR objectives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, couple minor comments, feel free to apply what makes sense to you
This PR implements a V2 orchestrator for TON similar to BTC in #3332.
Closes #3300
Summary by CodeRabbit
Based on the comprehensive summary, here are the release notes:
New Features
Refactoring
Improvements
Chores