Skip to content

fix(config): deprecate CLI params and add safety guardrails#11

Open
vividctrlalt wants to merge 1 commit intodevelopfrom
fix/pr6569-review-followup
Open

fix(config): deprecate CLI params and add safety guardrails#11
vividctrlalt wants to merge 1 commit intodevelopfrom
fix/pr6569-review-followup

Conversation

@vividctrlalt
Copy link
Owner

Summary

Follow-up to tronprotocol#6569 review feedback:

  • Deprecate 23 CLI parameters that can be replaced by config-file options, marking them with @Deprecated in CLIParameter and logging runtime warnings via reflection when used
  • Add max(3_000_000L, ...) guardrail for --max-energy-limit-for-constant CLI path, consistent with config-file validation (addresses @waynercheung's review)
  • Document seedNodes positional parameter behavior with comment explaining why isEmpty() is used instead of isAssigned(), plus deprecation warning

Retained CLI params (11)

-c, -d, --log-config, -h, -v, -w, -p, --witness-address, --password, --keystore-factory, --debug

Deprecated CLI params (23)

All storage, VM, network/thread, and misc runtime parameters — these should be configured via config file.

Test plan

  • ./gradlew compileJava — all modules compile successfully
  • ./gradlew :framework:test --tests "org.tron.core.config.args.*" — parameter tests pass
  • ./gradlew :framework:test — full framework tests pass

…rotocol#6569 review follow-up

- Mark 23 config-file-replaceable CLI parameters as @deprecated in CLIParameter
- Add runtime deprecation warning via reflection when deprecated CLI options are used
- Add max(3_000_000L, ...) guardrail for --max-energy-limit-for-constant CLI path,
  consistent with config-file validation (addresses waynercheung's review feedback)
- Document seedNodes positional parameter behavior and add deprecation warning
- Retain 11 essential CLI params: -c, -d, --log-config, -h, -v, -w, -p,
  --witness-address, --password, --keystore-factory, --debug
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