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

Deterministic sort on validators info #5409

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Jul 7, 2023

Reasoning behind the pull request

  • there were cases in which the validator's info could have not been sorted deterministically

Proposed changes

  • added a flag + deterministic way to sort the validator's info

Testing procedure

  • 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?

Base automatically changed from fix-backwards-compatibility-in-go-1205 to feat/go-v1.20.5-integration July 8, 2023 07:07
…-validators-info

# Conflicts:
#	epochStart/metachain/validators_test.go
sasurobert
sasurobert previously approved these changes Jul 10, 2023
miiu96
miiu96 previously approved these changes Jul 10, 2023
bogdan-rosianu
bogdan-rosianu previously approved these changes Jul 10, 2023
testCreateMiniblockBackwardsCompatibility(t, false, "./testdata/expected-legacy.data")
})
t.Run("full deterministic mode", func(t *testing.T) {
//this will prevent from changes the deterministic algorithm as to not create future backwards compatibility issues
Copy link
Contributor

Choose a reason for hiding this comment

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

might rephrase: this will prevent changes to the deterministic algorithm and ensure the backward compatibility

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rephrased comment

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.04 ⚠️

Comparison is base (84f9cb3) 77.64% compared to head (952d088) 77.61%.

❗ Current head 952d088 differs from pull request most recent head 056a257. Consider uploading reports for the commit 056a257 to get more accurate results

Additional details and impacted files
@@                       Coverage Diff                       @@
##           feat/go-v1.20.5-integration    #5409      +/-   ##
===============================================================
- Coverage                        77.64%   77.61%   -0.04%     
===============================================================
  Files                              656      656              
  Lines                            86186    86205      +19     
===============================================================
- Hits                             66922    66908      -14     
- Misses                           14058    14091      +33     
  Partials                          5206     5206              
Impacted Files Coverage Δ
common/enablers/enableEpochsHandler.go 74.28% <100.00%> (+0.18%) ⬆️
common/enablers/epochFlags.go 92.25% <100.00%> (+0.08%) ⬆️
epochStart/metachain/validators.go 79.13% <100.00%> (+1.09%) ⬆️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@iulianpascalau iulianpascalau merged commit aee68cc into feat/go-v1.20.5-integration Jul 11, 2023
@iulianpascalau iulianpascalau deleted the deterministic-sort-on-validators-info branch July 11, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants