Skip to content
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

fix: format error stack for rpc v0.8 #2523

Merged
merged 6 commits into from
Feb 28, 2025
Merged

fix: format error stack for rpc v0.8 #2523

merged 6 commits into from
Feb 28, 2025

Conversation

AnkushinDaniil
Copy link
Contributor

@AnkushinDaniil AnkushinDaniil commented Feb 19, 2025

No description provided.

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 62.06897% with 11 lines in your changes missing coverage. Please review.

Project coverage is 73.70%. Comparing base (50efd33) to head (ccb5193).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
rpc/v8/estimate_fee.go 0.00% 3 Missing ⚠️
node/throttled_vm.go 0.00% 2 Missing ⚠️
rpc/v8/trace.go 50.00% 2 Missing ⚠️
rpc/v6/estimate_fee.go 66.66% 1 Missing ⚠️
rpc/v6/trace.go 75.00% 1 Missing ⚠️
rpc/v7/estimate_fee.go 66.66% 1 Missing ⚠️
rpc/v7/trace.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2523   +/-   ##
=======================================
  Coverage   73.70%   73.70%           
=======================================
  Files         137      137           
  Lines       16711    16711           
=======================================
  Hits        12317    12317           
+ Misses       3534     3531    -3     
- Partials      860      863    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AnkushinDaniil AnkushinDaniil marked this pull request as ready for review February 20, 2025 01:03
@AnkushinDaniil AnkushinDaniil requested review from rianhughes and rodrigo-pino and removed request for rodrigo-pino February 20, 2025 06:45
@AnkushinDaniil AnkushinDaniil added Refactor rust Pull requests that update Rust code labels Feb 20, 2025
@AnkushinDaniil AnkushinDaniil marked this pull request as draft February 26, 2025 11:20
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/add-error branch 3 times, most recently from 7e1b7a8 to 459542c Compare February 26, 2025 16:43
@AnkushinDaniil AnkushinDaniil changed the title Add ExecutionError fix: format error stack for rpc v0.8 Feb 26, 2025
@AnkushinDaniil AnkushinDaniil added Bug Something isn't working or security issue High priority Needs to be solved this week or the next and removed Refactor labels Feb 26, 2025
@AnkushinDaniil AnkushinDaniil marked this pull request as ready for review February 26, 2025 19:17
Copy link
Contributor

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test code please

- Introduced `ExecutionError` enum to encapsulate different error types, including `TransactionExecutionError` and `CustomError`.
- Added `SimulationError` enum to handle specific simulation-related errors such as `OutOfGas` and `ExecutionError`.
- Implemented `fmt::Display` and `From` traits for `ExecutionError` and `SimulationError` to provide meaningful error messages and conversions.
- Replaced the use of `anyhow::anyhow!` with structured error handling using the new error types.
- Updated `execute_transaction` to use the new `ExecutionError` type.
- Refactored `is_l2_gas_accounting_enabled`, `get_gas_vector_computation_mode`, `simulate_execution`, `set_l2_gas_limit`, and `extract_l2_gas_limit` functions to handle errors using the new error types.
@rodrigo-pino rodrigo-pino merged commit c905aaf into main Feb 28, 2025
14 checks passed
@rodrigo-pino rodrigo-pino deleted the daniil/add-error branch February 28, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working or security issue High priority Needs to be solved this week or the next rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants