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

fix: only allow one session per peer for block/header sync #3402

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Oct 1, 2021

Description

Adds check for existing block sync sessions per peer.
Improve logging

Motivation and Context

When shutting down my local node, I've observed many blksync rpc sessions for a single peer.
It is unclear why/how the peer is creating these sessions and keeping them up. I've attempted to recreate this
by constantly attempting a sync and then dropping the stream after it starts but RPC appeared to handle that correctly.

By forbidding this action for block sync, any client that misbehaves will get an error response and that should help
to narrow down where this issue originates.

How Has This Been Tested?

Manually.

@sdbondi sdbondi force-pushed the core-block-sync-restrict-peer-sessions branch from 018607c to 9338fdf Compare October 1, 2021 06:31
Adds check for existing block sync sessions per peer.
@sdbondi sdbondi force-pushed the core-block-sync-restrict-peer-sessions branch from 9338fdf to 505a223 Compare October 1, 2021 06:37
@aviator-app aviator-app bot merged commit 06da165 into tari-project:development Oct 1, 2021
@sdbondi sdbondi deleted the core-block-sync-restrict-peer-sessions branch October 1, 2021 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants