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

produce and execute blocks on thread pool #1646

Merged
merged 8 commits into from
Sep 14, 2023
Merged

Conversation

turuslan
Copy link
Contributor

@turuslan turuslan commented Jun 5, 2023

Referenced issues

Description of the Change

  • rewrite synchronous block production and execution code with await

Benefits

  • don't block main thread

Possible Drawbacks

core/consensus/babe/impl/babe_impl.hpp Show resolved Hide resolved
core/consensus/babe/impl/block_executor_impl.cpp Outdated Show resolved Hide resolved
core/consensus/babe/impl/block_executor_impl.cpp Outdated Show resolved Hide resolved
test/testutil/asio_wait.hpp Show resolved Hide resolved
@turuslan turuslan requested review from xDimon and iceseer June 6, 2023 06:50
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan force-pushed the thread/block-wasm branch from 411f326 to 68c0bd9 Compare July 20, 2023 07:03
@kamilsa kamilsa removed request for xDimon and iceseer August 14, 2023 08:52
Signed-off-by: turuslan <turuslan.devbox@gmail.com>

# Conflicts:
#	core/consensus/babe/impl/babe_impl.cpp
#	core/consensus/babe/impl/block_executor_impl.cpp
#	test/core/consensus/babe/block_executor_test.cpp
@turuslan turuslan requested review from xDimon and Harrm September 1, 2023 12:24
Copy link
Contributor

@Harrm Harrm left a comment

Choose a reason for hiding this comment

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

I hope all affected resources are thread-safe.

@@ -186,6 +199,19 @@ namespace kagome::consensus::babe {
clock::SystemClock::TimePoint slot_timestamp,
std::optional<std::reference_wrapper<const crypto::VRFOutput>> output,
primitives::AuthorityIndex authority_index);
/**
* `processSlotLeadership` coroutine piece
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be confusing because it's not actually a coroutine, I'd rather that you describe it in the comment the way it is.

@turuslan turuslan merged commit f674a50 into master Sep 14, 2023
@turuslan turuslan deleted the thread/block-wasm branch September 14, 2023 06:04
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.

4 participants