Skip to content

fix(config): fail startup on invalid DNS publish parameters - #7019

Merged
kuny0707 merged 4 commits into
tronprotocol:release_v4.8.3from
Little-Peony:hotfix/dns-publish-param-validation
Oct 12, 2026
Merged

kuny0707 merged 4 commits into
tronprotocol:release_v4.8.3from
Little-Peony:hotfix/dns-publish-param-validation

Conversation

@SeriousCoding789

Copy link
Copy Markdown
Contributor

What does this PR do?

With node.dns.publish = true, startup now fails with TronError(PARAMETER_INIT) when node.dns.changeThreshold is negative or node.dns.maxMergeSize is outside [1, 5], instead of only logging an error. A value of 0 still selects the default for both.

Why are these changes required?

The other DNS publish parameters already fail startup when they are invalid, for example an unsupported node.dns.serverType or an empty node.dns.dnsDomain. For these two, the node logged an error and started with the default value, so a mistyped value went unnoticed and the node published with settings the operator had not chosen.

This PR has been tested by:

  • Unit Tests: new ArgsTest cases. With publishing enabled, a negative changeThreshold or a maxMergeSize of 6 fails with PARAMETER_INIT; both cases fail without the Args change. With publishing disabled, the same values are ignored. ArgsTest and checkstyle pass.

Follow up

None.

Extra details

  • Behavior change from 4.8.2.3, for the release notes: a node with node.dns.publish = true and an invalid node.dns.changeThreshold or node.dns.maxMergeSize now fails to start; correcting or removing the value fixes it.
  • These parameters are only read when node.dns.publish = true, so nodes that do not publish DNS are not affected.
  • Split out of fix: harden start.sh #7003.

@kuny0707
kuny0707 merged commit 7ebc2eb into tronprotocol:release_v4.8.3 Oct 12, 2026
11 checks passed
@SeriousCoding789
SeriousCoding789 deleted the hotfix/dns-publish-param-validation branch October 13, 2026 01:49
Little-Peony added a commit to Little-Peony/java-tron that referenced this pull request Oct 13, 2026
* release_v4.8.3:
  feat(crypto): harden ECKey validation (tronprotocol#6996)
  fix(config): fail startup on invalid DNS publish parameters (tronprotocol#7019)
  fix(jsonrpc): normalize error responses and fatal handling (tronprotocol#6985)
  fix(jsonrpc): handle null parameters consistently (tronprotocol#6984)
  refactor(trie): remove unused RLP utilities (tronprotocol#6991)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants