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

Changes tracker #1298

Merged
merged 3 commits into from
Mar 31, 2023
Merged

Changes tracker #1298

merged 3 commits into from
Mar 31, 2023

Conversation

turuslan
Copy link
Contributor

@turuslan turuslan commented Aug 3, 2022

Referenced issues

#1283

Description of the Change

Trie changes from Core_execute_block and Core_initialize_block+BlockBuilder_apply_extrinsic+BlockBuilder_finalize_block are tracked separately.
New tracker is created for each invocation and passed as argument.

Tracker was singleton before, so couldn't work from multiple threads.

  • BabeImpl
    • ProposerImpl
      • BlockBuilderFactoryImpl
        • CoreImpl
      • BlockBuilderImpl
  • BlockExecutorImpl
    • CoreImpl
  • Executor
    • TrieStorageProviderImpl
      • TrieStorageImpl

Benefits

Can execute multiple blocks simultaneously.

Possible Drawbacks

Usage Examples or Tests

Alternate Designs

Replacing some interface implementations with proxy/wrappers would be convenient.

@turuslan turuslan requested review from Harrm and GaroRobe August 3, 2022 10:17
@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #1298 (e897e13) into master (6110f90) will increase coverage by 3.33%.
The diff coverage is 41.66%.

❗ Current head e897e13 differs from pull request most recent head eb5e807. Consider uploading reports for the commit eb5e807 to get more accurate results

@@            Coverage Diff             @@
##           master    #1298      +/-   ##
==========================================
+ Coverage   21.99%   25.33%   +3.33%     
==========================================
  Files         695      605      -90     
  Lines       27847    21887    -5960     
  Branches    14337    11345    -2992     
==========================================
- Hits         6125     5545     -580     
+ Misses      16447    11224    -5223     
+ Partials     5275     5118     -157     
Impacted Files Coverage Δ
core/api/service/impl/api_service_impl.cpp 13.22% <0.00%> (-0.12%) ⬇️
core/authorship/block_builder_factory.hpp 100.00% <ø> (ø)
...ore/authorship/impl/block_builder_factory_impl.hpp 100.00% <ø> (ø)
core/authorship/impl/block_builder_impl.hpp 100.00% <ø> (ø)
core/authorship/impl/proposer_impl.cpp 43.90% <ø> (ø)
core/authorship/impl/proposer_impl.hpp 100.00% <ø> (ø)
core/authorship/proposer.hpp 100.00% <ø> (ø)
core/blockchain/impl/block_tree_impl.cpp 21.66% <ø> (+2.17%) ⬆️
core/blockchain/impl/block_tree_impl.hpp 33.33% <ø> (-66.67%) ⬇️
core/consensus/babe/impl/babe_impl.hpp 100.00% <ø> (ø)
... and 26 more

... and 381 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@turuslan turuslan marked this pull request as ready for review August 4, 2022 06:31
@turuslan turuslan changed the title Draft changes tracker Changes tracker Aug 31, 2022
@turuslan turuslan force-pushed the draft/changes_tracker branch from bd65f62 to e897e13 Compare August 31, 2022 10:07
@turuslan turuslan force-pushed the draft/changes_tracker branch from e897e13 to 6ae1f40 Compare January 12, 2023 06:31
@turuslan turuslan requested a review from igor-egorov January 12, 2023 08:48
@igor-egorov igor-egorov requested a review from iceseer January 12, 2023 08:50
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan force-pushed the draft/changes_tracker branch from 771beb1 to f0d746d Compare March 31, 2023 06:38
@turuslan turuslan enabled auto-merge (squash) March 31, 2023 12:30
@turuslan turuslan disabled auto-merge March 31, 2023 12:44
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan enabled auto-merge (squash) March 31, 2023 13:48
@turuslan turuslan merged commit 2045b62 into master Mar 31, 2023
@turuslan turuslan deleted the draft/changes_tracker branch March 31, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants