Skip to content

Latest commit

 

History

History
47 lines (19 loc) · 2.11 KB

peer-discovery-test.md

File metadata and controls

47 lines (19 loc) · 2.11 KB

Peer discovery with OCaml nodes

A diverse blockchain network consisting of at least two different node implementations is more decentralized, robust, and resilient to external as well as internal threats. However, with two different node implementations, we must also develop cross-compatibility between them.

Peer discovery between the two node implementations is a good starting point. We want to ensure that native Mina nodes written in OCaml can discover and connect to the Rust-based Openmina node.

We have developed a global test to ensure that any OCaml node can discover and connect to the Openmina node.

Steps

In these diagrams, we describe three different types of connections between peers:

legend
  1. We launch an OCaml node as a seed node. We run three additional non-seed OCaml nodes, connecting only to the seed node.

PeerDiscovery-step1

  1. Wait 3 minutes for the OCaml nodes to start and connect to the seed node.

PeerDiscovery-step2

  1. Run the Openmina node (application under test).

    Wait for the Openmina node to complete peer discovery and connect to all four OCaml nodes. This step ensures that the Openmina node can discover OCaml nodes.

PeerDiscovery-step3

  1. Run another OCaml node that only knows the address of the OCaml seed node, and will only connect to the seed node.

PeerDiscovery-step4

  1. Wait for the additional OCaml node to initiate a connection to the Openmina node. (This step ensures that the OCaml node can discover the Openmina node).

PeerDiscovery-step5

  1. Fail the test on the timeout.