Compare commits

..

5 Commits
main ... main

Author SHA1 Message Date
dec033fb67
Discord invite widget 2025-02-03 16:55:04 +02:00
6c3c04bb90
eula disclaimer
Signed-off-by: Valentyn Faychuk <valy@detee.ltd>
2025-01-30 23:34:26 +02:00
48803d4e89
switch to detee occlum
Signed-off-by: Valentyn Faychuk <valy@detee.ltd>
2025-01-22 05:23:11 +02:00
17cb3342ad
fix compilation issue for newer versions of occlum 2025-01-21 22:45:31 +02:00
1c4f9abd03
update sgx library to get patch for vulnerabilities 2025-01-21 22:17:57 +02:00
6 changed files with 28 additions and 10 deletions

2
Cargo.lock generated

@ -1572,7 +1572,7 @@ dependencies = [
[[package]]
name = "detee-sgx"
version = "0.1.0"
source = "git+https://gitea.detee.cloud/general/detee-sgx#f7eaed1392ae79ecc1105a50d919026f016a4e78"
source = "git+https://gitea.detee.cloud/general/detee-sgx?branch=dthc#8ced0efcbac57f118b202785c783f2a7d39bf700"
dependencies = [
"aes-gcm",
"hex",

@ -33,7 +33,7 @@ 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"] }
detee-sgx = { git = "https://gitea.detee.cloud/general/detee-sgx", branch = "dthc", features = ["tonic", "occlum", "sealing"] }
[build-dependencies]
tonic-build = "0.12"

@ -1,5 +1,24 @@
# Welcome to the HACKER CHALLENGE
> [!WARNING]
>
> Hacker challenge is licensed under [GPLv2](./LICENSE).\
> To participate in the Hacker Challenge, you must agree with following:
>
> - I acknowledge that I will not be able to recover any cryptocurrencies that I
> send to the Hacker Challenge wallet, and I am relinquishing ownership rights
> to any cryptocurrencies sent to the Hacker Challenge wallet.
> - I acknowledge that the tokens minted by the Hacker Challenge have no inherent
> value, and that these tokens have the sole purpose of testing the security of
> the challenge.
> - I have read the [EULA](https://detee.ltd/hacker-challenge-eula) and I accept
> all terms.
#### Join our Discord if you have questions:
[![Discord](https://img.shields.io/discord/1315810972476379166?color=%235865F2&label=discord&style=for-the-badge)](https://discord.gg/bbWJxftNWy)
## Building and packaging the challenge
The host can be without SGX support.
@ -8,7 +27,10 @@ Do the following steps to build the challenge:
```bash
# Notice that there is no SGX device mounted, run inside rewrite directory
docker run --rm --name packager -it -v .:/root/rewrite occlum/occlum:latest-ubuntu20.04
docker run --rm --name packager -it -v .:/root/rewrite detee/occlum:0.30.1-ubuntu20.04
# If you are running the packager on Mac, don't forget to set the VMM to QEMU (Legacy),
# and run the following command once you are inside the container
ln -s /usr/local/occlum/bin/x86_64-linux-musl-ar /usr/local/occlum/bin/musl-ar
# Inside the docker container run package.sh and follow its instructions
cd /root/rewrite && ./scripts/package.sh --prep
exit # Feel free to exit the container

@ -1,4 +1,4 @@
FROM occlum/occlum:latest-ubuntu20.04 AS build
FROM detee/occlum:0.30.1-ubuntu20.04 AS build
WORKDIR /
RUN mkdir sgx_libs &&\

@ -9,15 +9,10 @@ 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 1.84.0
rustup install stable-x86_64-unknown-linux-gnu
rustup default stable
rustup target add x86_64-unknown-linux-musl
echo "Building the occlum fork"
[ -d occlum ] || git clone https://gitea.detee.cloud/general/occlum.git
(cd occlum && make submodule)
(cd occlum/tools/toolchains/utils_lib && ./build.sh)
fi
if [ -n "$TEST" ]; then

@ -48,6 +48,7 @@ impl SolClient {
}
pub async fn mint(&self, recipient: &str) -> Result<String, Box<dyn std::error::Error>> {
// TODO: add the priority fee for the case when the solana network is congested
use std::str::FromStr;
let recipient = solana_sdk::pubkey::Pubkey::from_str(recipient)?;
let associated_token_address = self.create_token_account(&recipient).await?;