-
Notifications
You must be signed in to change notification settings - Fork 667
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
Error messages refactoring #1854
Merged
Merged
Changes from 50 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
775c141
use VMError instead of String in FunctionCall error
lexfrl 5f2226f
some progress on errors
lexfrl a986bc7
errors refactor
lexfrl bc9910c
revert changes (rename fields)
lexfrl ad1e830
test pass
lexfrl 4cd0ff5
error view update
lexfrl 5fc2e61
WIP
lexfrl 5696c99
make it compile
lexfrl 6515670
tests pass
lexfrl 27ab39b
action index added to ActionError
lexfrl 3062291
action index added: test pass
lexfrl 8657d92
merge statging
lexfrl 6d7c555
FunctionCall(String) -> FunctionCall(VMError)
lexfrl 52ebc4d
rpctypegen start
lexfrl a339c34
continue with RpcError derive_macro
lexfrl c32ddb9
continue working
lexfrl 63e7cc4
errors JSON schema generation done
lexfrl 3aebd75
Do not rewrite the schema file. Merge error schemas instead.
lexfrl 695c11b
small fix
lexfrl 212a430
VMErrors refactoring
lexfrl 08f601f
expose errors schema
lexfrl 614287f
rename rpc_errors_schema.json
lexfrl c07565d
merge staging
lexfrl 95ce423
specify a nearlib revision to test against
lexfrl c09cb6c
fix tests
lexfrl cd6e006
fix merge
lexfrl 03c0ee8
fix rpctypegen build
lexfrl 5979f68
Merge branch 'staging' into fckt/rpc-errors
lexfrl 86ad272
fix ci: exclude near_rpc_error_macro from tests
lexfrl 7815156
Merge branch 'staging' into fckt/rpc-errors
lexfrl f09766e
Merge branch 'staging' into fckt/rpc-errors
lexfrl a82fa00
add Errors docs, rename error types fix Balance formatting
lexfrl 9694cf6
fix formatting
lexfrl 216c808
Merge branch 'staging' into fckt/rpc-errors
lexfrl 7090763
make schema deterministic
lexfrl c15391c
Update core/primitives/src/errors.rs
lexfrl d3f7e7b
Update core/primitives/src/errors.rs
lexfrl 6f30669
Update core/primitives/src/errors.rs
lexfrl 3c8f755
Apply suggestions from code review
lexfrl 006bdf8
return ActionErrorKind::ActorNoPermission on AccountDelete and not sir
lexfrl 68a3a99
Merge branch 'fckt/rpc-errors' of github.com:nearprotocol/nearcore in…
lexfrl 4c476f1
StorageError doc comment addition
lexfrl 75f5383
update BalanceMismatch doc comment
lexfrl 90c1f44
Apply suggestions from code review
lexfrl 7fb443d
Merge branch 'staging' into fckt/rpc-errors
lexfrl 1a7eb06
ActionError index doc added
lexfrl 4b749d7
Merge branch 'fckt/rpc-errors' of github.com:nearprotocol/nearcore in…
lexfrl a2ae077
fix check_actor_permissions for DeleteAccount
lexfrl 879dffe
no cargo clean in build_errors_schema.sh and move to scripts
lexfrl c641f4a
feature-gated schema dump generation
lexfrl b9ae3fd
Merge branch 'staging' into fckt/rpc-errors
lexfrl 18ccdf3
Update tools/rpctypegen/Cargo.toml
lexfrl 361319b
removed rpc_error_variant attribute
lexfrl 7bbba23
split rpctypegen into core and macro crated + tests added
lexfrl 615121d
Merge branch 'staging' into fckt/rpc-errors
lexfrl addf11f
ServerError Display impl
lexfrl c1a094b
moved build_errors_schema.sh and res/rpc_errors_schema.json to a json…
lexfrl d9f3c6d
fix rpc-errors test
lexfrl e44e157
ActionError -> RequiresFullAccess
lexfrl d56236f
Merge branch 'staging' into fckt/rpc-errors
lexfrl 983478b
fix comment
lexfrl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
@bowenwang1996 @frol In what cases RPC will return a
MailboxError
? AFAIU it only happens if the communication between the actors has timed out or the channel has been closed. The latter one can happen when the node is shutting down (btw, we need to implement a way to gracefully shutdown the node). The former one is not supposed to happen in our infra, since the communication between the actors does not have a timeout , correct?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.
Yes I think this error can only happen under extreme circumstances, but @evgenykuzyakov insisted that I handle it. I think it can also happen if the node receives too much traffic.
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.
I see. @bowenwang1996 is it correct that communication between our Actix actors uses bounded channels that can overflow and drop the messages? Is it possible to arrive to an unforeseen state due to some messages being lost between the Actix actors? CC @SkidanovAlex
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.
I am not sure. I think @frol knows actix better, but we in general should be resistant to lost messages.
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.
It looks like Actix uses unbounded channels by the default, so it should be good unless we explicitly changed it. actix/actix#14
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.
unbounded channels are the major source of unbounded memory consumption, and they tend to hide problems until it is too late.