-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit scoring details and instant unstake details in V2 events (#81)
Updates scoring and instant unstake functions with several improvements: * Events now contain a "details" field which, for each given component that fails or is triggered, will now track the specific epoch and value that contained the violation, and will be emitted. * Will be shown in UI to improve validators' ability to diagnose scoring failures * Both response structs are now updated to a V2 since adding new fields without changing the name would break the ability to backfill the event from genesis, as the event discriminator is based on the name, and fields changing mid-history is a very annoying thing to code in. Old structs are stored and noted * Each individual component and the associated values are now calculated in their own helper methods which greatly improves readability. * In a future PR we can add tests for these helper functions, which will allow us to really simplify the unit tests for these functions in`test_algorithms.rs` * All score functionality remains the same as confirmed by tests
- Loading branch information
Showing
6 changed files
with
1,021 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.