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

Use of unwrap in core files and improper error handling #7

Open
sachindkagrawal15 opened this issue Apr 19, 2024 · 0 comments
Open

Comments

@sachindkagrawal15
Copy link

Unwrap is usually a shortcut to bypass implementing proper error handling in Rust. Using Unwrap in production code can be dangerous and should be avoided as it crashes the application & hides actual bugs. So, This is highly undesirable in core files and is a Rust bad practice and proper error handling/transmission should be implemented.

Some of Core files in repo where unwrap is used:

  1. backend/src/apis/round.rs
  2. backend/src/apis/mod.rs
  3. backend/build.rs
  4. backend/src/contracts/signer.rs
  5. zk_prover/benches/full_solvency_flow.rs
  6. zk_prover/src/chips/range/range_checks.rs
  7. zk_prover/src/circuits/merkle_sum_tree.rs
  8. zk_prover/src/merkle_sum_tree/node.rs
  9. zk_prover/src/merkle_sum_tree/utils/build_tree.rs
  10. zk_prover/src/merkle_sum_tree/utils/operation_helpers.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant