-
Notifications
You must be signed in to change notification settings - Fork 27
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
refactor(verification): move feature activation dependency #896
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #896 +/- ##
==========================================
+ Coverage 84.92% 84.96% +0.04%
==========================================
Files 298 298
Lines 22952 22961 +9
Branches 3466 3467 +1
==========================================
+ Hits 19492 19509 +17
+ Misses 2774 2766 -8
Partials 686 686 ☔ View full report in Codecov by Sentry. |
5f5d404
to
cbc3dc1
Compare
cbc3dc1
to
3e70c8c
Compare
@@ -58,6 +58,9 @@ def start(self) -> None: | |||
Log information related to bit signaling. Must be called after the storage is ready and migrations have | |||
been applied. | |||
""" | |||
if not self._feature_service.is_usage_enabled(): |
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.
I feel it should be done somewhere else. It seems error prone to call start()
and get no exception because it just skipped initialization.
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.
This has been removed from this PR.
@@ -473,24 +473,20 @@ def _get_or_create_bit_signaling_service(self) -> BitSignalingService: | |||
def _get_or_create_verification_service(self) -> VerificationService: | |||
if self._verification_service is None: | |||
verifiers = self._get_or_create_vertex_verifiers() | |||
self._verification_service = VerificationService(verifiers=verifiers) | |||
feature_service = self._get_or_create_feature_service() | |||
self._verification_service = VerificationService(verifiers=verifiers, feature_service=feature_service) | |||
|
|||
return self._verification_service | |||
|
|||
def _get_or_create_vertex_verifiers(self) -> VertexVerifiers: |
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.
Why not simply verify whether it is enabled or not here?
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.
This has been removed from this PR.
289059e
to
c4aa2b8
Compare
3e70c8c
to
8f3d009
Compare
c4aa2b8
to
e2f823e
Compare
8f3d009
to
ac02106
Compare
e774d52
to
103162b
Compare
2527d3c
to
1b24b0c
Compare
1b24b0c
to
0fc7e30
Compare
@msbrogli this PR has been simplified, I recommend re-reviewing it. I've updated the Acceptance Criteria. |
0fc7e30
to
d0f339c
Compare
103162b
to
204fa2c
Compare
d0f339c
to
a73d566
Compare
204fa2c
to
b895832
Compare
7eb1d79
to
ae05d01
Compare
4540afe
to
d82a5db
Compare
a12297b
to
eb0f05d
Compare
eb0f05d
to
43d2174
Compare
43d2174
to
3911dbf
Compare
Depends on #983
Motivation
Move the Feature Activation verification dependency to outside the verification method. This will be useful for Multiprocess Verification.
Acceptance Criteria
FeatureService.get_bits_description()
toget_feature_info()
, andFeatureDescription
toFeatureInfo
.BlockVerifier.verify_mandatory_signaling()
so it receives a pre-calculated signaling state, instead of calculating it itself with aFeatureService
.MergeMinedBlockVerifier.verify_aux_pow()
so it receives a pre-calculatedfeature_info
, instead of calculating it itself with aFeatureService
.verify_aux_pow()
verification fromverify_without_storage()
toverify()
.Checklist
master
, confirm this code is production-ready and can be included in future releases as soon as it gets merged