ChainSafe / ChainSafe/gossamer

feat(statement-distribution): Implement `ResponseManager`

Open
#4,378 0 comments 0 reactions 0 assignees View on GitHub
T-feat
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

### Description

When a message is sent, through **RequestManager** to the **NetworkBridge Subsystem** we should keep the reference of the receiving channel here in the **Statement Distribution Subsystem** so whenever we receive a response we can trigger the `handle_response`, defined here: https://github.com/ChainSafe/gossamer/issues/4376

When the **Statement Distribution Subsystem** finishes to handle some message the next call is for [`dispatch_requests`](https://github.com/paritytech/polkadot-sdk/blob/41a5d8ec5f3d3d0ff82899be66113b223395ade5/polkadot/node/network/statement-distribution/src/v2/mod.rs#L2976-L2977) and here it drains the messages from **RequestManager** and dispatch them but now pushing the `pending_response` channel to the `ResponseManager`

### Links

- [Response Manager](https://github.com/paritytech/polkadot-sdk/blob/4198dc95b20e7a157fa0d1b8ef4a2e01a223af1b/polkadot/node/network/statement-distribution/src/v2/requests.rs#L429)

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.