ChainSafe / ChainSafe/gossamer

chore(pkg/finality-grandpa): Update `pastRounds.commitSenders` to use `buffered` instead of primitive channel

Open
#3,510 0 comments 0 reactions 0 assignees View on GitHub
S-grandpa
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

## Issue summary

- In the rust code, `pastRounds.commitSenders` is a vector of unordered `Unbounded` channels. The current go code uses a buffered channel with length 100 ([link to code](https://github.com/ChainSafe/gossamer/blob/7a074e6fbcb8fb72f0e6c78a8ee9c289c7c1db66/pkg/finality-grandpa/past_rounds.go#L250))
- In practice will this channel ever fill up before another poll happens and all the messages are read?
- We could use `buffered` which just uses a slice to store the messages before they get flushed through the channel.

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.