From 0829ba4d073523abba16d20de294180b4b027e4d Mon Sep 17 00:00:00 2001 From: Valentyn Faychuk Date: Wed, 18 Dec 2024 20:26:46 +0200 Subject: [PATCH] switch to opensource --- Cargo.lock | 31 ++++++++++++------------- Cargo.toml | 56 +++++++++++++++++++++++----------------------- deploy_ed25519 | 7 ------ scripts/package.sh | 20 ++--------------- 4 files changed, 44 insertions(+), 70 deletions(-) delete mode 100644 deploy_ed25519 diff --git a/Cargo.lock b/Cargo.lock index 56b01d3..46abf2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1526,10 +1526,9 @@ dependencies = [ [[package]] name = "detee-sgx" version = "0.1.0" -source = "git+ssh://git@gitea.detee.cloud/SGX/detee-sgx?branch=hacker-challenge#2f032b5c5448be40feda466bb457821ef814f959" +source = "git+https://gitea.detee.cloud/general/detee-sgx#f7eaed1392ae79ecc1105a50d919026f016a4e78" dependencies = [ "aes-gcm", - "base64 0.22.1", "hex", "hyper 1.4.1", "hyper-rustls 0.27.3", @@ -1537,12 +1536,11 @@ dependencies = [ "lazy_static", "log", "pbkdf2 0.12.2", - "prost", "rcgen", "ring 0.17.8", - "rustls 0.23.14", + "rustls 0.23.20", "sha2 0.10.8", - "tokio-rustls 0.26.0", + "tokio-rustls 0.26.1", "tonic", "tonic-build", "tower 0.5.1", @@ -2035,7 +2033,7 @@ dependencies = [ "prost", "prost-types", "rand 0.8.5", - "rustls 0.23.14", + "rustls 0.23.20", "serde", "serde_json", "serde_with 3.11.0", @@ -2045,7 +2043,7 @@ dependencies = [ "spl-associated-token-account 5.0.1", "spl-token", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls 0.26.1", "tokio-stream", "tonic", "tonic-build", @@ -2321,11 +2319,11 @@ dependencies = [ "hyper 1.4.1", "hyper-util", "log", - "rustls 0.23.14", + "rustls 0.23.20", "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls 0.26.1", "tower-service", ] @@ -3661,9 +3659,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.14" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "aws-lc-rs", "log", @@ -3719,9 +3717,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -5520,12 +5518,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.14", - "rustls-pki-types", + "rustls 0.23.20", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index ee464d2..4de45e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,38 +5,38 @@ version = "0.1.0" edition = "2021" [dependencies] -once_cell = "1.20.2" -env_logger = "0.11.5" -actix-web = "4.9.0" -async-stream = "0.3.6" -chrono = "0.4.38" -dashmap = "6.1.0" -prost = "0.13.3" -prost-types = "0.13.3" -rand = "0.8.5" -serde = { version = "1.0.210", features = ["derive"] } -serde_with = { version = "3.11.0", features = ["macros", "base64"] } -serde_json = "1.0.128" -solana-client = "2.0.13" -solana-program = "2.0.13" -solana-sdk = "2.0.13" -spl-associated-token-account = "5.0.1" -spl-token = "6.0.0" -tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread", "fs"] } # this can be "full" -tokio-stream = { version = "0.1.16", features = ["sync"] } -tonic = "0.12.3" +once_cell = "1.20" +env_logger = "0.11" +actix-web = "4.9" +async-stream = "0.3" +chrono = "0.4" +dashmap = "6.1" +prost = "0.13" +prost-types = "0.13" +rand = "0.8" +serde = { version = "1.0", features = ["derive"] } +serde_with = { version = "3.11", features = ["macros", "base64"] } +serde_json = "1.0" +solana-client = "2.0" +solana-program = "2.0" +solana-sdk = "2.0" +spl-associated-token-account = "5.0" +spl-token = "6.0" +tokio = { version = "1.40", features = ["macros", "rt-multi-thread", "fs"] } # this can be "full" +tokio-stream = { version = "0.1", features = ["sync"] } +tonic = "0.12" # sgx poc dependencies -rustls = "0.23.14" -tokio-rustls = "0.26.26" -tower = { version = "0.5.1", features = ["full"] } -tower-http = { version = "0.6.2", features = ["full"] } -hyper = "1.4.1" -hyper-util = "0.1.7" -hyper-rustls = { version = "0.27.3", features = ["http2"] } +rustls = "0.23" +tokio-rustls = "0.26" +tower = { version = "0.5", features = ["full"] } +tower-http = { version = "0.6", features = ["full"] } +hyper = "1.4" +hyper-util = "0.1" +hyper-rustls = { version = "0.27", features = ["http2"] } detee-sgx = { git = "https://gitea.detee.cloud/general/detee-sgx", features = ["tonic", "occlum", "sealing"] } [build-dependencies] -tonic-build = "0.12.3" +tonic-build = "0.12" [patch.crates-io.curve25519-dalek] git = "https://github.com/anza-xyz/curve25519-dalek.git" diff --git a/deploy_ed25519 b/deploy_ed25519 deleted file mode 100644 index de8b221..0000000 --- a/deploy_ed25519 +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN OPENSSH PRIVATE KEY----- -b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW -QyNTUxOQAAACBYdHXQVf+0oYwA5YcRlpgqWCuIWgnNmXHi1LpFlI00+wAAAJAEKIh7BCiI -ewAAAAtzc2gtZWQyNTUxOQAAACBYdHXQVf+0oYwA5YcRlpgqWCuIWgnNmXHi1LpFlI00+w -AAAEAO6GnjVnvVtki2igy1aGZ6Jibtas0M7gU2RH1wzNWlaFh0ddBV/7ShjADlhxGWmCpY -K4haCc2ZceLUukWUjTT7AAAADXZmYXljaHVrQHNneDE= ------END OPENSSH PRIVATE KEY----- diff --git a/scripts/package.sh b/scripts/package.sh index 15124a1..c3c96dd 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -9,29 +9,13 @@ prerequisites=$1 if [ "$prerequisites" == "--prep" ]; then echo "Preparing the packager environment" apt update && apt install -y openssh-client + rustup install 1.83.0 rustup install stable-x86_64-unknown-linux-gnu rustup default stable rustup target add x86_64-unknown-linux-musl - mkdir -p /root/.ssh - - echo - echo "docker cp deploy_ed25519 packager:/root/.ssh/id_ed25519" - echo - echo "Run above commands in another terminal" - while true; do - echo -n "." && sleep 1 - if [ -e ~/.ssh/id_ed25519 ]; then - echo && break - fi - done - - chown -R root:root /root/.ssh - chmod 600 /root/.ssh/id_ed25519 - ssh-keyscan -H gitea.detee.cloud > ~/.ssh/known_hosts - echo "Building the occlum fork" - [ -d occlum ] || git clone git@gitea.detee.cloud:SGX/occlum.git + [ -d occlum ] || git clone https://gitea.detee.cloud/general/occlum.git (cd occlum && make submodule) (cd occlum/tools/toolchains/utils_lib && ./build.sh) fi