-
Notifications
You must be signed in to change notification settings - Fork 756
feat(rpc): viewing large contract state is now prohibted to avoid excessive resource consumption #4167
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
Conversation
|
|
||
| impl TrieViewer { | ||
| /// Upper bound of the size of contract state that is still viewable. | ||
| const CONTRACT_STATE_SIZE_LIMIT: u64 = 50_000; |
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.
How complicated is it to be exposed via the config.json file, so we can recommend people to run their own RPC node with the limit bumped to the values they feel is necessary?
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.
The problem is that it is related to the jsonrpc timeout (which is currently hardcoded). We need to refactor that part as well :(
Fixes #3950.
Test plan
test_view_state_too_large