Skip to content

Enable workflows to request a TEE#22220

Open
nolag wants to merge 23 commits into
developfrom
rtinianov_teeRuntime
Open

Enable workflows to request a TEE#22220
nolag wants to merge 23 commits into
developfrom
rtinianov_teeRuntime

Conversation

@nolag
Copy link
Copy Markdown
Contributor

@nolag nolag commented Apr 28, 2026

Requires

Supports

@nolag nolag force-pushed the rtinianov_teeRuntime branch from cee8c0b to 53e611e Compare May 1, 2026 19:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

CORA - Pending Reviewers

Codeowners Entry Overall Num Files Owners
/core/services/workflows/ 8 @smartcontractkit/keystone
/.github/** 1 @smartcontractkit/devex-cicd, @smartcontractkit/devex-tooling, @smartcontractkit/core
go.mod 6 @smartcontractkit/core, @smartcontractkit/foundations
go.sum 6 @smartcontractkit/core, @smartcontractkit/foundations
integration-tests/go.mod 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations
integration-tests/go.sum 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations

Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown

For more details, see the full review summary.

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 12, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

nadahalli and others added 3 commits May 14, 2026 17:37
…e factory

createModule built a RequirementSelectingModule that wraps a local WASM
module and a ConfidentialModule, so triggers carrying a TEE requirement
in their subscription route to the confidential-workflows capability
(which executes WASM inside the enclave) while other triggers continue
to run locally. The routing infrastructure was correct but unused:
engineFactoryFn never called createModule, so the V2 engine received
a bare local WASM module and every trigger ran locally.

For a confidential workflow whose handler is declared as
cre.HandlerInTee(..., cre.AnyTee{}), the cron fires, the engine calls
localWASM.Execute(triggerRequest), the WASM calls runtime.GetSecret,
which routes to the workflow-node SecretsFetcher and queries vault
capability config on the remote capabilities DON. That config's
DefaultConfig is nil for remote capabilities, so unmarshalConfig
errors with "cannot unwrap nil values.Map" and every execution fails:
the test waits 5 minutes for a successful trigger that never comes.

Inline the createModule wrap into engineFactoryFn's V2 branch and
delete the orphan function. Thread binaryURL through engineFactoryFn
so ConfidentialModule can hand it to the capability.
…t the wiring fix

Test_workflowRegisteredHandler_confidentialRouting was designed to catch
the missing wire-up of the RequirementSelectingModule. It didn't, because
the captureTrigger stub had shouldRun=true, so its assertion inside
RegisterTrigger always passed even when the engine routed the trigger to
the local trigger capability (which is the bug path the test should
reject). Flip the flag to false so the assertion fails when the routing
falls back to the local registry.

With the wiring in place the trigger flows through the confidential cap
mock (which sets trigger.ran via its Execute), so RegisterTrigger on the
captureTrigger is never invoked and the shouldRun assertion does not run.
Without the wiring the engine registers the trigger directly with the
captureTrigger, the assertion fires, and the test fails.
@nolag nolag changed the title Rtinianov tee runtime Enable workflows to request a TEE May 21, 2026
@nolag nolag force-pushed the rtinianov_teeRuntime branch from f192c64 to bc2001d Compare June 3, 2026 14:49
@nolag nolag marked this pull request as ready for review June 5, 2026 17:45
@nolag nolag requested review from a team as code owners June 5, 2026 17:45
@nolag nolag requested a review from a team as a code owner June 5, 2026 18:38
@cl-sonarqube-production
Copy link
Copy Markdown

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.

2 participants