Repository navigation
Design of a Secure IPC and JSON-RPC Based Administration Framework for FullNode #6497
Description
Activity
@317787106
I don't quite understand. What configuration parameters support dynamic modification?@lxcmyf There is a configuration item:
node.dynamicConfig.enable. It allows change active nodes dynamically.This solution does not depend on existing JSON-RPC interface definitions
What does it mean?
You mentioned that you will add a new
AdminRpcHttpService. Does it include the functions that have already been implemented by the existing JSON-RPC API?dynamic modification: such as
vm.minTimeRatio,vm.maxTimeRatio,rate.limiter,jsonrpc.maxBlockRange,jsonrpc.maxSubTopics,openHistoryQueryWhenLiteFN, api service, prometheus, and so on.@waynercheung Yes, there will be a new AdminRpcHttpService with independent port. It doesn't include existing eth-compattible JSON-RPC API.
@317787106 I have two questions regarding the admin API:
-
What specific functions/capabilities will the admin API provide?
-
How do the HTTP-based JSON-RPC and IPC approaches differ in their implementation of the admin API? Is the IPC approach dependent on the HTTP-based JSON-RPC service?
-
@waynercheung Two functions are planned initially: peer management and runtime parameter queries. Additional functions can be added as needed.
IPC and HTTP-based JSON-RPC are independent of each other and have separate enable/disable switches. IPC access is restricted to the local machine (similar to the
geth console), while the JSON-RPC service can be configured to be accessible from the local host only, the local network (LAN), or an open network.dynamic modification: such as
vm.minTimeRatio,vm.maxTimeRatio,rate.limiter,jsonrpc.maxBlockRange,jsonrpc.maxSubTopics,openHistoryQueryWhenLiteFN, api service, prometheus, and so on.@halibobo1205 @waynercheung These are optional choices.
Is the underlying implementation logic of the jsonrpc admin interface shared with the IPC method?
Is the underlying implementation logic of the jsonrpc admin interface shared with the IPC method?
@waynercheung Yes, they share the same implementation.
Placing the
.sockfile under/runor a dedicated data directory is more secure, because putting a Unix server socket in/tmpis effectively equivalent to exposing a local high-privilege control interface in a public space that is world-writable, preemptable, and susceptible to hijacking, which introduces real hijacking attack risks.@317787106
Hi, any progress here? Has anything been implemented yet (PR or prototype)? Would love to follow along.@lxcmyf Draft is ready. I would like to share it some days later.
@317787106 @liuyifei001 Hi, is there any update for this issue?
@lxcmyf @waynercheung Sorry for the long wait. The core architecture of this feature is already functionally in place. However, given the priority on maintaining network stability and allowing more time to gather community feedback, this feature will not be included in the upcoming v4.8.2 release.
The framework is designed with a modular architecture to support future community-driven extensions. I’ll share a draft PR as soon as the initial version is organized, and we can review it together at that point. Once there is a concrete plan to include it in a specific future release, I’ll update the progress immediately. Thanks again for your patience!
@lxcmyf @waynercheung This feature will be included in next release, I will implement more design details later.
@317787106 Good. Looking forward to the code implementation.
@317787106 Good. Looking forward to the code implementation.
@waynercheung See it in this PR #6979.
- linked a pull request that will close this issuefeat(framework): support admin JSON-RPC over IPC and HTTP #6979
on Sep 18, 2026 - added a parent issue
on Sep 18, 2026
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsNo status
Background
After a FullNode is started, its runtime status must be continuously monitored in real time . Once an abnormal condition is detected, timely manual intervention should be possible, such as dynamically adjusting startup or runtime parameters. Currently, the system lacks an effective mechanism to interact with the node. In most abnormal scenarios, recovery can only be achieved by restarting the node, which inevitably interrupts the services provided by the FullNode and negatively impacts overall stability and availability.
Although the existing configuration file provides the
node.dynamicConfigcapability, its functionality is relatively limited, lacks extensibility, and provides no real-time feedback to users. As a result, it does not adequately meet operational and debugging requirements. To address these limitations, we designed and implemented a real-time interaction mechanism for FullNode based on a UNIX Server Socket combined with a JSON-RPC service bound only to the local network interface. This approach significantly improves system flexibility, operability, and issue-handling efficiency while maintaining strong security guarantees.Rationale
Why should this feature exist?
This solution enables real-time, bidirectional interaction with a FullNode, rather than being limited to passive reading of node status or information. It greatly improves troubleshooting and debugging efficiency, simplifies node management workflows, and supports rapid intervention in abnormal scenarios, ultimately ensuring the overall stability and availability of the service.
What are the use-cases?
Specification
Users can interact with the FullNode in two ways:
Both approaches share identical interface definitions, parameter validation, and execution logic, differing only in communication channels and security boundaries.
Assume the following JSON-RPC interface is defined in FullNode:
Approach 1: HTTP-based JSON-RPC Interaction
In this approach, a dedicated HTTP service and port are started to expose the AdminJsonRpc interface, referred to as AdminRpcHttpService. Users can interact with the node through standard HTTP POST requests, for example:
For security reasons, AdminRpcHttpService listens on localhost by default to prevent external exposure of administrative interfaces. If necessary, the listening address can be adjusted via configuration to allow access from LAN nodes or a wider network scope. This approach is suitable for automated operations, remote management, and integration with external systems.
The overall interaction flow is illustrated below:
Approach 2: Inter-Process Communication via UNIX Server Socket
The second approach uses a UNIX Server Socket to enable inter-process communication (IPC). When the FullNode starts, it creates a socket file named after the process ID under the
/tmpdirectory and starts anIpcServicebound to this socket. TheIpcServicelistens for incoming socket requests in a dedicated thread.On the same machine, users can bind to the socket file using FullNode.jar and start an
IpcClientprocess. Interaction with the IpcService is performed using commands such as:The IpcClient parses and validates the command-line input, resolves the corresponding JSON-RPC method, and converts it into a standard JSON-RPC request. The request is then sent to the
IpcServicethrough the UNIX socket, and the execution result is received and displayed.Upon receiving the request, the
IpcServicedelegates execution to the internal JSON-RPC Server and returns the result to theIpcClientthrough the same socket, which is then presented to the user. Functionally and in terms of output, this approach is fully equivalent to the HTTP-based approach.Key Characteristics
Test Specification
Scope Of Impact
Only the services module of the framework is affected.
Implementation
Do you have ideas regarding the implementation of this feature?
Yes.
Are you willing to implement this feature?
Yes. An example interaction between the IPC Client and IPC Service is shown below:
Backwards Compatibility
This solution does not depend on existing JSON-RPC interface definitions; therefore, it introduces no interface evolution or compatibility risks.
Starting from JDK 16, Java provides native support for Unix Domain Sockets. In JDK 1.8 environments, access to Unix Domain Sockets on Linux / Unix platforms can be achieved via the third-party library junixsocket. Since FullNode must currently support both JDK 1.8 and JDK 17 runtimes, junixsocket is used as the unified underlying communication mechanism to ensure consistent behavior and implementation stability.
In future versions, once compatibility with JDK 1.8 is no longer required, the implementation can be migrated to Java’s native Unix Domain Socket support. This will reduce third-party dependencies, further simplify the system architecture, and lower long-term maintenance costs.