nucypher/taco-web

Error: Could not convert input for treasure_map to a TreasureMap: Failed to deserialize: differing major version: expected 3, got 1

Opened this issue · 12 comments

I am getting below error when trying to decrypt a message:

"Could not convert input for treasure_map to a TreasureMap: Failed to deserialize: differing major version: expected 3, got 1"

Below is the code snippet:

        const depStrategy = strategy as DeployedStrategy;
        const web3Provider = new providers.Web3Provider(window.ethereum);
        const decrypter = depStrategy.decrypter;

        const conditionContext = conditionSet.buildContext(web3Provider);
        const retrievedMessages = await decrypter.retrieve(
            [encryptedPrivateKey],
            conditionContext
        ); 

nucyper-ts version is "@nucypher/nucypher-ts": "^0.9.0".

It was working fine util few days back but now it is not. Please guide. Thanks.

Thanks for the issue! This is caused by a recent update to the version of nucypher running on the tapir testnet. You may need to update your dependencies to use the latest released version of nucypher-ts, however, we will be posting migration instructions in the official documentation soon.

nucypher-ts@0.9.0 has been deprecated. Please see the package tags on npmjs.com to find compatible nucypher-ts version and test networks:

image

@KPrasch Thanks for your response. When can we accept the migration guide? I am struggling to upgrade to newer version.

@KPrasch Thanks for your response. When can we accept the migration guide? I am struggling to upgrade to newer version.

Your feedback is useful here, what issues are you encountering? Do you plan to use CBD or PRE?

@KPrasch Thanks for your response. When can we accept the migration guide? I am struggling to upgrade to newer version.

Your feedback is useful here, what issues are you encountering? Do you plan to use CBD or PRE?

I am using CBD. Issue is cannot find some of the previously imported members after the upgrade.
Screenshot 2023-07-06 at 9 19 16 PM

@singhvivek2503 Before updating your nucypher-ts version, try running your up on the mainnet NuCypher network. You can connect to it using Porter under this address: https://porter.nucypher.io/. It should be compatible with your current version.

@piotr-roslaniec
After uri change to mainnet. It gives error:

Could not convert input for retrieval_kits to a valid checksum address: Failed to deserialize: unsupported minor version: expected <=0,got 1

@piotr-roslaniec After uri change to mainnet. It gives error:

Could not convert input for retrieval_kits to a valid checksum address: Failed to deserialize: unsupported minor version: expected <=0,got 1

Please ensure that you are using the version of nucypher-ts that is tagged mainnet for use on etheruem mainnet.

@piotr-roslaniec After uri change to mainnet. It gives error:

Could not convert input for retrieval_kits to a valid checksum address: Failed to deserialize: unsupported minor version: expected <=0,got 1

Please ensure that you are using the version of nucypher-ts that is tagged mainnet for use on etheruem mainnet.

I upgraded to version 1.0.0-beta.1 (tapir) and related code but now I get another error:

Number of provided requests must be >= the expected threshold

The threshold is 3 but only 2 encrypted_decryption_requests are being sent in the payload. What am I missing here?

@singhvivek2503 What is the content of your Cohort? Perhaps there are not enough available validators on tapir.

Edit: There are enough validators on tapir, but the DKG ritual currently used in the SDK is limited to 2 validators. So setting shares to 2 should fix your issue. This limitation will be removed after this PR is merged: #233

@singhvivek2503 What is the content of your Cohort? Perhaps there are not enough available validators on tapir.

Edit: There are enough validators on tapir, but the DKG ritual currently used in the SDK is limited to 2 validators. So setting shares to 2 should fix your issue. This limitation will be removed after this PR is merged: #233

I reduced shares and threshold both to 2. Now I get error 500:

After 10 seconds and 88 rounds, didn't find these 2 nodes: {'0xb15d5A4e2be34f4bE154A1b08a94Ab920FfD8A41', '0x210eeAC07542F815ebB6FD6689637D8cA2689392'}

@singhvivek2503 I reproduced that error. Looks like one of the nodes may be down. Let me get back to you when we fix that.