From 24d2673118a32d1bcc10379443418118c12060a9 Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 17 Dec 2024 13:55:56 +0100 Subject: [PATCH] A0-0000: Fix for sync config (#1886) # Description In aleph-node 13 [polkadot-sdk code](https://github.com/Cardinal-Cryptography/polkadot-sdk/blob/aleph-v1.2.0/substrate/client/network/sync/src/lib.rs#L516) there's a check against 0x0 block hash. This causes to ban nodes on 14 version by nodes on 13 version, causing unwanted behaviour. ## Type of change Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) --------- Co-authored-by: timorleph <145755355+timorleph@users.noreply.github.com> --- finality-aleph/src/network/base_protocol/config.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/finality-aleph/src/network/base_protocol/config.rs b/finality-aleph/src/network/base_protocol/config.rs index 7d910e8351..dfc8c45721 100644 --- a/finality-aleph/src/network/base_protocol/config.rs +++ b/finality-aleph/src/network/base_protocol/config.rs @@ -6,7 +6,6 @@ use sc_network::{ NotificationService, }; use sc_network_common::sync::message::BlockAnnouncesHandshake; -use sp_core::H256; use sp_runtime::traits::{Block, Header}; use crate::{BlockHash, BlockNumber}; @@ -44,10 +43,9 @@ where BlockAnnouncesHandshake::::build( // All nodes are full nodes. (&Role::Full).into(), - // The best block number, always send a dummy value of 0. + // We always pretend the genesis block is our best block 0, - // The best block hash, always an obviously dummy value. - H256([0; 32]), + genesis_hash, genesis_hash, ), )),