Skip to content
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

chore: use prebuilt bitcoin-node-sidecar #2989

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Oct 10, 2024

Description

Use prebuilt bitcoin-node-sidecar from https://github.com/zeta-chain/node-localnet-bitcoin-sidecar to improve E2E CI performance. Building this every E2E run wastes 30-60 seconds.

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • Chores
    • Removed several files related to the Bitcoin Sidecar project, indicating a significant restructuring or discontinuation of the project.
    • Updated Docker Compose configuration for improved clarity and functionality of services.
    • Simplified the bitcoin-node-sidecar service by switching from a build configuration to an image specification.

@gartnera gartnera added the no-changelog Skip changelog CI check label Oct 10, 2024
@gartnera gartnera requested a review from a team October 10, 2024 17:49
@gartnera gartnera marked this pull request as ready for review October 10, 2024 17:54
Copy link
Contributor

coderabbitai bot commented Oct 10, 2024

📝 Walkthrough

Walkthrough

This pull request involves the deletion of several files related to the Bitcoin Sidecar project, including a Dockerfile, TypeScript configuration, and various source files that implemented client functionality for Bitcoin transactions. The changes indicate a significant restructuring or potential discontinuation of the project, as key components such as the client implementation and configuration files have been removed. Additionally, the Docker Compose configuration has been updated to use a pre-built image instead of a local build context.

Changes

File Path Change Summary
contrib/localnet/bitcoin-sidecar/Dockerfile Deleted; defined a multi-stage build process for a Node.js application.
contrib/localnet/bitcoin-sidecar/js/package.json Deleted; configuration file for the zeta-btc-client project, specifying metadata and dependencies.
contrib/localnet/bitcoin-sidecar/js/src/client.ts Deleted; implemented client functionality for interacting with ZetaChain using Bitcoin transactions.
contrib/localnet/bitcoin-sidecar/js/src/index.ts Deleted; Express.js application for handling Bitcoin transactions.
contrib/localnet/bitcoin-sidecar/js/src/script.ts Deleted; contained a ScriptBuilder class for constructing tapscript spending scripts.
contrib/localnet/bitcoin-sidecar/js/src/tsconfig.json Deleted; TypeScript compiler options for the project.
contrib/localnet/bitcoin-sidecar/js/src/util.ts Deleted; utility function for converting public keys to x-only representation.
contrib/localnet/docker-compose.yml Modified; changed bitcoin-node-sidecar from build configuration to an image specification and updated command options for clarity.

Possibly related PRs

Suggested labels

ci, PERFORMANCE_TESTS

Suggested reviewers

  • fbac
  • kingpinXD
  • swift1337
  • ws4charlie
  • brewmaster012
  • skosito
  • lumtis

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?

❤️ 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.
    • 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 @coderabbitai in 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 @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 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 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 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.

@gartnera gartnera enabled auto-merge October 10, 2024 17:54
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Outside diff range and nitpick comments (1)
contrib/localnet/docker-compose.yml (1)

Line range hint 231-241: Prebuilt image implementation approved with a maintenance consideration.

The transition to a prebuilt image (ghcr.io/zeta-chain/node-localnet-bitcoin-sidecar:e0205d7) aligns with the PR objective of enhancing CI performance. This change eliminates the need for building the sidecar during each CI run, potentially saving 30 to 60 seconds per execution.

Consider implementing a strategy for keeping the image tag up-to-date:

  1. Use a more general tag (e.g., latest or stable) for easier updates.
  2. Implement a periodic review process to ensure the image remains current.
  3. Utilize a CI/CD pipeline to automatically update the tag when a new version is available.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 81fc485 and 1bdfe65.

📒 Files selected for processing (8)
  • contrib/localnet/bitcoin-sidecar/Dockerfile (0 hunks)
  • contrib/localnet/bitcoin-sidecar/js/package.json (0 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/client.ts (0 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/index.ts (0 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/script.ts (0 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/tsconfig.json (0 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/util.ts (0 hunks)
  • contrib/localnet/docker-compose.yml (1 hunks)
💤 Files with no reviewable changes (7)
  • contrib/localnet/bitcoin-sidecar/Dockerfile
  • contrib/localnet/bitcoin-sidecar/js/package.json
  • contrib/localnet/bitcoin-sidecar/js/src/client.ts
  • contrib/localnet/bitcoin-sidecar/js/src/index.ts
  • contrib/localnet/bitcoin-sidecar/js/src/script.ts
  • contrib/localnet/bitcoin-sidecar/js/src/tsconfig.json
  • contrib/localnet/bitcoin-sidecar/js/src/util.ts
🧰 Additional context used
🔇 Additional comments (1)
contrib/localnet/docker-compose.yml (1)

Line range hint 231-237: Command formatting enhancement approved.

The reformatting of the bitcoin service command improves readability without altering functionality. This change adheres to best practices for Docker Compose file maintainability.

Copy link
Contributor

@morde08 morde08 left a comment

Choose a reason for hiding this comment

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

LGTM

@gartnera gartnera added this pull request to the merge queue Oct 10, 2024
Merged via the queue into develop with commit cb74b25 Oct 10, 2024
41 checks passed
@gartnera gartnera deleted the btc-sidecar-prebuilt branch October 10, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Skip changelog CI check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants