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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add health check sc for validators #2128 #951

Merged
merged 4 commits into from
Feb 25, 2023
Merged

Conversation

Hitenjain14
Copy link
Member

Changes

Added common method for both validator and blobber to send health check transaction.
Added healthcheck frequency to config/0chain_validator
Created new method type for VALIDATOR_HEALTH_CHECK in blobbercore/transaction/entity

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 馃搵
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2023

Codecov Report

Merging #951 (207874e) into staging (ccd9e2f) will decrease coverage by 0.10%.
The diff coverage is 0.00%.

馃摚 This organization is not using Codecov鈥檚 GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           staging     #951      +/-   ##
===========================================
- Coverage    26.53%   26.44%   -0.10%     
===========================================
  Files           76       76              
  Lines         7638     7665      +27     
===========================================
  Hits          2027     2027              
- Misses        5345     5372      +27     
  Partials       266      266              
Flag Coverage 螖
Unit-Tests 26.44% <0.00%> (-0.10%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
code/go/0chain.net/blobbercore/handler/health.go 0.00% <0.00%> (酶)
code/go/0chain.net/blobbercore/handler/protocol.go 0.00% <0.00%> (酶)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

code/go/0chain.net/blobbercore/handler/health.go Outdated Show resolved Hide resolved
code/go/0chain.net/blobbercore/handler/health.go Outdated Show resolved Hide resolved
func ValidatorHealthCheck() (*transaction.Transaction, error) {

if valConfig.Configuration.Capacity == 0 {
// setValidatorHealthCheckError(ErrValidatorHasRemoved)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove dead code

code/go/0chain.net/blobbercore/handler/health.go Outdated Show resolved Hide resolved
code/go/0chain.net/core/common/handler/worker.go Outdated Show resolved Hide resolved
@Hitenjain14 Hitenjain14 self-assigned this Feb 20, 2023
Copy link
Member

@peterlimg peterlimg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we will need to wait for the validator_health_check SC implemented on 0chain, before merging this one.

@Hitenjain14
Copy link
Member Author

LGTM, but we will need to wait for the validator_health_check SC implemented on 0chain, before merging this one.

I have been working on it , just wanted to know if we can emit validator health check in DbHealthCheck or new table has to be created.

Copy link
Member

@peterlimg peterlimg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@service-0chain
Copy link
Collaborator

Manual system tests [success] with the following config

config value
tests skipped TRUE
system-tests master
gosdk NOT OVERRIDDEN
zboxcli staging
zwalletcli staging
0chain staging
blobber validator-health
authorizer staging
0box staging
0block staging
0dns staging
explorer master
0proxy staging
0search staging

@peterlimg peterlimg merged commit 239d7d1 into staging Feb 25, 2023
@peterlimg peterlimg deleted the validator-health branch February 25, 2023 23:23
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.

None yet

4 participants