-
Notifications
You must be signed in to change notification settings - Fork 707
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
Data robustness during restart #4071
Conversation
Leo-Besancon
commented
Jun 13, 2023
- document all added functions
- try in sandbox /simulation/labnet
- unit tests on the added/changed features
- make tests compile
- make tests pass
- add logs allowing easy debugging in case the changes caused problems
- if the API has changed, update the API specification
@aoudiamoncef, if you think it's relevant to add a context info that we are in downtime on the API response of get_stakers, please guide me on how to do so ;) |
@Leo-Besanconwe have two ways to bring it to Massa, using a field in the response or a status codes. JsonRPC https://www.jsonrpc.org/specification I'm voting for a status field in the response which is explicit |
massa-final-state/src/final_state.rs
Outdated
"Invalid cycle_history", | ||
)))?; | ||
let latest_snapshot_cycle = self.pos_state.cycle_history_cache.back().cloned().ok_or( | ||
FinalStateError::SnapshotError(String::from("Invalid cycle_history")), |
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.
Don't hesitate to add more détails in error messages, this is very helpful
Ok thanks I'll look into it then ;) |
@Leo-Besancon please don't forget to propagate the changes to |
9cf8384
to
ff5061a
Compare
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.
LGTM 👍🏻