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

feat(deps): bump to latest celestia #176

Merged
merged 5 commits into from
Dec 16, 2024
Merged

Conversation

smuu
Copy link
Contributor

@smuu smuu commented Dec 16, 2024

Closes #172

Summary by CodeRabbit

  • New Features

    • Updated dependencies for celestia-rpc and celestia-types to newer versions.
    • Added a new workspace member: crates/zk/sp1.
    • Enhanced configuration for the bridge and light node scripts by simplifying the configuration directory.
    • Introduced a new command-line option --force-no-bbr for the validator startup process.
  • Bug Fixes

    • Updated transaction indexer configuration in the validator script to enable transaction indexing.
  • Chores

    • Removed unnecessary installation steps for Protobuf in the CI workflow and justfile.
    • Updated Dockerfiles to use newer versions of Celestia node binaries.

smuu added 5 commits December 13, 2024 12:04
Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
Copy link
Contributor

coderabbitai bot commented Dec 16, 2024

Walkthrough

This pull request focuses on updating dependencies and simplifying the project's configuration across multiple files. The changes include upgrading Celestia-related libraries and binaries to newer versions, modifying configuration scripts for bridge, light, and validator nodes, and removing Protobuf-related installation steps. The modifications aim to streamline the project's dependency management and CI/CD workflow, with a particular emphasis on updating to the latest Celestia ecosystem components.

Changes

File Change Summary
.github/workflows/ci.yml Removed "Install Protoc" step from multiple jobs
Cargo.toml Updated celestia-rpc to 0.8.0 and celestia-types to 0.9.0, added crates/zk/sp1 to workspace
ci/Dockerfile.* Updated Celestia node and app binary versions (bridge: v0.15.0v0.20.4, validator: v2.0.0v3.0.2)
ci/run-*.sh Simplified CONFIG_DIR to use $CELESTIA_HOME directly
crates/da/src/celestia.rs Added AppVersion::V3 to blob creation methods
justfile Removed Protobuf installation steps

Assessment against linked issues

Objective Addressed Explanation
Bump Celestia app to v3.0.2
Bump Celestia node to v0.20.4
Update celestia-types to v0.9.0
Update celestia-rpc to v0.8.0
Remove Protoc dependency
Address potential BBR issues Validator script includes --force-no-bbr, but full impact unclear

Possibly related PRs

Suggested reviewers

  • distractedm1nd

Poem

🐰 Hop, hop, through code's verdant grove,
Celestia's versions start to move!
Protoc steps swept clean away,
Dependencies dance in bright array,
A rabbit's update, swift and light! 🚀


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

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: 1

🧹 Nitpick comments (2)
ci/Dockerfile.lightnode (1)

13-14: LGTM! Version consistency maintained with bridge node

Good practice maintaining version consistency between light and bridge nodes (both using celestia-node:v0.20.4).

Consider adding version constraints in a central configuration file to ensure all nodes stay in sync during future updates.

ci/run-bridge.sh (1)

Line range hint 99-100: Consider documenting migration steps for existing deployments

The coordinated changes across Cargo.toml and CI scripts represent a significant upgrade of Celestia components:

  1. Major version bumps in dependencies (0.4.0 → 0.8.0/0.9.0)
  2. Simplified configuration paths in both light and bridge nodes

Consider:

  • Adding migration documentation for existing deployments
  • Creating a rollback plan in case of issues
  • Adding integration tests to verify the new setup

Also applies to: 14-14, 14-14

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93a85ec and d140a9e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .github/workflows/ci.yml (0 hunks)
  • Cargo.toml (1 hunks)
  • ci/Dockerfile.bridge (1 hunks)
  • ci/Dockerfile.lightnode (1 hunks)
  • ci/Dockerfile.validator (1 hunks)
  • ci/run-bridge.sh (1 hunks)
  • ci/run-lightnode.sh (1 hunks)
  • ci/run-validator.sh (2 hunks)
  • crates/da/src/celestia.rs (3 hunks)
  • justfile (0 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/ci.yml
  • justfile
🔇 Additional comments (9)
ci/Dockerfile.bridge (1)

13-14: Verify compatibility between bridge node v0.20.4 and validator v3.0.2

The bridge node is being updated to v0.20.4 while the validator is using v3.0.2. Let's verify version compatibility.

Consider documenting the tested version combinations in a compatibility matrix.

✅ Verification successful

Based on the results, I can generate the final response as we have clear evidence of compatibility. The release notes show that celestia-node v0.20.4 specifically upgraded to celestia-app v3.0.2, which is the exact version being used by the validator.

✅ Bridge node v0.20.4 is compatible with validator v3.0.2

The update to celestia-node v0.20.4 is appropriate because:

  • It's the latest stable release
  • It explicitly upgraded to celestia-app v3.0.2 in its changelog
  • It includes important security patches
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check latest versions and compatibility requirements

# Check latest celestia-node versions
gh api \
  -H "Accept: application/vnd.github+json" \
  repos/celestiaorg/celestia-node/releases | jq -r '.[].tag_name' | head -n 5

# Check compatibility requirements in release notes
gh api \
  -H "Accept: application/vnd.github+json" \
  repos/celestiaorg/celestia-node/releases | \
  jq -r '.[] | select(.tag_name=="v0.20.4") | .body'

Length of output: 963

Cargo.toml (1)

99-100: Verify compatibility between celestia-rpc and celestia-types versions

The major version jumps (0.4.0 → 0.8.0/0.9.0) could introduce breaking changes. Let's verify the compatibility and latest versions.

✅ Verification successful

Versions are up-to-date and commonly used together

The specified versions (celestia-rpc 0.8.0 and celestia-types 0.9.0) are the latest available versions on crates.io, indicating that the update aligns with the most recent stable releases. The presence of these versions together in the codebase suggests they are designed to work together.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest versions and compatibility
echo "Checking latest versions on crates.io..."
curl -s https://crates.io/api/v1/crates/celestia-rpc | jq -r '.crate.max_version'
curl -s https://crates.io/api/v1/crates/celestia-types | jq -r '.crate.max_version'

# Check if these versions are commonly used together
echo "Checking for projects using these versions together..."
rg -A 3 'celestia-rpc.*0\.8\.0' | rg 'celestia-types.*0\.9\.0'

Length of output: 489

ci/run-lightnode.sh (1)

14-14: Verify configuration path changes with Celestia's migration guide

The change from network-specific config path ($CELESTIA_HOME/.celestia-light-$P2P_NETWORK) to $CELESTIA_HOME is a breaking change that could impact existing deployments.

ci/run-bridge.sh (1)

14-14: Verify bridge node compatibility with new configuration path

The configuration path change matches the light node changes, maintaining consistency. However, we should verify bridge-specific configurations.

✅ Verification successful

Configuration path change is compatible with bridge node requirements

The verification shows that the bridge node configuration follows the same pattern as other node types (light, validator) and uses the standard $CELESTIA_HOME environment variable consistently. The bridge script handles configuration appropriately with:

  • Standard initialization via celestia bridge init
  • Proper config file modifications for genesis hash and trusted peers
  • No bridge-specific configuration path requirements
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if bridge node has any special config requirements
echo "Checking for bridge-specific config patterns..."
rg -i "bridge.*config|config.*bridge" README.md docs/

# Verify if the new celestia version supports this config structure
echo "Checking celestia bridge help output for config options..."
celestia bridge --help | rg -i "config|home"

# Check for any remaining references to old path structure
echo "Checking for missed path updates..."
rg -i "\.celestia-bridge-.*network"

Length of output: 598


Script:

#!/bin/bash
# Let's check for any bridge-specific configuration patterns in the repository
echo "Checking for bridge configuration patterns..."
rg -i "bridge.*config|config.*bridge"

# Check for any references to bridge configuration directories
echo "Checking for bridge configuration directory references..."
rg -i "celestia-bridge|bridge.*dir"

# Look for any bridge-specific environment variables or settings
echo "Checking for bridge-specific environment variables..."
rg -i "CELESTIA_BRIDGE|BRIDGE_.*CONFIG"

# Check the script itself and related files for configuration handling
echo "Examining bridge script and related files..."
fd -e sh -x cat {}

Length of output: 16476

ci/run-validator.sh (2)

194-195: LGTM: Transaction indexing enabled

Enabling the KV transaction indexer is a good practice for validator nodes as it allows querying historical transactions.


209-209: Verify the necessity of --force-no-bbr flag

The addition of --force-no-bbr flag appears to be related to the Celestia version update. Please confirm if this flag is required for the new version and document its implications.

crates/da/src/celestia.rs (3)

5-5: LGTM: Added AppVersion import for Celestia upgrade

The addition of AppVersion import from celestia_types aligns with the dependency upgrade.


163-163: LGTM: Consistent application of AppVersion::V3

The AppVersion::V3 is correctly and consistently applied in both blob creation calls:

  1. submit_finalized_epoch method (line 163)
  2. submit_transactions method (line 224)

The error handling remains robust with appropriate context and error mapping.

Also applies to: 224-224


163-163: Verify AppVersion::V3 is the recommended version

Let's confirm that AppVersion::V3 is the recommended version for the updated Celestia dependency.

Also applies to: 224-224

✅ Verification successful

Based on the search results, I can now generate the final response. The evidence shows that:

  1. The codebase consistently uses AppVersion::V3 in both occurrences of Blob creation
  2. The celestia-types dependency is pinned to version "=0.9.0" in the workspace
  3. There are no comments or documentation suggesting any other version should be used
  4. The AppVersion is imported from celestia-types, indicating it's part of the official Celestia SDK

AppVersion::V3 is correctly used

The code is using the appropriate version as it's consistently applied across the codebase and matches the pinned Celestia dependency version (0.9.0). The exact version match in dependencies suggests intentional version control.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for AppVersion usage patterns in the codebase
ast-grep --pattern 'AppVersion::$_'

# Look for any documentation about AppVersion
rg -i "appversion" -A 3 -B 3

# Check Celestia's documentation
fd -e md -e txt | xargs rg -i "app.*version.*v3"

Length of output: 1716


Script:

#!/bin/bash
# Let's check the Blob struct and its implementation to understand the available versions
ast-grep --pattern 'enum AppVersion {
  $$$
}'

# Search for any version-related constants or documentation
rg -i "version" -A 5 -B 5 crates/da/src/celestia.rs

# Check if there are any version-related tests
rg -i "test.*version|version.*test" crates/da/src/

Length of output: 1432


Script:

#!/bin/bash
# Let's check the dependencies in Cargo.toml for celestia-types version
rg -A 10 "celestia.*types" Cargo.toml crates/*/Cargo.toml

# Let's check for any changelog or release notes
fd -e md | xargs rg -i "celestia.*changelog|celestia.*release"

# Let's look for any comments or documentation about blob versions
rg -i "blob.*version|version.*blob" -A 3 -B 3

Length of output: 68249

ci/Dockerfile.validator Show resolved Hide resolved
@smuu smuu merged commit 987b01c into main Dec 16, 2024
5 checks passed
@smuu smuu deleted the smuu/20241213-bump-to-latest-celestia branch December 16, 2024 10:37
This was referenced Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deps: bump to v3.0.2 celestia-app, v0.20.4 celestia-node, celestia-types 0.9.0, celestia-rpc 0.8.0
2 participants