Skip to content

Kari server#45

Merged
jamesatomc merged 3 commits into
kanari-sdkfrom
kari-server
Jun 1, 2025
Merged

Kari server#45
jamesatomc merged 3 commits into
kanari-sdkfrom
kari-server

Conversation

@jamesatomc

Copy link
Copy Markdown
Member

This pull request introduces several updates and improvements to the Kanari SDK and its CLI tools, focusing on renaming and restructuring the network-related CLI commands, improving configuration management, and enhancing usability. The changes include renaming "network" commands to "environment" commands, dynamic handling of RPC endpoints, and centralizing configuration initialization. Below is a summary of the most important changes:

CLI Command Restructuring

  • Renamed network_cli module to env_cli and updated all related functions and commands from "network" to "environment" (e.g., handle_network_command to handle_env_command, list_networks to list_envs, etc.). This includes updating user-facing messages and examples. [1] [2] [3] [4] [5] [6] [7]

Dynamic RPC Endpoint Handling

  • Added a helper function get_rpc_endpoint to dynamically fetch the RPC endpoint from the active environment in the configuration. This replaces hardcoded RPC URLs in the keytool_cli module and improves flexibility. [1] [2] [3] [4] [5]

Configuration Management Improvements

  • Centralized the initialization of default configurations by introducing the init_default_config function, which simplifies the creation of kanari.yaml. This replaces redundant code in server_cli/init_server.rs. [1] [2]
  • Unified network configuration handling using the ensure_network_config function in server_cli/start_server.rs, improving error handling and backward compatibility with legacy configurations. [1] [2] [3]

Dependency Updates

  • Updated the reqwest dependency in Cargo.toml from version 0.12.15 to 0.12.18.

Version Increment

  • Incremented the SDK version in Cargo.toml from 0.1.2 to 0.1.3.

Summary

Summary about this PR

  • Closes #issue

- Commented out Axum and Tower HTTP dependencies in Cargo.toml.
- Replaced Axum-based HTTP server with jsonrpc-http-server for handling RPC requests.
- Removed Axum-specific routing and middleware configurations.
- Simplified the RPC server startup process and integrated health check endpoints.
- Updated the handling of pending transactions using a RwLock for thread-safe access.
- Enhanced transaction processing with dynamic gas fee calculation and improved error handling.
- Removed unused blockchain_display module and related functions.
- Streamlined the simulation module by consolidating transaction handling logic.
- Updated chain ID to an empty string for default initialization.
… node

- Updated main.rs to rename the "network" command to "env" and added handling for environment commands.
- Added comprehensive user guides in English and Thai for running Kanari blockchain nodes, covering installation, configuration, and troubleshooting.
- Removed outdated Running-Node-Guide.md in favor of the new guides.
- Refactored network configuration functions in mod.rs to streamline the setup process and improve code maintainability.
@netlify

netlify Bot commented Jun 1, 2025

Copy link
Copy Markdown

Deploy Preview for movekari canceled.

Name Link
🔨 Latest commit 4562b0a
🔍 Latest deploy log https://app.netlify.com/projects/movekari/deploys/683c42231a86fd0008b91e6a

@jamesatomc jamesatomc merged commit f3b727d into kanari-sdk Jun 1, 2025
15 of 16 checks passed
@netlify

netlify Bot commented Jun 1, 2025

Copy link
Copy Markdown

Deploy Preview for whitepaperkari canceled.

Name Link
🔨 Latest commit 4562b0a
🔍 Latest deploy log https://app.netlify.com/projects/whitepaperkari/deploys/683c42235c697c0008a1d6c5

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