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(bens): add configs for indexing names from puppynet #1187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renatoalencar
Copy link
Contributor

@renatoalencar renatoalencar commented Jan 14, 2025

Currently names can only be indexed from Shibarium mainnet, this adds the necessary configs for d3 connect subgraph to be indexed from testnet as well.

Summary by CodeRabbit

  • Configuration Updates
    • Added support for Shibarium testnet network.
    • Updated protocol configurations for network ID 109 and 157.
    • Introduced new RPC and Blockscout URLs for Shibarium testnet.
    • Configured graph node settings for the new Shibarium testnet.
    • Added new protocol "d3-connect-shib-testnet" for Shibarium testnet deployment.

Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

Walkthrough

The pull request introduces configuration updates across multiple files to support the Shibarium testnet integration. In the dev.json configuration, the use_protocols entry for network ID 109 is updated from "d3_connect" to "d3_connect_shib", and a new network with ID 157 is added, featuring specific protocol settings for the Shibarium testnet. The graph-node/config.toml file includes a new chain configuration for Shibarium, specifying a provider URL for the testnet. Additionally, the graph-node/deployer/config.json is updated to include a new protocol entry for the Shibarium testnet, defining subgraph details and network specifications. These changes collectively enable the setup and configuration for interacting with the Shibarium test network.

Poem

🐰 Hop, hop, config's new dance!
Shibarium testnet takes its stance
Protocols shifting, URLs bright
Graph nodes ready for the fight
A rabbit's config, smooth and sleek 🚀


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.

@renatoalencar renatoalencar force-pushed the renatoalencar/shibarium-testnet-config branch from 3249fc3 to 62b3211 Compare January 14, 2025 22:06
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)
blockscout-ens/bens-server/config/dev.json (2)

30-37: Consider adding rate limiting configuration for the testnet RPC endpoint.

While the network configuration is well-structured, consider adding rate limiting parameters for the RPC endpoint to prevent potential abuse in the testnet environment.


109-115: Consider differentiating testnet meta information.

The meta information is identical to the mainnet protocol. Consider:

  1. Adding "(Testnet)" suffix to short_name and title
  2. Updating the description to indicate this is for the testnet environment
  "meta": {
-   "short_name": "D3 Connect",
-   "title": "D3 Connect",
+   "short_name": "D3 Connect (Testnet)",
+   "title": "D3 Connect (Testnet)",
    "description": "D3 Connect is a platform for connecting to the Shibarium network.",
    "icon_url": "https://i.imgur.com/cD6VIXk.png",
    "docs_url": "https://docs.d3.app/"
  }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3249fc3 and 62b3211.

📒 Files selected for processing (3)
  • blockscout-ens/bens-server/config/dev.json (3 hunks)
  • blockscout-ens/graph-node/config.toml (1 hunks)
  • blockscout-ens/graph-node/deployer/config.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • blockscout-ens/graph-node/config.toml
  • blockscout-ens/graph-node/deployer/config.json
🧰 Additional context used
🪛 Gitleaks (8.21.2)
blockscout-ens/bens-server/config/dev.json

106-106: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (1)
blockscout-ens/bens-server/config/dev.json (1)

103-103: Verify address resolution technique change.

The testnet protocol uses "address_resolve_technique": "reverse_registry" while the mainnet uses "addr2name". Please confirm if this difference is intentional and document the reasoning.

@@ -23,9 +23,18 @@
"url": "https://shibariumscan.io"
},
"use_protocols": [
"d3_connect"
"d3_connect_shib"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Protocol rename is incomplete and inconsistent

The protocol rename from "d3_connect" to "d3_connect_shib" is not consistently applied. Found multiple instances still using the old name:

  • In dev.json: Two configurations using "type": "d3_connect"
  • In prod.json: Network 109 configuration still uses "d3_connect" in protocol list and configuration object
🔗 Analysis chain

Verify protocol rename consistency across the codebase.

The protocol rename from "d3_connect" to "d3_connect_shib" should be reflected in all related configurations and code.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to the old protocol name
rg "d3_connect\"" --type json

Length of output: 389


Script:

#!/bin/bash
# Get context around d3_connect occurrences
echo "=== dev.json ==="
rg -B 2 -A 2 "d3_connect\"" blockscout-ens/bens-server/config/dev.json

echo -e "\n=== prod.json ==="
rg -B 2 -A 2 "d3_connect\"" blockscout-ens/bens-server/config/prod.json

Length of output: 1252

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.

1 participant