mithril icon indicating copy to clipboard operation
mithril copied to clipboard

Mithril relay broadcasts signer registrations with P2P PubSub

Open jpraynaud opened this issue 11 months ago • 0 comments

Why

We want to keep experimenting with the P2P relay that we have prototyped to broadcast signer registrations in a similar way that we already broadcast signature registrations.

[!NOTE] This is only an experimentation on the Mithril relay which is not production ready yet in order to decentralize further Mithril networks. We already know that there is no consensus on the P2P network so we expect this experiment to work in an ideal adversary free environment.

What

The Mithril relay should handle the following behavior:

  • The relay on the signer side should broadcast messages on a P2P network
  • The relay on the aggregator side should catch these messages and forward them to the aggregator with a HTTP call

How

  • [x] Mithril relay broadcasts signer registrations in an ideal adversary free environment
  • [x] Mithril relay repeats signer registrations in order to minimize the expected on-boarding delay of new/recently offline signer/aggregator
  • [ ] Enhancements of the relay
    • [x] Fix CI flakiness due to P2P latency vs end to end test parameters
    • [x] Fix slow test (should_receive_signatures_from_signers_when_subscribed_to_pubsub
    • [x] Implement peer signature sent to aggregator retry
    • [ ] Make integration test with aggregator relay and signer relay (and cleanup P2P client)
    • [ ] Make integration test with variable number of aggregator relays and signer relays?
    • [ ] Repeat signature messages (maybe cap the number of repeat)?
    • [ ] Listen to multiple MultiAddr?
    • [ ] Display list of connected peers for debugging?
    • [ ] Remove ping behavior in peer?
    • [ ] Implement peer connection retry?

Parent issue

#1456

jpraynaud avatar Mar 22 '24 16:03 jpraynaud