{"id":13673893,"url":"https://github.com/ethresearch/sharding-p2p-poc","last_synced_at":"2025-04-12T10:40:27.942Z","repository":{"id":57608655,"uuid":"138018957","full_name":"ethresearch/sharding-p2p-poc","owner":"ethresearch","description":"Proof of Concept of Ethereum Serenity Peer-to-Peer Layer on libp2p PubSub System","archived":false,"fork":false,"pushed_at":"2019-03-22T09:44:39.000Z","size":2062,"stargazers_count":40,"open_issues_count":19,"forks_count":19,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-26T05:33:12.598Z","etag":null,"topics":["ethereum","libp2p","pubsub","serenity"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethresearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-20T10:45:28.000Z","updated_at":"2024-07-09T05:50:59.000Z","dependencies_parsed_at":"2022-09-03T10:21:42.650Z","dependency_job_id":null,"html_url":"https://github.com/ethresearch/sharding-p2p-poc","commit_stats":null,"previous_names":["mhchia/sharding-poc"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethresearch%2Fsharding-p2p-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethresearch%2Fsharding-p2p-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethresearch%2Fsharding-p2p-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethresearch%2Fsharding-p2p-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethresearch","download_url":"https://codeload.github.com/ethresearch/sharding-p2p-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248556570,"owners_count":21124141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","libp2p","pubsub","serenity"],"created_at":"2024-08-02T11:00:27.882Z","updated_at":"2025-04-12T10:40:27.909Z","avatar_url":"https://github.com/ethresearch.png","language":"Go","funding_links":[],"categories":["Ethereum"],"sub_categories":["Tech"],"readme":"# sharding-p2p-poc\n\n[![Build Status](https://travis-ci.org/ethresearch/sharding-p2p-poc.svg?branch=master)](https://travis-ci.org/ethresearch/sharding-p2p-poc) [![](https://img.shields.io/badge/gitter-sharding--p2p--poc-ed1965.svg)](https://gitter.im/sharding-p2p-testing/Lobby)\n\n\u003e This is a proof of concept of Ethereum sharding peer to peer layer with PubSub in libp2p, based on the idea from the [slide](\nhttps://docs.google.com/presentation/d/11a0jibNz0fyUnsWt9fa2MmghHANdHAAABa0TV7EieHs/).\n\nFor more information, please check out the [document](https://github.com/ethresearch/sharding-p2p-poc/blob/master/docs/README.md).\n\n## Getting Started\n\n### Prerequisites\n\n- `go` with `1.11.x` or above is installed and properly configured on your machine.\n    - `$GOPATH` variable has been [specified](https://github.com/golang/go/wiki/GOPATH).\n    - `$GOPATH/bin/` is part of your `$PATH`.\n- If you modify `*.proto` files, you will also need `protoc` to compile them to `*.pb.go`.\n    - e.g., [Install protoc on mac](https://medium.com/@erika_dike/installing-the-protobuf-compiler-on-a-mac-a0d397af46b8).\n\n### Build\n\n```bash\n$ git clone https://github.com/ethresearch/sharding-p2p-poc.git\n$ cd sharding-p2p-poc\n$ make build\n```\n\n### Testing\n\n```bash\n$ go test -v\n```\n\n## Usage\n\n```bash\n$ ./sharding-p2p-poc --help\nUsage of ./sharding-p2p-poc:\n  -bootnodes string\n    \tmultiaddresses of the bootnodes\n  -bootstrap\n    \twhether to do bootstrapping or not\n  -client\n    \tis RPC client or server\n  -ip string\n    \tip listened by the process for incoming connections (default \"127.0.0.1\")\n  -notifierport int\n    \tnotifier port listened by the event rpc server\n  -port int\n    \tport listened by the node for incoming connections (default 10000)\n  -rpcip string\n    \tip listened by the RPC server (default \"127.0.0.1\")\n  -rpcport int\n    \tRPC port listened by the RPC server (default 13000)\n  -seed int\n    \tset random seed for id generation\n  -verbose\n    \tverbose output, i.e., log level is set to DEBUG, otherwise it's set to ERROR\n```\n\n**Note**\n- `-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`.\n- `-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](#command-line-interface).\n\n### Example\n\n#### Spin up a node with a running RPC server\n\n```bash\n$ ./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\n```\nThis 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`.\n\n**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}`.\n\n#### Command Line Interface\n\nTo give commands to the node you have spun up, you can run the command in this format:\n\n```bash\n$ ./sharding-p2p-poc -client -rpcport={rpcport} {method_name} {params}\n```\n\nThe 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`.\n\nSince they are still subject to changes, please check out the [documentations](https://notes.ethereum.org/s/HJdvvyTmm) for further reference to the RPC methods. You can also check out the examples [here](https://github.com/ethresearch/sharding-p2p-poc/tree/master/cli-example).\n\n## Using Docker\n\n```\nmake docker-build\n```\n\n### Setting up tracer\n\nSee [tracer](./docs/tracer.md) in the document.\n\n## Contributing\n\nIssues, PRs, or any kind of help are definitely welcomed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethresearch%2Fsharding-p2p-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethresearch%2Fsharding-p2p-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethresearch%2Fsharding-p2p-poc/lists"}