Skip to content

Create Full Configuration File #6432

Closed

Description

@317787106

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

  1. Full-line comments must start with #.
  2. Inline comments can use either # or //.
  3. 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

Activity

  1. waynercheung commented on Aug 27, 2025

    @waynercheung
    Collaborator

    @317787106 Good work!

    But I have some questions:

    1. After modification, we can use this config.conf to start the FullNode, right?
    2. What's the differences between config.conf and main_net_config.conf? In the start.sh, there also exist config.conf and main_net_config.conf.
  2. moved this to In Progress in java-tronon Aug 27, 2025
  3. halibobo1205 commented on Aug 27, 2025

    @halibobo1205
    Collaborator
  4. linked a pull request that will close this issuefeat(config): fill whole config items #6430on Aug 27, 2025
  5. halibobo1205 commented on Aug 27, 2025

    @halibobo1205
    Collaborator

    Create a new file, such as config.conf.default, to serve as the Configuration File Template. Additionally, we should standardize the current mainnet configuration to ensure consistency and clarity.

  6. 317787106 commented on Aug 27, 2025

    @317787106
    CollaboratorAuthor

    Create a new file, such as config.conf.default, to serve as the Configuration File Template. Additionally, we should standardize the current mainnet configuration to ensure consistency and clarity.

    @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.

  7. Federico2014 commented on Aug 27, 2025

    @Federico2014
    Collaborator

    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.

  8. abn2357 commented on Aug 27, 2025

    @abn2357
    Contributor

    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?

  9. 317787106 commented on Aug 28, 2025

    @317787106
    CollaboratorAuthor

    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.

    @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.

  10. 317787106 commented on Aug 28, 2025

    @317787106
    CollaboratorAuthor

    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?

    @abn2357 Nile configuration has not been updated yet, we can discuss it further.

  11. bladehan1 commented on Aug 29, 2025

    @bladehan1
    Collaborator

    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.

  12. moved this from In Progress to Done in java-tronon Sep 1, 2025
  13. closed this as completedby moving to Done in java-tronon Sep 1, 2025
  14. changed the title [-]Create Configuration File Template[/-] [+]Create Full Configuration File[/+] on Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions