Repository navigation
feat: better serialization and check tx fix - #1129
Merged
Merged
Conversation
shumkov
requested changes
May 30, 2023
| .map_err(|e| ResponseException::from(Error::Protocol(e)))?); | ||
|
|
||
| let error_data = json!({ | ||
| "message": "Drive check_tx error", |
Collaborator
There was a problem hiding this comment.
You don't need to pass the message. It will be recovered from the serialized error.
| }) | ||
| } | ||
| Err(error) => { | ||
| let error_data = json!({ |
Collaborator
There was a problem hiding this comment.
We need to create a set of errors for ABCI (internal error, invalid request, and so on https://grpc.github.io/grpc/core/md_doc_statuscodes.html) eventually. Then we can translate them to gRPC error codes in DAPI. Not this PR of course.
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Currently some errors on check_tx were causing platform to panic. Some of this was by design, however this design seemed flawed.
What was done?
All errors on check_tx return a validation result, and do not cause the system to crash.
The serialization of Consensus errors was also changed to using default bincode instead of bincode using serde.
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only