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

[Bug]: DEVNET DSC was created from validator data - cannot unstake 1 node - public key mismatch #4488

Closed
1 task done
frankf1957 opened this issue Sep 20, 2022 · 9 comments
Assignees

Comments

@frankf1957
Copy link

frankf1957 commented Sep 20, 2022

Contact Details

No response

Description

I created a DSC on DEVNET from existing validator data. One node cannot be unstaked due to public key mismatch error.

Node version

N/A

Host machine

N/A

Steps to reproduce

I created a DSC on DEVNET from existing validator data.
TXID a92415f38bc87a24a781b42e29524bfbda111c5359455be83dd8ab4c1e9ad51e

The transaction was issued using the web wallet, from the wallet that had previously been used to stake 6 validator nodes.
Wallet address erd1gzzc96mpflcq5lnat0dz7dryv74fnqu6ddkwrqnk32jk508hgkgqyfc5wy
Address of the DSC erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr8llllse9cj2t

As this was the first time I created a DSC, I wanted to try as many operations as I could, including unstaking, unbonding and removing all nodes.

I was able to unstake and remove all but one node. To remove the last one, I added new BLS keys to the DSC, but I still have one of the original keys staked and cannot unstake, or unbond, or remove it.

Each time I try to unstake the transaction fails with "
could not get all blsKeys from registration data: error - public key mismatch, key dedeffa6ae5e12405f18225fa348b4d5ec8cce423b21ce6c8ee6683ca495d951c20287e1b6230eb496c9c1b189c10c0b4e481ee278e8b60bbffa6c215d11dd5363cb1e8ca74a840bbce91aad6c30a7d9884d048de80f184d00e85dc22bb4dc04 not found"

TXID 56a7e3b349036cf354d4e151d45b05cdcafdd578afa9eb7d851dac4bb42353c7

On which network is the bug manifesting itself?

Devnet

Relevant log output

Output from using erdpy to issue the unStakeNodes transaction for this BLS key.

$ erdpy --version
erdpy 2.0.1

$ bash -x sp-unstake-nodes.sh 
+ export PROXY=https://devnet-gateway.elrond.com
+ PROXY=https://devnet-gateway.elrond.com
+ export CHAIN=D
+ CHAIN=D
+ export KEYFILE=sp-control-wallet.json
+ KEYFILE=sp-control-wallet.json
+ export PASSFILE=sp-control-wallet-secret.txt
+ PASSFILE=sp-control-wallet-secret.txt
+ export DELEGATION_CONTRACT=erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr8llllse9cj2t
+ DELEGATION_CONTRACT=erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr8llllse9cj2t
+ export BLS_KEYS=dedeffa6ae5e12405f18225fa348b4d5ec8cce423b21ce6c8ee6683ca495d951c20287e1b6230eb496c9c1b189c10c0b4e481ee278e8b60bbffa6c215d11dd5363cb1e8ca74a840bbce91aad6c30a7d9884d048de80f184d00e85dc22bb4dc04
+ BLS_KEYS=dedeffa6ae5e12405f18225fa348b4d5ec8cce423b21ce6c8ee6683ca495d951c20287e1b6230eb496c9c1b189c10c0b4e481ee278e8b60bbffa6c215d11dd5363cb1e8ca74a840bbce91aad6c30a7d9884d048de80f184d00e85dc22bb4dc04
+ export GAS_LIMIT=16500000
+ GAS_LIMIT=16500000
+ erdpy staking-provider unstake-nodes --bls-keys dedeffa6ae5e12405f18225fa348b4d5ec8cce423b21ce6c8ee6683ca495d951c20287e1b6230eb496c9c1b189c10c0b4e481ee278e8b60bbffa6c215d11dd5363cb1e8ca74a840bbce91aad6c30a7d9884d048de80f184d00e85dc22bb4dc04 --chain D --proxy https://devnet-gateway.elrond.com --keyfile sp-control-wallet.json --passfile sp-control-wallet-secret.txt --delegation-contract erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr8llllse9cj2t --gas-limit 16500000 --recall-nonce --send
INFO:accounts:Account.sync_nonce()
INFO:accounts:Account.sync_nonce() done: 204
INFO:transactions:Transaction.send: nonce=204
INFO:transactions:Hash: 56a7e3b349036cf354d4e151d45b05cdcafdd578afa9eb7d851dac4bb42353c7
INFO:utils:View this transaction in the Elrond Devnet Explorer: https://devnet-explorer.elrond.com/transactions/56a7e3b349036cf354d4e151d45b05cdcafdd578afa9eb7d851dac4bb42353c7
{
    "emittedTransaction": {
        "nonce": 204,
        "value": "0",
        "receiver": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr8llllse9cj2t",
        "sender": "erd1gzzc96mpflcq5lnat0dz7dryv74fnqu6ddkwrqnk32jk508hgkgqyfc5wy",
        "gasPrice": 1000000000,
        "gasLimit": 16500000,
        "data": "dW5TdGFrZU5vZGVzQGRlZGVmZmE2YWU1ZTEyNDA1ZjE4MjI1ZmEzNDhiNGQ1ZWM4Y2NlNDIzYjIxY2U2YzhlZTY2ODNjYTQ5NWQ5NTFjMjAyODdlMWI2MjMwZWI0OTZjOWMxYjE4OWMxMGMwYjRlNDgxZWUyNzhlOGI2MGJiZmZhNmMyMTVkMTFkZDUzNjNjYjFlOGNhNzRhODQwYmJjZTkxYWFkNmMzMGE3ZDk4ODRkMDQ4ZGU4MGYxODRkMDBlODVkYzIyYmI0ZGMwNA==",
        "chainID": "D",
        "version": 1,
        "signature": "708d6e98fe7ca2152a1cde1641a3162e54db8c2fe51b4aea6039ba35501c839f9e58c755f61199620b83a88891ff738bd85b31cd6aa427d6256be85c0aab9f0c"
    },
    "emittedTransactionData": "unStakeNodes@dedeffa6ae5e12405f18225fa348b4d5ec8cce423b21ce6c8ee6683ca495d951c20287e1b6230eb496c9c1b189c10c0b4e481ee278e8b60bbffa6c215d11dd5363cb1e8ca74a840bbce91aad6c30a7d9884d048de80f184d00e85dc22bb4dc04",
    "emittedTransactionHash": "56a7e3b349036cf354d4e151d45b05cdcafdd578afa9eb7d851dac4bb42353c7"
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@frankf1957
Copy link
Author

Getting list of currently staked nodes from vm-values/query

$ API_SERVER="https://devnet-gateway.elrond.com/vm-values/query"
$ CONTRACT_ADDRESS="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr8llllse9cj2t"
$ data="{\"scAddress\": \"${CONTRACT_ADDRESS}\", \"funcName\": \"getAllNodeStates\"}"
$ response=$(curl -s -k --data "${data}" "${API_SERVER}")

$ echo $response | jq -r '.data.data.returnData[]'
c3Rha2Vk
3t7/pq5eEkBfGCJfo0i01eyMzkI7Ic5sjuZoPKSV2VHCAofhtiMOtJbJwbGJwQwLTkge4njotgu/+mwhXRHdU2PLHoynSoQLvOkarWwwp9mITQSN6A8YTQDoXcIrtNwE
yv5MSwnChsiZh8VSFli9aY85/PCXoI/nrpwRGm+WA8GKWJE2LXX/JwNmb0/LOwQXq3rMKDi+pkEb05bAouAfT6XDBzf4fzcLzxrTcIvkX+M2/K3YR9UfeOdCMHqV1myH
yv5MlXFRBpnav8ekvJRGy13F341bv/pPLk/ncJ7aVMYCn2AWcNg7IMYbYrvgRyIPrz7w7yGG8LKY/z6IrNvB/tyPwf2sGLnqlTpBTE+uMciJYLAjr0yTZEbreuG31ryQ
yv5aS9EmUCt3uIdSctpawZ/Bpg9DNmW+a2J9aeopb/+qNV48JDIu1nQKSmPT5LkTv5vAg5CSq9aOq+jmYrOi4LAblxx729UakYduNznNG585XYnQ6lZfE3BrJYbyCFIO
yv5eE/olGwXCatqrlHo2Dc/o8EeqkdQQXncbST1dbvcdSjYWJ/3gELXP1dnS8/YVCzQgFqJCLo1GSNO1J3qo0tLqe5G5tLCWWDNOcXf8ilKHmheiXiufAMN+92Xq6MkO

$ echo $response | jq -r '.data.data.returnData[0] | @base64d'
staked

$ echo $response | jq -r '.data.data.returnData[1]' | base64 -D | xxd -p -c256
dedeffa6ae5e12405f18225fa348b4d5ec8cce423b21ce6c8ee6683ca495d951c20287e1b6230eb496c9c1b189c10c0b4e481ee278e8b60bbffa6c215d11dd5363cb1e8ca74a840bbce91aad6c30a7d9884d048de80f184d00e85dc22bb4dc04

@iulianpascalau
Copy link
Contributor

iulianpascalau commented Sep 20, 2022

Thanks for reporting this. We are aware of this problem and fix on the way. Although it will not make it in the v1.3.4x release, we are probably rolling it out on the v1.4.x release. Will link the fixing PR to this issue when it will become available.

@frankf1957
Copy link
Author

Thanks for reporting this. We are aware of this problem and fix on the way. Although it will not make it in the v1.3.4x release, we are probably rolling it out on the v1.4.x release. Will link the fixing PR to this issue when it will become available.

Thank-you for your response. I have 1 question. I plan to create a DSC on mainnet and merge my existing genesis validators to the DSC. If I proceed with this now on mainnet, will I be in a situation that in the future I could possibly have 1 node that I would never be able to unstake? Or, will the patch, once applied to mainnet in the future, mitigate the issue such that after the issue is patched, unstaking all nodes will be possible?

@iulianpascalau
Copy link
Contributor

@raduchis

@easy2stake
Copy link

Hi,

Is this bug still around on testnet 1.4.10 ?
We're having the same issue when trying to unjail our nodes that are under our Delegation Contract.

Example TX:
https://testnet-explorer.multiversx.com/transactions/ae3f6ae3aa54e6bc3225dd3520fe5fee30f9992539e516e92773abd299424198#2caf78c2e2abdad7e3fd79f57c6a73fda97e3cc697844fc111f49691062b426c

Error: Could not get all blsKeys from registration data: error - public key mismatch
The transaction was sent from the wallet that deployed the Delegation Contract.

@raduchis
Copy link
Contributor

raduchis commented Mar 6, 2023

Hi, the fix did not make it in the v1.4.10 release . It will come in the v1.5.x release and I will link the PR when it will become available.

@raduchis
Copy link
Contributor

Hi,

Is this bug still around on testnet 1.4.10 ? We're having the same issue when trying to unjail our nodes that are under our Delegation Contract.

Example TX: https://testnet-explorer.multiversx.com/transactions/ae3f6ae3aa54e6bc3225dd3520fe5fee30f9992539e516e92773abd299424198#2caf78c2e2abdad7e3fd79f57c6a73fda97e3cc697844fc111f49691062b426c

Error: Could not get all blsKeys from registration data: error - public key mismatch The transaction was sent from the wallet that deployed the Delegation Contract.

Hi @easy2stake,

Upon further investigation, although the error messages are the same, in your case the unJail transaction was not formatted correctly. Please use the unJailNodes method described here for Delegation Contracts: https://docs.multiversx.com/validators/delegation-manager#unjailing-nodes with the receiver: <address of the delegation contract>

@easy2stake
Copy link

Thanks @raduchis it worked.

@AdoAdoAdo
Copy link
Contributor

closing the issue as the issue seems to be solved.

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

5 participants