1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Add candidates cache (#1000)

* Broadcast shardchain block candidates in private overlays, generate proof links from candidates

* Disable shardchain block broadcasts in private overlays

* Send block candidate broadcasts to custom overlays, allow non-validators to receive candidates

---------

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2024-05-24 09:58:07 +03:00 committed by GitHub
parent 7a74888d2f
commit 539d5dd2de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 382 additions and 20 deletions

View file

@ -5012,12 +5012,13 @@ bool Collator::create_block_candidate() {
}
// 4. save block candidate
LOG(INFO) << "saving new BlockCandidate";
td::actor::send_closure_later(manager, &ValidatorManager::set_block_candidate, block_candidate->id,
block_candidate->clone(), [self = get_self()](td::Result<td::Unit> saved) -> void {
LOG(DEBUG) << "got answer to set_block_candidate";
td::actor::send_closure_later(std::move(self), &Collator::return_block_candidate,
std::move(saved));
});
td::actor::send_closure_later(
manager, &ValidatorManager::set_block_candidate, block_candidate->id, block_candidate->clone(),
validator_set_->get_catchain_seqno(), validator_set_->get_validator_set_hash(),
[self = get_self()](td::Result<td::Unit> saved) -> void {
LOG(DEBUG) << "got answer to set_block_candidate";
td::actor::send_closure_later(std::move(self), &Collator::return_block_candidate, std::move(saved));
});
// 5. communicate about bad and delayed external messages
if (!bad_ext_msgs_.empty() || !delay_ext_msgs_.empty()) {
LOG(INFO) << "sending complete_external_messages() to Manager";