-
Notifications
You must be signed in to change notification settings - Fork 108
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(e2e): use address_book.seed rather than bootstrap peer #3277
Conversation
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: 4
🧹 Outside diff range and nitpick comments (2)
cmd/zetae2e/get_zetaclient_bootstrap.go (2)
68-68
: Adhere to Go Naming Conventions for AcronymsThe variable
peerId
should be renamed topeerID
to follow Go naming conventions for acronyms, enhancing code consistency and readability.Apply this diff to correct the variable name:
- peerId, err := conversion.Bech32PubkeyToPeerID(account.GranteePubkey.Secp256k1.String()) + peerID, err := conversion.Bech32PubkeyToPeerID(account.GranteePubkey.Secp256k1.String())Also, update subsequent references to
peerID
accordingly:- fmt.Printf("/ip4/%s/tcp/6668/p2p/%s\n", ipv4Address, peerId.String()) + fmt.Printf("/ip4/%s/tcp/6668/p2p/%s\n", ipv4Address, peerID.String())🧰 Tools
🪛 GitHub Check: lint
[failure] 68-68:
var-naming: var peerId should be peerID (revive)
55-57
: Enhance Error Context by Wrapping Returned ErrorsReturning errors with additional context aids in debugging and log tracing. Consider wrapping the error to include more detail.
Apply this diff to improve error handling:
accAddr, err := sdk.AccAddressFromBech32(account.Operator) if err != nil { - return err + return fmt.Errorf("failed to convert operator address from Bech32: %w", err) }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
cmd/zetae2e/get_zetaclient_bootstrap.go
(1 hunks)cmd/zetae2e/root.go
(1 hunks)contrib/localnet/scripts/start-zetaclientd.sh
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
cmd/zetae2e/root.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
contrib/localnet/scripts/start-zetaclientd.sh (1)
Pattern **/*.sh
: Review the shell scripts, point out issues relative to security, performance, and maintainability.
cmd/zetae2e/get_zetaclient_bootstrap.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
🪛 GitHub Check: lint
cmd/zetae2e/get_zetaclient_bootstrap.go
[failure] 68-68:
var-naming: var peerId should be peerID (revive)
🔇 Additional comments (1)
cmd/zetae2e/root.go (1)
32-32
: Command Registration Added Successfully
The new command NewGetZetaclientBootstrap()
is properly registered, enhancing the CLI functionality.
ad4d4ef
to
f1ca865
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3277 +/- ##
========================================
Coverage 61.79% 61.79%
========================================
Files 429 429
Lines 30816 30816
========================================
Hits 19043 19043
Misses 10914 10914
Partials 859 859 |
4a83f5d
to
7b43854
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.
NodeAccounts list can contain accounts which are not part of the TSS yet , is it okay to use the list for the seed ?
Okay dont think its a problem since we are using for starting the network only
Yes I think the address book should contain all possible peers. Only those that are needed will be actually used. |
* refactor(e2e): use seed address book rather than bootstrap peer * review updates * move to local * feedback
Generate the address_book.seed file for zetaclient when running in localnet. This is to ensure that the localnet/e2e setup matches the testnet/mainnet zetaclient configuration where we configure an address book.
This command lives under
zetae2e
rather thanzetaclient
as this is localnet/e2e specific functionality.Related to zeta-chain/go-tss#40 (Remove all dynamic peer discovery)
Summary by CodeRabbit
New Features
zetae2e
command-line interface with the new command registration.start-zetaclientd.sh
script to streamline the initialization process and retrieve the bootstrap address book.Bug Fixes