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

feat: Implement synthetic records for immediate genesis reconnect scenario #10176

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

mhess-swl
Copy link
Member

@mhess-swl mhess-swl commented Nov 29, 2023

The basic idea behind this PR is that the TokenSchema class has been split out into two parts: the synthetic records that need to be created, and the actual creation of the accounts. The Hedera class now has logic to determine if any synthetic records need to be generated, and if so, the SyntheticRecordsGenerator class will generate only the records. If applicable, these synthetic records will also be passed to the token schema class to actually create the entities in state.

The modular behavior is now similar to the mono service in how it handles this scenario, but unfortunately we haven't figured out a way to test this.

Closes #9757

Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
@mhess-swl mhess-swl added the Modularization Issues or PRs related to modularization label Nov 29, 2023
@mhess-swl mhess-swl added this to the v0.45 milestone Nov 29, 2023
@mhess-swl mhess-swl self-assigned this Nov 29, 2023
@mhess-swl mhess-swl requested a review from a team November 29, 2023 21:59
@mhess-swl mhess-swl requested review from a team as code owners November 29, 2023 21:59
Copy link

github-actions bot commented Nov 29, 2023

Node: HAPI Test (Token) Results

190 tests   188 ✔️  19m 30s ⏱️
  13 suites      2 💤
  13 files        0

Results for commit 5f8a227.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 29, 2023

Node: HAPI Test (Crypto) Results

211 tests  ±0   201 ✔️ ±0   21m 10s ⏱️ + 1m 32s
  22 suites ±0     10 💤 ±0 
  22 files   ±0       0 ±0 

Results for commit 5f8a227. ± Comparison against base commit 0a9d531.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 29, 2023

Node: Unit Test Results

    2 290 files  +1      2 290 suites  +1   47m 58s ⏱️ - 1m 47s
118 411 tests +3  118 377 ✔️ +3  34 💤 ±0  0 ±0 
126 833 runs  +3  126 799 ✔️ +3  34 💤 ±0  0 ±0 

Results for commit 5f8a227. ± Comparison against base commit 0a9d531.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (develop@0a9d531). Click here to learn what that means.

❗ Current head 90a71b3 differs from pull request most recent head 5f8a227. Consider uploading reports for the commit 5f8a227 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #10176   +/-   ##
==========================================
  Coverage           ?   63.16%           
  Complexity         ?    30722           
==========================================
  Files              ?     3329           
  Lines              ?   134059           
  Branches           ?    13892           
==========================================
  Hits               ?    84685           
  Misses             ?    46031           
  Partials           ?     3343           

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

Copy link

github-actions bot commented Nov 29, 2023

Node: HAPI Test (Time Consuming) Results

21 tests     9 ✔️  25m 27s ⏱️
  2 suites  12 💤
  2 files      0

Results for commit 5f8a227.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 29, 2023

Node: HAPI Test (Misc) Results

419 tests  ±0   313 ✔️ ±0   25m 41s ⏱️ + 1m 27s
  73 suites ±0   106 💤 ±0 
  73 files   ±0       0 ±0 

Results for commit 5f8a227. ± Comparison against base commit 0a9d531.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 29, 2023

Node: E2E Test Results

    1 files      1 suites   23m 4s ⏱️
311 tests 311 ✔️ 0 💤 0
333 runs  333 ✔️ 0 💤 0

Results for commit 5f8a227.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 29, 2023

Node: Integration Test Results

279 tests  ±0   279 ✔️ ±0   28m 27s ⏱️ -5s
    5 suites ±0       0 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit 5f8a227. ± Comparison against base commit 0a9d531.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 29, 2023

Node: HAPI Test (Smart Contract) Results

405 tests   325 ✔️  44m 46s ⏱️
  56 suites    80 💤
  56 files        0

Results for commit 5f8a227.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

One question and a couple nits but LGTM, tyvm @mhess-swl !

iwsimon
iwsimon previously approved these changes Nov 30, 2023
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, small comment.

Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
@mhess-swl mhess-swl dismissed stale reviews from iwsimon and tinker-michaelj via 4fb7847 November 30, 2023 21:43
@mhess-swl mhess-swl changed the title Implement synthetic records for event recovery scenarios feat: Implement synthetic records for event recovery scenarios Dec 1, 2023
@mhess-swl mhess-swl requested a review from a team as a code owner December 4, 2023 17:38
@mhess-swl mhess-swl modified the milestones: v0.45, v0.46 Dec 4, 2023
@mhess-swl mhess-swl force-pushed the 09757_modular-synthetic-records branch from 4b4c0e9 to 4fb7847 Compare December 4, 2023 21:45
@mhess-swl mhess-swl changed the title feat: Implement synthetic records for event recovery scenarios feat: Implement synthetic records for immediate genesis reconnect scenario Dec 6, 2023
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

Copy link
Collaborator

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

LGTM, tyvm @mhess-swl !

@mhess-swl mhess-swl merged commit 3d59673 into develop Dec 7, 2023
28 of 29 checks passed
@mhess-swl mhess-swl deleted the 09757_modular-synthetic-records branch December 7, 2023 15:56
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.

Handle event stream recovery failure via synthetic records
3 participants