Skip to content

Billing: Config [Metering].CapabilityUsageEnabled flag - #23856

Closed
DylanTinianov wants to merge 3 commits into
developfrom
CRE-6779-compute-usage-records
Closed

DylanTinianov wants to merge 3 commits into
developfrom
CRE-6779-compute-usage-records

Conversation

@DylanTinianov

@DylanTinianov DylanTinianov commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

… MeterRecords

Per-capability workflow billing (CRE-6778) adds METER_ACTION_USAGE records for
compute duration and gas at every capability that bills a workflow execution.
This setting is the single switch for all of those emission points, default
false, so DONs can be moved to the new records one at a time and rolled back
without a redeploy of the emitters.

It is independent of MeterRecordsEnabled, which gates durable resource metering
(active workflow specs) and must not be coupled to this rollout. Passed to LOOP
capability plugins as CL_CAPABILITY_USAGE_ENABLED.

DylanTinianov and others added 3 commits October 6, 2026 13:27
…on (CRE-6779)

When [Metering].CapabilityUsageEnabled is set, the syncer builds a
ResourceManager and every v2 engine emits one METER_ACTION_USAGE record per
execution after computeDuration is known:

- resource type cre:workflow:compute, value in milliseconds
- Utilization.ResourceId "<workflow_id>:<execution_id>", EventId = execution id
  (identical on every node; billing derives
  cre:workflow:<wf>:<exec>:<exec>)
- Identity.Service workflow-engine, DON id from the local node, org from the
  engine's resolved org id

Emitted for successful and failed executions, outside the legacy metering
block so a legacy metering failure cannot suppress it, and skipped when the
execution was delegated to the confidential module (ConfidentialModule now
tracks the executions it handled; the enclave path meters those).

Each emission logs "Emitted capability usage meter record" with executionID,
eventID, resourceType, value and orgID. That line is a contract for the
billing reconciler and is covered by a unit test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ntract

Identity.ResourcePool and ResourcePoolID are now "cre:workflow:compute",
derived via resourcemanager.WithWorkflowUsagePool, matching the
Billing <-> Decentralized stack contract. Bumps chainlink-common.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… CapabilityUsageEnabled

chainlink-common #2428 dropped the separate CapabilityUsageEnabled flag per
review: capability usage records share the existing [Metering].MeterRecordsEnabled
gate with durable resource metering. The syncer now builds the compute usage
ResourceManager when MeterRecordsEnabled is set, next to the spec meter.

Bumps chainlink-common to 16997122620e in all modules: CRE-6781-emit-usage-value
merged with develop's current pin 8fdc7816. Re-bump to main once #2428 and the
develop bump #23910 land.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@DylanTinianov
DylanTinianov force-pushed the CRE-6779-compute-usage-records branch from 6527b3a to b11eb78 Compare October 6, 2026 17:56
@github-actions

github-actions Bot commented Oct 6, 2026

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.

@DylanTinianov

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #23858 (same branch; #23858 now targets develop).

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Oct 6, 2026

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

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