diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f82398328..34ff0fca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: uses: Swatinem/rust-cache@v2.7.7 - name: Clippy - run: cargo clippy --keep-going --all-features --all-targets -- -D warnings + run: cargo clippy --keep-going --all-features --all-targets --locked -- -D warnings fmt: name: Check formatting @@ -81,10 +81,10 @@ jobs: uses: Swatinem/rust-cache@v2.7.7 - name: Build - run: cargo build --all-targets + run: cargo build --all-targets --locked - name: Test - run: cargo test --no-fail-fast + run: cargo test --no-fail-fast --locked wasm: name: Build and Test wasm @@ -159,7 +159,7 @@ jobs: run: echo "127.0.0.1 tlsnotaryserver.io" | sudo tee -a /etc/hosts - name: Run integration tests - run: cargo test --profile tests-integration --workspace --exclude tlsn-tls-client --exclude tlsn-tls-core --no-fail-fast -- --include-ignored + run: cargo test --locked --profile tests-integration --workspace --exclude tlsn-tls-client --exclude tlsn-tls-core --no-fail-fast -- --include-ignored coverage: runs-on: ubuntu-latest @@ -174,7 +174,7 @@ jobs: - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + run: cargo llvm-cov --all-features --workspace --locked --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -202,7 +202,7 @@ jobs: - name: Build Rust Binary run: | - cargo build --bin notary-server --release --features tee_quote + cargo build --locked --bin notary-server --release --features tee_quote cp --verbose target/release/notary-server $GITHUB_WORKSPACE - name: Upload Binary for use in the Gramine Job diff --git a/.gitignore b/.gitignore index 6119782a0..bd1464c20 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,3 @@ target/ # metrics *.csv - -# Cargo.lock -Cargo.lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1299a423..30adc7680 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,3 +61,21 @@ Comments for function arguments must adhere to this pattern: /// * `arg2` - The second argument. pub fn compute(... ``` + +## Cargo.lock + +We check in `Cargo.lock` to ensure reproducible builds. It must be updated whenever `Cargo.toml` changes. The TLSNotary team typically updates `Cargo.lock` in a separate commit after dependency changes. + +If you want to hide `Cargo.lock` changes from your local `git diff`, run: + +```sh +git update-index --assume-unchanged Cargo.lock +``` + +To start tracking changes again: +```sh +git update-index --no-assume-unchanged Cargo.lock +``` + +> ⚠️ Note: This only affects your local view. The file is still tracked in the repository and will be checked and used in CI. + diff --git a/Cargo.lock b/Cargo.lock index 5dddcd8f3..4aaa927bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,12 +51,12 @@ dependencies = [ [[package]] name = "aes" -version = "0.9.0-pre.3" +version = "0.9.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e4da00d9978020ddaa556c1747cfcafc3f375cfadb109acfe8b752cfc373bf" +checksum = "cd4838e4ad37bb032dea137f441d5f71c16c26c068af512e64c5bc13a88cdfc7" dependencies = [ "cfg-if", - "cipher 0.5.0-pre.8", + "cipher 0.5.0-rc.0", "cpufeatures", ] @@ -1501,9 +1501,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.24" +version = "1.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" +checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" dependencies = [ "jobserver", "libc", @@ -1671,12 +1671,12 @@ dependencies = [ [[package]] name = "cipher" -version = "0.5.0-pre.8" +version = "0.5.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276974d2acb7cf592603150941fc1ff6442acdeb1dc653ac2825928f4703c131" +checksum = "bd4ef774202f1749465fc7cf88d70fc30620e8cacd5429268f4bff7d003bd976" dependencies = [ - "crypto-common 0.2.0-rc.2", - "inout 0.2.0-rc.4", + "crypto-common 0.2.0-rc.3", + "inout 0.2.0-rc.5", ] [[package]] @@ -1707,9 +1707,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.38" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" +checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" dependencies = [ "clap_builder", "clap_derive", @@ -1717,9 +1717,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.38" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" +checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" dependencies = [ "anstream", "anstyle", @@ -1962,7 +1962,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.38", + "clap 4.5.39", "criterion-plot", "futures 0.3.31", "is-terminal", @@ -2055,9 +2055,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.2.0-rc.2" +version = "0.2.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170d71b5b14dec99db7739f6fc7d6ec2db80b78c3acb77db48392ccc3d8a9ea0" +checksum = "8a23fa214dea9efd4dacee5a5614646b30216ae0f05d4bb51bafb50e9da1c5be" dependencies = [ "hybrid-array", ] @@ -3245,12 +3245,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.5.1" @@ -3446,17 +3440,21 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9f1e950e0d9d1d3c47184416723cf29c0d1f93bd8cccf37e4beb6b44f31710" +checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", + "futures-core", "futures-util", "http 1.3.1", "http-body 1.0.1", "hyper 1.6.0", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", "socket2", "tokio", @@ -3710,9 +3708,9 @@ dependencies = [ [[package]] name = "inout" -version = "0.2.0-rc.4" +version = "0.2.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5e145e8ade9f74c0a5efc60ccb4e714b0144f7e2220b7ca64254feee71c57f" +checksum = "c774c86bce20ea04abe1c37cf0051c5690079a3a28ef5fdac2a5a0412b3d7d74" dependencies = [ "hybrid-array", ] @@ -3723,6 +3721,16 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is-terminal" version = "0.4.16" @@ -4026,9 +4034,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -4321,13 +4329,13 @@ name = "mpz-core" version = "0.1.0-alpha.3" source = "git+https://github.com/privacy-scaling-explorations/mpz?tag=v0.1.0-alpha.3#3bd2f557a541797d50e0aaac41be1e1a03e895d7" dependencies = [ - "aes 0.9.0-pre.3", + "aes 0.9.0-rc.0", "bcs", "bitvec", "blake3", "bytemuck", "cfg-if", - "cipher 0.5.0-pre.8", + "cipher 0.5.0-rc.0", "clmul", "hybrid-array", "itybity 0.3.1", @@ -4394,11 +4402,11 @@ name = "mpz-garble-core" version = "0.1.0-alpha.3" source = "git+https://github.com/privacy-scaling-explorations/mpz?tag=v0.1.0-alpha.3#3bd2f557a541797d50e0aaac41be1e1a03e895d7" dependencies = [ - "aes 0.9.0-pre.3", + "aes 0.9.0-rc.0", "bitvec", "blake3", "cfg-if", - "cipher 0.5.0-pre.8", + "cipher 0.5.0-rc.0", "derive_builder 0.11.2", "itybity 0.3.1", "mpz-circuits", @@ -4510,11 +4518,11 @@ name = "mpz-ot-core" version = "0.1.0-alpha.3" source = "git+https://github.com/privacy-scaling-explorations/mpz?tag=v0.1.0-alpha.3#3bd2f557a541797d50e0aaac41be1e1a03e895d7" dependencies = [ - "aes 0.9.0-pre.3", + "aes 0.9.0-rc.0", "blake3", "bytemuck", "cfg-if", - "cipher 0.5.0-pre.8", + "cipher 0.5.0-rc.0", "clmul", "ctr 0.9.2", "curve25519-dalek", @@ -4844,11 +4852,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.5.1", "libc", ] @@ -4900,9 +4908,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.72" +version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ "bitflags 2.9.1", "cfg-if", @@ -4941,9 +4949,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.108" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -5023,9 +5031,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -5033,9 +5041,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", @@ -5349,9 +5357,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +checksum = "9dee91521343f4c5c6a63edd65e54f31f5c92fe8978c40a4282f8372194c6a7d" dependencies = [ "proc-macro2", "syn 2.0.101", @@ -5690,14 +5698,13 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.15" +version = "0.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +checksum = "a2f8e5513d63f2e5b386eb5106dc67eaf3f84e95258e210489136b8b92ad6119" dependencies = [ "base64 0.22.1", "bytes", "futures-core", - "futures-util", "http 1.3.1", "http-body 1.0.1", "http-body-util", @@ -5716,19 +5723,19 @@ dependencies = [ "sync_wrapper", "tokio", "tower 0.5.2", + "tower-http 0.6.6", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-registry", ] [[package]] name = "reserve-port" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3747658ee2585ecf5607fa9887c92eff61b362ff5253dbf797dfeb73d33d78" +checksum = "21918d6644020c6f6ef1993242989bf6d4952d2e025617744f184c02df51c356" dependencies = [ "thiserror 2.0.12", ] @@ -7315,7 +7322,7 @@ version = "0.0.0" dependencies = [ "bincode", "chrono", - "clap 4.5.38", + "clap 4.5.39", "dotenv", "futures 0.3.31", "hex", @@ -7499,7 +7506,7 @@ dependencies = [ "tokio", "tokio-util", "tower 0.5.2", - "tower-http 0.6.5", + "tower-http 0.6.6", "tower-service", "tracing", "tracing-subscriber", @@ -7872,15 +7879,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc2d9e086a412a451384326f521c8123a99a466b329941a9403696bff9b0da2" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "bitflags 2.9.1", "bytes", + "futures-util", "http 1.3.1", "http-body 1.0.1", + "iri-string", "pin-project-lite", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -8711,7 +8721,7 @@ dependencies = [ "windows-interface", "windows-link", "windows-result", - "windows-strings 0.4.2", + "windows-strings", ] [[package]] @@ -8742,17 +8752,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" -[[package]] -name = "windows-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" -dependencies = [ - "windows-result", - "windows-strings 0.3.1", - "windows-targets 0.53.0", -] - [[package]] name = "windows-result" version = "0.3.4" @@ -8762,15 +8761,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" -dependencies = [ - "windows-link", -] - [[package]] name = "windows-strings" version = "0.4.2" diff --git a/crates/benches/binary/README.md b/crates/benches/binary/README.md index 010c1f22b..5a999ea96 100644 --- a/crates/benches/binary/README.md +++ b/crates/benches/binary/README.md @@ -25,7 +25,7 @@ Make sure you're in the `crates/benches/` directory, build the binaries, and the ```sh cd binary -cargo build --release +cargo build --release --locked sudo ./bench.sh ``` @@ -38,9 +38,9 @@ With a Chrome browser installed on your system, make sure you're in the `crates/ directory, build the wasm module, build the binaries, and then run the script: ```sh cd browser/wasm -wasm-pack build --release --target web +wasm-pack build --release --locked --target web cd ../../binary -cargo build --release --features browser-bench +cargo build --release --locked --features browser-bench sudo ./bench.sh ``` diff --git a/crates/benches/binary/benches.Dockerfile b/crates/benches/binary/benches.Dockerfile index e698c6f48..8731fdf4f 100644 --- a/crates/benches/binary/benches.Dockerfile +++ b/crates/benches/binary/benches.Dockerfile @@ -13,12 +13,12 @@ RUN \ rustup component add rust-src --toolchain nightly; \ cargo install wasm-pack; \ cd crates/benches/browser/wasm; \ - wasm-pack build --release --target web; \ + wasm-pack build --release --locked --target web; \ cd ../../binary; \ - cargo build --release --features browser-bench; \ + cargo build --release --features browser-bench --locked; \ else \ cd crates/benches/binary; \ - cargo build --release; \ + cargo build --release --locked; \ fi FROM debian:latest diff --git a/crates/notary/server/notary-server.Dockerfile b/crates/notary/server/notary-server.Dockerfile index f8732322b..98bee3f06 100644 --- a/crates/notary/server/notary-server.Dockerfile +++ b/crates/notary/server/notary-server.Dockerfile @@ -3,7 +3,7 @@ FROM rust:latest AS builder RUN apt-get update && apt-get install -y clang libclang-dev WORKDIR /usr/src/tlsn COPY . . -RUN cargo install --path crates/notary/server +RUN cargo install --locked --path crates/notary/server FROM ubuntu:latest WORKDIR /root/.notary