Hello, we need to import a private key to a verifier via the ImportShare call and for some reason on the node 1 we are consistently getting error 502 while on other nodes the call works fine. Are you aware of any issue with the node 1 on sapphire mainnet (https://node-1.node.web3auth.io/sss/jrpc)? The error happened around 10 PM CEST, June 28th, could you please look into it?
Interestingly, we observed the same error also on the first RPC node at sapphire devnet:
https://node-1.dev-node.web3auth.io/sss/jrpc
Here’s an example of the failing RPC call (which now in turn fails because the timesigned params have expired):
curl 'https://node-1.node.web3auth.io/sss/jrpc' \
-H 'accept: */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json; charset=utf-8' \
-H 'origin: https://wallet.nu.fi' \
-H 'priority: u=1, i' \
-H 'referer: https://wallet.nu.fi/' \
-H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
--data-raw '{"jsonrpc":"2.0","method":"ImportShare","id":10,"params":{"encrypted":"yes","use_temp":true,"distributed_metadata":true,"item":[{"verifier_id":"katushkadubajova@gmail.com","idtoken":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjJhZjkwZTg3YmUxNDBjMjAwMzg4OThhNmVmYTExMjgzZGFiNjAzMWQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIxMDk4MDY5MjQ2ODk1LTVuczQ2ZWl1MGlpM2hsaWE3NHFpOWZiOXBidWhyNzQ3LmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiMTA5ODA2OTI0Njg5NS01bnM0NmVpdTBpaTNobGlhNzRxaTlmYjlw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106a08ac9c60a3c4d6021c","data":"mug00\u001ce0da8edaa33bcc99d515d52bd2c4c43cfe44672c33e2b1ad14dd82cd674b2363\u001c6f23bfba78e61b97f6757e86970e6b9406350558f578375ca9270924bf7687e7\u001c5dc35c70555e3810cc6f563fac5a134aac30c7458f0ce34b8f1d24071533259c\u001cnufi-w3a-google\u001c1719604665","nodepubx":"e0925898fee0e9e941fdca7ee88deec99939ae9407e923535c4d4a3a3ff8b052","nodepuby":"54b9fea924e3f3e40791f9987f4234ae4222412d65b74068032fa5d8b63375c1","nodeindex":"1","pub_key_x":""},{"signature":"cd52ba2412a891607ad2bde30a2bf6cd5f683d74b5e8a64fe0c9b6b9c92c2f0e2fda7be3dcf50447ac80c16e2e566f3a87a309d815daad13a764ae06d584ac851c","data":"mug00\u001ce0da8edaa33bcc99d515d52bd2c4c43cfe44672c33e2b1ad14dd82cd674b2363\u001c6f23bfba78e61b97f6757e86970e6b9406350558f578375ca9270924bf7687e7\u001c5dc35c70555e3810cc6f563fac5a134aac30c7458f0ce34b8f1d24071533259c\u001cnufi-w3a-google\u001c1719604665","nodepubx":"9124cf1e280aab32ba50dffd2de81cecabc13d82d2c1fe9de82f3b3523f9b637","nodepuby":"fca939a1ceb42ce745c55b21ef094f543b457630cb63a94ef4f1afeee2b1f107","nodeindex":"2","pub_key_x":""},{"signature":"9b8f91f5c218774fed956999c825e03088cf669590642ac20ff08ab13912d78f518e44f4666d9a4d06577407ba555ef6db4be3399dd7c528ac7e03d013ba437d1c","data":"mug00\u001ce0da8edaa33bcc99d515d52bd2c4c43cfe44672c33e2b1ad14dd82cd674b2363\u001c6f23bfba78e61b97f6757e86970e6b9406350558f578375ca9270924bf7687e7\u001c5dc35c70555e3810cc6f563fac5a134aac30c7458f0ce34b8f1d24071533259c\u001cnufi-w3a-google\u001c1719604665","nodepubx":"555f681a63d469cc6c3a58a97e29ebd277425f0e6159708e7c7bf05f18f89476","nodepuby":"606f2bcc0884fa5b64366fc3e8362e4939841b56acd60d5f4553cf36b891ac4e","nodeindex":"3","pub_key_x":""},{"signature":"218a38fe26084aa70a49c3400d5a5aff3577c231cebd53d744aa2958f68d190f042a7ddaac713083e742736979712a0dbc0ae813da44c22f5e74b5669e9da0af1c","data":"mug00\u001ce0da8edaa33bcc99d515d52bd2c4c43cfe44672c33e2b1ad14dd82cd674b2363\u001c6f23bfba78e61b97f6757e86970e6b9406350558f578375ca9270924bf7687e7\u001c5dc35c70555e3810cc6f563fac5a134aac30c7458f0ce34b8f1d24071533259c\u001cnufi-w3a-google\u001c1719604665","nodepubx":"2b5f58d8e340f1ab922e89b3a69a68930edfe51364644a456335e179bc130128","nodepuby":"4b4daa05939426e3cbe7d08f0e773d2bf36f64c00d04620ee6df2a7af4d2247","nodeindex":"4","pub_key_x":""},{"signature":"4ca4a01f2688e94bed9916bc2f897a864bd0d9a14ef93018175e2ae263c3c74b5fb6d0df13c1535491ff953c16fff99263cd1c072d4d2e72e383cf65c72c08031b","data":"mug00\u001ce0da8edaa33bcc99d515d52bd2c4c43cfe44672c33e2b1ad14dd82cd674b2363\u001c6f23bfba78e61b97f6757e86970e6b9406350558f578375ca9270924bf7687e7\u001c5dc35c70555e3810cc6f563fac5a134aac30c7458f0ce34b8f1d24071533259c\u001cnufi-w3a-google\u001c1719604665","nodepubx":"3ecbb6a68afe72cf34ec6c0a12b5cb78a0d2e83ba402983b6adbc5f36219861a","nodepuby":"dc1031c5cc8f0472bd521a62a64ebca9e163902c247bf05937daf4ae835091e4","nodeindex":"5","pub_key_x":""}],"verifieridentifier":"nufi-w3a-google","pub_key_x":"f33ffc3d5c249f73dad6f0279785a236d1d97092b43fb88ffc2055f3c3c21da5","pub_key_y":"07d55119b7cae69183358c2b44ec645f49b6b016b0a37a9b94336f434bacd7a1","encrypted_share":"9b4d3f4bde427f40dbb287a986353860e182b807724e414b368092c2eb5ea1520848f190140c8be1771709b7571c2f77","encrypted_share_metadata":{"iv":"616ad5576a2eca859e036e5ce6113249","ephemPublicKey":"04ab4a77e9273c4748d8aec5e16f369b5432a11d8cef1f6f54e689d071d6ec6f8c53f109bdf7691e451a23acc720aa48aabe9e9cc4fcc1b5cdb93a072db97b5d63","ciphertext":"9b4d3f4bde427f40dbb287a986353860e182b807724e414b368092c2eb5ea1520848f190140c8be1771709b7571c2f77","mac":"1dacf06d2935ad723674d34a498754ef8cd645aec90e4d3f64b4974509f79389","mode":"AES256"},"node_index":1,"key_type":"secp256k1","nonce_data":"eyJkYXRhIjoiOTkwNmVlOWU0MWRhNjAyOWU2NjBlMWQ4ODBiMzIxYTIwZTY1MjQ5OTZkNTRkZmZiMjFlZDkzODg5OWU2ODY2YiIsIm9wZXJhdGlvbiI6ImdldE9yU2V0Tm9uY2UiLCJ0aW1lc3RhbXAiOiI2NjdmMTViOSJ9","nonce_signature":"ON6hmmRYC/frYEW761rVKm9gnwvBTUCjoPIfDQQeUh38TsVcaaYwD2SP930gd1MK8aCxLGvVo8O/sb/P9vvPcgA=","session_token_exp_second":86400}],"one_key_flow":true}}'
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>
We tried doing the key import with the latest torus.js library from npm (v12.3.6), this is how the relevant code looks like and it worked in the past without issues:
import NodeDetailsManager from '@toruslabs/fetch-node-details'
import Torus from '@toruslabs/torus.js'
...
const authInstance = new Torus({
clientId: web3AuthClientId,
enableOneKey: true,
network: web3AuthNetwork,
})
...
const fetchNodeDetails = new NodeDetailsManager({network})
const {torusNodeEndpoints, torusIndexes, torusNodePub} =
await fetchNodeDetails.getNodeDetails({
verifier,
verifierId,
})
return await authInstance.importPrivateKey(
torusNodeEndpoints,
torusIndexes,
torusNodePub,
verifier,
{verifier_id: verifierId},
idToken,
privateKey.toString('hex'),
)