-
Notifications
You must be signed in to change notification settings - Fork 110
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
feat: observation of inbound SOL token deposit #2465
Conversation
…ana-observe-inbound-SOL
WalkthroughThe recent updates introduce robust support for the Solana blockchain across the project's infrastructure. Key changes encompass modifications to Docker configurations, the Makefile, and multiple Go files, integrating functionalities for Solana chain observation, testing routines, account management, and smart contract interactions. These enhancements are designed to streamline end-to-end testing and foster seamless interactions with the Solana ecosystem within the existing framework. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant CLI as CLI Tool
participant Docker as Docker
participant Solana as Solana Node
participant Tester as Test Runner
participant Logger as Logger
User->>CLI: Start Solana Test
CLI->>Docker: Build Solana Docker Image
Docker-->>CLI: Image Ready
CLI->>Docker: Start Solana Container
Docker-->>CLI: Container Running
CLI->>Tester: Initiate Solana Test
Tester->>Solana: Set Up Accounts
Tester->>Solana: Deploy Programs
Tester->>Solana: Run Tests
Solana-->>Tester: Test Results
Tester->>Logger: Log Results
Logger-->>User: Test Complete
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
!!!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 |
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: 6
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- zetaclient/chains/solana/observer/inbound.go (1 hunks)
- zetaclient/chains/solana/observer/inbound_test.go (1 hunks)
- zetaclient/chains/solana/observer/inbound_tracker.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- zetaclient/chains/solana/observer/inbound.go
- zetaclient/chains/solana/observer/inbound_test.go
Additional context used
Path-based instructions (1)
zetaclient/chains/solana/observer/inbound_tracker.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Additional comments not posted (1)
zetaclient/chains/solana/observer/inbound_tracker.go (1)
15-16
: Ensure context is not nil.Before using the context, it is good practice to ensure it is not nil to avoid potential panics.
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: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- zetaclient/chains/base/observer_test.go (18 hunks)
Files skipped from review as they are similar to previous changes (1)
- zetaclient/chains/base/observer_test.go
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 to me, just a few comments. I'm also gonna run more advanced test in the CI since it is a big change
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: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- zetaclient/chains/solana/observer/inbound.go (1 hunks)
- zetaclient/chains/solana/observer/inbound_tracker.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- zetaclient/chains/solana/observer/inbound.go
- zetaclient/chains/solana/observer/inbound_tracker.go
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.
👍
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: 0
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: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- pkg/bg/bg_test.go (2 hunks)
Additional context used
Path-based instructions (1)
pkg/bg/bg_test.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Additional comments not posted (3)
pkg/bg/bg_test.go (3)
73-78
: LGTM! The changes improve the test assertions.The use of
require.Contains
is appropriate for checking the presence of substrings in the log output. This ensures that the test will fail immediately if the expected substrings are not found.
Line range hint
39-54
:
LGTM! The use ofassert.JSONEq
is appropriate.The use of
assert.JSONEq
ensures that the log output matches the expected JSON structure exactly.
Line range hint
15-28
:
LGTM! The use ofassertChanClosed
is appropriate.The use of
assertChanClosed
ensures that the work function has completed and the signal channel is closed.
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: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- zetaclient/chains/solana/observer/inbound.go (1 hunks)
- zetaclient/chains/solana/observer/observer.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- zetaclient/chains/solana/observer/inbound.go
- zetaclient/chains/solana/observer/observer.go
9df010d
to
b15c080
Compare
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: 8
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- zetaclient/chains/solana/observer/inbound.go (1 hunks)
- zetaclient/chains/solana/observer/observer.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- zetaclient/chains/solana/observer/observer.go
Additional context used
Path-based instructions (1)
zetaclient/chains/solana/observer/inbound.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Description
Done:
SOL
token depositSOL
token depositgateway
program initialization.SOL
token deposit.How Has This Been Tested?
Summary by CodeRabbit