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

Separate different features in polybft package to separate packages #383

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Sep 26, 2024

Description

New packages in polybft

  • blockchain - contains block_wrapper, block_builder logic.
  • bridge - contains all the bridge logic.
  • config - contains polybft config structures and helper functions used to save the polybft config to genesis file, and reading it.
  • governance - contains all the governance logic.
  • helper - contains helper functions used across the polybft packages.
  • metrics - contains helper functions to increment different metrics in polybft.
  • proposer - contains proposer_calculator and proposer_snapshot logic.
  • stake - contains the stake_manager logic.
  • state - contains the logic for creating db for saving different offchain data in polybft.
  • system_state - contains all the systemState logic.
  • testing - contains mocked structures.
  • types - contains common polybft types used throughout polybft (for example, Extra).
  • validator-snapshot - contains all the logic around validator snapshots.

What logic was changed

  • all the packages that require a form of persistance store now have their own state_store file, and those stores are not initialized like before in the global state instance. Global state instance now only opens a db. The rest of the stores now use the db instance from the global state instance to initialize their buckets.
  • mocks are now in the mocks package.
    The rest of the logic is basically the same, and was not changed.

How to review

Most of the changes are just package name changes. Only focus on the points in the previous section.

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

@goran-ethernal goran-ethernal force-pushed the separate-to-packages branch 9 times, most recently from ddc702f to 89a1aad Compare September 26, 2024 14:02
@goran-ethernal goran-ethernal added the technical-debt Removal of technical debt label Sep 26, 2024
@goran-ethernal goran-ethernal self-assigned this Sep 26, 2024
@goran-ethernal goran-ethernal marked this pull request as ready for review September 26, 2024 14:26
@goran-ethernal goran-ethernal force-pushed the separate-to-packages branch 2 times, most recently from a510f0b to 2520523 Compare September 27, 2024 09:20
server/server.go Outdated Show resolved Hide resolved
server/builtin.go Show resolved Hide resolved
consensus/polybft/blockchain/block_builder.go Outdated Show resolved Hide resolved
consensus/polybft/blockchain/block_builder.go Outdated Show resolved Hide resolved
consensus/polybft/blockchain/block_builder.go Outdated Show resolved Hide resolved
consensus/polybft/types/extra_test.go Outdated Show resolved Hide resolved
consensus/polybft/bridge/bridge.go Outdated Show resolved Hide resolved
consensus/polybft/system_state/system_state.go Outdated Show resolved Hide resolved
consensus/polybft/helpers/runtime_helpers.go Show resolved Hide resolved
consensus/polybft/config/runtime_config.go Outdated Show resolved Hide resolved
Base automatically changed from BLADE-207-change-relayer to feat/bridge September 30, 2024 13:01
@goran-ethernal goran-ethernal merged commit f96aef2 into feat/bridge Sep 30, 2024
9 of 10 checks passed
@goran-ethernal goran-ethernal deleted the separate-to-packages branch September 30, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical-debt Removal of technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants