Skip to content

refactor(config): add a detailed comments structure to config.conf file#6612

Open
FrancescoDiMuro wants to merge 30 commits intotronprotocol:developfrom
FrancescoDiMuro:feature/config-file-refactoring
Open

refactor(config): add a detailed comments structure to config.conf file#6612
FrancescoDiMuro wants to merge 30 commits intotronprotocol:developfrom
FrancescoDiMuro:feature/config-file-refactoring

Conversation

@FrancescoDiMuro
Copy link
Copy Markdown

What does this PR do?
This PR introduces a detailed and standardized commenting convention for the config.conf file.
It uses Visual Studio Code’s Better Comments extension to visually distinguish between different types of comments, improving readability and maintainability.

Why are these changes required?
The configuration file previously lacked explanations and a consistent structure for comments, making it harder to quickly identify critical notes versus general documentation.
By introducing categorized comment prefixes (!, *, ?), developers can more efficiently scan the file, understand the purpose of each section, and identify important warnings or references at a glance.

This PR has been tested by: myself

  • Unit Tests
  • Manual Testing

Follow up

  • Ensure team-wide adoption of the commenting convention
  • Optionally document the convention in the project README or contribution guidelines
  • Eventually adjust explanations for some sections / parameters

Extra details

  • ! → Important comments (warnings / required attention, always followed by “Please note”)
  • * → Informational comments (context, no action required)
  • ? → Reference comments (links, documentation, additional resources)

@FrancescoDiMuro FrancescoDiMuro changed the title feature/config-file-refactoring_into_ feature/config-file-refactoring_into_develop Mar 30, 2026
@FrancescoDiMuro FrancescoDiMuro changed the title feature/config-file-refactoring_into_develop Refactor: add a detailed comments structure to config.conf file Mar 30, 2026
@lvs0075
Copy link
Copy Markdown
Collaborator

lvs0075 commented Mar 31, 2026

Recommendation: This PR should be split into two separate PRs

  1. Documentation-only PR — adds comments exclusively, changes no runtime values, and removes the editor-extension dependency.
  2. Config adjustment PR (if warranted) — addresses each parameter change individually with clear justification, reviewed by maintainers on its own merits.

@FrancescoDiMuro
Copy link
Copy Markdown
Author

Recommendation: This PR should be split into two separate PRs

  1. Documentation-only PR — adds comments exclusively, changes no runtime values, and removes the editor-extension dependency.
  2. Config adjustment PR (if warranted) — addresses each parameter change individually with clear justification, reviewed by maintainers on its own merits.

Thank you for the feedback.
For the first point, I would just explain the concept better by saying that to have a better visualization of the file structure is suggested to have such extension.
What do you think?

To avoid creating a new PR, what do you think if I just restore the original config.conf's original values?
And in this case, I would even remove those that I added and tested.

Thank you again.

@simbadMarino
Copy link
Copy Markdown

simbadMarino commented Mar 31, 2026

I strongly support this PR, having such detailed documentation directly in the config file will significantly improve developer experience while deploying a TRON node (we have received several inquiries around the config file in the past from dev community in telegram).
I agree with @lvs0075, I would recommend to keep this PR as documentation improvement ONLY and avoid changing any config parameter values. I do not see a particular issue with the prefixes as long as we do not push developers into installing a particular editor dependency.

I would recommend to eventually create a similar PR in the Nile testnet repo as well.

Thanks for your support on drafting this PR @FrancescoDiMuro !

@lvs0075
Copy link
Copy Markdown
Collaborator

lvs0075 commented Apr 1, 2026

Recommendation: This PR should be split into two separate PRs

  1. Documentation-only PR — adds comments exclusively, changes no runtime values, and removes the editor-extension dependency.
  2. Config adjustment PR (if warranted) — addresses each parameter change individually with clear justification, reviewed by maintainers on its own merits.

Thank you for the feedback. For the first point, I would just explain the concept better by saying that to have a better visualization of the file structure is suggested to have such extension. What do you think?

To avoid creating a new PR, what do you think if I just restore the original config.conf's original values? And in this case, I would even remove those that I added and tested.

Thank you again.

Contributors using vim, emacs, IntelliJ, Sublime, and other editors, where those prefixes render as meaningless noise.
Of course, this does not seem to affect the user experience.

Yes, the original values in the configuration file should not be changed in this pull request; if changes are required, please submit a separate pull request.

@halibobo1205 halibobo1205 changed the title Refactor: add a detailed comments structure to config.conf file refactor(config): add a detailed comments structure to config.conf file Apr 7, 2026
Copy link
Copy Markdown
Collaborator

@halibobo1205 halibobo1205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! The intention to improve documentation is appreciated, but there are several issues that need to be addressed before this can move forward:

  1. If the goal is purely to improve documentation, the PR should only modify comments without changing any configuration values, structure, or removing existing configuration blocks. Currently, this PR silently changes several default values (e.g., net.type, connection.timeout, minConnections, vm.supportConstant, event.subscribe.version, etc.), removes the 27 mainnet genesis witnesses, empties the fastForward node list, and shifts committee parameters from mainnet to private-net defaults. These are runtime behavior changes, not documentation improvements.

  2. There are merge conflicts that need to be resolved. Please rebase or merge with the latest develop branch.

  3. Please address the above issues before continuing the review process. It is recommended to convert this PR to draft status until the changes are reworked to be comment-only modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants