Giter Site home page Giter Site logo

stjordanis / enigma-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scrtlabs/enigma-core-deprecated

0.0 3.0 0.0 3.42 MB

Enigma Core library. The domain: Trusted and Untrusted App in Rust.

Home Page: https://enigma.co/protocol

License: Other

Dockerfile 0.18% Makefile 4.20% Rust 95.27% Python 0.34%

enigma-core's Introduction

Enigma Core library

Service Master Develop
CI Badge

Pure Rust Enclave && Untrusted in Rust. Core is part of the Enigma node software stack. The Core component as it's name suggests is responsible for the core operations. The core includes Remote Attestation (SGX SDK), Cryptography and the Ethereum EVM.

Getting Started (With the Enigma Docker)

Prerequisites

Build and Compile

  • build the enigma docker image
 cd /some/path/enigma-core/dockerfile
 docker build -t enigma_core .

The output should look like that:

Sending build context to Docker daemon  2.048kB
Step 1/7 : FROM baiduxlab/sgx-rust:1.0.0
 ---> 44a7928943e4
Step 2/7 : MAINTAINER enigmampc
 ---> Using cache
 ---> 2a1b994a20f4
Step 3/7 : WORKDIR /root
 ---> Using cache
 ---> 33fc66f979b8
Step 4/7 : RUN rm -rf /root/sgx
 ---> Using cache
 ---> da313d0a4471
Step 5/7 : RUN git clone https://github.com/baidu/rust-sgx-sdk.git sgx -b v1.0.0
 ---> Using cache
 ---> 704631bc2d68
Step 6/7 : RUN apt-get install -y libzmq3-dev
 ---> Using cache
 ---> 141b17bb1564
Step 7/7 : RUN echo '/opt/intel/sgxpsw/aesm/aesm_service &' >> /root/.bashrc
 ---> Using cache
 ---> cd6787969fd1
Successfully built cd6787969fd1
  • run docker:
docker run -v /some/path/enigma-core/:/root/enigma-core -ti -p 5552:5552 --device /dev/isgx enigma_core
  • build the project
cd enigma-core/enigma-core
make 

If the following error ocures then this is an open issuen that will be solved.

error[E0463]: can't find crate for `std`
  --> /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/xargo/sgx_tunittest/../../sgx_tunittest/src/lib.rs:88:1
   |
88 | extern crate sgx_tstd as std;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `sgx_tunittest`.

check out Troubleshooting and then make clean && make

Run the tests (inside Docker)

  • Build the project
make
cd app/

Run the tests (no std)

cargo test

Run the test (with std)

cargo test -- --nocapture

Run the project

cd root/enigma-core/enigma-core/bin
./app

Simulation Mode

If you want to run this in a computer that doesn't support SGX you can run both enigma-core and surface in simulation mode.
To do this, run surface with --simulation, then fire up the docker and run:

$ cd enigma-core
$ make full-clean
$ export SGX_MODE=SW
$ make # Here you can add JOBS=N to pass on to cargo the number of jobs to run simultaneously.

Principal Node

Principal Node README.

TBD

Installing

TBD

Deployment

Built With

TBD

Contributing

The master branch always contain the latest release, develop branch is used for continuous developing
Tags will be used to signify releases.

Pull Request

Every new feature or a bug fix will be presented in a pull request while it's a work in progress under the correct label.
When finished change the label to 3 - Ready for reviewing, every pull request is required to pass a code review from at least 1 member before merging.

Issues

Please use the templates accordingly.

Versioning

TBD

Troubleshooting

  • Error while building with make
error[E0463]: can't find crate for `std`
  --> /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/xargo/sgx_tunittest/../../sgx_tunittest/src/lib.rs:88:1
  • Temp Solution:
rm -rf /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/xargo/

Authors

License

TBD

enigma-core's People

Contributors

elichai avatar isan-rivkin avatar lacabra avatar moriaab avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.