hexresearch / hexresearch/hschain

Performance optimizartions of gossip

Open
#520 2 comments 0 reactions 0 assignees View on GitHub
gossip network
Dominant language
C
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

It turns out that current implementation of gossip is suboptimal. What have been observed:

1. In dioxane benchmarks incresing block size makes throughtput of network worse. This hints that gossip could be superlinear in block size and/or delays from sending large block makes delays introduced by sending large block slows things down

2. Gossip takes a lot of space in profile:

![Screenshot_20191224_144806](https://user-images.githubusercontent.com/100394/71411953-6ca7bb80-265c-11ea-8a06-34a66275f75e.png)

### What could be done

There're many ways in which we can attack problem.

1. Monomorphize monad which is used by gossip. It doesn't call any user-provided callbacks so we pay performance price of polymorphic bind but don't use it!

2.Try to optimize gossip state machine. It's not clear that there are a lot of opportunity there but every bit helps

3. Maybe we need to rework network abstraction/state machine. Currently TCP assumtionsa re baked quite deeply into `NetworkAPI`

4. Maybe gossiping block in small chunks (#21) will improve performance as well

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.