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

Miscellaneous code improvements for Orchestrator #364

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

leviathanbeak
Copy link

Solves #360

I have made the improvements mentioned in the issue, having said that, handling and propagating errors is still not completed, while it could be argued it could be a separate ticket in itself, since I did a lot of work in this ticket, being provided some guidelines I could implement better error propagation.

What the audit recommended is that we handle errors at the top not somewhere randomly in lib functions, and exiting the app without any clear hints to the caller of the functions. I went and created another Error Enum by using thiserror lib in our lib code, and also used anyhow lib in main.rs.

I have not cleaned all exit(1) from other functions, cuz I wanted some feedback on the current improvements, especially concerning error handling, and naming of ValidityCheckError - not sure what name would be best, since I would need much more context on all of it :)

} else if req_delegate_orchestrator_address != delegate_orchestrator_address {
error!("Your Delegate Orchestrator address is incorrect!");
error!(
"You provided {} Correct Value {}",
delegate_eth_address, req_delegate_eth_address
Copy link
Author

Choose a reason for hiding this comment

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

Also I think this is a bug? The addresses in question are those from orchestrator and not eth? and in error! eth addresses are provided?

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

Successfully merging this pull request may close these issues.

1 participant