-
Notifications
You must be signed in to change notification settings - Fork 2
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
Now out of gas error can be handled in livenet. #496
Conversation
WalkthroughIn these recent updates, there are significant changes across different files to introduce an Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- core/src/error.rs (1 hunks)
- examples/bin/livenet_tests.rs (2 hunks)
- justfile (1 hunks)
- odra-casper/rpc-client/src/casper_client/error.rs (4 hunks)
Files skipped from review due to trivial changes (2)
- core/src/error.rs
- justfile
Additional comments not posted (5)
examples/bin/livenet_tests.rs (2)
5-5
: Import ofExecutionError
is appropriate.This import is necessary for handling the new test case that checks for the
OutOfGas
error, aligning with the PR objectives to enhance error handling related to gas issues.
23-27
: Well-implemented test forOutOfGas
error handling.The test sets a very low gas limit and correctly asserts that the operation should result in an
OutOfGas
error. This is a good use of the newly introduced error type and helps in preventing regressions related to gas handling.odra-casper/rpc-client/src/casper_client/error.rs (3)
7-9
: Correct handling of 'Out of gas error'.The explicit check for the "Out of gas error" message and returning the correct error type and code is a robust addition. This aligns with the PR objectives to handle gas-related errors specifically.
20-27
: Refined schema path handling logic.The conditional compilation for different schema paths based on the environment (test vs. non-test) is a good practice for ensuring that the correct resources are used in different contexts. This helps in maintaining the environment-specific configurations without affecting the production or test behavior.
141-144
: Proper test coverage for 'Out of gas error'.Adding a test case specifically for the "Out of gas error" ensures that the new error handling logic is correctly implemented and will behave as expected in production scenarios. This is crucial for maintaining robustness in error handling.
#364 seems to be fixed by previous errors PR by @kpob
This one adds a test to avoid regression and adds an ExecutionError to allow handling oog error in tests.
Summary by CodeRabbit
New Features
Chores
run-nctl
in the build configuration to streamline Docker container setup for specific network uses.