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

Hardware requirements checks #5852

Merged
merged 8 commits into from Jan 23, 2024
Merged

Conversation

ssd04
Copy link
Contributor

@ssd04 ssd04 commented Jan 18, 2024

Reasoning behind the pull request

  • Check cpu flags checks

Testing procedure

  • Check if node will fail to start if no required cpu flags available
  • Standard system test

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dbf6d2e) 80.19% compared to head (728c22b) 80.19%.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           rc/sirius-patch-2    #5852      +/-   ##
=====================================================
- Coverage              80.19%   80.19%   -0.01%     
=====================================================
  Files                    708      708              
  Lines                  94094    94094              
=====================================================
- Hits                   75456    75455       -1     
- Misses                 13294    13295       +1     
  Partials                5344     5344              

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

iulianpascalau
iulianpascalau previously approved these changes Jan 18, 2024
@ssd04 ssd04 marked this pull request as ready for review January 18, 2024 16:50
sstanculeanu
sstanculeanu previously approved these changes Jan 19, 2024
AdoAdoAdo
AdoAdoAdo previously approved these changes Jan 19, 2024
gabi-vuls
gabi-vuls previously approved these changes Jan 19, 2024
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

Normal allin test: v1.6.11-dev-config-ace90ef010 -> hardware-requirements-chec-639da41b11

--- Specific errors ---

block hash does not match 6352
wrong nonce in block 2372
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0

/------/

--- Statistics ---

Nr. of all ERRORS: 0
Nr. of all WARNS: 951
Nr. of new ERRORS: 0
Nr. of new WARNS: 1
Nr. of PANICS: 0

/------/

--- ERRORS ---

/------/

--- WARNINGS ---

upcloud-fra-observer-2 :
Warn: wt.Listen()-> connection problem error = connection not open 1

/------/

cmd/node/main.go Outdated
@@ -301,3 +307,11 @@ func attachFileLogger(log logger.Logger, flagsConfig *config.ContextFlagsConfig)

return fileLogging, nil
}

func checkHardwareRequirements() error {
if !cpuid.CPU.Supports(cpuid.SSE4, cpuid.SSE42) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not like having these hardcoded, can we somehow extract them in config.toml ?

func parseFeatures(features []string) ([]cpuid.FeatureID, error) {
flags := make([]cpuid.FeatureID, 0)

for _, cpuFlag := range features {
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for this switch, we have the ParseFeature function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated to use ParseFeature func

Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

Normal allin test: v1.6.11-dev-config-ace90ef010 -> hardware-requirements-chec-728c22bfa4

--- Specific errors ---

block hash does not match 10590
wrong nonce in block 3751
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0

/------/

--- Statistics ---

Nr. of all ERRORS: 17
Nr. of all WARNS: 4310
Nr. of new ERRORS: 17
Nr. of new WARNS: 9
Nr. of PANICS: 0

/------/

--- ERRORS ---

/------/

@ssd04 ssd04 merged commit c84a6e6 into rc/sirius-patch-2 Jan 23, 2024
7 of 8 checks passed
@ssd04 ssd04 deleted the hardware-requirements-checks branch January 23, 2024 11:38
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

5 participants