An open API service indexing awesome lists of open source software.

https://github.com/starknet-io/starknet-p2p-specs

Specification of P2P protocol for StarkNet nodes
https://github.com/starknet-io/starknet-p2p-specs

Last synced: 11 months ago
JSON representation

Specification of P2P protocol for StarkNet nodes

Awesome Lists containing this project

README

          

# StarkNet P2P Specification

This repo contains and tracks the specification of the P2P protocol for StarkNet nodes.

## Starknet P2P Networks
There are three different networks that serve different type of applications:
* [Sync](./p2p/proto/sync/protocols.md) - responsible for downloading information about blocks existing in Starknet
* [Mempool](./p2p/proto/mempool/mempool.md) - responsible for handling transactions pending for insertion to Starknet
* Consensus - responsible for creating and adding new blocks to Starknet via staking

Each network has a separate discovery network. The Kademlia protocol names for those networks are:
* /starknet//sync/kad/1.0.0
* /starknet//mempool/kad/1.0.0
* /starknet//consensus/kad/1.0.0

A node that wants to connect to multiple networks should connect through a different port for each network.

The reasons to split the network by protocols and not have a singular network are:
* Allow adding custom security policies and authentication requirements for each network separately.
* Filter out nodes that don't support the capabilities you need
* Allow modular development of node's code stack by having a node comprised of different implementations for each network.