Repository navigation
Conversation
Invalid node.dns.changeThreshold and node.dns.maxMergeSize now fail startup with TronError(PARAMETER_INIT); add tests for both.
SeriousCoding789
requested review from
bladehan1,
halibobo1205 and
waynercheung
October 12, 2026 08:54
halibobo1205
approved these changes
Oct 12, 2026
317787106
approved these changes
Oct 12, 2026
bladehan1
approved these changes
Oct 12, 2026
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
With
node.dns.publish = true, startup now fails withTronError(PARAMETER_INIT)whennode.dns.changeThresholdis negative ornode.dns.maxMergeSizeis 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.serverTypeor an emptynode.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:
ArgsTestcases. With publishing enabled, a negativechangeThresholdor amaxMergeSizeof 6 fails withPARAMETER_INIT; both cases fail without theArgschange. With publishing disabled, the same values are ignored.ArgsTestand checkstyle pass.Follow up
None.
Extra details
node.dns.publish = trueand an invalidnode.dns.changeThresholdornode.dns.maxMergeSizenow fails to start; correcting or removing the value fixes it.node.dns.publish = true, so nodes that do not publish DNS are not affected.