-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/internal connect to archive node #13
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
Feature/internal connect to archive node #13
Conversation
WalkthroughThis pull request updates several configuration files and dependencies. Two chain configuration files have been updated: one with new API and RPC addresses and another with a minor formatting change. A new JSON configuration file for the MANTRA blockchain is introduced. The dependency versions in the package manager file are upgraded and a new packageManager field is added. In addition, the dashboard store now loads configurations from an extra internal directory based on specific hostname checks. Changes
Sequence Diagram(s)sequenceDiagram
participant DS as DashboardStore
participant IM as Import.meta.glob
participant Src as Source Aggregator
DS->>DS: Check if hostname includes ".int." or "localhost"
alt Hostname matches
DS->>IM: Load testnets configurations
DS->>IM: Load internals configurations
IM-->>DS: Return testnets files
IM-->>DS: Return internals files
else Hostname does not match
DS->>DS: Load mainnets configurations only
end
DS->>Src: Aggregate configurations from mainnets, testnets, internals
Src-->>DS: Configuration data ready
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
chains/internal/5_mantra-internal.json (1)
22-22: Consider updating logo to a more specific imageThe logo URL is using the same Dukong SVG as other configurations. If this is a different chain/network, consider using a more specific logo image.
src/stores/useDashboard.ts (1)
369-371: Consider DRY principle for repeated codeThis section has similar condition and code as in the
loadingFromLocalmethod but doesn't load the internal configurations. Consider updating this method to also load internal configurations for consistency.async loadLocalConfig(network: NetworkType) { const config: Record<string, ChainConfig> = {}; let testnets: Record<string, LocalConfig> = {}; + let internals: Record<string, LocalConfig> = {}; if (window.location.hostname.search('.int.') > -1 || window.location.hostname.search('localhost') > -1) { testnets = import.meta.glob('../../chains/testnet/*.json', { eager: true }); + internals = import.meta.glob('../../chains/internal/*.json', { eager: true }); } const mainnets: Record<string, LocalConfig> = import.meta.glob('../../chains/mainnet/*.json', { eager: true }); - const source = { ...mainnets, ...testnets }; + const source = { ...mainnets, ...testnets, ...internals }; Object.values<LocalConfig>(source).forEach((x: LocalConfig) => { config[x.chain_name] = fromLocal(x); }); return config; }package.json (1)
48-48: Review postcss Version Pinning.
The version for postcss has been updated to "8.4.31" and the caret symbol (^) has been removed compared to the previous version. Verify if pinning to an exact version was intentional; otherwise, consider using "^8.4.31" for more flexibility with patch updates.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (5)
chains/internal/2_mantra-dukong-internal.json(2 hunks)chains/internal/3_mantra-dukong-sandbox.json(1 hunks)chains/internal/5_mantra-internal.json(1 hunks)package.json(3 hunks)src/stores/useDashboard.ts(2 hunks)
🔇 Additional comments (11)
chains/internal/3_mantra-dukong-sandbox.json (1)
33-34: Adding EOL newline is a good practiceThe addition of a newline at the end of file follows best practices and is consistent with standard file formatting conventions.
chains/internal/5_mantra-internal.json (2)
1-33: New internal mainnet configuration looks goodThis new configuration file for MANTRA-1-Internal looks well-structured and follows the same pattern as other chain configuration files. The endpoints are using HTTPS which is good for security.
4-4: Verify chain type is correctThe configuration specifies
"type": "mainnet"which differs from the MANTRA-Dukong configurations that use"type": "testnet". Please confirm this is intentional.chains/internal/2_mantra-dukong-internal.json (2)
8-8: Domain change from .dev to .io for API endpointThe API endpoint is being updated from a development domain (.dev) to what appears to be a production domain (.io) with "archive" added to the URL. This update aligns with the PR objective of connecting to an archive node.
14-14: Domain change from .dev to .io for RPC endpointThe RPC endpoint is being updated from a development domain (.dev) to what appears to be a production domain (.io) with "archive" added to the URL. This is consistent with the API endpoint change above.
src/stores/useDashboard.ts (3)
350-350: Added variable to store internal configurationsThe new
internalsvariable allows the dashboard to store configurations from the internal directory, which is in line with the PR objectives.
353-353: Loading JSON files from internal directoryAdded functionality to load configuration files from the internal directory when running on internal environments or localhost. This change is necessary to support the new internal chain configurations.
357-357: Including internal configurations in the source objectThe source object now includes internal configurations alongside mainnet and testnet configurations, which ensures they're available for the dashboard.
package.json (3)
35-35: Updated Dependency Version for axios.
The axios version has been updated from "^1.3.2" to "^1.8.2". Please ensure that this update is thoroughly tested across your environments to confirm no API deprecations or breaking changes have surfaced.
82-82: Addition of packageManager Field.
A new field"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"has been added. This is a useful inclusion for ensuring consistent dependency management. Make sure that all contributors update their environment configurations accordingly.
54-54:Details
❓ Verification inconclusive
Major Version Upgrade for vue-i18n.
The vue-i18n package has been upgraded from "^9.2.2" to "11.1.2". As this is a major version update, ensure that any breaking changes or API modifications have been addressed in your localization implementation.
🌐 Web query:
What are the major breaking changes and API modifications introduced in vue-i18n version 11 compared to version 9?💡 Result:
Vue I18n v11 introduces several significant breaking changes compared to v9, focusing on modernization and alignment with Vue 3's Composition API. Here's a structured breakdown:
Key Breaking Changes
1. Deprecation of Legacy API Mode
- Reason: Originally introduced for Vue 2 compatibility, Legacy API mode is now deprecated in v11 and will be fully removed in v12[1][3][5]. Developers must migrate to the Composition API.
- Migration: Use the Composition API migration guide for code adjustments[1][5].
2. Removal of
v-tCustom Directive
- Reason: Performance optimizations provided by
v-t(Vue 2) became obsolete with Vue 3's Virtual DOM improvements. Developer experience issues, such as lack of editor autocompletion, also contributed[1][3][11].- Replacement: Use the
tor$tfunctions directly in templates. Theeslint-plugin-vue-i18nhelps detect deprecated usage[1][11].3. Dropping
tcand$tcMethods
- Reason: These pluralization methods were deprecated in v10 and fully removed in v11. The standard
tfunction now handles pluralization through modern message syntax[1][9].
Deprecated Features and Timelines
- Legacy API and
v-tremain functional in v11 but will be removed in v12[1][3].- Maintenance Status:
- Vue I18n v8 is end-of-life (EOL).
- v9 and v10 are in maintenance until July 2025[3][10].
- v11 becomes the recommended mainstream version[3][10].
Additional API Changes
VueI18nClass tocreateI18n: Introduced in v9, the class-based API was replaced by a function-based approach for better tree-shaking and Vue 3 compatibility[5][6].- Custom Formatters: Removed in v9 due to integration challenges with new compilers[5].
- Linked Message Syntax: Simplified by eliminating brackets for key references (e.g.,
@.upper:message.dio→@:message.dio)[5].
Migration Recommendations
- Adopt Composition API for future-proofing and improved reactivity[1][5].
- Refactor
v-tto usetor$twith linting tools[1][11].- Update Pluralization Logic to use the
tfunction with ICU-style messages[9].For detailed migration steps, refer to the official migration guide and use
eslint-plugin-vue-i18nfor automated checks[1][11].Citations:
- 1: https://vue-i18n.intlify.dev/guide/migration/breaking11
- 2: https://nextcloud.com/changelog/
- 3: https://github.com/intlify/vue-i18n/releases
- 4: https://kazupon.github.io/vue-i18n/api/
- 5: https://vue-i18n.intlify.dev/guide/migration/breaking
- 6: https://quasar.dev/start/upgrade-guide/
- 7: https://classic.yarnpkg.com/en/package/vue-i18n
- 8: https://www.tiny.cloud/docs/tinymce/latest/changelog/
- 9: https://vue-i18n.intlify.dev/guide/migration/breaking10
- 10: https://kazupon.github.io/vue-i18n/
- 11: https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-v-t
- 12: https://github.com/intlify/vue-i18n/blob/master/CHANGELOG.md
Action Required: Verify Migration for vue-i18n v11 Upgrade
The vue-i18n package upgrade from "^9.2.2" to "11.1.2" includes several breaking changes. Please review the following key points to ensure your localization implementation has been updated accordingly:
- Legacy API Deprecation: Verify that any reliance on the legacy API is removed in favor of the Composition API.
- Directive & Method Removals: Ensure you are not using the deprecated
v-tcustom directive or the removed pluralization methods (tcand$tc).- API Changes: Confirm that all usages align with the new API structure (e.g., using
createI18ninstead of the old class-based configuration).For further details, consult the official migration guide.
| "address": "https://rpc.archive.mantrachain.io" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the RPC endpoint is accessible
Ensure the new RPC endpoint is accessible and properly configured.
🏁 Script executed:
#!/bin/bash
# Check if the RPC endpoint responds with a 200 status code
curl -s -o /dev/null -w "%{http_code}" https://rpc.archive.mantrachain.io/statusLength of output: 86
RPC Endpoint Access Issue Detected
The verification indicates that the RPC endpoint (https://rpc.archive.mantrachain.io/status) returned an HTTP status code of 403 rather than the expected 200. This suggests that the endpoint may be misconfigured or access-restricted.
- Confirm if the endpoint requires specific authentication or has firewall/network rules blocking access.
- Investigate and adjust the endpoint's configuration to ensure it responds with a 200 status code when accessed.
| "address": "https://api.archive.mantrachain.io" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the archive node endpoints are accessible
Ensure the new API endpoint is accessible and properly configured.
🏁 Script executed:
#!/bin/bash
# Check if the API endpoint responds with a 200 status code
curl -s -o /dev/null -w "%{http_code}" https://api.archive.mantrachain.io/node_infoLength of output: 89
Action Required: Archive Node Endpoint Misconfiguration
The verification script indicates that the API endpoint at https://api.archive.mantrachain.io/node_info returns a 403 Forbidden status rather than the expected 200 response. This suggests that either additional authentication or configuration adjustments may be required for proper accessibility.
- Please confirm if the endpoint is intentionally secured (e.g., requiring authentication or IP whitelisting).
- Verify the server configuration to ensure that the endpoint allows access as needed.
- If authentication is intended, update the documentation and implementation to include the necessary credentials or headers.
Summary by CodeRabbit
New Features
Chores