Commit 195b901c authored by Vsevolod Stakhov's avatar Vsevolod Stakhov Committed by GitHub
Browse files

Implement grid topology routing for the statement distribution subsystem (#5476)



* Move NewGossipTopology -> SessionGridTopology outside as this implementation is shared

* Add method to return peers difference between topologies

* Implement basic grid topology usage for the bitfield distribution

* Fix tests

* Oops, fix tests

* Add some tests for random routing

* Add a unit test for topology distribution

* Store the current and the previous topology to match sessions boundaries

* Update tests

* Update node/network/bitfield-distribution/src/lib.rs

Co-authored-by: default avatarAndronik <[email protected]>

* Update node/network/protocol/src/grid_topology.rs

Co-authored-by: default avatarAndronik <[email protected]>

* Update node/network/bitfield-distribution/src/lib.rs

Co-authored-by: default avatarAndronik <[email protected]>

* Add some debug

* Fix tests as HashSet order is undefined

* Move session bounded topology to the common code part

* Fix tests

* Allow to select routing by peer index

* Implement grid topology in the statement distribution subsystem

* Fix tests compilation

* Fix test

* Refactor API slightly

* Address review comments

* Reduce runtime error logging severity

* Update node/network/protocol/src/grid_topology.rs

Co-authored-by: default avatarBernhard Schuster <[email protected]>

* Update node/network/bitfield-distribution/src/tests.rs

Co-authored-by: default avatarBernhard Schuster <[email protected]>

* Fmt run

* Use named struct

* Fix logging stuff

* One more accidental fmt damage

* Increase active queue size and add metrics

Signed-off-by: default avatarAndrei Sandu <[email protected]>

* Revert "Increase active queue size and add metrics"

This reverts commit c4f48e8bded6dfeb9c62814ba2f8d815c34b04cf.

* Use validator index to choose the routing strategy

Noted by: @rphmeier



* Fix test after distribution logic fix

Co-authored-by: default avatarAndronik <[email protected]>
Co-authored-by: default avatarBernhard Schuster <[email protected]>
Co-authored-by: default avatarAndrei Sandu <[email protected]>
parent 28cae2ef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment