Skip to content

Conversation

@moisesPompilio
Copy link
Contributor

Description and Notes

Error messaging for the loaddescriptor RPC has been improved to provide more detailed feedback when a descriptor is invalid. Previously, the RPC only returned a generic "invalid descriptor" error, which was insufficient for diagnosing the actual issue. Descriptors can be invalid for many reasons: incorrect checksums, using private keys instead of public keys (which are not accepted by the project), malformed syntax, and more.

Now, the specific parsing error is returned to the user, making it easier to identify and fix the problem. Additionally, documentation for the loaddescriptor RPC has been added, including parameter descriptions and usage notes accessible via the CLI.

How to verify the changes you have done?

  • Test with descriptors that use private keys instead of public keys:
    floresta-cli -n regtest loaddescriptor "wpkh(tprv8hCwaWbnCTeqSXMmEgtYqC3tjCHQTKphfXBG5MfWgcA6pif3fAUqCuqwphSyXmVFhd8b5ep5krkRxF6YkuQfxSAhHMTGeRA8rKPzQd9BMre/0/*)#amzqvgzd"
    
  • Test with descriptor that use invalid public key
    floresta-cli -n regtest loaddescriptor "wpkh(tpubDDtyive2LqLWKzPZ8LZ9Ebi1JDoLcf1cEpn3Mshp6sxVfCupHZJRPQTozp2EpTF76vJcyQBN7VP7CjUntEJxeADnuTMNTYKoSWNae8soVyy/1/*)#6ljl9tyc"
    
  • Test with descriptors that have incorrect checksums:
    floresta-cli -n regtest loaddescriptor "wpkh(tpubDDtyive2LqLWKzPZ8LZ9Ebi1JDoLcf1cEpn3Mshp6sxVfCupHZJRPQTozp2EpTF76vJcyQBN7VP7CjUntEJxeADnuTMNTYKoSWNae8soVyv/1/*)#0rlhs7rd"
    
  • Verify that detailed, actionable error messages are returned in each case, clearly indicating what went wrong during descriptor parsing.
  • Check the CLI documentation for loaddescriptor to ensure parameter descriptions and usage notes are present and accurate.
    floresta-cli -n regtest loaddescriptor --help
    

@moisesPompilio moisesPompilio force-pushed the improve-erro-message-loaddescriptor branch from 636514a to 5fcb8ad Compare January 4, 2026 23:58
@Davidson-Souza Davidson-Souza added the RPC Changes something with our JSON-RPC interface label Jan 5, 2026
Copy link
Collaborator

@jaoleal jaoleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conpept ACK.

Thanks for doing this, just some comments.

@moisesPompilio moisesPompilio force-pushed the improve-erro-message-loaddescriptor branch from 5fcb8ad to 7191374 Compare January 5, 2026 13:43
@moisesPompilio moisesPompilio force-pushed the improve-erro-message-loaddescriptor branch from 7191374 to 5548070 Compare January 5, 2026 21:57
@jaoleal
Copy link
Collaborator

jaoleal commented Jan 6, 2026

LGTM, can you just ammend and push to retrigger the CI ?

Save the descriptor to the database at the end
@moisesPompilio moisesPompilio force-pushed the improve-erro-message-loaddescriptor branch from 5548070 to 3b277a9 Compare January 6, 2026 17:35
@moisesPompilio
Copy link
Contributor Author

I added descriptor persistence at the end of the load_descriptor function, so before returning true in the RPC, it saves the descriptor.

@jaoleal
Copy link
Collaborator

jaoleal commented Jan 6, 2026

ACK 3b277a9

@moisesPompilio moisesPompilio force-pushed the improve-erro-message-loaddescriptor branch from 3b277a9 to 6ed98e8 Compare January 6, 2026 18:48
@jaoleal
Copy link
Collaborator

jaoleal commented Jan 6, 2026

ACK 6ed98e8

Copy link
Member

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6ed98e8

@Davidson-Souza Davidson-Souza merged commit ff72f7c into vinteumorg:master Jan 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC Changes something with our JSON-RPC interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants