-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full integration of threshold plugin with Functions #9765
Conversation
KuphJr
commented
Jul 10, 2023
•
edited by bolekk
Loading
edited by bolekk
- Completed integration of threshold plugin with Functions
- Added Functions integration tests with threshold decryption
I see that you haven't updated any README files. Would it make sense to do so? |
res.WriteHeader(http.StatusOK) | ||
// prepend "0xab" to source and return as result | ||
_, err = res.Write([]byte(fmt.Sprintf(`{"result": "success", "statusCode": 200, "data": {"result": "0xab%s", "error": ""}}`, source))) | ||
_, err = res.Write(responsePayload) |
Check warning
Code scanning / CodeQL
Reflected cross-site scripting
core/services/ocr2/plugins/functions/integration_tests/internal/testutils.go
Outdated
Show resolved
Hide resolved
core/services/ocr2/plugins/functions/integration_tests/internal/testutils.go
Outdated
Show resolved
Hide resolved
core/services/ocr2/plugins/functions/integration_tests/functions_integration_test.go
Outdated
Show resolved
Hide resolved
core/services/ocr2/plugins/functions/integration_tests/functions_integration_test.go
Outdated
Show resolved
Hide resolved
core/services/ocr2/plugins/functions/integration_tests/functions_integration_test.go
Outdated
Show resolved
Hide resolved
core/services/ocr2/plugins/functions/integration_tests/internal/testutils.go
Outdated
Show resolved
Hide resolved
SonarQube Quality Gate |
for i := 0; i < nOracleNodes; i++ { | ||
var thresholdKeyShare string | ||
if len(thresholdKeyShares) == 0 { | ||
thresholdKeyShare = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified.
require.Equal(t, functions.LanguageJavaScript, int(data["language"].(float64))) | ||
require.Equal(t, functions.LocationInline, int(data["codeLocation"].(float64))) | ||
require.Equal(t, functions.LocationRemote, int(data["secretsLocation"].(float64))) | ||
if data["secrets"] != DefaultSecretsBase64 && request["nodeProvidedSecrets"] != fmt.Sprintf(`{"0x0":"%s"}`, DefaultSecretsBase64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hard to understand without remembering how the legacy flow works exactly. I hope we can simplify after everything is migrated to Threshold.