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

Feature/async-backing #1825

Merged
merged 220 commits into from
Feb 27, 2024
Merged

Feature/async-backing #1825

merged 220 commits into from
Feb 27, 2024

Conversation

iceseer
Copy link
Contributor

@iceseer iceseer commented Oct 5, 2023

Description of the Change

  1. Async-backing implementation.
  2. Set of minor fixes

Additionally

  1. Validation protocol V1 is removed

Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
move -> forward

Signed-off-by: iceseer <iceseer@gmail.com>
1
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
…ncoding

Signed-off-by: iceseer <iceseer@gmail.com>

# Conflicts:
#	test/core/storage/trie_pruner/trie_pruner_test.cpp
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
1
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Comment on lines 716 to 722
auto validation_protocol = [&]() -> std::shared_ptr<ProtocolBase> {
if (proto_version == network::CollationVersion::VStaging) {
return router_->getValidationProtocolVStaging();
} else {
return router_->getValidationProtocol();
}
}();
Copy link
Contributor

@turuslan turuslan Feb 15, 2024

Choose a reason for hiding this comment

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

Do you want to choose protocol supported by client,
or does runtime api return protocol version (e.g. async backing off/on)?

// may sort/reorder protocol list based on peer protocol list from "/identify"
host.newStream({"/validation/2", "/validation/1"}, [](r) {
  if r.protocol == "/validation/1"
    protocol_1.onOutgoingStream(r.stream)
  if r.protocol == "/validation/2"
    protocol_2.onOutgoingStream(r.stream)
})

Copy link
Contributor

@kamilsa kamilsa left a comment

Choose a reason for hiding this comment

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

Fix too many logs like:

24.02.19 04:50:00.089592  main_runner      Warning   ParachainProcessorImpl  After `send_peer_messages_for_relay_parent` no parachain state on relay_parent. (relay_parent=0x9ff1…b8ac)

and

24.02.19 04:50:06.074950  main_runner      Warning   PeerManager  Unable to create stream /e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e/validation/1 with …uB1dLv: Stream: reset by remote peer

Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
core/parachain/pvf/pvf_impl.cpp Outdated Show resolved Hide resolved
core/utils/thread_pool.hpp Outdated Show resolved Hide resolved
test/core/storage/trie_pruner/trie_pruner_test.cpp Outdated Show resolved Hide resolved
test/core/parachain/pvf_test.cpp Outdated Show resolved Hide resolved
test/core/blockchain/block_header_repository_test.cpp Outdated Show resolved Hide resolved
core/parachain/validator/backing_implicit_view.cpp Outdated Show resolved Hide resolved
core/parachain/validator/backing_implicit_view.cpp Outdated Show resolved Hide resolved
core/utils/struct_to_tuple.hpp Outdated Show resolved Hide resolved
core/utils/struct_to_tuple.hpp Outdated Show resolved Hide resolved
core/application/impl/app_configuration_impl.hpp Outdated Show resolved Hide resolved
core/consensus/babe/impl/babe.cpp Outdated Show resolved Hide resolved
Comment on lines 94 to 95
// app_state_manager_->takeControl(*collation_protocol_.get());
// app_state_manager_->takeControl(*validation_protocol_.get());
Copy link
Member

Choose a reason for hiding this comment

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

Uncomment or remove

@@ -36,6 +36,18 @@ namespace kagome::math {
return res;
}

template <typename T, typename E>
inline outcome::result<void> checked_sub(T &x, T y, E e) {
static_assert(std::numeric_limits<T>::is_integer
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
static_assert(std::numeric_limits<T>::is_integer
BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_integer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BOOST_STATIC_ASSERT используется в 2 местах, а static_assert во всем остальном коде. Думаю логично переехать на static_assert

core/parachain/validator/impl/parachain_processor.cpp Outdated Show resolved Hide resolved
core/parachain/validator/impl/parachain_processor.cpp Outdated Show resolved Hide resolved
core/parachain/validator/impl/parachain_processor.cpp Outdated Show resolved Hide resolved

protocol->request(peer_info, candidate_hash, std::forward<F>(callback));
/// TODO(iceseer): do
Copy link
Member

Choose a reason for hiding this comment

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

Is TODO actual? Add more details if do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://imgur.com/9Rby94j.png 2-я строка

@qdrvm qdrvm deleted a comment from iceseer Feb 22, 2024
iceseer and others added 3 commits February 23, 2024 12:45
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>

# Conflicts:
#	core/network/impl/peer_manager_impl.cpp
#	core/parachain/validator/impl/parachain_processor.cpp
@iceseer iceseer force-pushed the feature/async_backing_net branch 3 times, most recently from 4efbfdb to 0c4c0b7 Compare February 23, 2024 15:50
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>
Signed-off-by: iceseer <iceseer@gmail.com>

# Conflicts:
#	core/network/impl/peer_manager_impl.cpp
#	core/parachain/validator/impl/parachain_processor.cpp
@iceseer iceseer merged commit 5183aa6 into master Feb 27, 2024
12 of 13 checks passed
@iceseer iceseer deleted the feature/async_backing_net branch February 27, 2024 16:33
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

5 participants