Skip to content

[DX-3049] use v2 PoR workflow as example#21696

Merged
Tofel merged 2 commits intocodex/dx-3043-local-cre-cli-use-state-filefrom
codex/dx-3049-v2-por-example
Mar 26, 2026
Merged

[DX-3049] use v2 PoR workflow as example#21696
Tofel merged 2 commits intocodex/dx-3043-local-cre-cli-use-state-filefrom
codex/dx-3049-v2-por-example

Conversation

@Tofel
Copy link
Contributor

@Tofel Tofel commented Mar 25, 2026

No description provided.

@Tofel Tofel force-pushed the codex/dx-3049-v2-por-example branch from 75b8319 to b4b29c0 Compare March 25, 2026 15:10
@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

✅ No conflicts with other open PRs targeting codex/dx-3043-local-cre-cli-use-state-file

@trunk-io
Copy link

trunk-io bot commented Mar 25, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@Tofel Tofel marked this pull request as ready for review March 25, 2026 18:33
@Tofel Tofel requested review from a team as code owners March 25, 2026 18:33
Copilot AI review requested due to automatic review settings March 25, 2026 18:33
@Tofel Tofel requested a review from a team as a code owner March 25, 2026 18:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: MEDIUM (CLI behavior + local env workflow execution + CI workflow now runs the PoR example)

This PR updates the CRE environment “example workflow” to use the PoR v2 cron workflow as the canonical reference, and wires multiple commands to resolve defaults (RPC, DON ID, registry addresses) from local CRE state when available.

Changes:

  • Switch example PoR workflow support from v1 (cron/web-trigger) to the v2 cron example and remove the v1 web-trigger example module.
  • Introduce a LocalCREStateResolver and use it to hydrate CLI defaults (RPC/DON ID/contract addresses) across workflow + billing commands.
  • Enable the “Execute example PoR workflow” step in cre-local-env-tests (now calls workflow run-por-example).

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
go.md Updates the dependency/workflow diagram to reference PoR v2 cron example.
core/scripts/go.mod Switches replace/require from v1 PoR example modules to the v2 cron example module; promotes chain-selectors to direct dep.
core/scripts/cre/environment/examples/pkg/deploy/consumer.go Adds chain metadata helper + address generation/funding helper used by the PoR v2 example.
core/scripts/cre/environment/examples/examples.go Adds RPC auto-resolution from local CRE state for example contract deploy commands.
core/scripts/cre/environment/environment/state_resolver.go Adds local CRE state resolver (RPC, address refs, DON metadata, gateway URL, workflow registry output).
core/scripts/cre/environment/environment/workflow.go Refactors workflow deploy/delete commands to resolve RPC/DON ID/addresses via local state + shared resolver logic.
core/scripts/cre/environment/environment/examples.go Replaces “deploy-and-verify-example” with run-por-example using PoR v2 cron workflow + new config generation.
core/scripts/cre/environment/environment/environment.go Removes v1 trigger selection flags/logic and always uses PoR v2 cron example when --with-example is set.
core/scripts/cre/environment/environment/billing.go Hydrates billing config from local CRE state when setup output isn’t available; normalizes docker-host RPC rewriting.
core/scripts/cre/environment/completions.go Updates shell completions for renamed workflow command and removed trigger flag.
core/scripts/cre/environment/README.md Updates docs to reflect PoR v2 cron example as the default/only example.
.github/workflows/cre-local-env-tests.yaml Enables running the PoR example workflow in CI (workflow run-por-example).
core/scripts/cre/environment/examples/workflows/v1/proof-of-reserve/web-trigger-based/* Removes the v1 web-trigger-based PoR example module (go.mod/go.sum/types/main).

@Tofel Tofel changed the base branch from develop to codex/dx-3043-local-cre-cli-use-state-file March 26, 2026 08:47
@Tofel Tofel requested review from a team as code owners March 26, 2026 08:47
@Tofel Tofel requested review from AmrMohamedRezk, asoliman92, makramkd and winder and removed request for a team March 26, 2026 08:47
@github-actions
Copy link
Contributor

github-actions bot commented Mar 26, 2026

CORA - Analysis Skipped

Reason: The number of code owners (4) is less than the minimum required (5) and/or the number of CODEOWNERS entries with changed files (5) is less than the minimum required (2).

@github-actions
Copy link
Contributor

I see you added a changeset file but it does not contain a tag. Please edit 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.

@Tofel Tofel force-pushed the codex/dx-3049-v2-por-example branch from 6fa08ab to 1a6885c Compare March 26, 2026 16:50
@github-actions
Copy link
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.

@Tofel Tofel merged commit 3764847 into codex/dx-3043-local-cre-cli-use-state-file Mar 26, 2026
199 of 200 checks passed
@Tofel Tofel deleted the codex/dx-3049-v2-por-example branch March 26, 2026 17:03
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants