Skip to content

Commit

Permalink
A0-0000: Fix for sync config (#1886)
Browse files Browse the repository at this point in the history
# 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>
  • Loading branch information
Marcin-Radecki and timorleph authored Dec 17, 2024
1 parent cc81359 commit 24d2673
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions finality-aleph/src/network/base_protocol/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -44,10 +43,9 @@ where
BlockAnnouncesHandshake::<B>::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,
),
)),
Expand Down

0 comments on commit 24d2673

Please sign in to comment.