-
Notifications
You must be signed in to change notification settings - Fork 100
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
Implement RPC errors proposal #156 #815
Implement RPC errors proposal #156 #815
Conversation
@AnnaShaleva Please review |
Remove comments
…jinghui/neo-modules into Add-error-codes-and-response-errors * 'Add-error-codes-and-response-errors' of github.com:Liaojinghui/neo-modules: Format code
@Liaojinghui if you unify the namespace and fix the unit test we can merge it. |
I need to talk with you about this pr since it changes the error code, do you think it is ok to merge it? This is inconsistent change. |
It will unify the error codes, I can't see the problem. |
Fair enough, I will work on it |
@roman-khimov will need you to define some new error code for the canceltx command. The existing error code are like randomly assigned. As to the format, i run |
I don't think we need a separate error code. @Liaojinghui, does this comment answer your question? |
@superboyiii good to go for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need this PR in the mono repo, we don't have nuget, so, you can't update neo (for AlreadyInPool
).
Can use local reference to test. Postpone the monorepo merge can make things unnecessarily complex. Waiting for a release is nonsense. |
We need this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me if neo-go
team are good with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually have spotted some minor problems in the set of errors passed from core to module (we can have a bit more details there), but I don't think these should hold the PR. We can also improve the proposal now with Conflicts
handling that was missing from the protocol when it was initially submitted, but that's also a different topic. The PR here is a pretty big and good set of changes, it definitely improves the situation and it's compliant to the current state of proposal, so let's merge it as is and then improve upon it if and when needed.
* add RPC error proposal 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 * nep-Y: correct group description Co-authored-by: Erik van den Brink <[email protected]> * nep-Y: typo fix Co-authored-by: Erik van den Brink <[email protected]> * nep-Y: unify -104 wording Co-authored-by: Erik van den Brink <[email protected]> * nep-Y: UTF-8 for code/message * nep-Y: clarify "other codes" * nep-Y: the most specific * NEP-Y: extend list of `getblock` and `getblockheader` return error codes These can autoresolve height to hash, so height-related error code is applicable as well. Signed-off-by: Anna Shaleva <[email protected]> * NEP-Y: extend list of `submitoracleresponse` return error codes Oracle response can have invalid signature. Signed-off-by: Anna Shaleva <[email protected]> * NEP-Y: extend list of `submitblock` return error codes Blocks contain transactions, therefore any transaction-related error codes can be applicable too. Signed-off-by: Anna Shaleva <[email protected]> * NEP-Y: extend list of `verifyproof` return error codes Proof verification is relevant only for the nodes that store not only the latest chain state. Signed-off-by: Anna Shaleva <[email protected]> * nep-Y: add -600 for "access denied" See neo-project/neo-modules#815 (comment) Signed-off-by: Roman Khimov <[email protected]> * nep-Y: spelling fix Signed-off-by: Roman Khimov <[email protected]> * Update nep-Y.mediawiki Co-authored-by: Jimmy <[email protected]> * Rename nep-Y.mediawiki to nep-23.mediawiki * Update README.mediawiki * Update nep-23.mediawiki * Update README.mediawiki * README: fix link to the document Signed-off-by: Roman Khimov <[email protected]> * nep-23: add implementation links Signed-off-by: Roman Khimov <[email protected]> * nep-23: extend -510 to cover NVB Signed-off-by: Roman Khimov <[email protected]> * nep-23: add -513 for Conflicts Signed-off-by: Roman Khimov <[email protected]> --------- Signed-off-by: Anna Shaleva <[email protected]> Signed-off-by: Roman Khimov <[email protected]> Co-authored-by: Erik van den Brink <[email protected]> Co-authored-by: Anna Shaleva <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Jimmy <[email protected]>
#728
#814