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

keva_filter returns error: couldn't parse reply from server #19

Open
kevacoin-project opened this issue Jan 17, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@kevacoin-project
Copy link
Owner

Steps to reproduce:

kevacoin-cli keva_group_filter NdwuyeGvKxX7yVU6Vf1qQ8Jp7XLp4dP1Wo

The command returns the following error message:

error: couldn't parse reply from server
@kevacoin-project kevacoin-project added the bug Something isn't working label Jan 17, 2021
@kevacoin-project
Copy link
Owner Author

This is triggered by the new protocol used in Kevacoin mobile app.

The title(key) of reply/share/reward starts with byte 0x00, then followed by 0x01 (reply), 0x02(share), 0x03(reward), and finally the txid (in binary format). This is to save the key size. The txid is 32 byte long if it is in binary format, while it is about 44 bytes in Base64 format.

This binary string makes the JSON result invalid and causes the above error message.

What we can do is to add detection of key format. If it is a valid UTF-8 string, we display the string as before. Otherwise we display it as a hex string. For example:

"key": "000104ed782eda93..."

The problem how we can know if the string is a hex string, or a UTF-8 string?

One possible solution is to introduce a new option field encode:

"key": "000104ed782eda93...",
"encode": "hex"

The default decoding is utf8 if encode is not specified.

@kawww
Copy link

kawww commented Jan 18, 2021

App better first if this is good for app.

Pc just do what app do is ok.

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

2 participants