massa icon indicating copy to clipboard operation
massa copied to clipboard

Error with node_ban_by_id in massa-client

Open JeromeSi opened this issue 2 years ago • 3 comments

In massa-client, I'm using node_ban_by_id and i've got this error : Error: 'massa_signature' error:...

Works fine with curl:

curl --location --request POST 'http://localhost:33034' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "node_ban_by_id",
    "params": [["P1QyZpgk7Cvr3SBKNwyaZiKftWBYeXqbupiFXkQMQRvsmP8bndP"]]
}'

Result:

{"jsonrpc":"2.0","result":null,"id":1}
  • OS: Ubuntu 22.04
  • Massa : 15.1

JeromeSi avatar Oct 13 '22 16:10 JeromeSi

@aoudiamoncef are you able you reproduce it ?

damip avatar Oct 18 '22 08:10 damip

We are talking about this errors in https://discord.com/channels/828270821042159636/866464478828036126/996107758426390670

JeromeSi avatar Oct 18 '22 08:10 JeromeSi

@aoudiamoncef are you able you reproduce it ?

Yes, as you cant see:

Error: `massa_signature` error: Parsing error: public key bs58_check parsing error: invalid checksum, calculated checksum: '[123, 228, 249, 154]', expected checksum: [161, 146, 57, 18]

IMHO there an issue in this line: https://github.com/massalabs/massa/blob/17be24cab84e5efae3691e00a3173dc4fc8e0011/massa-models/src/node.rs#L26

I tried to replace it with Ok(NodeId(PublicKey::from_str(s)?)) and it works, but I should check if there is no regressions.

aoudiamoncef avatar Oct 18 '22 09:10 aoudiamoncef