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

Candidate backing fixup #1564

Merged
merged 8 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/consensus/babe/impl/babe_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,10 @@ namespace kagome::consensus::babe {
bitfield_store_->getBitfields(relay_parent);

paras_inherent_data.backed_candidates = backing_store_->get(relay_parent);
SL_TRACE(log_,
"Get backed candidates from store.(count={}, relay_parent={})",
paras_inherent_data.backed_candidates.size(),
relay_parent);
SL_INFO(log_,
iceseer marked this conversation as resolved.
Show resolved Hide resolved
"Get backed candidates from store.(count={}, relay_parent={})",
paras_inherent_data.backed_candidates.size(),
relay_parent);

auto best_block_header_res =
block_tree_->getBlockHeader(best_block_.hash);
Expand Down
3 changes: 2 additions & 1 deletion core/injector/application_injector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,8 @@ namespace {
injector
.template create<std::shared_ptr<application::AppStateManager>>(),
injector.template create<
primitives::events::BabeStateSubscriptionEnginePtr>());
primitives::events::BabeStateSubscriptionEnginePtr>(),
injector.template create<sptr<authority_discovery::Query>>());

auto protocol_factory =
injector.template create<std::shared_ptr<network::ProtocolFactory>>();
Expand Down
7 changes: 4 additions & 3 deletions core/network/impl/protocols/protocol_req_pov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ namespace kagome::network {
}

void onTxRequest(RequestPov const &request) override {
base().logger()->info("Transmit PoV request(candidate hash={})", request);
base().logger()->trace("Transmit PoV request(candidate hash={})",
request);
}

private:
Expand Down Expand Up @@ -95,12 +96,12 @@ namespace kagome::network {
}

void ReqPovProtocol::request(
const PeerId &peer_id,
const PeerInfo &peer_info,
RequestPov request,
std::function<void(outcome::result<ResponsePov>)> &&response_handler) {
BOOST_ASSERT(impl_ && !!"ReqPovProtocolImpl must be initialized!");
return impl_->doRequest(
peer_id, std::move(request), std::move(response_handler));
peer_info, std::move(request), std::move(response_handler));
}

} // namespace kagome::network
2 changes: 1 addition & 1 deletion core/network/impl/protocols/protocol_req_pov.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace kagome::network {
std::function<void(outcome::result<std::shared_ptr<Stream>>)> &&cb)
override;

void request(const PeerId &peer_id,
void request(const PeerInfo &peer_info,
RequestPov,
std::function<void(outcome::result<ResponsePov>)>
&&response_handler) override;
Expand Down
8 changes: 4 additions & 4 deletions core/network/impl/protocols/request_response_protocol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ namespace kagome::network {
const PeerInfo &peer_info,
std::function<void(outcome::result<std::shared_ptr<Stream>>)> &&cb)
override {
SL_INFO(base_.logger(),
"Connect for {} stream with {}",
protocolName(),
peer_info.id);
SL_TRACE(base_.logger(),
"Connect for {} stream with {}",
protocolName(),
peer_info.id);

base_.host().newStream(
peer_info,
Expand Down
2 changes: 1 addition & 1 deletion core/network/protocols/req_pov_protocol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace kagome::network {

class IReqPovProtocol : public ProtocolBase {
public:
virtual void request(const PeerId &peer_id,
virtual void request(const PeerInfo &peer_info,
RequestPov,
std::function<void(outcome::result<ResponsePov>)>
&&response_handler) = 0;
Expand Down
5 changes: 4 additions & 1 deletion core/parachain/approval/approval_distribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ namespace kagome::parachain {

void ApprovalDistribution::on_active_leaves_update(
const network::ExView &updated) {
if (!parachain_processor_->canProcessParachains()) {
if (!parachain_processor_->canProcessParachains() || true) {
iceseer marked this conversation as resolved.
Show resolved Hide resolved
iceseer marked this conversation as resolved.
Show resolved Hide resolved
return;
}
if (auto result =
Expand Down Expand Up @@ -1569,6 +1569,9 @@ namespace kagome::parachain {
void ApprovalDistribution::onValidationProtocolMsg(
libp2p::peer::PeerId const &peer_id,
network::ValidatorProtocolMessage const &message) {
if (!parachain_processor_->canProcessParachains() || true) {
iceseer marked this conversation as resolved.
Show resolved Hide resolved
return;
}
if (auto m{boost::get<network::ApprovalDistributionMessage>(&message)}) {
visit_in_place(
*m,
Expand Down
Loading