From 91fe7d810dc91d28dc8647a8f6459836cf16c97a Mon Sep 17 00:00:00 2001 From: Valentyn Faychuk Date: Fri, 6 Dec 2024 04:19:04 +0200 Subject: [PATCH] remove unused dependencies Signed-off-by: Valentyn Faychuk --- .cargo/{config => config.toml} | 0 .gitignore | 12 +++++++++--- Cargo.lock | 8 -------- Cargo.toml | 8 -------- scripts/testnet.sh | 12 ++++++------ 5 files changed, 15 insertions(+), 25 deletions(-) rename .cargo/{config => config.toml} (100%) diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/.gitignore b/.gitignore index 9d00ece..86eeade 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ -**/target -**/build -#detee_challenge_nodes +target .idea .tmp + +# build artifacts +build +occlum +challenge.yaml +challenge_instance +docker/challenge.tar.gz +scripts/mint_sol diff --git a/Cargo.lock b/Cargo.lock index 6c1e756..47d2809 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2024,22 +2024,16 @@ version = "0.1.0" dependencies = [ "actix-web", "async-stream", - "base64 0.22.1", "chrono", "dashmap 6.1.0", "detee-sgx", "env_logger 0.11.5", - "hex", "hyper 1.4.1", "hyper-rustls 0.27.3", "hyper-util", - "lazy_static", - "log", "prost", "prost-types", "rand 0.8.5", - "rcgen", - "ring 0.17.8", "rustls 0.23.14", "serde", "serde_json", @@ -2055,8 +2049,6 @@ dependencies = [ "tonic", "tonic-build", "tower 0.5.1", - "tower-http", - "x509-parser 0.16.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 2d60b3e..259e6ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,19 +24,11 @@ tokio-stream = { version = "0.1", features = ["sync"] } tonic = "0.12" # sgx poc dependencies rustls = "0.23" -x509-parser = "0.16" -ring = "0.17" # hash256 -rcgen = "0.13" -log = "0.4" -hex = "0.4" tokio-rustls = "0.26" tower = { version = "0.5", features = ["full"] } -tower-http = { version = "0.5", features = ["full"] } hyper = "1.4.1" hyper-util = "0.1.7" hyper-rustls = { version = "0.27", features = ["http2"] } -base64 = "0.22" -lazy_static = "1.5" detee-sgx = { git = "ssh://git@gitea.detee.cloud/SGX/detee-sgx", branch = "hacker-challenge", features = ["tonic", "occlum", "sealing"] } diff --git a/scripts/testnet.sh b/scripts/testnet.sh index aacdc89..df8c0eb 100755 --- a/scripts/testnet.sh +++ b/scripts/testnet.sh @@ -7,19 +7,19 @@ cd "${script_dir}/.." # Go to the root of the project function build_mint_sol_tool() { echo "Building the mint_sol tool for testing" - if ! command -v cargo 2>&1 >/dev/null + if ! command -v cargo 2>&1 /dev/null then echo "cargo not found, run 'curl https://sh.rustup.rs -sSf | sh'" exit 1 fi - if ! command -v gcc 2>&1 >/dev/null + if ! command -v gcc 2>&1 /dev/null then echo "cc not found, run 'apt update && apt install build-essential'" exit 1 fi - if ! command -v protoc 2>&1 >/dev/null + if ! command -v protoc 2>&1 /dev/null then echo "protoc not found, run 'apt update && apt install protobuf-compiler'" exit 1 @@ -44,7 +44,7 @@ docker run --device /dev/sgx/enclave \ -d hacker-challenge:latest while true; do echo -n "." && sleep 1 - docker logs hacker-challenge | grep "SOL" && echo && break + docker logs hacker-challenge | grep -q "SOL" && echo && break done echo "Sending SOL to the root and waiting for the mint" @@ -52,7 +52,7 @@ address=$(docker logs hacker-challenge | grep 'SOL' | awk '{ print $NF }') "${script_dir}"/mint_sol "${address}" while true; do echo -n "." && sleep 1 - docker logs hacker-challenge | grep "Mint created" && echo && break + docker logs hacker-challenge | grep -q "Mint created" && echo && break done echo "Creating the cluster" @@ -71,5 +71,5 @@ for p in {31311..31320}; do curl -X POST "127.0.0.1:${p}/mint" \ --json '{"wallet": "EZT16iP1SQVUFf1AJN6oiE5BZPnyBUqaKDkZ4oZRsvhR"}' \ --connect-timeout 5 2> /dev/null - echo "" # Newline + echo "" done