Motivation
EthStorage, a decentralized storage protocol based on Ethereum, hopes to use the portal network to support their proposed web3:// protocol. Because EthStorage is based on the Go technology stack, and there were only three portal network clients: rust, nim and js, so we started to build a Go client from scratch. Read this blog for further details.
Inspection
By reading the Spec of the Portal Network, we learned that its core mechanism is as follows.
Its wire protocol is a DHT network protocol based on discv5, if the length of a single content is greater than the limit of a single discv5 packet, it needs to be combined with the utp protocol to transfer multiple discv5 packets.
At the same time, content uses SSZ to implement encoding and decoding.
On top of the decentralized storage layer, the JSON RPC interface is provided externally to provide services.
Custom sub protocols can be implemented on top of the wire protocol, and there are currently three sub networks: history, beacon and state.