chore: upgrade github.com/btcsuite/btcd
Upgrade github.com/btcsuite/btcd.
TODO:
- [ ] restore HSM code
- [ ] simplify key conversion logic
- [ ] improve BIP 341/342 compliance by removing
txscript.NewCannedPrevOutputFetcher([]byte{}, 0) - [ ] merge https://github.com/zeta-chain/go-tss/pull/23
Closes #2728
Summary by CodeRabbit
-
New Features
- Updated key generation process with a new import for the
keygenpackage, enhancing functionality. - Simplified the transaction signing process by modifying the
SignTxmethod.
- Updated key generation process with a new import for the
-
Bug Fixes
- Improved error messaging in test functions for better clarity.
-
Chores
- Updated import paths for various packages to ensure compatibility and maintainability.
- Updated version numbers of dependencies to their latest releases for improved performance and security.
[!IMPORTANT]
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Walkthrough
Walkthrough
The recent code changes primarily focus on upgrading the btcsuite library across the project to streamline dependencies and enable support for Taproot scripts. This update involves modifying import paths for several packages, particularly shifting to versioned imports of btcd, thereby enhancing the codebase's clarity and maintainability without altering the core functionality.
Changes
| Files | Change Summary |
|---|---|
| cmd/zetaclientd/gen_pre_params.go, cmd/zetaclientd/keygen_tss.go, cmd/zetaclientd/main.go | Updated import paths for keygen and ecdsakeygen from gitlab.com/thorchain to github.com/bnb-chain. |
| e2e/e2etests/helpers.go, e2e/e2etests/test_* | Reorganized or updated btcutil import paths, indicating a shift in source without functional changes. |
| e2e/runner/.go, zetaclient/chains/bitcoin/.go | Reordered btcutil imports and updated btcec to version 2, improving structure and supporting new features. |
| go.mod | Updated various dependencies, including btcsuite/btcd to v0.24.2, and introduced bnb-chain/tss-lib. |
| pkg/chains/.go, pkg/crypto/.go | Adjusted btcutil imports and refined existing code for better organization and clarity. |
| x/crosschain/types/tx_body_verification.go | Updated btcec import path and simplified verifyOutboundBodyBTC function. |
| zetaclient/tss/tss_signer.go | Added keygen import from bnb-chain, enhancing key generation capabilities. |
| zetaclient/zetacore/broadcast.go | Simplified SignTx method by removing conditional checks, streamlining the process. |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
Upgrade btcsuite project-wise (2728) |
✅ |
This assessment confirms that the primary objective of upgrading the btcsuite library to improve dependency management and support for Taproot scripts has been effectively addressed through the recent code changes.
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?
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.--Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples: --@coderabbitai generate unit testing code for this file.--@coderabbitai modularize this function. - PR comments: Tag
@coderabbitaiin 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 generate interesting stats about this repository and render them as a table.--@coderabbitai read src/utils.ts and generate unit testing code.--@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.
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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere 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.
Codecov Report
Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
Please upload report for BASE (
develop@17f26e6). Learn more about missing BASE report. Report is 1 commits behind head on develop.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| zetaclient/chains/bitcoin/signer/signer.go | 0.00% | 6 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #2750 +/- ##
==========================================
Coverage ? 67.12%
==========================================
Files ? 378
Lines ? 21121
Branches ? 0
==========================================
Hits ? 14178
Misses ? 6276
Partials ? 667
| Files with missing lines | Coverage Δ | |
|---|---|---|
| pkg/chains/address.go | 86.79% <ø> (ø) |
|
| pkg/chains/address_taproot.go | 58.42% <ø> (ø) |
|
| pkg/crypto/tss.go | 82.60% <ø> (ø) |
|
| pkg/proofs/bitcoin/proof.go | 100.00% <ø> (ø) |
|
| pkg/proofs/headers.go | 71.76% <ø> (ø) |
|
| pkg/proofs/proof.go | 76.47% <ø> (ø) |
|
| x/lightclient/keeper/grpc_query_prove.go | 71.79% <ø> (ø) |
|
| zetaclient/chains/bitcoin/fee.go | 37.98% <ø> (ø) |
|
| zetaclient/chains/bitcoin/observer/observer.go | 38.31% <ø> (ø) |
|
| zetaclient/chains/bitcoin/rpc/rpc.go | 0.00% <ø> (ø) |
|
| ... and 4 more |