Skip to content

Commit

Permalink
Merge pull request #305 from libp2p/1.0.0
Browse files Browse the repository at this point in the history
1.0.0 Release
  • Loading branch information
StefanBratanov authored Aug 21, 2023
2 parents 4c3deba + 71c20d5 commit cebf411
Show file tree
Hide file tree
Showing 434 changed files with 7,800 additions and 2,920 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Execute Gradle build
run: ./gradlew -s build dokkaJar
25 changes: 6 additions & 19 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@ name: Close and mark stale issue

on:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.'
close-issue-message: 'This issue was closed because it is missing author input.'
stale-issue-label: 'kind/stale'
any-of-labels: 'need/author-input'
exempt-issue-labels: 'need/triage,need/community-input,need/maintainer-input,need/maintainers-input,need/analysis,status/blocked,status/in-progress,status/ready,status/deferred,status/inactive'
days-before-issue-stale: 6
days-before-issue-close: 7
enable-statistics: true
uses: pl-strflt/.github/.github/workflows/reusable-stale-issue.yml@v0.3
139 changes: 77 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,65 +6,74 @@
![Build Status](https://github.com/libp2p/jvm-libp2p/actions/workflows/build.yml/badge.svg?branch=master)
[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io)

> a libp2p implementation for the JVM, written in Kotlin 🔥
**⚠️ This is heavy work in progress! ⚠**

## Roadmap

The endeavour to build jvm-libp2p is split in two phases:

* **minimal phase (v0.x):** aims to provide the bare minimum stack that will
allow JVM-based Ethereum 2.0 clients to interoperate with other clients that
rely on fully-fledged libp2p stacks written in other languages.
* To achieve this, we have to be wire-compliant, but don't need to fulfill
the complete catalogue of libp2p abstractions.
* This effort will act as a starting point to evolve this project into a
fully-fledged libp2p stack for JVM environments, including Android
runtimes.
* We are shooting for Aug/early Sept 2019.
* Only Java-friendly façade.

* **maturity phase (v1.x):** upgrades the minimal version to a flexible and
versatile stack adhering to the key design principles of modularity and
pluggability that define the libp2p project. It adds features present in
mature implementations like go-libp2p, rust-libp2p, js-libp2p.
* will offer: pluggable peerstore, connection manager, QUIC transport,
circuit relay, AutoNAT, AutoRelay, NAT traversal, etc.
* Android-friendly.
* Kotlin coroutine-based façade, possibly a Reactive Streams façade too.
* work will begin after the minimal phase concludes.

## minimal phase (v0.x): Definition of Done

We have identified the following components on the path to attaining a minimal
implementation:

- [X] multistream-select 1.0
- [X] multiformats: [multiaddr](https://github.com/multiformats/multiaddr)
- [X] crypto (RSA, ed25519, secp256k1)
- [X] [secio](https://github.com/libp2p/specs/pull/106)
- [X] [connection bootstrapping](https://github.com/libp2p/specs/pull/168)
- [X] mplex as a multiplexer
- [X] stream multiplexing
- [X] TCP transport (dialing and listening)
- [X] Identify protocol
- [X] Ping protocol
- [X] [peer ID](https://github.com/libp2p/specs/pull/100)
- [X] noise security protocol
- [X] MDNS
- [X] Gossip 1.1 pubsub

We are explicitly leaving out the peerstore, DHT, pubsub, connection manager,
etc. and other subsystems or concepts that are internal to implementations and
do not impact the ability to hold communications with other libp2p processes.

## Adding as a dependency to your project:
![Maven version](https://img.shields.io/maven-metadata/v?label=jvm-libp2p-minimal&metadataUrl=https%3A%2F%2Fdl.cloudsmith.io%2Fpublic%2Flibp2p%2Fjvm-libp2p%2Fmaven%2Fio%2Flibp2p%2Fjvm-libp2p-minimal%2Fmaven-metadata.xml)

[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=flat-square)](https://cloudsmith.com)
[Libp2p](https://libp2p.io/) implementation for the JVM, written in Kotlin 🔥

## Components

List of components in the Libp2p spec and their JVM implementation status

| | Component | Status |
|--------------------------|-------------------------------------------------------------------------------------------------|:----------------:|
| **Transport** | tcp | :green_apple: |
| | [quic](https://github.com/libp2p/specs/tree/master/quic) | :tomato: |
| | websocket | :lemon: |
| | [webtransport](https://github.com/libp2p/specs/tree/master/webtransport) | |
| | [webrtc-browser-to-server](https://github.com/libp2p/specs/blob/master/webrtc/webrtc-direct.md) | |
| | [webrtc-private-to-private](https://github.com/libp2p/specs/blob/master/webrtc/webrtc.md) | |
| **Secure Communication** | [noise](https://github.com/libp2p/specs/blob/master/noise/) | :green_apple: |
| | [tls](https://github.com/libp2p/specs/blob/master/tls/tls.md) | :lemon: |
| | [plaintext](https://github.com/libp2p/specs/blob/master/plaintext/README.md) | :lemon: |
| | [secio](https://github.com/libp2p/specs/blob/master/secio/README.md) **(deprecated)** | :green_apple: |
| **Protocol Select** | [multistream](https://github.com/multiformats/multistream-select) | :green_apple: |
| **Stream Multiplexing** | [yamux](https://github.com/libp2p/specs/blob/master/yamux/README.md) | :lemon: |
| | [mplex](https://github.com/libp2p/specs/blob/master/mplex/README.md) | :green_apple: |
| **NAT Traversal** | [circuit-relay-v2](https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md) | |
| | [autonat](https://github.com/libp2p/specs/tree/master/autonat) | |
| | [hole-punching](https://github.com/libp2p/specs/blob/master/connections/hole-punching.md) | |
| **Discovery** | [bootstrap](https://github.com/libp2p/specs/blob/master/kad-dht/README.md#bootstrap-process) | |
| | random-walk | |
| | [mdns-discovery](https://github.com/libp2p/specs/blob/master/discovery/mdns.md) | :lemon: |
| | [rendezvous](https://github.com/libp2p/specs/blob/master/rendezvous/README.md) | |
| **Peer Routing** | [kad-dht](https://github.com/libp2p/specs/blob/master/kad-dht/README.md) | |
| **Publish/Subscribe** | floodsub | :lemon: |
| | [gossipsub](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) | :green_apple: |
| **Storage** | record | |
| **Other protocols** | [ping](https://github.com/libp2p/specs/blob/master/ping/ping.md) | :green_apple: |
| | [identify](https://github.com/libp2p/specs/blob/master/identify/README.md) | :green_apple: |

Legend:
- :green_apple: - tested in production
- :lemon: - prototype or beta, not tested in production
- :tomato: - in progress

## Gossip simulator

Deterministic Gossip simulator which may simulate networks as large as 10000 of peers

Please check the Simulator [README](tools/simulator/README.md) for more details

## Android support

The library is basically being developed with Android compatibility in mind.
However we are not aware of anyone using it in production.

The `examples/android-chatter` module contains working sample Android application. This module is ignored by the Gradle
build when no Android SDK is installed.
To include the Android module define a valid SDK location with an `ANDROID_HOME` environment variable
or by setting the `sdk.dir` path in your project's local properties file local.properties.

Importing the project into Android Studio should work out of the box.

## Adding as a dependency to your project

Hosting of artefacts is graciously provided by [Cloudsmith](https://cloudsmith.com).

[![Latest version of 'jvm-libp2p' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/libp2p/jvm-libp2p/maven/jvm-libp2p/latest/a=noarch;xg=io.libp2p/?render=true&show_latest=true)](https://cloudsmith.io/~libp2p/repos/jvm-libp2p/packages/detail/maven/jvm-libp2p/latest/a=noarch;xg=io.libp2p/)

As an alternative, artefacts are also available on [JitPack](https://jitpack.io/).

[![](https://jitpack.io/v/libp2p/jvm-libp2p.svg)](https://jitpack.io/#libp2p/jvm-libp2p)

### Using Gradle
Add the Cloudsmith repository to the `repositories` section of your Gradle file.
```groovy
Expand All @@ -77,7 +86,7 @@ Add the library to the `implementation` part of your Gradle file.
```groovy
dependencies {
// ...
implementation 'io.libp2p:jvm-libp2p-minimal:X.Y.Z-RELEASE'
implementation 'io.libp2p:jvm-libp2p:X.Y.Z-RELEASE'
}
```
### Using Maven
Expand All @@ -103,14 +112,12 @@ And then add jvm-libp2p as a dependency:
``` xml
<dependency>
<groupId>io.libp2p</groupId>
<artifactId>jvm-libp2p-minimal</artifactId>
<artifactId>jvm-libp2p</artifactId>
<version>X.Y.Z-RELEASE</version>
<type>pom</type>
</dependency>
```



## Building the project

To build the library you will need just
Expand All @@ -130,7 +137,15 @@ To build the library from the `jvm-libp2p` folder, run:
./gradlew build
```

After the build is complete you may find the library `.jar` file here: `jvm-libp2p/build/libs/jvm-libp2p-minimal-0.x.y-RELEASE.jar`
After the build is complete you may find the library `.jar` file here: `jvm-libp2p/build/libs/jvm-libp2p-X.Y.Z-RELEASE.jar`

## Notable users

- [Teku](https://github.com/Consensys/teku) - Ethereum Consensus Layer client
- [Nabu](https://github.com/peergos/nabu) - minimal Java implementation of IPFS
- [Peergos](https://github.com/peergos/peergos) - peer-to-peer encrypted global filesystem

(Please open a pull request if you want your project to be added here)

## License

Expand Down
Loading

0 comments on commit cebf411

Please sign in to comment.