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] find_lost_did Bad Bytes initializer (versions 2.0.0 -> main) #18947

Open
BrandtH22 opened this issue Nov 27, 2024 · 1 comment
Open

[Bug] find_lost_did Bad Bytes initializer (versions 2.0.0 -> main) #18947

BrandtH22 opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@BrandtH22
Copy link
Contributor

BrandtH22 commented Nov 27, 2024

What happened?

Steps to reproduce:

  1. create a wallet in pawket
  2. create a did in pawket
  3. click on the wallet fingerprint in pawket to reveal the 24 word mnemonic and import it into the chia reference client

NOTE - the did will be present in the pawket app but not in the chia client
Side note - the sage wallet is able to import the same mnemonics and use the DID without issue

  1. run the find_lost_did command on the newly created DID
  2. review the errors

When running the find lost did command on a did that is created in pawket (note it could be other dids also but this is a reproducible method to expose this issue) the chia client fails to find the did and returns an error of (note this same error is present in the debug log file)

Failed to find lost DID: RPC response failure: {"error": "bad bytes32 initializer b''", "success": false, "traceback": "Traceback (most recent call last):\n  File \"chia/rpc/util.py\", line 84, in inner\n  File \"chia/rpc/wallet_rpc_api.py\", line 2545, in did_find_lost_did\n  File \"chia_rs/sized_byte_class.py\", line 46, in __init__\nValueError: bad bytes32 initializer b''\n"}

When attempting the same command on main this error is duplicated:

Failed to find lost DID: RPC response failure: {"error": "bad bytes32 initializer b''", "success": false, "traceback": "Traceback (most recent call last):\n  File \"/Users/USERNAME/chia-blockchain/chia/rpc/util.py\", line 84, in inner\n    res_object = await f(request_data)\n                 ^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/USERNAME/chia-blockchain/chia/rpc/wallet_rpc_api.py\", line 2545, in did_find_lost_did\n    bytes32(recovery_list_hash.as_atom()),\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/brandtholmes/chia-blockchain/.venv/lib/python3.12/site-packages/chia_rs/sized_byte_class.py\", line 46, in __init__\n    raise ValueError(f\"bad {type(self).__name__} initializer {v}\")\nValueError: bad bytes32 initializer b''\n"}

Version

2.4.4

What platform are you using?

macOS

What ui mode are you using?

CLI

Relevant log output

No response

@BrandtH22 BrandtH22 added the bug Something isn't working label Nov 27, 2024
@Rigidity Rigidity assigned Rigidity and unassigned Rigidity Nov 27, 2024
@Rigidity
Copy link
Contributor

The cause of the issue is that the recovery list hash can be null on-chain but the reference wallet doesn't allow this. Both Pawket and Sage default to a null recovery list hash since it's 32 bytes cheaper to reveal on-chain every spend.

@wjblanke wjblanke assigned wjblanke and emlowe and unassigned wjblanke Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants