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
- Host: GitHub
- URL: https://github.com/starknet-io/starknet-p2p-specs
- Owner: starknet-io
- Created: 2022-09-11T10:39:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-18T07:53:05.000Z (11 months ago)
- Last Synced: 2025-02-18T08:36:41.931Z (11 months ago)
- Size: 189 KB
- Stars: 49
- Watchers: 7
- Forks: 29
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
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.