All Projects → ethresearch → sharding-p2p-poc

ethresearch / sharding-p2p-poc

Licence: other
Proof of Concept of Ethereum Serenity Peer-to-Peer Layer on libp2p PubSub System

Programming Languages

go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
HCL
1544 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to sharding-p2p-poc

js-libp2p-gossipsub
JavaScript implementation of Gossipsub
Stars: ✭ 76 (+117.14%)
Mutual labels:  pubsub, libp2p
go-ipfs-recovery
Data recovery for IPFS protocol.
Stars: ✭ 16 (-54.29%)
Mutual labels:  libp2p
Pubbie
A high performance pubsub client/server implementation for .NET Core
Stars: ✭ 122 (+248.57%)
Mutual labels:  pubsub
azure-iothub-pubsub-esp8266
Using Arduino PubSub library with Azure IoT Hub on an ESP8266
Stars: ✭ 17 (-51.43%)
Mutual labels:  pubsub
souls
SOULs 🔥 Build Serverless Apps faster like Rails. Powered by Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud.
Stars: ✭ 327 (+834.29%)
Mutual labels:  pubsub
rclex
Rclex: ROS 2 Client Library for Elixir
Stars: ✭ 77 (+120%)
Mutual labels:  pubsub
talek
a Private Publish Subscribe System
Stars: ✭ 39 (+11.43%)
Mutual labels:  pubsub
fpEs
Functional Programming for EcmaScript(Javascript)
Stars: ✭ 40 (+14.29%)
Mutual labels:  pubsub
shimmer animation
This shimmer animation widget can help you bring simple yet beautiful skeleton loaders to your flutter app with ease.
Stars: ✭ 29 (-17.14%)
Mutual labels:  pubsub
proximo
Interoperable GRPC based publish/subscribe
Stars: ✭ 38 (+8.57%)
Mutual labels:  pubsub
hanbo-db
hanboDB is a high available,low latency memory database system
Stars: ✭ 29 (-17.14%)
Mutual labels:  pubsub
terraform-splunk-log-export
Deploy Google Cloud log export to Splunk using Terraform
Stars: ✭ 26 (-25.71%)
Mutual labels:  pubsub
incubator-eventmesh
EventMesh is a dynamic event-driven application runtime used to decouple the application and backend middleware layer, which supports a wide range of use cases that encompass complex multi-cloud, widely distributed topologies using diverse technology stacks.
Stars: ✭ 939 (+2582.86%)
Mutual labels:  pubsub
simple redis
Simple and resilient redis client for rust.
Stars: ✭ 21 (-40%)
Mutual labels:  pubsub
watermill-amqp
AMQP Pub/Sub for the Watermill project.
Stars: ✭ 27 (-22.86%)
Mutual labels:  pubsub
learnp2p
https://learnp2p.org
Stars: ✭ 22 (-37.14%)
Mutual labels:  libp2p
dpos
A Simple DPoS Algorithm, Use go-libp2p implement.
Stars: ✭ 45 (+28.57%)
Mutual labels:  libp2p
u-observers
Simple and powerful implementation of the observer pattern.
Stars: ✭ 31 (-11.43%)
Mutual labels:  pubsub
wsapix
Next generation Websocket framework for nodejs
Stars: ✭ 17 (-51.43%)
Mutual labels:  pubsub
php-pubsub-kafka
A Kafka adapter for the php-pubsub package
Stars: ✭ 26 (-25.71%)
Mutual labels:  pubsub

sharding-p2p-poc

Build Status

This is a proof of concept of Ethereum sharding peer to peer layer with PubSub in libp2p, based on the idea from the slide.

For more information, please check out the document.

Getting Started

Prerequisites

  • go with 1.11.x or above is installed and properly configured on your machine.
    • $GOPATH variable has been specified.
    • $GOPATH/bin/ is part of your $PATH.
  • If you modify *.proto files, you will also need protoc to compile them to *.pb.go.

Build

$ git clone https://github.com/ethresearch/sharding-p2p-poc.git
$ cd sharding-p2p-poc
$ make build

Testing

$ go test -v

Usage

$ ./sharding-p2p-poc --help
Usage of ./sharding-p2p-poc:
  -bootnodes string
    	multiaddresses of the bootnodes
  -bootstrap
    	whether to do bootstrapping or not
  -client
    	is RPC client or server
  -ip string
    	ip listened by the process for incoming connections (default "127.0.0.1")
  -notifierport int
    	notifier port listened by the event rpc server
  -port int
    	port listened by the node for incoming connections (default 10000)
  -rpcip string
    	ip listened by the RPC server (default "127.0.0.1")
  -rpcport int
    	RPC port listened by the RPC server (default 13000)
  -seed int
    	set random seed for id generation
  -verbose
    	verbose output, i.e., log level is set to DEBUG, otherwise it's set to ERROR

Note

  • -bootstrap controls whether to spin up a bootstrap routine, which periodically queries its peers for new peers. There will be no effect if you feed -bootnodes without specifying the flag -bootstrap.
  • -client indicates we are running a client of sharding-p2p-poc. If not specifying the flag it will be run as the server by default. Details can be found in this section.

Example

Spin up a node with a running RPC server

$ ./sharding-p2p-poc -seed=1 -port=10001 -rpcport=13001 -bootstrap -bootnodes=/ip4/127.0.0.1/tcp/5566/ipfs/QmS5QmciTXXnCUCyxud5eWFenUMAmvAWSDa1c7dvdXRMZ7,/ip4/127.0.0.1/tcp/10001/ipfs/QmexAnfpHrhMmAC5UNQVS8iBuUUgDrMbMY17Cck2gKrqeX

This command spins up a node with seed 1, listening to new connections at port 10001, listening to RPC requests at port 13001, turning on bootstrapping mode with the flag-bootstrap, with the bootstrapping nodes /ip4/127.0.0.1/tcp/5566/ipfs/QmS5QmciTXXnCUCyxud5eWFenUMAmvAWSDa1c7dvdXRMZ7 and /ip4/127.0.0.1/tcp/10001/ipfs/QmexAnfpHrhMmAC5UNQVS8iBuUUgDrMbMY17Cck2gKrqeX.

Note: /ip4/127.0.0.1/tcp/10001/ipfs/QmexAnfpHrhMmAC5UNQVS8iBuUUgDrMbMY17Cck2gKrqeX is the format of ipfs address, which is in the form of /ip4/{ip}/tcp/{port}/{peerID}.

Command Line Interface

To give commands to the node you have spun up, you can run the command in this format:

$ ./sharding-p2p-poc -client -rpcport={rpcport} {method_name} {params}

The flag -rpcport is important since it is used to specify which node you are going to communicate with. If you don't specify it, the current default rpcport is 13000.

Since they are still subject to changes, please check out the documentations for further reference to the RPC methods. You can also check out the examples here.

Using Docker

make docker-build

Setting up tracer

See tracer in the document.

Contributing

Issues, PRs, or any kind of help are definitely welcomed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].