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

core, services: fix Designation-dependant service initialisation #3229

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

AnnaShaleva
Copy link
Member

  1. Initialise services dependant on roles designation based on N+1 block so that Genesis roles extension work properly. There's not much sence to fetch node roles information for the latest persisted block because Designation contract itself makes designated nodes responsible since the next subsequent block.
  2. Perform initialisation of StateRoot service with designated StateValidator's node list in the service constructor. There's no need to wait until the next role update event, and it may lead to inaccuraces in service work on SIGHUP/server restart.

Close #3228.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (4216efb) 85.38% compared to head (15b4e0a) 85.30%.

Files Patch % Lines
pkg/services/stateroot/service.go 66.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3229      +/-   ##
==========================================
- Coverage   85.38%   85.30%   -0.08%     
==========================================
  Files         326      326              
  Lines       43988    44007      +19     
==========================================
- Hits        37557    37540      -17     
- Misses       4951     4987      +36     
  Partials     1480     1480              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AnnaShaleva AnnaShaleva changed the title core, services: fix Deignation-dependant service initialisation core, services: fix Designation-dependant service initialisation Nov 24, 2023
Initialise services dependant on roles designation based on N+1
block so that Genesis roles extension work properly. There's not
much sence to fetch node roles information for the latest persisted
block because Designation contract itself makes designated nodes
responsible since the next subsequent block.

A part of #3228.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Perform initialisation of StateRoot service with designated
StateValidator's node list in the service constructor. There's no need
to wait until the next role update event, and it may lead to inaccuraces
in service work on SIGHUP/server restart.

A part of #3228.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva marked this pull request as ready for review November 24, 2023 12:26
@roman-khimov roman-khimov merged commit 7a1bf77 into master Nov 24, 2023
15 of 18 checks passed
@roman-khimov roman-khimov deleted the fix-service-init branch November 24, 2023 12:47
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.

Notary service doesn't start its work with GenesisRoles set
2 participants