feat(framework): remove --keystore-factory support from FullNode - #6978
Open
0xbigapple wants to merge 6 commits into
Open
0xbigapple wants to merge 6 commits into
0xbigapple wants to merge 6 commits into
Conversation
- delete KeystoreFactory and its parameter plumbing; keep the flag as a tombstone that exits 1 with a Toolkit migration hint - update plugins/README.md keystore migration notes
- detect the flag via isAssigned so a repeated flag cannot bypass the exit - replace raw exit(1) with TronError(PARAMETER_INIT) so the shutdown is logged - reword the SM2 hint: --sm2 applies to commands that create or modify a keystore - note on the tombstone parameter why the declaration must stay - ArgsTest: assert TronError, add repeated-flag case, class-level @after clearParam
Its last callers were deleted with the --keystore-factory REPL; Toolkit implements its own password confirmation.
- drop the flag name from the witness keystore recovery tip - test the tombstone against an invalid config path
0xbigapple
requested review from
lxcmyf and
waynercheung
and removed request for
xxo1shine
September 17, 2026 07:23
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?
close #6949
Removes the deprecated
--keystore-factoryCLI fromFullNode.jar. Keystore management moved toToolkit.jar keystore <new|import|list|update>in GreatVoyage-v4.8.2 (#6637); this PR deletes the legacy shim left behind:KeystoreFactoryand its dispatch branch inFullNode.mainCommonParameter.keystoreFactoryfield and theArgsparameter plumbingKeystoreFactoryDeprecationTest(its subject is gone)The option stays declared in
CLIParameteras a tombstone: passing it now exits with status 1 and prints the Toolkit replacement, including an--sm2note for SM2 nodes — the legacy mode followedcrypto.engine, while the Toolkit commands default to ECDSA. Undeclaring the option instead would let JCommander parse the flag as a positional seed-node address and fail with a misleading error.Why are these changes required?
FullNode.jaris the node binary; it should not ship an interactive key-management REPL that reads private keys and passwords from stdin now thatToolkit.jar keystoreis the supported implementation of the same operations. Two implementations drift. Deprecation shipped in GreatVoyage-v4.8.2, giving one full release of warning before removal.This PR has been tested by:
ArgsTestupdated to stop passing the flag; keystore library tests (org.tron.keystore, 60 tests) unchanged and passingFullNode.jar --keystore-factory→ exit 1, stderr names the Toolkit replacementFullNode.jar --keystore-factory --help→ exit 0, prints normal help;--helpno longer lists the flaglocalwitnesskeystore+--passwordloads the keystore and produces blocks — the witness keystore startup path is unaffectedFollow up
Extra details
Breaking change:
java -jar FullNode.jar --keystore-factorystops working. Keystore file format and existing keystores are unaffected. The publicKeystoreFactoryclass and theCommonParameter.keystoreFactoryLombok accessors are removed with it — internal API, source-level breakage only for out-of-tree code compiling against these modules.WalletUtils.inputPassword2Twice()is removed as well: its last callers were the REPL'sGenKeystore/ImportPrivateKeycommands, and the Toolkit keystore commands implement their own password confirmation.Behavior change worth a release note: the legacy REPL read from plain stdin, so a private key could be piped in (
printf ... | java -jar FullNode.jar --keystore-factory) without ever being written to disk. Toolkitkeystore importdoes not read stdin, and--key-fileaccepts only a regular file (symlinks and FIFOs are rejected by design), so non-interactive imports now require the plaintext key in a file on disk. Create it with restrictive permissions and delete it immediately after the import: