Repository navigation
Create Full Configuration File #6432
Description
Background
The java-tron public blockchain has been running for many years. As its features continue to evolve, configuration items in the config file have also been constantly added or removed. For example, since the libp2p project was separated from java-tron, many configuration parameters have become invalid. It is therefore necessary to clean up the configuration items and provide a complete, unambiguous, and environment-independent configuration template file.
Rationale
Why should this feature exist?
To maintain a unified and complete configuration file, thereby optimizing the developer experience.
What are the use-cases?
- Provide a standard configuration template for developers.
- Avoid using outdated or invalid configuration items.
- Ensure consistency across different environments.
Specification
Publish a complete configuration template
Extract all available configuration parameters and place the mainnet configuration in framework/src/main/resources/config.conf. Any configuration items not included in this file will be considered invalid.
Mark invalid or deprecated configuration items
The following configuration items are invalid, including but not limited to:
| Configuration Item | Reason for Deprecation |
|---|---|
| actuator.whitelist | This parameter can cause forks and has been deprecated |
| storage.index.directory, storage.index.switch |
The APIs getTransactionsToThis and getTransactionsFromThis have been deprecated |
| storage.backup.* | Database backup functionality is no longer available |
| node.tcpNettyWorkThreadNum, node.udpNettyWorkThreadNum, node.connection.timeout |
These functions have been migrated to libp2p with fixed values |
| node.discovery.bind.ip, node.discovery.external.ip |
Functionality deprecated |
| node.maxActiveNodes, node.connectFactor, node.activeConnectFactor, node.disconnectNumberFactor, node.maxConnectNumberFactor |
Migrated to libp2p, replaced by node.minConnections, node.maxConnections, node.minActiveConnections |
| node.fullNodeAllowShieldedTransaction | Replaced by node.allowShieldedTransactionApi |
Update configuration rules
- Full-line comments must start with
#. - Inline comments can use either
#or//. - All parameters without default values must start with
#.
Improve parameter comments
Some parameter descriptions are currently inconsistent, incomplete, or logically incorrect, and need improvement. For example, storage.properties: currently, each database (not just a few) should allow a separate path to be specified.
Update configuration values
Some seed node IP lists (seed.node.ip.list) are continuously updated. Maintaining the latest version will help nodes start up faster.
Maintain a single configuration file
Currently, there are two config files: framework/src/main/resources/config.conf under source code of Java-Tron and tron-deployment project configs. Moving forward, the mainnet configuration will gradually transition to the develop branch of java-tron under framework/src/main/resources/config.conf.
Test Specification
Scope Of Impact
All FullNodes and Super Representatives (SRs) should refer to this modification to avoid unexpected behaviors.
Implementation
Do you have ideas regarding the implementation of this feature?
Yes
Are you willing to implement this feature?
Yes, refer to #6430
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
waynercheung commentedon Aug 27, 2025
@317787106 Good work!
But I have some questions:
halibobo1205 commentedon Aug 27, 2025
Perfect! Implementing this cleanup will help us avoid confusion and issues similar to these:
halibobo1205 commentedon Aug 27, 2025
Create a new file, such as
config.conf.default, to serve asthe Configuration File Template. Additionally, we should standardize the current mainnet configuration to ensure consistency and clarity.317787106 commentedon Aug 27, 2025
@halibobo1205 If add a new file and it has the same content as config.conf, It's reduant and hard to maintain. Standardize the current mainnet configuration is necessary and urgent.
Federico2014 commentedon Aug 27, 2025
Nice job. For completeness, I would suggest also updating or removing any related code when the corresponding configuration is deleted or deprecated, for example,
actuator.whitelist.abn2357 commentedon Aug 27, 2025
I noticed that the configuration file used in the README of the Nile testnet GitHub has a different source from that of the mainnet. It has adopted the configuration file under framework/src/main/resources/ and no longer uses that under repository of tron-deployment. Does this indicate that Nile has completed the work related to this issue? If not, can the configuration file for Nile be quickly completed based on this work?
317787106 commentedon Aug 28, 2025
@Federico2014 Thanks for your remind. Plan to remove unuseful code in another issue in next release, other unused code besides this will also be cleaned up.
317787106 commentedon Aug 28, 2025
@abn2357 Nile configuration has not been updated yet, we can discuss it further.
bladehan1 commentedon Aug 29, 2025
Should we centralize the configuration files of nile and shasta into the source code instead of tron-depolyment? Just like go-ethereum, it will be more user-friendly.
[-]Create Configuration File Template[/-][+]Create Full Configuration File[/+]