Conversation
Based on neo-project/neo-modules#728, but differs a bit from it: * reduced set of groups * unified missing block/header error * improved compatibility for -301 and -302
ixje
left a comment
There was a problem hiding this comment.
I really like supporting this. Many times the error responses are too general to figure out what is actually wrong and one has to debug it running their own node.
Co-authored-by: Erik van den Brink <git@erikvandenbrink.com>
Co-authored-by: Erik van den Brink <git@erikvandenbrink.com>
Co-authored-by: Erik van den Brink <git@erikvandenbrink.com>
|
📯 📯 📯 @erikzhang, @shargon, @vncoelho, @devhawk, anyone else 🥁 🥁 🥁 I think we need to move on with this, it's important for dApp development. |
shargon
left a comment
There was a problem hiding this comment.
Good proposal to improve the user experience
Agreed. When do we merge this? |
|
We need this. |
These can autoresolve height to hash, so height-related error code is applicable as well. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Oracle response can have invalid signature. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Blocks contain transactions, therefore any transaction-related error codes can be applicable too. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Proof verification is relevant only for the nodes that store not only the latest chain state. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
|
Minor adjustments (no new codes) made based on implementation experience from nspcc-dev/neo-go#3063. |
According to proposal: neo-project/proposals#156 Close nspcc-dev#2248 Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
According to proposal: neo-project/proposals#156 Close nspcc-dev#2248 Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
According to proposal: neo-project/proposals#156 Close nspcc-dev#2248 Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
According to proposal: neo-project/proposals#156 Close nspcc-dev#2248 Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
According to proposal: neo-project/proposals#156 Close nspcc-dev#2248 Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
While our server no longer uses these codes (-100, -400) they still can come from C# servers and while we consider them deprecated we better at least have some definition of them until C# implements our proposal: neo-project/proposals#156 Also adding description of deprecated RPC error codes in ROADMAP.md. Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
This change makes code incompatible with C# node, because currently no error is returned on invalid proof. According to proposal: neo-project/proposals#156 Also adding `verifyProof` descpiption in docs/rpc.md. Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
Behaviour change. `terminatesession` returns ErrUnknownSession in case of impossibility of finding session, previously there was no-error response with `false` result. `traverseIterator`returns ErrUnknownSession in case of impossibility of finding session, previously there was no-error response with default result; `traverseIterator`returns ErrUnknownIterator, there were no such errors before. Accordingly to proposal: neo-project/proposals#156 Also adding description of `traverseIterator` in docs/rpc.md. Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
|
Just for the record: we've successfully adopted this standard to the NeoGo RPC server in nspcc-dev/neo-go#3063. It works fine in tests and we'll integrate these new error codes into NeoFS as soon as 0.102.0 is released. There's a couple of issues that will be fixed by the usage of new RPC errors standard. |
|
While this hasn't been merged yet, two suggestions related to new attributes:
|
mempool.ErrInsufficientFunds is used when sender doesn't have enough balance to pay the submitted transaction fees (-511 code according to neo-project/proposals#156). mempool.ErrConflict is used when sender is not able to pay the overall transactions fee sum in the pool (generic -500 error according to the proposal). This bugfix is kind of breaking change for those users who relied on the old -511 code previously returning "insufficient funds" error. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This is not the way intended in neo-project/proposals#156. -511 covers _both_ cases because users hardly can distinguish one from another, it's just that our mempool implementation has error codes for both.. Signed-off-by: Roman Khimov <roman@nspcc.ru>
|
I think it's good to go. Adding a implement link will be better. |
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Signed-off-by: Roman Khimov <roman@nspcc.ru>
|
Updated, added implementation links. |
|
LGTM |
Based on neo-project/neo-modules#728, but differs a bit from it: