Skip to content

fix(event): reject incompatible event-plugin versions below 3.0.0#6760

Merged
lvs0075 merged 1 commit into
tronprotocol:release_v4.8.2from
halibobo1205:feat/fix_event_plugins
May 11, 2026
Merged

fix(event): reject incompatible event-plugin versions below 3.0.0#6760
lvs0075 merged 1 commit into
tronprotocol:release_v4.8.2from
halibobo1205:feat/fix_event_plugins

Conversation

@halibobo1205
Copy link
Copy Markdown
Collaborator

@halibobo1205 halibobo1205 commented May 11, 2026

What does this PR do?

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 it in a TronError(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, 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 without any indication that the event subscription is broken.

This PR has been tested by:

  • Unit Tests: Add a unit test covering accept/reject boundaries and empty/null versions.
  • Manual Testing

Follow up

@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.8.2 milestone May 11, 2026
@halibobo1205 halibobo1205 added the topic:event subscribe transaction trigger, block trigger, contract event, contract log label May 11, 2026
@halibobo1205 halibobo1205 force-pushed the feat/fix_event_plugins branch from 8dc3443 to 1ead96e Compare May 11, 2026 07:34
@halibobo1205 halibobo1205 changed the title fix(event): reject incompatible event-plugin versions below 2.0.0 fix(event): reject incompatible event-plugin versions below 3.0.0 May 11, 2026
@halibobo1205 halibobo1205 requested a review from lvs0075 May 11, 2026 07:35
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.
@halibobo1205 halibobo1205 force-pushed the feat/fix_event_plugins branch from 1ead96e to d371a52 Compare May 11, 2026 07:57
Copy link
Copy Markdown
Collaborator

@waynercheung waynercheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lvs0075 lvs0075 merged commit 9d28fa7 into tronprotocol:release_v4.8.2 May 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:event subscribe transaction trigger, block trigger, contract event, contract log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants