Commit bdff6a5
authored
[CRE] [4/5] ConfidentialModule, config, DB migration, syncer routing (#21641)
* resolve go.mod conflicts
* Revert file fetcher HTTP URL handling
The filepath.Base() code for HTTP URLs in newFileFetcher was dead code.
No test or production path sends an HTTP URL to a file-based fetcher.
The enclave fetches binaries via its own BinaryFetcher, independent of
the node syncer's fetcher.
* Restore comments in startAndRegisterEngine, extract newV2EngineConfig
Restore comments that were dropped when extracting startAndRegisterEngine
from tryEngineCreate. Extract common EngineConfig construction into
newV2EngineConfig and initDone hook wiring into wireInitDoneHook,
reducing duplication between the normal and confidential engine paths.
* Unify engine creation flow for confidential and normal paths
Replace the early-return pattern with a symmetric if/else that picks
the factory, then converges on a single startAndRegisterEngine call.
Rename tryConfidentialEngineCreate to confidentialEngineFactory and
change its signature to return (services.Service, error).
# Conflicts:
# core/services/workflows/syncer/v2/handler.go
* Restore initDone comment in tryEngineCreate
* Inline startAndRegisterEngine back into tryEngineCreate
No longer needed as a separate method now that both engine paths
converge in tryEngineCreate.
* Restore inline comments in wireInitDoneHook
* Restore original BeholderEmitter closure pattern in newV2EngineConfig
* Clean up factory signatures and newV2EngineConfig param ordering
Group string params together in newV2EngineConfig, move SdkName and
DebugMode into the constructor, drop unused wid param from
confidentialEngineFactory.
* Fix lint: errors.New, assert.Empty
* Add BinaryURLResolver to ConfidentialModule for presigned URL support
The enclave needs an authenticated URL to download WASM binaries from
the CRE storage service. BinaryURLResolver resolves the raw on-chain
URL into a presigned/ephemeral URL per execution. Nil-safe: falls
back to the raw URL when no resolver is set.
PR 5/5 (#21642) wires this to the storage service retriever.
* add EmitUserMetric to stubExecutionHelper
host.ExecutionHelper gained EmitUserMetric in chainlink-common #1924.
* fix struct field alignment in ConfidentialModule
* set org_id on WorkflowExecution from CRE context
Bump chainlink-common to pick up OrgId field on WorkflowExecution
proto. Read org from the CRE execution context and include it in
the proto sent to the enclave, matching the pattern used by the
framework executor for VaultDON requests.
* block user workflows from calling system-only capabilities
Adds a deny-list check in ExecutionHelper.CallCapability() that
prevents user workflow steps from invoking internal capabilities
like confidential-workflows. The ConfidentialModule bypasses this
gate because it calls the registry directly.1 parent 6b6d76b commit bdff6a5
10 files changed
Lines changed: 1077 additions & 69 deletions
File tree
- core
- services
- job
- standardcapabilities/conversions
- workflows
- artifacts/v2
- syncer/v2
- v2
- store/migrate/migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| 933 | + | |
933 | 934 | | |
934 | 935 | | |
935 | 936 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| 561 | + | |
561 | 562 | | |
562 | 563 | | |
563 | 564 | | |
| |||
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
| 662 | + | |
675 | 663 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 664 | + | |
715 | 665 | | |
716 | 666 | | |
717 | 667 | | |
| |||
824 | 774 | | |
825 | 775 | | |
826 | 776 | | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
827 | 782 | | |
828 | 783 | | |
829 | 784 | | |
830 | 785 | | |
| 786 | + | |
831 | 787 | | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
845 | 794 | | |
846 | 795 | | |
847 | 796 | | |
| |||
898 | 847 | | |
899 | 848 | | |
900 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
901 | 955 | | |
902 | 956 | | |
903 | 957 | | |
| |||
0 commit comments