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

Extracted validator related structures into consensus/polybft/validator package #1493

Merged
merged 3 commits into from
May 15, 2023

Conversation

dusan-maksimovic
Copy link
Contributor

Description

This PR includes validator related files into separate package.

  • Files validator_metadata.go and validator_set.go, with related test files, extracted to consensus/polybft/validator/ package
  • ValidatorSetDelta and associated methods moved from polybft/extra.go to polybft/validators/validator_set.go
  • Validator, validatorRaw and associated methods moved from polybft/polybft_config.go to polybft/validators/validator_config.go
    • Renamed Validator to GenesisValidator
    • Renamed validatorRaw to genesisValidatorRaw
  • PostEpochRequest struct modified to use ValidatorSet interface instead of unexported validatorSet structure
  • testValidator, testValidators and accociated methods moved from consensus/polybft/mocks_test.go to consensus/polybft/validator/test_mocks.go
    • unexported structs, fields and functions converted to exported, since they are used by various tests from the polybft package

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@dusan-maksimovic
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@github-actions
Copy link

github-actions bot commented May 10, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM aside from the comments

Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

Generally looks good, but leaving some suggestions.

consensus/polybft/extra_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

🥇

@dusan-maksimovic dusan-maksimovic force-pushed the EVM-640-extract-poly-bft-validators-package branch from 2e4d700 to 7c6def7 Compare May 15, 2023 08:55
@dusan-maksimovic dusan-maksimovic force-pushed the EVM-640-extract-poly-bft-validators-package branch from 7c6def7 to 1ae5642 Compare May 15, 2023 09:05
@dusan-maksimovic dusan-maksimovic merged commit 719e5f3 into develop May 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2023
@dusan-maksimovic dusan-maksimovic deleted the EVM-640-extract-poly-bft-validators-package branch May 16, 2023 06:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants