Skip to content

Add WorkerModules pallet. - #1964

Open
Neopallium wants to merge 40 commits into
developfrom
add_worker_modules_pallet
Open

Neopallium wants to merge 40 commits into
developfrom
add_worker_modules_pallet

Conversation

@Neopallium

@Neopallium Neopallium commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Adds the WorkerModules pallet, which stores worker protocol module code, context and
config on-chain so the Polymesh Worker can load and upgrade protocol modules without a node
release. Also adds a develop-only WorkerTesting pallet used to exercise that upgrade path
from the integration tests.

changelog

new features

  • New WorkerModules pallet (index 60, all runtimes): root-managed on-chain storage of worker protocol module code, context and config.
  • The worker loads protocol modules from chain state; ProtocolConfigHash selects the active config, so protocols can be upgraded without a node release.
  • Chains with no uploaded config keep using the built-in (static) DART modules.
  • Module code may be zstd-compressed. Limits: 2 MiB code, 2 MiB context, 8 modules per config.
  • Backend module version 2 (SCALE-encoded code/context), with version 1 kept for v8.0.x - v8.1.x nodes.
  • New WorkerTesting pallet (index 200, develop runtime only) for testing protocol module upgrades.
  • Build-time selection of host functions: host_workers (default), host_curves, no_host_fns.
  • Deterministic containerised module builds via worker/rebuild.sh, with the artifacts committed under worker/modules/.
  • worker-tools gains compress, build-release-config, export-config-json and check-release-config.

new external API

  • WorkerModules.register_protocol (root).
  • WorkerModules.upload_protocol_module_code (root).
  • WorkerModules.upload_protocol_module_context (root).
  • WorkerModules.upload_protocol_module_config (root).
  • WorkerTesting.test_version, set_protocol_version, set_enable_work_session, submit_work_request (develop runtime only).

new events

  • WorkerModules.ProtocolRegistered.
  • WorkerModules.ProtocolModuleCodeUploaded.
  • WorkerModules.ProtocolModuleContextUploaded.
  • WorkerModules.ProtocolModuleConfigUploaded.
  • WorkerTesting.TestingProtocolTask (develop runtime only).

other

  • Fix mediator affirmations being processed after sender/receiver in ConfidentialAssets instant settlements.
  • Isolate the dart-v0 protocol from the workspace so it can be built with its pinned older compiler.
  • New CI job check-worker-modules verifies the committed DART module artifacts are reproducible.
  • New worker_testing integration test covering the upload/activate/upgrade cycle.

@Neopallium Neopallium changed the title Add WorkerModules pallet. [WIP] Add WorkerModules pallet. Jun 23, 2026
@Neopallium
Neopallium force-pushed the add_worker_modules_pallet branch 2 times, most recently from 9f947c3 to 14a3a00 Compare September 2, 2026 16:05
@Neopallium
Neopallium force-pushed the add_worker_modules_pallet branch 3 times, most recently from 3e8896e to caff7cb Compare September 15, 2026 18:15
@socket-security

socket-security Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​wasmtime@​43.0.2 ⏵ 48.0.269 -710093100100
Addedcargo/​log@​0.4.2910010093100100
Addedcargo/​picoalloc@​5.2.010010098100100

View full report

@socket-security

socket-security Bot commented Sep 15, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@Neopallium
Neopallium changed the base branch from develop to update_rust_compiler September 15, 2026 18:20
Base automatically changed from update_rust_compiler to develop September 16, 2026 10:59
@Neopallium
Neopallium force-pushed the add_worker_modules_pallet branch from caff7cb to 237397a Compare September 16, 2026 12:28
@Neopallium
Neopallium force-pushed the add_worker_modules_pallet branch from 4f19b4d to 7d0adc0 Compare September 16, 2026 20:51
@Neopallium Neopallium changed the title [WIP] Add WorkerModules pallet. Add WorkerModules pallet. Sep 18, 2026
@Neopallium
Neopallium marked this pull request as ready for review September 18, 2026 11:49
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