Skip to content

fix: docs/config templates upstream - #219

Open
SeriousCoding789 wants to merge 5 commits into
tronprotocol:developfrom
SeriousCoding789:docs/config-templates-upstream
Open

fix: docs/config templates upstream#219
SeriousCoding789 wants to merge 5 commits into
tronprotocol:developfrom
SeriousCoding789:docs/config-templates-upstream

Conversation

@SeriousCoding789

Copy link
Copy Markdown

What does this PR do?
The mainnet and Nile HOCON templates at the repository root are mirrors of files owned by java-tron and nile-testnet. Describe those upstream files as the place to get them, and drop the promise that this repo keeps copies at its root, so the mirrors can be removed.

  • stop presenting the mainnet and Nile templates as repo files
  • drop the mainnet and Nile symlinks

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@SeriousCoding789
SeriousCoding789 force-pushed the docs/config-templates-upstream branch from 756aecb to 2b9c198 Compare August 20, 2026 05:38
…files

The mainnet and Nile HOCON templates at the repository root are mirrors of
files owned by java-tron and nile-testnet. Describe those upstream files as
the place to get them, and drop the promise that this repo keeps copies at
its root, so the mirrors can be removed.

The rendering path is unaffected: the templates the CLI renders from are the
embedded copies under internal/render/templates, which stay.

- README.md: rewrite the heads-up, the workflow table, the template-user
  note and the Configuration Templates section
- Makefile: sync-templates now fetches straight into the embedded template
  dir instead of writing a root copy first
- cmd/apply.go, cmd/network/create.go: probe the on-disk template dir with
  private_net_config.conf, which is maintained here, instead of
  main_net_config.conf
templates/ held symlinks into the root copies of the mainnet and Nile
configs. Those root copies are going away, which would leave the links
dangling and make the directory probe in apply and network create reject
the whole directory. Remove the two links; private_net_config.conf still
points at the copy maintained here.

Rendering is unaffected: mainnet and Nile now resolve to the embedded
templates under internal/render/templates.
main_net_config.conf and test_net_config.conf were copies of files owned by
java-tron and nile-testnet. Take them out of the repository root; the
templates the CLI renders from are the embedded copies under
internal/render/templates, which keep their names and are refreshed from
upstream by `make sync-templates`.

private_net_config.conf is unaffected — it has no upstream and is still
maintained here, at the root and through the templates/ symlink.

- delete main_net_config.conf, test_net_config.conf
- internal/render/hocon.go: note where the templates now live
- README.md: keep the historical template name in the workflow table
findTemplatesDir keyed off one hardcoded filename, so a directory that
carried only the other networks' templates was rejected outright and the
override silently fell back to the embedded copies. Walk the known
templates instead and accept the directory as soon as one of them is
there.

Both copies of the helper, in apply and in network create, had the same
check.
@SeriousCoding789
SeriousCoding789 force-pushed the docs/config-templates-upstream branch from 2b9c198 to d0d6a27 Compare August 20, 2026 07:17
Comment thread cmd/apply.go Outdated
Comment thread README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants