diff --git a/gossipsub-interop/rust-libp2p/Cargo.lock b/gossipsub-interop/rust-libp2p/Cargo.lock index 2136a94f3..d3187763f 100644 --- a/gossipsub-interop/rust-libp2p/Cargo.lock +++ b/gossipsub-interop/rust-libp2p/Cargo.lock @@ -331,16 +331,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", + "digest", ] [[package]] @@ -574,19 +565,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -596,7 +574,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", "rustc_version", "subtle", @@ -673,22 +651,13 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -743,15 +712,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -759,21 +719,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -782,11 +728,11 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519 2.2.3", + "curve25519-dalek", + "ed25519", "rand_core 0.6.4", "serde", - "sha2 0.10.9", + "sha2", "subtle", "zeroize", ] @@ -1023,17 +969,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.16" @@ -1217,7 +1152,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1688,7 +1623,7 @@ dependencies = [ "quick-protobuf-codec", "rand 0.8.5", "regex", - "sha2 0.10.9", + "sha2", "tracing", "web-time", ] @@ -1721,12 +1656,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbb68ea10844211a59ce46230909fd0ea040e8a192454d4cc2ee0d53e12280eb" dependencies = [ "bs58", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "hkdf", "multihash", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.9", + "sha2", "thiserror 2.0.12", "tracing", "zeroize", @@ -2588,19 +2523,6 @@ version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -2622,16 +2544,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -2652,15 +2564,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" @@ -2679,15 +2582,6 @@ dependencies = [ "getrandom 0.3.3", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rcgen" version = "0.13.2" @@ -2810,14 +2704,14 @@ dependencies = [ "byteorder", "clap", "dns-lookup", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "futures", "hostname", "libp2p", "log", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "slog", "slog-async", "slog-json", @@ -2998,20 +2892,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -3022,7 +2903,7 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -3049,12 +2930,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -3131,11 +3006,11 @@ dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.3", + "curve25519-dalek", "rand_core 0.6.4", "ring", "rustc_version", - "sha2 0.10.9", + "sha2", "subtle", ] @@ -3578,12 +3453,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3972,7 +3841,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ - "curve25519-dalek 4.1.3", + "curve25519-dalek", "rand_core 0.6.4", "serde", "zeroize", diff --git a/gossipsub-interop/rust-libp2p/Cargo.toml b/gossipsub-interop/rust-libp2p/Cargo.toml index 0eaa0523a..9f204421e 100644 --- a/gossipsub-interop/rust-libp2p/Cargo.toml +++ b/gossipsub-interop/rust-libp2p/Cargo.toml @@ -32,5 +32,5 @@ slog-async = "2.8.0" dns-lookup = "2.0.2" byteorder = "1.4.3" hostname = "0.3.1" -ed25519-dalek = "1.0.1" +ed25519-dalek = "2.1.1" thiserror = "2.0.12" 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" + ] } ]