hacker-challenge-sgx-general/rewrite
Valentyn Faychuk 21ea84a747 refactoring
2024-10-06 19:23:54 +03:00
..
.cargo fix compilation and runtime 2024-10-06 15:34:02 +03:00
docker refactoring 2024-10-06 19:23:54 +03:00
mint_sol refactoring 2024-10-06 19:23:54 +03:00
proto added skeleton for Solana integration 2024-09-28 20:09:05 +03:00
scripts refactoring 2024-10-06 19:23:54 +03:00
src package the challenge within enclave 2024-10-06 14:19:01 +03:00
.gitignore refactoring 2024-10-06 19:23:54 +03:00
build.rs migrate hacker challenge on ratls 2024-10-06 13:28:18 +03:00
Cargo.lock migrate hacker challenge on ratls 2024-10-06 13:28:18 +03:00
Cargo.toml migrate hacker challenge on ratls 2024-10-06 13:28:18 +03:00
README.md fix compilation and runtime 2024-10-06 15:34:02 +03:00
rustfmt.toml migrate hacker challenge on ratls 2024-10-06 13:28:18 +03:00

Welcome to the HACKER CHALLENGE

Building and packaging the challenge

The host can be without SGX support. To build and package the challenge you will need the docker environment. Do the following steps to build the challenge:

# Notice that there is no SGX device mounted
docker run --rm --name packager -it -v /path/to/rewrite:/root/rewrite occlum/occlum:latest-ubuntu20.04
# Inside the docker container do env preparation to build the image
rustup install stable-x86_64-unknown-linux-gnu
rustup default stable
rustup target add x86_64-unknown-linux-musl

mkdir -p /root/.ssh

# Outside the container copy the ssh keys to the container to download occlum-ratls dependency
docker cp ~/.ssh/config packager:/root/.ssh/config
docker cp ~/.ssh/gitea_ed25519 packager:/root/.ssh/gitea_ed25519

apt update && apt install openssh-client
ssh-keyscan -H gitea.detee.cloud >> ~/.ssh/known_hosts
chown -R root:root /root/.ssh
chmod 600 /root/.ssh/gitea_ed25519

cd /root/rewrite && ./scripts/package.sh
# Feel free to exit the container once the challenge was packaged
exit

Testing the challenge

To test the challenge you will need the SGX support.

Contributing to the challenge

Don't forget to run cargo clippy and cargo fmt before submitting a PR.