feat: add retries & update ping/go interop test (#32)

* .github/workflows/run-composition.yml: retry the build command

* .github/workflows/run-composition.yml: reduce run timeout for now

* .github/workflows/*: run on push and PR

* .github/actions: check testground health

* ping/_composition/*: reorder lib versions

* ping/: update with go-libp2p v0.22

* chore: gofmt

* .github/workflows: allow check test-plans during PR and push

* .github/workflows/*: introduce ping-interop-latest

* .github/workflow: tweak retry + timeout

* .github/actions/setup-testground: retry install

* ping/rust: update with v0.47.0 release
This commit is contained in:
Laurent Senta 2022-08-29 16:34:15 +02:00 committed by GitHub
parent 072d351a5f
commit d872355bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1682 additions and 92 deletions

View File

@ -16,7 +16,7 @@ runs:
go-version: "1.16.x"
- name: Install testground
run: make install
run: make install || make install || make install || make install
working-directory: testground
shell: bash
@ -38,4 +38,14 @@ runs:
task_timeout_min = 60
EOF
testground daemon > testground.out 2> testground.err &
fi;
fi;
- name: Check testground daemon health
run:
echo "Waiting for Testground to launch on 8042...";
while ! nc -z localhost 8042; do
sleep 1;
done;
echo "Testground launched";
testground healthcheck --runner local:docker --fix;
shell: bash

View File

@ -14,6 +14,8 @@ on:
required: false
description: repository to use as replace target
default: github.com/libp2p/go-libp2p
push:
pull_request:
name: go-libp2p ping - go test with testground.
@ -28,3 +30,5 @@ jobs:
custom_git_target: ${{ github.event.inputs.custom_git_target }} # nothing or "some-fork/go-libp2p"
custom_git_reference: ${{ github.event.inputs.custom_git_reference }} # a git branch
testground_endpoint: ${{ github.event.inputs.testground_endpoint }}
test_repository: ${{ (github.event.inputs && '') || github.repository }}
test_ref: ${{ (github.event.inputs && '') || github.event.pull_request.head.sha || github.sha }}

View File

@ -0,0 +1,35 @@
on:
workflow_dispatch:
inputs:
testground_endpoint:
type: string
required: false
description: testground endpoint
custom_git_reference:
description: the git commit or branch we're going to use for the custom target
required: false
type: string
custom_git_target:
description: the custom git fork url we're going to use for the custom target (github.com/some-fork/rust-libp2p)
required: false
type: string
custom_interop_target:
description: in the case of cross-implementation testing, the implementation target (go | rust | ...)
required: false
type: string
push:
pull_request:
name: libp2p ping - go + rust test (latest) with testground.
jobs:
run-ping-latest:
uses: "./.github/workflows/run-composition.yml"
with:
composition_file: "ping/_compositions/go-rust-interop-latest.toml"
custom_git_target: ${{ github.event.inputs.custom_git_target }} # nothing or "some-fork/go-libp2p"
custom_git_reference: ${{ github.event.inputs.custom_git_reference }} # a git reference
custom_interop_target: ${{ github.event.inputs.custom_interop_target }} # go | rust
testground_endpoint: ${{ github.event.inputs.testground_endpoint }}
test_repository: ${{ (github.event.inputs && '') || github.repository }}
test_ref: ${{ (github.event.inputs && '') || github.event.pull_request.head.sha || github.sha }}

View File

@ -14,6 +14,8 @@ on:
required: false
description: repository to use as replace target
default: github.com/libp2p/rust-libp2p
push:
pull_request:
name: rust-libp2p ping - rust test with testground.
@ -28,3 +30,5 @@ jobs:
custom_git_target: ${{ github.event.inputs.custom_git_target }} # nothing or "some-fork/go-libp2p"
custom_git_reference: ${{ github.event.inputs.custom_git_reference }} # a git reference
testground_endpoint: ${{ github.event.inputs.testground_endpoint }}
test_repository: ${{ (github.event.inputs && '') || github.repository }}
test_ref: ${{ (github.event.inputs && '') || github.event.pull_request.head.sha || github.sha }}

View File

@ -17,8 +17,10 @@ on:
description: in the case of cross-implementation testing, the implementation target (go | rust | ...)
required: false
type: string
push:
pull_request:
name: libp2p ping - go and rust test with testground.
name: libp2p ping - go and rust test (all) with testground.
jobs:
run-ping-latest:
@ -29,6 +31,8 @@ jobs:
custom_git_reference: ${{ github.event.inputs.custom_git_reference }} # a git reference
custom_interop_target: ${{ github.event.inputs.custom_interop_target }} # go | rust
testground_endpoint: ${{ github.event.inputs.testground_endpoint }}
test_repository: ${{ (github.event.inputs && '') || github.repository }}
test_ref: ${{ (github.event.inputs && '') || github.event.pull_request.head.sha || github.sha }}
run-ping-all:
uses: "./.github/workflows/run-composition.yml"
with:
@ -36,4 +40,6 @@ jobs:
custom_git_target: ${{ github.event.inputs.custom_git_target }} # nothing or "some-fork/go-libp2p"
custom_git_reference: ${{ github.event.inputs.custom_git_reference }} # a git reference
custom_interop_target: ${{ github.event.inputs.custom_interop_target }} # go | rust
testground_endpoint: ${{ github.event.inputs.testground_endpoint }}
testground_endpoint: ${{ github.event.inputs.testground_endpoint }}
test_repository: ${{ (github.event.inputs && '') || github.repository }}
test_ref: ${{ (github.event.inputs && '') || github.event.pull_request.head.sha || github.sha }}

View File

@ -22,13 +22,19 @@ on:
testground_endpoint:
required: false
type: string
test_repository:
required: false
type: string
test_ref:
required: false
type: string
jobs:
run_test:
name: Run a test with different versions
runs-on: ubuntu-latest
env:
TEST_PLAN_REPO: "libp2p/test-plans"
TEST_PLAN_BRANCH: "master"
TEST_PLAN_REPO: ${{ inputs.test_repository || 'libp2p/test-plans' }}
TEST_PLAN_BRANCH: ${{ inputs.test_ref || 'master' }}
TESTGROUND_ENDPOINT: ${{ inputs.testground_endpoint }}
defaults:
run:
@ -56,17 +62,23 @@ jobs:
echo "::set-output name=custom_git_sha::${SHA}"
- name: Build the composition file
working-directory: ./test-plans
timeout-minutes: 30
run: |
testground build composition \
-f ${{ inputs.composition_file }} \
--wait
for i in 1 2 3; do
echo "=== Attempt $i ==="
testground build composition \
-f ${{ inputs.composition_file }} \
--wait && exit 0;
sleep 10
done
exit 1
env:
GitReference: ${{ steps.resolve_reference.outputs.custom_git_sha || inputs.custom_git_reference }}
GitTarget: ${{ inputs.custom_git_target }}
InteropTarget: ${{ inputs.custom_interop_target }}
- name: Run the composition file
working-directory: ./test-plans
timeout-minutes: 10
timeout-minutes: 6
run: |
testground run composition \
-f ${{ inputs.composition_file }} \

View File

@ -1,31 +1,25 @@
[master]
GoVersion = '1.18'
Modfile = "go.v0.21.mod"
Selector = 'v0.21'
Modfile = "go.v0.22.mod"
Selector = 'v0.22'
[custom]
GoVersion = '1.18'
Modfile = "go.v0.22.mod"
Selector = 'v0.22'
[[groups]]
Id = "v0.22"
GoVersion = '1.18'
Modfile = "go.v0.22.mod"
Selector = 'v0.22'
[[groups]]
Id = "v0.21"
GoVersion = '1.18'
Modfile = "go.v0.21.mod"
Selector = 'v0.21'
[[groups]]
Id = "v0.11"
GoVersion = '1.14'
Modfile = "go.v0.11.mod"
Selector = 'v0.11'
[[groups]]
Id = "v0.17"
GoVersion = '1.16'
Modfile = "go.v0.17.mod"
Selector = 'v0.17'
[[groups]]
Id = "v0.19"
GoVersion = '1.17'
Modfile = "go.v0.19.mod"
Selector = 'v0.19'
[[groups]]
Id = "v0.20"
GoVersion = '1.18'
@ -33,7 +27,19 @@ Modfile = "go.v0.20.mod"
Selector = 'v0.20'
[[groups]]
Id = "v0.21"
GoVersion = '1.18'
Modfile = "go.v0.21.mod"
Selector = 'v0.21'
Id = "v0.19"
GoVersion = '1.17'
Modfile = "go.v0.19.mod"
Selector = 'v0.19'
[[groups]]
Id = "v0.17"
GoVersion = '1.16'
Modfile = "go.v0.17.mod"
Selector = 'v0.17'
[[groups]]
Id = "v0.11"
GoVersion = '1.14'
Modfile = "go.v0.11.mod"
Selector = 'v0.11'

View File

@ -1,17 +1,21 @@
[master]
CargoFeatures = 'libp2pv0480'
[custom]
CargoFeatures = 'libp2pv0480'
[[groups]]
Id = "v0.44.0"
CargoFeatures = 'libp2pv0440'
Id = "v0.47.0"
CargoFeatures = 'libp2pv0470'
[[groups]]
Id = "v0.46.0"
CargoFeatures = 'libp2pv0460'
[[groups]]
Id = "v0.45.1"
CargoFeatures = 'libp2pv0450'
[[groups]]
Id = "v0.46.0"
CargoFeatures = 'libp2pv0460'
[master]
CargoFeatures = 'libp2pv0470'
[custom]
CargoFeatures = 'libp2pv0470'
Id = "v0.44.0"
CargoFeatures = 'libp2pv0440'

View File

@ -9,12 +9,15 @@ import (
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/config"
noise "github.com/libp2p/go-libp2p-noise"
tls "github.com/libp2p/go-libp2p-tls"
)
type PeerAddrInfo = peer.AddrInfo
func NewLibp2(ctx context.Context, secureChannel string, opts ...config.Option) (host.Host, error) {
security := getSecurityByName(secureChannel)

View File

@ -9,12 +9,15 @@ import (
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/config"
noise "github.com/libp2p/go-libp2p-noise"
tls "github.com/libp2p/go-libp2p-tls"
)
type PeerAddrInfo = peer.AddrInfo
func NewLibp2(ctx context.Context, secureChannel string, opts ...config.Option) (host.Host, error) {
security := getSecurityByName(secureChannel)

View File

@ -9,12 +9,15 @@ import (
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/config"
noise "github.com/libp2p/go-libp2p/p2p/security/noise"
tls "github.com/libp2p/go-libp2p/p2p/security/tls"
)
type PeerAddrInfo = peer.AddrInfo
func NewLibp2(ctx context.Context, secureChannel string, opts ...config.Option) (host.Host, error) {
security := getSecurityByName(secureChannel)

View File

@ -0,0 +1,37 @@
//go:build v0.22
// +build v0.22
package compat
import (
"context"
"fmt"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p/config"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
noise "github.com/libp2p/go-libp2p/p2p/security/noise"
tls "github.com/libp2p/go-libp2p/p2p/security/tls"
)
type PeerAddrInfo = peer.AddrInfo
func NewLibp2(ctx context.Context, secureChannel string, opts ...config.Option) (host.Host, error) {
security := getSecurityByName(secureChannel)
return libp2p.New(
append(opts, security)...,
)
}
func getSecurityByName(secureChannel string) libp2p.Option {
switch secureChannel {
case "noise":
return libp2p.Security(noise.ID, noise.New)
case "tls":
return libp2p.Security(tls.ID, tls.New)
}
panic(fmt.Sprintf("unknown secure channel: %s", secureChannel))
}

110
ping/go/go.v0.22.mod Normal file
View File

@ -0,0 +1,110 @@
module github.com/libp2p/test-plans/ping/go
go 1.18
require (
github.com/libp2p/go-libp2p v0.22.0
github.com/libp2p/go-libp2p-core v0.19.1
github.com/libp2p/go-libp2p-noise v0.5.0
github.com/libp2p/go-libp2p-tls v0.5.0
github.com/testground/sdk-go v0.3.1-0.20211012114808-49c90fa75405
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
)
require (
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cheekybits/genny v1.0.0 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/huin/goupnp v1.0.3 // indirect
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect
github.com/ipfs/go-cid v0.2.0 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
github.com/koron/go-ssdp v0.0.3 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
github.com/libp2p/go-msgio v0.2.0 // indirect
github.com/libp2p/go-nat v0.1.0 // indirect
github.com/libp2p/go-netroute v0.2.0 // indirect
github.com/libp2p/go-openssl v0.1.0 // indirect
github.com/libp2p/go-reuseport v0.2.0 // indirect
github.com/libp2p/go-yamux/v3 v3.1.2 // indirect
github.com/lucas-clemente/quic-go v0.28.1 // indirect
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-pointer v0.0.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/miekg/dns v1.1.50 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.4 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multiaddr v0.6.0 // indirect
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
github.com/multiformats/go-multibase v0.1.1 // indirect
github.com/multiformats/go-multicodec v0.5.0 // indirect
github.com/multiformats/go-multihash v0.2.1 // indirect
github.com/multiformats/go-multistream v0.3.3 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/raulk/clock v1.1.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/testground/sync-service v0.1.0 // indirect
github.com/testground/testground v0.5.3 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.22.0 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
lukechampine.com/blake3 v1.1.7 // indirect
nhooyr.io/websocket v1.8.7 // indirect
)

1123
ping/go/go.v0.22.sum Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,6 @@ import (
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p/p2p/protocol/ping"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/testground/sdk-go/network"
"github.com/testground/sdk-go/run"
"github.com/testground/sdk-go/runtime"
@ -34,16 +32,16 @@ var testcases = map[string]interface{}{
//
// Other key objects are:
//
// * sync.Client (https://pkg.go.dev/github.com/testground/sdk-go/sync):
// used to coordinate instances with one another via synchronisations
// primitives like signals, barriers, pubsub. In the future, we plan to
// support more sophisticated patterns like locks, semaphores, etc.
// * network.Client (https://pkg.go.dev/github.com/testground/sdk-go/network):
// used to manipulate network configurations. The network.Client uses the
// sync service to communicate with the sidecar containers that manage
// the network configurations "from the outside". In other words, network
// configuration is NOT managed locally by the SDK. Rather, the SDK sends
// commands to the sidecar, and awaits until those commands are applied.
// - sync.Client (https://pkg.go.dev/github.com/testground/sdk-go/sync):
// used to coordinate instances with one another via synchronisations
// primitives like signals, barriers, pubsub. In the future, we plan to
// support more sophisticated patterns like locks, semaphores, etc.
// - network.Client (https://pkg.go.dev/github.com/testground/sdk-go/network):
// used to manipulate network configurations. The network.Client uses the
// sync service to communicate with the sidecar containers that manage
// the network configurations "from the outside". In other words, network
// configuration is NOT managed locally by the SDK. Rather, the SDK sends
// commands to the sidecar, and awaits until those commands are applied.
func main() {
// Delegate this run to the SDK. InvokeMap takes a map of test case names
@ -138,13 +136,13 @@ func runPing(runenv *runtime.RunEnv, initCtx *run.InitContext) error {
// 'peersTopic' topic, where others will read from.
var (
hostId = host.ID()
ai = &peer.AddrInfo{ID: hostId, Addrs: host.Addrs()}
ai = &compat.PeerAddrInfo{ID: hostId, Addrs: host.Addrs()}
// the peers topic where all instances will advertise their AddrInfo.
peersTopic = sync.NewTopic("peers", new(peer.AddrInfo))
peersTopic = sync.NewTopic("peers", new(compat.PeerAddrInfo))
// initialize a slice to store the AddrInfos of all other peers in the run.
peers = make([]*peer.AddrInfo, 0, runenv.TestInstanceCount)
peers = make([]*compat.PeerAddrInfo, 0, runenv.TestInstanceCount)
)
// Publish our own.
@ -152,7 +150,7 @@ func runPing(runenv *runtime.RunEnv, initCtx *run.InitContext) error {
// Now subscribe to the peers topic and consume all addresses, storing them
// in the peers slice.
peersCh := make(chan *peer.AddrInfo)
peersCh := make(chan *compat.PeerAddrInfo)
sctx, scancel := context.WithCancel(ctx)
sub := initCtx.SyncClient.MustSubscribe(sctx, peersTopic, peersCh)

290
ping/rust/Cargo.lock generated
View File

@ -1321,7 +1321,8 @@ dependencies = [
[[package]]
name = "libp2p"
version = "0.47.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e7cc4d88e132823122905158c8e019173da72117825ad82154890beff02967e"
dependencies = [
"bytes",
"futures",
@ -1329,17 +1330,46 @@ dependencies = [
"getrandom 0.2.7",
"instant",
"lazy_static",
"libp2p-core 0.35.0",
"libp2p-dns 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-dns 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-metrics 0.8.0",
"libp2p-mplex 0.35.0",
"libp2p-noise 0.38.0",
"libp2p-mplex 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-noise 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-ping 0.38.0",
"libp2p-swarm 0.38.0",
"libp2p-swarm-derive 0.29.0",
"libp2p-tcp 0.35.0",
"libp2p-websocket 0.37.0",
"libp2p-yamux 0.39.0",
"libp2p-tcp 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-websocket 0.37.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-yamux 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"multiaddr",
"parking_lot",
"pin-project 1.0.12",
"rand 0.7.3",
"smallvec",
]
[[package]]
name = "libp2p"
version = "0.48.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"bytes",
"futures",
"futures-timer",
"getrandom 0.2.7",
"instant",
"lazy_static",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-dns 0.35.0 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-metrics 0.9.0",
"libp2p-mplex 0.35.0 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-noise 0.38.0 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-ping 0.39.0",
"libp2p-swarm 0.39.0",
"libp2p-swarm-derive 0.30.0",
"libp2p-tcp 0.35.0 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-websocket 0.37.0 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-yamux 0.39.0 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"multiaddr",
"parking_lot",
"pin-project 1.0.12",
@ -1451,8 +1481,42 @@ dependencies = [
[[package]]
name = "libp2p-core"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
version = "0.35.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583862167683fea9e4712f2802910df067ca5f83e6b88979be16364904c2bdf1"
dependencies = [
"asn1_der",
"bs58",
"ed25519-dalek",
"either",
"fnv",
"futures",
"futures-timer",
"instant",
"lazy_static",
"log",
"multiaddr",
"multihash",
"multistream-select 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot",
"pin-project 1.0.12",
"prost 0.11.0",
"prost-build 0.11.1",
"rand 0.8.5",
"ring",
"rw-stream-sink 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.10.2",
"smallvec",
"thiserror",
"unsigned-varint",
"void",
"zeroize",
]
[[package]]
name = "libp2p-core"
version = "0.35.1"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"asn1_der",
"bs58",
@ -1529,11 +1593,26 @@ dependencies = [
[[package]]
name = "libp2p-dns"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8a09386cb4891343703614454a4e5f1084a22589f655d48a78c8dcad6b09d0a"
dependencies = [
"async-std-resolver",
"futures",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"parking_lot",
"smallvec",
"trust-dns-resolver",
]
[[package]]
name = "libp2p-dns"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"async-std-resolver",
"futures",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"log",
"parking_lot",
"smallvec",
@ -1579,14 +1658,26 @@ dependencies = [
[[package]]
name = "libp2p-metrics"
version = "0.8.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d1364ebcfe0146428fceee2d12e57ba79f94f001945bddecdb70d97406b91c2"
dependencies = [
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-ping 0.38.0",
"libp2p-swarm 0.38.0",
"prometheus-client 0.18.0",
]
[[package]]
name = "libp2p-metrics"
version = "0.9.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-ping 0.39.0",
"libp2p-swarm 0.39.0",
"prometheus-client 0.18.0",
]
[[package]]
name = "libp2p-mplex"
version = "0.32.0"
@ -1644,12 +1735,30 @@ dependencies = [
[[package]]
name = "libp2p-mplex"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17eb2b734c3c5dc49408e257a70872b42eb21cd3ca9dc34e3c20a2a131120088"
dependencies = [
"asynchronous-codec",
"bytes",
"futures",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"nohash-hasher",
"parking_lot",
"rand 0.7.3",
"smallvec",
"unsigned-varint",
]
[[package]]
name = "libp2p-mplex"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"asynchronous-codec",
"bytes",
"futures",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"log",
"nohash-hasher",
"parking_lot",
@ -1727,13 +1836,35 @@ dependencies = [
[[package]]
name = "libp2p-noise"
version = "0.38.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a550a023fe31aafb3a5e9831ac124d43060807d7c201a035922ec75857c7e3e"
dependencies = [
"bytes",
"curve25519-dalek 3.2.1",
"futures",
"lazy_static",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"prost 0.11.0",
"prost-build 0.11.1",
"rand 0.8.5",
"sha2 0.10.2",
"snow",
"static_assertions",
"x25519-dalek",
"zeroize",
]
[[package]]
name = "libp2p-noise"
version = "0.38.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"bytes",
"curve25519-dalek 3.2.1",
"futures",
"lazy_static",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"log",
"prost 0.11.0",
"prost-build 0.11.1",
@ -1796,18 +1927,34 @@ dependencies = [
[[package]]
name = "libp2p-ping"
version = "0.38.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75c6b87fb448f42fada8cb259704ac8589b0a11d559115725f307686f9ac346d"
dependencies = [
"futures",
"futures-timer",
"instant",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-swarm 0.38.0",
"log",
"rand 0.7.3",
"void",
]
[[package]]
name = "libp2p-ping"
version = "0.39.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"futures",
"futures-timer",
"instant",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"libp2p-swarm 0.39.0",
"log",
"rand 0.7.3",
"void",
]
[[package]]
name = "libp2p-swarm"
version = "0.35.0"
@ -1871,14 +2018,34 @@ dependencies = [
[[package]]
name = "libp2p-swarm"
version = "0.38.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91932a67f579ac6d66b51603a75b04c2737af7f84c9e44743f81978be951933"
dependencies = [
"either",
"fnv",
"futures",
"futures-timer",
"instant",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"pin-project 1.0.12",
"rand 0.7.3",
"smallvec",
"thiserror",
"void",
]
[[package]]
name = "libp2p-swarm"
version = "0.39.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"either",
"fnv",
"futures",
"futures-timer",
"instant",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"log",
"pin-project 1.0.12",
"rand 0.7.3",
@ -1910,7 +2077,18 @@ dependencies = [
[[package]]
name = "libp2p-swarm-derive"
version = "0.29.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27b2aac6a51e400168345fd89aaa5ce55395f49297e1d4fbf4acf0c6104ad096"
dependencies = [
"heck 0.4.0",
"quote",
"syn",
]
[[package]]
name = "libp2p-swarm-derive"
version = "0.30.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"heck 0.4.0",
"quote",
@ -1971,7 +2149,8 @@ dependencies = [
[[package]]
name = "libp2p-tcp"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebf0bba86870fd7b2d74f9b939066be5b984b46989b02d13d292fcf3caab3fdb"
dependencies = [
"async-io",
"futures",
@ -1979,7 +2158,23 @@ dependencies = [
"if-watch",
"ipnet",
"libc",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"socket2",
]
[[package]]
name = "libp2p-tcp"
version = "0.35.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"async-io",
"futures",
"futures-timer",
"if-watch",
"ipnet",
"libc",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"log",
"socket2",
]
@ -2043,12 +2238,31 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
version = "0.37.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d32644385b7787ada559b49957efd939d857ad1357d12f4cc4af7938635b6f20"
dependencies = [
"either",
"futures",
"futures-rustls",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"parking_lot",
"quicksink",
"rw-stream-sink 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"soketto",
"url",
"webpki-roots",
]
[[package]]
name = "libp2p-websocket"
version = "0.37.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"either",
"futures",
"futures-rustls",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"log",
"parking_lot",
"quicksink",
@ -2100,10 +2314,23 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
version = "0.39.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d1dc106f1f0c67aa89d59184dd8ae1db0bc683337dcdc36b6dc6e31dafc35ea"
dependencies = [
"futures",
"libp2p-core 0.35.0",
"libp2p-core 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot",
"thiserror",
"yamux",
]
[[package]]
name = "libp2p-yamux"
version = "0.39.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"futures",
"libp2p-core 0.35.1 (git+https://github.com/libp2p/rust-libp2p?branch=master)",
"parking_lot",
"thiserror",
"yamux",
@ -2268,7 +2495,7 @@ dependencies = [
[[package]]
name = "multistream-select"
version = "0.11.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"bytes",
"futures",
@ -3089,7 +3316,7 @@ dependencies = [
[[package]]
name = "rw-stream-sink"
version = "0.3.0"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#8931860b2f35e55316860a5fc0affb264c447c61"
source = "git+https://github.com/libp2p/rust-libp2p?branch=master#6855ab943bd7427a2135b46ad3d08f48fbf10872"
dependencies = [
"futures",
"pin-project 1.0.12",
@ -3452,6 +3679,7 @@ dependencies = [
"libp2p 0.45.1",
"libp2p 0.46.1",
"libp2p 0.47.0",
"libp2p 0.48.0",
"log",
"rand 0.8.5",
"serde",

View File

@ -23,4 +23,5 @@ futures = "0.3.1"
libp2pv0440 = {package = "libp2p", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.44.0", optional = true}
libp2pv0450 = {package = "libp2p", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.45.0", optional = true}
libp2pv0460 = {package = "libp2p", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.46.0", optional = true}
libp2pv0470 = {package = "libp2p", git = "https://github.com/libp2p/rust-libp2p", branch = "master", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.47.0", optional = true}
libp2pv0470 = {package = "libp2p", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.47.0", optional = true}
libp2pv0480 = {package = "libp2p", git = "https://github.com/libp2p/rust-libp2p", branch = "master", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.48.0", optional = true}

View File

@ -11,6 +11,9 @@ use testground::network_conf::{
};
pub mod libp2p {
#[cfg(all(feature = "libp2pv0480",))]
pub use libp2pv0480::*;
#[cfg(all(feature = "libp2pv0470",))]
pub use libp2pv0470::*;