fix(event): reject incompatible event-plugin versions below 3.0.0#6760
Merged
lvs0075 merged 1 commit intoMay 11, 2026
Merged
Conversation
lvs0075
approved these changes
May 11, 2026
8dc3443 to
1ead96e
Compare
317787106
approved these changes
May 11, 2026
Pre-3.0.0(The previous event-plugin public release is 2.2.0) event-plugin builds still link against com.alibaba.fastjson, which was removed from java-tron in tronprotocol#6701. When such a plugin is loaded, the NoClassDefFoundError surfaces inside the plugin's own worker thread and is swallowed by its catch(Throwable) handler. The node keeps running while silently dropping every trigger, leaving operators with no signal that the event subscription is broken. Enforce a minimum Plugin-Version at startup in EventPluginLoader.startPlugin using pf4j's VersionManager (semver). When the descriptor version is below 3.0.0, log a clear upgrade hint and return false; the existing call chain in Manager.startEventSubscribing wraps that into TronError(EVENT_SUBSCRIBE_INIT) and aborts node startup instead of silently degrading.
1ead96e to
d371a52
Compare
lvs0075
approved these changes
May 11, 2026
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?
Enforce a minimum
Plugin-Versionat startup inEventPluginLoader.startPluginusingpf4j's VersionManager(semver). When the descriptor version is below3.0.0, log a clear upgrade hint and return false; the existing call chain inManager.startEventSubscribingwraps it in aTronError(EVENT_SUBSCRIBE_INIT)and aborts node startup instead of silently degrading.Why are these changes required?
Pre-3.0.0 event-plugin builds still link against
com.alibaba.fastjson, which was removed from java-tron in #6701. When such a plugin is loaded, theNoClassDefFoundErrorsurfaces inside the plugin's own worker thread and is swallowed by its catch(Throwable) handler. The node keeps running while silently dropping every trigger, leaving operators without any indication that the event subscription is broken.This PR has been tested by:
Follow up
Extra details