Supports dynamic loading of more configurations

Open
#6,577 16 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java

Research direction

Start by tracing the existing dynamicConfig mechanism and how it applies node.active and node.passive. Then inspect the P2P, RPC/HTTP/gRPC, rate limiter, and metrics modules named in the scope. Done means the listed parameters reload without a restart, invalid values are rejected, existing sessions remain uninterrupted, and reloads are logged.

Written by the indexing model from the issue text.

Description

type:feature
Background

Java-Tron already supports dynamic loading of the node.active and node.passive configurations through dynamicConfig, allowing these parameters to be modified at runtime without restarting the node.

To further improve operational flexibility, we propose extending the dynamic loading capability to more configuration items, including network connection strategies, RPC / HTTP / gRPC parameters, JSON-RPC parameters, dynamic rate limiting, and node monitoring switches.

Rationale
Why should this feature exist?
  • Operators can adjust key parameters without restarting nodes, improving overall network stability and availability.
  • In testing environments or large-scale node deployments, operators could dynamically tune RPC concurrency, P2P connection strategies, and rate-limiting strategies flexibly.
  • It avoids service interruptions or temporary unavailability caused by frequent node restarts.
Use Cases
  • Temporarily adjusting node connection limits to handle network fluctuations.
  • Dynamically modifying RPC or HTTP parameters such as minimum effective connections or rate-limiting policies during high traffic periods.
  • Enabling or disabling metrics collection without stopping the node.
  • Quickly responding to operational needs or testing scenarios such as stress testing or traffic shaping.
Specification

The following configuration items are proposed to support dynamic loading.

Network / P2P Connection Strategy
  • node.maxConnections
  • node.minConnections
  • node.minActiveConnections
  • node.maxConnectionsWithSameIp
  • node.fastForward
  • node.isOpenFullTcpDisconnect
  • node.inactiveThreshold
  • node.unsolidifiedBlockCheck
  • node.maxUnsolidifiedBlocks
RPC / HTTP / gRPC Parameters
  • node.rpc.minEffectiveConnection
  • node.walletExtensionApi
  • node.disabledApi
JSON-RPC Parameters
  • node.jsonrpc.maxBlockRange
  • node.jsonrpc.maxSubTopics
  • node.jsonrpc.maxBlockFilterNum
Dynamic Rate Limiting
  • rate.limiter.http
  • rate.limiter.rpc
  • rate.limiter.global.qps
  • rate.limiter.global.ip.qps
Node Monitoring (Metrics / Logging)
  • node.metricsEnable
  • node.openPrintLog
Test Specification
  • Modify the configuration file and trigger dynamic reload to verify that the updated parameters take effect immediately without restarting the node.
  • Ensure that dynamic updates do not interrupt existing P2P connections or RPC sessions.
  • Verify that configuration change events are recorded in the logs.
  • Validate that invalid configuration values are properly rejected to ensure node stability.
Scope Of Impact
  • P2P module: connection limits, maximum connections per IP, fast-forward node lists.
  • RPC / HTTP / gRPC modules: minimum effective connections, extension API switches.
  • Rate limiter module: QPS limits for HTTP / RPC / P2P components and global QPS.
  • Metrics module: node monitoring switch.
  • Operations and testing environments: configuration changes can be applied without restarting the node.
Implementation
  • The implementation could extend the existing dynamicConfig mechanism by adding logic to monitor and apply additional configuration parameters.
  • Each time the configuration file is read, validate new values and atomically update the corresponding module parameters.
  • Implement refresh methods for different modules, such as P2P, RPC, RateLimiter, and Metrics.
  • Log every dynamic reload event to facilitate tracking and auditing.
Dominant language
Java
Stars
4.2k
Forks
1.8k
Avg merge
3d 4h
Merged PRs (30d)
51

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tronprotocol/java-tron

All issues in tronprotocol/java-tron

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.