Skip to content
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

Keyurl endpoint is no longer working with kms-core main version #73

Open
leventdem opened this issue Dec 23, 2024 · 0 comments
Open

Keyurl endpoint is no longer working with kms-core main version #73

leventdem opened this issue Dec 23, 2024 · 0 comments

Comments

@leventdem
Copy link
Collaborator

Testing Titouan's PR on the Catchup Mechanism in fhevm-devops

Context:

We are working to update fhevm-devops to ensure compatibility with the main version of kms-core.

Why?

Titouan's PR modifies several components in the Gateway and Connector.

Goal:

The objective is to implement a mechanism that saves the current state of decryption and allows resumption in case of a failure or interruption.

Changes in fhevm-devops:

Configuration files are being updated to incorporate the new CSC .
Deployment scripts are being revised to align with changes in the KMS Blockchain.

Current Issue:

During testing, we encountered an issue when parsing/reading the result from the /keyurl endpoint.

Potential cause:

from the outputs (in thread) we can see that signatures is replaced by external_signatures ???

Technical context:

Images to test main: v0.9.1-rc3-test-catchup-mechanism
Images to test release: v0.9.0-rc37
Fhevm version: "fhevmjs": "^0.6.0-18",

Is this error related to tfhe-rs v0.10.0 ?

Initially I supposed yes, but the tfhe-rs version upgrade in kms-core has been merged today, images are from friday (so not related)

Outputs from /keyurl:

Main:

"fhe_key_info": [
      {
        "fhe_public_key": {
          "data_id": "cd6a2f09e9c240d14015654d32e758bb7d513efd",
          "external_signatures": [
            "1331d168..",
            "55333c44..",
            "8dde46ea1...",
            "fd32fc7dd2e..."
          ],
          "param_choice": 1,
          "signatures": [
            "400000000000",
            "400000000000",
            "400000000000..",
            "4000000000000..."
          ],
          "urls": [
            "http://localhost:9000/PUB-p2/PublicKey/cd6a2f09e9c240d14015654d32e758bb7d513efd",
            "http://localhost:9000/PUB-p3/PublicKey/cd6a2f09e9c240d14015654d32e758bb7d513efd",
            "http://localhost:9000/PUB-p4/PublicKey/cd6a2f09e9c240d14015654d32e758bb7d513efd",
            "http://localhost:9000/PUB-p1/PublicKey/cd6a2f09e9c240d14015654d32e758bb7d513efd"
          ]
        },

Release v0.9:

"fhe_key_info": [
      {
        "fhe_public_key": {
          "data_id": "b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
          "param_choice": 1,
          "signatures": [
            "40000000000000003e1",
            "40000000000000009c2",
            "4000000000000000cf0900",
            "4000000000000000c73394476"
          ],
          "urls": [
            "http://localhost:9000/kms/PUB-p4/PublicKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
            "http://localhost:9000/kms/PUB-p2/PublicKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
            "http://localhost:9000/kms/PUB-p1/PublicKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
            "http://localhost:9000/kms/PUB-p3/PublicKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26"
          ]
        },
        "fhe_server_key": {
          "data_id": "b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
          "param_choice": 1,
          "signatures": [
            "40000000000000005cdc39520e07cec",
            "40000000000000006c614aef26d4a3171120",
            "400000000000000014a6c384c0e4",
            "4000000000000000275f06969acf"
          ],
          "urls": [
            "http://localhost:9000/kms/PUB-p4/ServerKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
            "http://localhost:9000/kms/PUB-p2/ServerKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
            "http://localhost:9000/kms/PUB-p1/ServerKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26",
            "http://localhost:9000/kms/PUB-p3/ServerKey/b4ad0f97c2f361ba88fa16db3b492668b72e0c26"
          ]
        }

Error

  1) TestAsyncDecrypt
       "before all" hook for "test async decrypt bool":
     Error: Impossible to fetch public key: wrong gateway url.
      at getKeysFromGateway (node_modules/fhevmjs/lib/node.cjs:122:15)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async getTfheCompactPublicKey (node_modules/fhevmjs/lib/node.cjs:672:24)
      at async createInstance (node_modules/fhevmjs/lib/node.cjs:1119:27)
      at async createInstance (test/instance.ts:11:20)
      at async Context.<anonymous> (test/gateway/decrypt.ts:18:18)
     Caused by: Error: "Invalid size 7311066695147732796: sizes must fit in a usize (0 to 4294967295)"
      at module.exports.__wbindgen_error_new (node_modules/node-tfhe/tfhe.js:15240:17)
      at wasm://wasm/00b0220a:wasm-function[1614]:0x21eee0
      at Function.safe_deserialize (node_modules/node-tfhe/tfhe.js:14409:18)
      at getKeysFromGateway (node_modules/fhevmjs/lib/node.cjs:105:58)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async getTfheCompactPublicKey (node_modules/fhevmjs/lib/node.cjs:672:24)
      at async createInstance (node_modules/fhevmjs/lib/node.cjs:1119:27)
      at async createInstance (test/instance.ts:11:20)
      at async Context.<anonymous> (test/gateway/decrypt.ts:18:18)
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

No branches or pull requests

1 participant