Concordium / concordium-client

A command line client to interact with the concordium-node
Apache License 2.0
8 stars 6 forks source link

Wrong error returned (gRPC: Too low energy) #158

Open mh-concordium opened 2 years ago

mh-concordium commented 2 years ago

Bug Description If user tries to delegate scheduled CCDs but doesn't have CCDs to pay for the transaction, user will receive user error (gRPC error Too low energy)

Steps to Reproduce Try to delegate scheduled CCDs while not having any CCDs at disposal.

Expected Result Warning before transaction is submitted that will tell that tx will fail due to not having enough CCDs.

Actual Result image

Versions

┆Issue is synchronized with this Jira Bug by Unito

abizjak commented 2 years ago

The fact that the RPC error is wrong is caused by the node, specifically this issue https://github.com/Concordium/concordium-node/issues/375

The client could also check before it submits of course, and that would be a nicer user experience. But if the node provided a correct response the error would already be much less confusing.

abizjak commented 2 years ago

The node issue has been fixed in https://github.com/Concordium/concordium-node/pull/401 (that will be part of the ~August release).

From then on the transaction would fail immediately with a more correct error. The remaining issue here is the "check before submission".

abizjak commented 2 years ago

That last part is related/duplicate of #45