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

fix: update klaytn/kaia rpc url #3426

Merged
merged 1 commit into from
Dec 2, 2024
Merged

fix: update klaytn/kaia rpc url #3426

merged 1 commit into from
Dec 2, 2024

Conversation

ChiTimesChi
Copy link
Collaborator

@ChiTimesChi ChiTimesChi commented Dec 2, 2024

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

Summary by CodeRabbit

  • New Features

    • Updated the primary and fallback RPC URLs for the KLAYTN chain to enhance connectivity and performance.
  • Bug Fixes

    • Resolved issues related to KLAYTN network connections by changing outdated RPC endpoints.

66901b9: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Dec 2, 2024

Walkthrough

The pull request modifies the KLAYTN chain configuration across several files. The primary RPC URL for the KLAYTN chain has been updated from 'https://klaytn.blockpi.network/v1/rpc/public' to 'https://kaia.blockpi.network/v1/rpc/public' in the packages/rest-api/src/constants/chains.ts, packages/synapse-constants/src/constants/chains/master.ts, packages/synapse-interface/constants/chains/master.tsx, and packages/widget/src/constants/chains.ts files. No other changes to the structure or properties of the KLAYTN chain or other chains are present.

Changes

File Path Change Summary
packages/rest-api/src/constants/chains.ts Updated KLAYTN fallback URL from 'https://klaytn.blockpi.network/v1/rpc/public' to 'https://kaia.blockpi.network/v1/rpc/public'.
packages/synapse-constants/src/constants/chains/master.ts Updated KLAYTN primary URL from 'https://klaytn.blockpi.network/v1/rpc/public' to 'https://kaia.blockpi.network/v1/rpc/public'.
packages/synapse-interface/constants/chains/master.tsx Updated KLAYTN primary URL from 'https://klaytn.blockpi.network/v1/rpc/public' to 'https://kaia.blockpi.network/v1/rpc/public'.
packages/widget/src/constants/chains.ts Updated KLAYTN primary URL from 'https://klaytn.blockpi.network/v1/rpc/public' to 'https://kaia.blockpi.network/v1/rpc/public'.

Possibly related PRs

  • feat(rest-api): Chain and token updates #3319: This PR updates the KLAYTN chain configuration in the packages/rest-api/src/constants/chains.ts file, specifically changing the primary RPC URL, which is directly related to the changes made in the main PR that also modifies the KLAYTN chain configuration in a similar manner.
  • feat(synapse-constants): chain and token updates #3320: This PR introduces a new constant WORLDCHAIN in the packages/synapse-constants/src/constants/chains/master.ts file, which may relate to the overall structure of chain configurations, although it does not directly modify the KLAYTN chain. However, it is part of a broader context of chain updates that includes the changes in the main PR.

Suggested labels

size/xs, Sol, Typescript

Suggested reviewers

  • trajan0x
  • Defi-Moses

🐰 In the code, a change was made,
KLAYTN's URL, a new path laid.
From BlockPi's old to Kaia's embrace,
A hop to the future, a swift new place.
With every update, we leap and bound,
In the world of chains, new paths are found! 🌟

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/synapse-interface/constants/chains/master.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@babel/eslint-parser' declared in 'packages/synapse-interface/.eslintrc.js': Cannot find module '@babel/core/package.json'
Require stack:

  • /node_modules/@babel/eslint-parser/lib/parse.cjs
  • /node_modules/@babel/eslint-parser/lib/index.cjs
  • /node_modules/@eslint/eslintrc/dist/eslintrc.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object. (/node_modules/@babel/eslint-parser/lib/parse.cjs:14:19)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
    at Module._load (node:internal/modules/cjs/loader:1127:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)

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.

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

🧹 Outside diff range and nitpick comments (1)
packages/synapse-constants/src/constants/chains/master.ts (1)

195-195: LGTM! Consistent RPC URL update across all chain configurations

The primary RPC URL update for KLAYTN chain has been consistently applied across all configuration files, maintaining system-wide coherence.

The distributed configuration with different fallback URLs across implementations provides good redundancy and failover capabilities.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3dcf2e3 and 3f55d7b.

📒 Files selected for processing (4)
  • packages/rest-api/src/constants/chains.ts (1 hunks)
  • packages/synapse-constants/src/constants/chains/master.ts (1 hunks)
  • packages/synapse-interface/constants/chains/master.tsx (1 hunks)
  • packages/widget/src/constants/chains.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/rest-api/src/constants/chains.ts
🔇 Additional comments (1)
packages/synapse-interface/constants/chains/master.tsx (1)

250-250: LGTM! Primary RPC URL update is consistent

The change aligns with the updates in other files. Having different fallback URLs across implementations provides better redundancy.

@@ -173,7 +173,7 @@ export const KLAYTN: Chain = {
id: 8217,
name: 'Klaytn',
rpcUrls: {
primary: 'https://klaytn.blockpi.network/v1/rpc/public',
primary: 'https://kaia.blockpi.network/v1/rpc/public',
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

RPC endpoint configuration inconsistency detected across packages

The new RPC endpoint 'https://kaia.blockpi.network/v1/rpc/public' is used inconsistently across the packages:

  • In widget and synapse-constants: Used as primary with different fallbacks
  • In synapse-interface: Used as primary with a different fallback URL
  • In rest-api: Used as fallback instead of primary

This inconsistency in RPC configuration across packages could lead to reliability issues and unpredictable behavior.

🔗 Analysis chain

Verify the availability and reliability of the new RPC endpoint

The primary RPC URL for KLAYTN chain has been updated. Let's verify the endpoint's availability and ensure consistent updates across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new RPC endpoint and check for consistency across files

# Test: Check if the new RPC endpoint is used consistently
echo "Checking for consistency of RPC URL updates..."
rg -l "kaia.blockpi.network/v1/rpc/public"

# Test: Check if there are any remaining references to the old URL
echo "Checking for any remaining old URL references..."
rg -l "klaytn.blockpi.network/v1/rpc/public"

Length of output: 492


Script:

#!/bin/bash
# Let's check the actual RPC URL configurations in these files
echo "=== Checking RPC configuration in widget/src/constants/chains.ts ==="
rg -A 2 "kaia.blockpi.network/v1/rpc/public" "packages/widget/src/constants/chains.ts"

echo -e "\n=== Checking RPC configuration in synapse-interface/constants/chains/master.tsx ==="
rg -A 2 "kaia.blockpi.network/v1/rpc/public" "packages/synapse-interface/constants/chains/master.tsx"

echo -e "\n=== Checking RPC configuration in synapse-constants/src/constants/chains/master.ts ==="
rg -A 2 "kaia.blockpi.network/v1/rpc/public" "packages/synapse-constants/src/constants/chains/master.ts"

echo -e "\n=== Checking RPC configuration in rest-api/src/constants/chains.ts ==="
rg -A 2 "kaia.blockpi.network/v1/rpc/public" "packages/rest-api/src/constants/chains.ts"

Length of output: 1540

Copy link

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3f55d7b
Status: ✅  Deploy successful!
Preview URL: https://b313cf12.sanguine-fe.pages.dev
Branch Preview URL: https://fix-fe-klaytn-rpc.sanguine-fe.pages.dev

View logs

Copy link

codecov bot commented Dec 2, 2024

Bundle Report

Changes will increase total bundle size by 358.26kB (1.1%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
synapse-interface-client-array-push 7.41MB 16 bytes (-0.0%) ⬇️
synapse-interface-server-cjs 1.66MB 13 bytes (-0.0%) ⬇️
widget-esm-cjs 276.08kB 2.78kB (1.02%) ⬆️
@synapsecns/synapse-constants-cjs-esm 177.53kB 177.53kB (100%) ⬆️
@synapsecns/synapse-constants-esm-cjs 177.99kB 177.99kB (100%) ⬆️

@ChiTimesChi ChiTimesChi merged commit 590594a into master Dec 2, 2024
35 of 37 checks passed
@ChiTimesChi ChiTimesChi deleted the fix/fe-klaytn-rpc branch December 2, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants