-
Notifications
You must be signed in to change notification settings - Fork 179
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
InitialProtocolState
refactor and epoch protocol sub-state rename
#5968
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5968 +/- ##
==========================================
- Coverage 55.82% 55.79% -0.04%
==========================================
Files 1129 1129
Lines 89260 89330 +70
==========================================
+ Hits 49829 49840 +11
- Misses 34677 34735 +58
- Partials 4754 4755 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
reflecting that this DB is scoped to the epoch-related subset of protocol state
reflect that this is scoped to epoch state
InitialProtocolState
refactorInitialProtocolState
refactor and epoch protocol sub-state rename
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.
Thank you. This refactoring removes a large amount of ambiguity in my opinion. Great work 👏 .
Unfortunately, there are some remaining areas, where we are actually referring to the epoch sub-state (of the overall protocol state) but Interface and method inputs still only talk about the "Protocol State". I think this is particularly dangerous in case of IDs because we have a the filed ProtocolStateID
in the block Payload
, which is identical naming to the epoch sub-state's ID for the storage layer and therefore very easily confused. I tried to add extensive comments in all places that I found. Though, if you could take a second look that I didn't miss anything that would be appreciated.
Not sure, but it might be best to first merge this PR and then follow up with a second one doing the renaming, because there are a lot of files changed already in this PR. If we do that in two PRs, I am happy to take a second pass. But I am also totally happy if you just do the renaming at the end of this PR before merging. It doesn't have to be perfect, as long as most places in the respective storage layer abstraction actually talk about the epoch sub-state, I think it is fine if we missed a few occurrences that still use "protocol state". It will be clear from context.
Happy to help with the renaming ... it might touch a lot of code to get it consistent.
Co-authored-by: Alexander Hentschel <[email protected]>
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.
Very nice PR, extremely solid refactoring which brings consistency in the code base. Well done!
Co-authored-by: Yurii Oleksyshyn <[email protected]>
This PR addresses the following item from #5666:
Changes
InitialProtocolState
withDynamicProtocolState
, renames combined type toEpochProtocolState