Skip to content

feat(config): sync all config files with java-tron upstream#117

Closed
warku123 wants to merge 1 commit intotronprotocol:mainfrom
warku123:feat/sync-config-structure
Closed

feat(config): sync all config files with java-tron upstream#117
warku123 wants to merge 1 commit intotronprotocol:mainfrom
warku123:feat/sync-config-structure

Conversation

@warku123
Copy link
Copy Markdown

@warku123 warku123 commented Apr 9, 2026

What does this PR do?

Synchronizes all 5 tron-docker config files with the latest java-tron upstream config structure (framework/src/main/resources/config.conf), and fixes JDK 17 incompatible JVM arguments in private_net/docker-compose.yml.

Why are these changes required?

The tron-docker config files had drifted significantly from java-tron's upstream config. New fields and sections introduced in recent releases (including v4.8.1) were missing, while deprecated fields were still present. This causes confusion for node operators and may lead to unexpected behavior.

This PR also lays the groundwork for a follow-up automated config drift detection — by first bringing all config files to a known-good baseline aligned with upstream, a future GitHub Action can periodically diff against java-tron's config and open an issue when structural drift is detected.

Key structural changes (all 5 config files):

  • Add missing sections: net {}, node.metrics.influxdb {}, rate.limiter.p2p {}
  • Add new fields: storage.dbSettings.maxOpenFiles, node.jsonrpc.maxBlockFilterNum, event.subscribe.enable, trx.reference.block, txCache.initOptimization, rate.limiter.global.qps
  • Remove deprecated fields: storage.index.directory, storage.backup {}, node.tcpNettyWorkThreadNum, node.udpNettyWorkThreadNum
  • Add ~30 committee proposal switches as inline comments for operator reference
  • Update mainnet seed nodes to match v4.8.1 (last upstream update: 2026-02-04)

JVM fix (docker-compose.yml):

  • Replace -XX:+UseConcMarkSweepGC (removed in JDK 14) — JDK 17 defaults to G1GC
  • Replace deprecated -Xloggc with -Xlog:gc (unified logging framework, JDK 9+)

This PR has been tested by:

  • Manual Testing: private net launched via docker-compose up, witness node produced blocks and full node synced successfully
  • All config files parsed without HOCON syntax errors

Follow up

In future, can add a GitHub Action for automatic config structure drift detection between tronprotocol/java-tron upstream and tron-docker, triggering an issue when structural changes are detected.

Extra details

Network-specific values are preserved per config file:

  • mainnet: p2p.version = 11111, mainnet genesis block and seed nodes
  • Nile testnet: p2p.version = 201910292, Nile genesis block and seed nodes
  • Private net: p2p.version = 1, test accounts (TestA–E), witness private keys

Align all 5 tron-docker config files with java-tron's latest config.conf
structure. This ensures tron-docker stays consistent with upstream and
reduces config drift.

Changes:
- Add missing sections: net {}, node.metrics.influxdb {}, rate.limiter.p2p {}
- Add new fields: storage.dbSettings.maxOpenFiles, node.jsonrpc.maxBlockFilterNum,
  event.subscribe.enable, trx.reference.block, txCache.initOptimization, etc.
- Remove deprecated fields: storage.index.directory, storage.backup {},
  node.tcpNettyWorkThreadNum, node.udpNettyWorkThreadNum
- Add ~30 committee proposal switches as commented reference
- Activate previously commented fields: node.rpc.reflectionService,
  node.disabledApi, rate.limiter.global.qps/ip.qps
- Fix docker-compose.yml JVM args for JDK 17 compatibility:
  replace removed -XX:+UseConcMarkSweepGC and deprecated -Xloggc
  with -Xlog:gc

Validated: private net witness1 produces blocks, node1 syncs successfully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@warku123 warku123 closed this Apr 14, 2026
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.

1 participant