Skip to content

fix(actuator): remove acurator whitelist#67

Open
317787106 wants to merge 5 commits intodevelopfrom
feature/remove_acurator_whitelist
Open

fix(actuator): remove acurator whitelist#67
317787106 wants to merge 5 commits intodevelopfrom
feature/remove_acurator_whitelist

Conversation

@317787106
Copy link
Copy Markdown
Owner

@317787106 317787106 commented Apr 9, 2026

What does this PR do?

Removes the actuator.whitelist configuration and all related code. All actuator types are now unconditionally registered and executed on every node. Nodes with the old config key in config.conf are unaffected — it is silently ignored after upgrade.

Why are these changes required?

actuator.whitelist was designed for private-chain scenarios and is fundamentally incompatible with public-chain consensus. A node configured with a non-empty whitelist skips registering excluded actuator types at startup. When the network produces a block containing those transaction types, the configured node fails to execute them, its world state diverges from the network, and it forms a private fork. Removing this configuration eliminates the risk of consensus breakage caused by misconfiguration.

This PR has been tested by:

  • Unit Tests: TransactionRegisterTest, ParameterTest — all pass
  • Checkstyle: checkstyleMain, checkstyleTest — no violations

Follow up

None.

Extra details

TransactionRegister.registerActuator() was already updated in a prior PR to register all actuators unconditionally. This PR completes that cleanup by removing the whitelist enforcement that remained in the execution path (TransactionFactory, RuntimeImpl) and the associated config infrastructure (CommonParameter, Args, ConfigKey).


Summary by cubic

Remove actuator.whitelist and all related checks so every actuator is always registered and executed on all nodes. This prevents consensus splits from misconfiguration; the old key is ignored after upgrade.

  • Refactors

    • Removed actuator.whitelist config and parsing in Args, ConfigKey, and CommonParameter.
    • Deleted whitelist enforcement in TransactionFactory and RuntimeImpl (VM actuator).
    • Simplified AbstractActuator with Lombok @Getter and dropped redundant getters.
    • Made TransactionFactory maps final and removed unused accessors; updated tests.
  • Migration

    • No action required. You may delete actuator.whitelist from config.conf; it is ignored.

Written for commit a87cb0b. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor
    • Streamlined internal code structure and improved immutability of core components through structural optimization and removal of redundant APIs.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7b1bcc22-043e-4f3c-8c35-49c6f7fd917c

📥 Commits

Reviewing files that changed from the base of the PR and between 1ae9bb3 and a87cb0b.

📒 Files selected for processing (8)
  • actuator/src/main/java/org/tron/core/actuator/AbstractActuator.java
  • chainbase/src/main/java/org/tron/core/actuator/TransactionFactory.java
  • common/src/main/java/org/tron/common/parameter/CommonParameter.java
  • framework/src/main/java/org/tron/common/runtime/RuntimeImpl.java
  • framework/src/main/java/org/tron/core/config/args/Args.java
  • framework/src/main/java/org/tron/core/config/args/ConfigKey.java
  • framework/src/test/java/org/tron/common/ParameterTest.java
  • framework/src/test/java/org/tron/core/utils/TransactionRegisterTest.java
💤 Files with no reviewable changes (6)
  • framework/src/test/java/org/tron/core/utils/TransactionRegisterTest.java
  • framework/src/main/java/org/tron/core/config/args/Args.java
  • framework/src/main/java/org/tron/core/config/args/ConfigKey.java
  • framework/src/main/java/org/tron/common/runtime/RuntimeImpl.java
  • common/src/main/java/org/tron/common/parameter/CommonParameter.java
  • framework/src/test/java/org/tron/common/ParameterTest.java

📝 Walkthrough

Walkthrough

This PR removes the actuator whitelist feature across the codebase, including configuration fields, runtime validation checks, and filtering logic. It refactors AbstractActuator to use Lombok-generated getters, restricts TransactionFactory map accessibility by making fields final and removing public accessors, and eliminates related configuration initialization and test setup.

Changes

Cohort / File(s) Summary
Getter Refactoring
actuator/src/main/java/org/tron/core/actuator/AbstractActuator.java
Replaced explicit getter methods with Lombok-generated ones for any, chainBaseManager, contract, and tx fields. Fluent setters remain unchanged.
Registry Cleanup
chainbase/src/main/java/org/tron/core/actuator/TransactionFactory.java
Removed actuator whitelist pre-registration filtering, made actuatorMap and contractMap final, and removed public accessor methods getActuatorMap() and getContractMap(). Direct map access no longer available externally.
Configuration Removal
common/src/main/java/org/tron/common/parameter/CommonParameter.java, framework/src/main/java/org/tron/core/config/args/ConfigKey.java, framework/src/main/java/org/tron/core/config/args/Args.java
Deleted actuatorSet field from CommonParameter, removed ACTUATOR_WHITELIST config constant, and eliminated related initialization logic in Args.applyConfigParams().
Runtime Validation Removal
framework/src/main/java/org/tron/common/runtime/RuntimeImpl.java
Removed pre-execution whitelist validation for TriggerSmartContract and CreateSmartContract contract types; direct VMActuator instantiation now proceeds without actuator-set existence checks.
Test Updates
framework/src/test/java/org/tron/common/ParameterTest.java, framework/src/test/java/org/tron/core/utils/TransactionRegisterTest.java
Removed actuator set initialization and related assertions in parameter tests; simplified test setup by removing global actuator set configuration.

Possibly related issues

  • [Feature] #66: This PR fully implements the removal of the actuator whitelist feature, eliminating the CommonParameter.actuatorSet field, TransactionFactory filtering logic, and runtime actuator validation checks that were proposed in the feature request.

Poem

🐰 The whitelist fades like morning dew,
No more filtering what's true,
Lombok's getters dance and play,
Cleaner code to light the way!
✨🎉


🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The pull request title contains a typo: 'acurator' instead of 'actuator', making it appear unprofessional and potentially confusing despite the PR objectives clearly describing the change. Correct the typo in the title from 'fix(actuator): remove acurator whitelist' to 'fix(actuator): remove actuator whitelist' for accuracy and clarity.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/remove_acurator_whitelist

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 8 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant