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

Migrated ConsensusService to new design #6239

Merged
merged 1 commit into from Apr 25, 2023

Conversation

netopyr
Copy link
Contributor

@netopyr netopyr commented Apr 25, 2023

This PR migrates the ConsensusService to the new design:

  • Makes the preHandle() method generic. It has only one parameter context and is defined in TransactionHandler.
  • Introduces interfaces for each store (e.g. ReadableTokenStore) in the corresponding api-module
  • Adds the suffix 'Impl' to names of store implementations (e.g. ReadableTokenStoreImpl). The classes implement the new interfaces.
  • PreHandleContext will become an interface in an upcoming PR. To prepare this change, FakePreHandleContext was introduced and tests were updated. This class allows to do the switch without breaking all the tests in services.
  • We will stop to use AccountAccess soon. Instead the new interface ReadableAccountStore should be used instead.

Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
@netopyr netopyr added CI:UnitTests Modularization Issues or PRs related to modularization labels Apr 25, 2023
@netopyr netopyr added this to the v0.38 milestone Apr 25, 2023
@netopyr netopyr requested a review from a team as a code owner April 25, 2023 05:36
@netopyr netopyr self-assigned this Apr 25, 2023
@netopyr netopyr requested review from a team, povolev15 and iwsimon as code owners April 25, 2023 05:36
@github-actions
Copy link

github-actions bot commented Apr 25, 2023

Node: E2E Test Results

    1 files      1 suites   17m 9s ⏱️
309 tests 309 ✔️ 0 💤 0
327 runs  327 ✔️ 0 💤 0

Results for commit 9874b42.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

Node: Unit Test Results

  1 318 files    1 318 suites   1h 22m 3s ⏱️
97 182 tests 97 175 ✔️ 7 💤 0
98 824 runs  98 817 ✔️ 7 💤 0

Results for commit 9874b42.

@sonarcloud
Copy link

sonarcloud bot commented Apr 25, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@github-actions
Copy link

Node: Integration Test Results

    3 files      3 suites   15m 1s ⏱️
150 tests 150 ✔️ 0 💤 0
151 runs  151 ✔️ 0 💤 0

Results for commit 9874b42.

@netopyr netopyr linked an issue Apr 25, 2023 that may be closed by this pull request
Copy link
Contributor

@iwsimon iwsimon left a comment

Choose a reason for hiding this comment

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

LGTM

@netopyr netopyr merged commit 56689ef into develop Apr 25, 2023
9 of 11 checks passed
@netopyr netopyr deleted the 06178-cross-service-stores-consensus branch April 25, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Modularization Issues or PRs related to modularization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make stores of other services available via PreHandleContext
4 participants