diff --git a/gossipsub-interop/rust-libp2p/Cargo.lock b/gossipsub-interop/rust-libp2p/Cargo.lock index 2136a94f3..0f675c0c0 100644 --- a/gossipsub-interop/rust-libp2p/Cargo.lock +++ b/gossipsub-interop/rust-libp2p/Cargo.lock @@ -2009,11 +2009,11 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -2214,12 +2214,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -2296,12 +2295,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "parking" version = "2.2.1" @@ -2729,17 +2722,8 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2750,15 +2734,9 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.5" @@ -3463,14 +3441,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", diff --git a/gossipsub-interop/rust-libp2p/Cargo.toml b/gossipsub-interop/rust-libp2p/Cargo.toml index 0eaa0523a..d07dabcd8 100644 --- a/gossipsub-interop/rust-libp2p/Cargo.toml +++ b/gossipsub-interop/rust-libp2p/Cargo.toml @@ -18,7 +18,7 @@ libp2p = { version = "0.55.0", features = [ tokio = { version = "1.33.0", features = ["full"] } futures = "0.3.28" tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.20", features = ["env-filter"] } serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" clap = { version = "4.4.4", features = ["derive"] } diff --git a/transport-interop/Makefile b/transport-interop/Makefile index afd539550..2c7ccf3a4 100644 --- a/transport-interop/Makefile +++ b/transport-interop/Makefile @@ -5,9 +5,9 @@ RUST_CHROMIUM_SUBDIRS := $(wildcard impl/rust-chromium/*/.) NIM_SUBDIRS := $(wildcard impl/nim/*/.) ZIG_SUBDIRS := $(wildcard impl/zig/*/.) JVM_SUBDIRS := $(wildcard impl/jvm/*/.) +C_SUBDIRS := $(wildcard impl/c/*/.) -all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(RUST_CHROMIUM_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JVM_SUBDIRS) - +all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(RUST_CHROMIUM_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JVM_SUBDIRS) $(C_SUBDIRS) $(JS_SUBDIRS): $(MAKE) -C $@ $(GO_SUBDIRS): @@ -22,5 +22,7 @@ $(ZIG_SUBDIRS): $(MAKE) -C $@ $(JVM_SUBDIRS): $(MAKE) -C $@ +$(C_SUBDIRS): + $(MAKE) -C $@ -.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(RUST_CHROMIUM_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JVM_SUBDIRS) all +.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(RUST_CHROMIUM_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JVM_SUBDIRS) $(C_SUBDIRS) all diff --git a/transport-interop/impl/c/.gitignore b/transport-interop/impl/c/.gitignore new file mode 100644 index 000000000..d84214176 --- /dev/null +++ b/transport-interop/impl/c/.gitignore @@ -0,0 +1,4 @@ +c-libp2p-*.zip +c-libp2p-* +c-libp2p-*/* +image.json diff --git a/transport-interop/impl/c/v0.0.1/Makefile b/transport-interop/impl/c/v0.0.1/Makefile new file mode 100644 index 000000000..8380edb39 --- /dev/null +++ b/transport-interop/impl/c/v0.0.1/Makefile @@ -0,0 +1,29 @@ +image_name := c-v0.0.1 +commitSha := 2d6ccc96b39a5129ebdaf5b2577eba5880f3dc0a +repo_url := https://github.com/Pier-Two/c-libp2p.git +dir_name := c-libp2p-$(commitSha) + +all: image.json + +image.json: + rm -rf $(dir_name) + git clone $(repo_url) $(dir_name) + cd $(dir_name) && git checkout $(commitSha) + cd $(dir_name) && git submodule update --init --recursive lib/picoquic + cd $(dir_name) && \ + mkdir -p lib/secp256k1 && wget -O secp256k1.zip https://github.com/bitcoin-core/secp256k1/archive/master.zip && unzip -o secp256k1.zip && mv secp256k1-master/* lib/secp256k1/ && rm -rf secp256k1.zip secp256k1-master && \ + mkdir -p lib/libtomcrypt && wget -O libtomcrypt.zip https://github.com/libtom/libtomcrypt/archive/develop.zip && unzip -o libtomcrypt.zip && mv libtomcrypt-develop/* lib/libtomcrypt/ && rm -rf libtomcrypt.zip libtomcrypt-develop && \ + mkdir -p lib/libtommath && wget -O libtommath.zip https://github.com/libtom/libtommath/archive/master.zip && unzip -o libtommath.zip && mv libtommath-master/* lib/libtommath/ && rm -rf libtommath.zip libtommath-master && \ + mkdir -p lib/libeddsa && wget -O libeddsa.zip https://github.com/phlay/libeddsa/archive/master.zip && unzip -o libeddsa.zip && mv libeddsa-master/* lib/libeddsa/ && rm -rf libeddsa.zip libeddsa-master && \ + mkdir -p lib/noise-c && wget -O noise-c.zip https://github.com/uink45/noise-c/archive/master.zip && unzip -o noise-c.zip && mv noise-c-master/* lib/noise-c/ && rm -rf noise-c.zip noise-c-master && \ + mkdir -p lib/wjcryptlib && wget -O wjcryptlib.zip https://github.com/WaterJuice/WjCryptLib/archive/master.zip && unzip -o wjcryptlib.zip && mv WjCryptLib-master/* lib/wjcryptlib/ && rm -rf wjcryptlib.zip WjCryptLib-master && \ + mkdir -p lib/sha3 && wget -O sha3.zip https://github.com/pablotron/sha3/archive/main.zip && unzip -o sha3.zip && mv sha3-main/* lib/sha3/ && rm -rf sha3.zip sha3-main && \ + mkdir -p lib/c20p1305 && wget -O c20p1305.zip https://github.com/wg/c20p1305/archive/master.zip && unzip -o c20p1305.zip && mv c20p1305-master/* lib/c20p1305/ && rm -rf c20p1305.zip c20p1305-master + cd $(dir_name) && IMAGE_NAME=$(image_name) ../../../../dockerBuildWrapper.sh -f interop-tests/Dockerfile . + docker image inspect $(image_name) -f '{{.Id}}' | \ + xargs -I {} echo '{"imageID": "{}"}' > $@ + +clean: + rm -rf image.json $(dir_name) + +.PHONY: all clean diff --git a/transport-interop/package-lock.json b/transport-interop/package-lock.json index c2916e005..3df99c364 100644 --- a/transport-interop/package-lock.json +++ b/transport-interop/package-lock.json @@ -1,11 +1,11 @@ { - "name": "Multidimensional libp2p interop test", + "name": "@libp2p/transport-interop", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "Multidimensional libp2p interop test", + "name": "@libp2p/transport-interop", "version": "0.0.1", "license": "MIT", "dependencies": { diff --git a/transport-interop/versionsInput.json b/transport-interop/versionsInput.json index 0fc6d27da..6b5054690 100644 --- a/transport-interop/versionsInput.json +++ b/transport-interop/versionsInput.json @@ -281,5 +281,19 @@ "mplex", "yamux" ] + }, + { + "id": "c-v0.0.1", + "transports": [ + "tcp", + "quic-v1" + ], + "secureChannels": [ + "noise" + ], + "muxers": [ + "mplex", + "yamux" + ] } ]