-
Notifications
You must be signed in to change notification settings - Fork 0
ÐΞVP2P Networking
- Allow multiple protocols to leverage the same peer network & messaging system.
- Maximise code reuse between protocols.
Rather than having multiple peer networks for each of the different P2P protocols (currently Ethereum, Whisper and Swarm but with the potential for there to be several others), we have a single P2P mother protocol forming the spine of the network. This is then able to support multiple mutually-independent sub-protocols within its framework.
Thus we split off the basic P2P networking portion of the protocol from the Ethereum-specific portion. For now we manually reserve chunks of message-ID space. In a later revision of this protocol, we will have a dynamically negotiating message-ID scheme. For now, message IDs 0x00 to 0x0f are reserved for specifically P2P stuff. Message IDs 0x10 to 0x1f will be used by the eth protocol (Ethereum). Message IDs 0x20 to 0x2f will be used by the shh protocol (Whisper).
-
0x00Hello:[0x00: P, protocolVersion: P, clientVersion: B, [cap0: B, cap1: B, ...], listenPort: P, id: B_64]-
protocolVersion: The underlying network protocol.0 -
clientVersion: The underlying client. A user-readable string. -
capN: A peer-network capability code, readable ASCII and 3 letters. Currently only"eth"and"shh"are known. -
listenPort: The port on which the peer is listening for an incoming connection. -
id: The identity and public key of the peer.
-
-
0x01Disconnect: Unchanged. -
0x02Ping: Unchanged. -
0x03Pong: Unchanged. -
0x04GetPeers: Unchanged. -
0x05Peers: Unchanged.
Clients that are able and willing (i.e. not simply peer-servers) to take part in the Ethereum network should include the "eth" capability and recognise the following packets:
-
0x10Status:[0x10: P, protocolVersion: P, networkID: P, totalDifficulty: P, latestHash: B_32, genesisHash: B_32]-
protocolVersion: The version of the Ethereum protocol this peer implements.32at present. -
networkID: The network version of Ethereum for this peer.0for the official testnet. -
totalDifficulty: Total Difficulty of the best chain. Integer, as found in block header. -
latestHash: The hash of the latest block in our canonical chain, or alternatively put, the block with the highest validated total difficulty. -
GenesisHash: The hash of the Genesis block.
-
-
0x11GetTransactions: Unchanged. -
0x12Transactions: Unchanged. -
0x13GetBlockHashes: Unchanged. -
0x14BlockHashes: Unchanged. -
0x15GetBlocks: Unchanged. -
0x16Blocks: Unchanged.
Status should be sent immediately after the Hello message exchange has demonstrated both peers have the eth capability.
- Building on Linux
- Building on MacOS
- Building on Windows
- Compatibility Info and Build Tips
- Serpent LLL Only Build
- LLL PoC 6
- [LLL Examples for PoC 6](LLL Examples for PoC 5)
- PoC 6 JS API
- Client Development with PoC 6
- MetaCoin API
- Exchange API
- Name Registration API
- Coins API