{"id":18966868,"url":"https://github.com/tronprotocol/libp2p","last_synced_at":"2025-07-11T18:34:48.150Z","repository":{"id":61586848,"uuid":"535939219","full_name":"tronprotocol/libp2p","owner":"tronprotocol","description":"The p2p system implemented in java language","archived":false,"fork":false,"pushed_at":"2025-04-15T23:11:58.000Z","size":795,"stargazers_count":45,"open_issues_count":6,"forks_count":26,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-22T07:19:52.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/tronprotocol.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-13T03:11:42.000Z","updated_at":"2025-04-16T06:03:56.000Z","dependencies_parsed_at":"2022-10-19T14:45:29.380Z","dependency_job_id":"d2d9fe7e-7458-45b2-a318-0d550e26f3db","html_url":"https://github.com/tronprotocol/libp2p","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/tronprotocol/libp2p","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Flibp2p","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Flibp2p/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Flibp2p/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Flibp2p/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tronprotocol","download_url":"https://codeload.github.com/tronprotocol/libp2p/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Flibp2p/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264871120,"owners_count":23676380,"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":[],"created_at":"2024-11-08T14:38:49.725Z","updated_at":"2025-07-11T18:34:48.108Z","avatar_url":"https://github.com/tronprotocol.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libp2p\nlibp2p is a p2p network SDK implemented in java language. The functional modules that have been implemented so far include\n* node discovery by p2p, include ipv4 and ipv6,\n* tcp connection management,\n* publish nodes on dns domain and node discovery by dns,\n* support compressed message transmission among nodes\n\n# Note\nStarting from version 2.2.6, `libp2p` has removed the logback component and adopted the logger facade. If logging is required, you need to introduce a logging framework manually.  \nHere’s how to include logback in your project using Gradle:\n\n1. Add the following dependencies to your build.gradle file\n  ```\n  dependencies {\n      implementation group: 'ch.qos.logback', name: 'logback-classic', version: 'x.x.xx'\n  }\n  ```\n2. Create or edit logback.xml in src/main/resources to configure logging. Here is an example of logback.xml:\n  ```xml\n  \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n  \u003cconfiguration\u003e\n      \u003cappender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\"\u003e\n          \u003cencoder\u003e\n              \u003cpattern\u003e%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n\u003c/pattern\u003e\n          \u003c/encoder\u003e\n      \u003c/appender\u003e\n      \u003croot level=\"INFO\"\u003e\n          \u003cappender-ref ref=\"STDOUT\" /\u003e\n      \u003c/root\u003e\n  \u003c/configuration\u003e\n```\n\n\n# Build\nBuilding libp2p requires `git` and `Oracle JDK 1.8` to be installed, other JDK versions are not supported yet. Make sure you operate on `Linux` and `MacOS` operating systems.\n\nClone the repo and switch to the `main` branch\n\n  ```bash\n  $ git clone https://github.com/tronprotocol/libp2p.git\n  $ cd libp2p\n  $ git checkout -t origin/main\n  ```\nThen, run the following command to build libp2p, the `libp2p.jar` file can be found in `libp2p/build/libs/` after being built successfully.\n```bash\n$ ./gradlew clean build -x test\n```\n\n# Usage\nlibp2p can run independently or be imported into other projects.\n\n## Run independently\nRunning libp2p requires Oracle JDK 1.8 to be installed, other JDK versions are not supported yet. Make sure you operate on Linux and MacOS operating systems.\nthen run the following command to start the node:\n```bash\n$ nohup java -jar libp2p.jar [options] \u003e\u003e start.log 2\u003e\u00261 \u0026\n```\nSee the manual for details on [options](https://github.com/tronprotocol/libp2p/tree/develop/src/main/java/org/tron/p2p/example/README.md)\n\n## How to include the dependency\n### Gradle Setting\nAdd repo setting:\n```bash\nrepositories {\n    ...\n    mavenCentral()\n}\n```\nThen add the required packages as dependencies. Please add dependencies locally.\n```bash\ndependencies {\n    implementation group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.6'\n}\n```\nOr if you are using the jar files as your dependencies:\n```bash\ndependencies {\n    implementation fileTree(dir:'libs', include: 'libp2p.jar')\n}\n```\n\n### Maven Setting\n```bash\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ecentral-repos\u003c/id\u003e\n        \u003cname\u003eCentral Repository\u003c/name\u003e\n        \u003curl\u003ehttps://repo.maven.apache.org/maven2\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.tronprotocol\u003c/groupId\u003e\n    \u003cartifactId\u003elibp2p\u003c/artifactId\u003e\n    \u003cversion\u003e2.2.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Example\nFor some examples please check our [example package](https://github.com/tronprotocol/libp2p/tree/develop/src/main/java/org/tron/p2p/example). \n\n# Integrity Check\n* After February 21, 2023， releases are signed the gpg key:\n  ```\n  pub: 1254 F859 D2B1 BD9F 66E7 107D F859 BCB4 4A28 290B\n  uid: build@tron.network\n  ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftronprotocol%2Flibp2p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftronprotocol%2Flibp2p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftronprotocol%2Flibp2p/lists"}