ChainSafe / ChainSafe/gossamer

Gossamer Misbehavior `Reason: Genesis mismatch`

Open
#2,880 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

After a Substrate node got a block response from a Gossamer node it checks the ancestry of the block and for some reason, this checks fails:
- It is important to notice that this problem occur after some blocks were produced and the finalization was happening between the nodes.
```
sync: Got ancestry block #0 (0x34f9…65a3) from peer 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9
sync: Ancestry search: genesis mismatch for peer 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9
```

And instantly disconnect the node and decrease the node reputation to `-2147483648. Reason: Genesis mismatch, Disconnecting

More detailed log about the problem in the substrate side

```
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9 with 1 blocks (1)
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sync: Got ancestry block #0 (0x34f9…65a3) from peer 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sync: Ancestry search: genesis mismatch for peer 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: External API => Disconnect(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(0))
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: PSM <= Dropped(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(0))
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker peerset: Dropping 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9: -256 to -484
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: External API <= Closed(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(0))
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: Handler(PeerId("12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9"), ConnectionId(2)) <= Close(SetId(0))
2022-10-06 11:20:18.674 DEBUG tokio-runtime-worker sync: 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9 disconnected
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sync: 0 blocks ready for import
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: PSM => Connect(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(0)): No connection in proper state. Delaying.
2022-10-06 11:20:18.674 DEBUG tokio-runtime-worker peerset: Report 12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9: -2147483648 to -2147483648. Reason: Genesis mismatch, Disconnecting
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: PSM => Drop(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(0)): Interrupting pending enabling.
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: PSM => Drop(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(1)): Disabling connections.
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: External API <= Closed(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(1))
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: Handler((PeerId("12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9"), SetId(1)), ConnectionId(2)) <= Close(SetId(1))
2022-10-06 11:20:18.674 TRACE tokio-runtime-worker sub-libp2p: PSM => Drop(12D3KooWNS3YG26AvWTeX5KRy5zFM6toEVY5gxumo3XgSZZ3mzW9, SetId(2)): Disabling connections.
```

Full logs from Gossamer (BOB) + Substrate (ALICE) nodes -> https://gist.github.com/EclesioMeloJunior/6af15fe7d127a80e487a9c273b3b2f92

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.